diff options
| author | Kevin Laeufer | 2021-02-17 14:42:45 -0800 |
|---|---|---|
| committer | GitHub | 2021-02-17 22:42:45 +0000 |
| commit | edb91f7bc613026f824519786c3ce25740bb21c3 (patch) | |
| tree | 89efd1667fb31289ba1f04808b8398780026b2b1 /src/main | |
| parent | 5a89fca6090948d0a99c217a09c692e58a20d1df (diff) | |
ExpandWhens: ensure that statement names are maintained (#2082)
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/scala/firrtl/passes/ExpandWhens.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/scala/firrtl/passes/ExpandWhens.scala b/src/main/scala/firrtl/passes/ExpandWhens.scala index 7456d2ab..8fb4e5fb 100644 --- a/src/main/scala/firrtl/passes/ExpandWhens.scala +++ b/src/main/scala/firrtl/passes/ExpandWhens.scala @@ -125,13 +125,13 @@ object ExpandWhens extends Pass { EmptyStmt // For simulation constructs, update simlist with predicated statement and return EmptyStmt case sx: Print => - simlist += (if (weq(p, one)) sx else Print(sx.info, sx.string, sx.args, sx.clk, AND(p, sx.en))) + simlist += (if (weq(p, one)) sx else sx.withEn(AND(p, sx.en))) EmptyStmt case sx: Stop => - simlist += (if (weq(p, one)) sx else Stop(sx.info, sx.ret, sx.clk, AND(p, sx.en))) + simlist += (if (weq(p, one)) sx else sx.withEn(AND(p, sx.en))) EmptyStmt case sx: Verification => - simlist += (if (weq(p, one)) sx else sx.copy(en = AND(p, sx.en))) + simlist += (if (weq(p, one)) sx else sx.withEn(AND(p, sx.en))) EmptyStmt // Expand conditionally, see comments below case sx: Conditionally => |
