diff options
| author | Jack Koenig | 2017-01-10 18:34:13 -0800 |
|---|---|---|
| committer | Jack Koenig | 2017-02-08 18:00:32 -0800 |
| commit | 132b80edee2fb8e730d3b6f5eb5f36051a819525 (patch) | |
| tree | ac5e31aaabe74e991fbb9fbea12178bf5406a5a4 /chiselFrontend/src/main/scala/chisel3/core/When.scala | |
| parent | f902b119069732910ca4b26ab45e0d6392464b3b (diff) | |
Add counter for depth of when scope
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/When.scala')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/core/When.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/When.scala b/chiselFrontend/src/main/scala/chisel3/core/When.scala index 7501ebb1..9b646855 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/When.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/When.scala @@ -54,6 +54,8 @@ final class WhenContext(sourceInfo: SourceInfo, cond: Bool, prevCond: => Bool, b new WhenContext(sourceInfo, prevCond, null, block) pushCommand(WhenBegin(sourceInfo, cond.ref)) + Builder.whenDepth += 1 block + Builder.whenDepth -= 1 pushCommand(WhenEnd(sourceInfo)) } |
