From edb91f7bc613026f824519786c3ce25740bb21c3 Mon Sep 17 00:00:00 2001 From: Kevin Laeufer Date: Wed, 17 Feb 2021 14:42:45 -0800 Subject: ExpandWhens: ensure that statement names are maintained (#2082) --- src/main/scala/firrtl/passes/ExpandWhens.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main') 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 => -- cgit v1.2.3