aboutsummaryrefslogtreecommitdiff
path: root/test/passes/expand-whens
diff options
context:
space:
mode:
authorazidar2015-05-13 10:42:36 -0700
committerazidar2015-05-13 10:42:36 -0700
commit2cf26ba655e59937f5a52aa50db2d97538d1fdde (patch)
treed64a9843993a94978a1a671ac032a5b2f665b875 /test/passes/expand-whens
parent791334cced721789fad180b6479cfa783963032f (diff)
Updated Spec. Added scoped-reg which exposes on-reset bug. Fixed lowering bug
Diffstat (limited to 'test/passes/expand-whens')
-rw-r--r--test/passes/expand-whens/scoped-reg.fir12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/passes/expand-whens/scoped-reg.fir b/test/passes/expand-whens/scoped-reg.fir
new file mode 100644
index 00000000..20c91386
--- /dev/null
+++ b/test/passes/expand-whens/scoped-reg.fir
@@ -0,0 +1,12 @@
+; RUN: firrtl -i %s -o %s.flo -x abcdefghijk -p c | tee %s.out | FileCheck %s
+; CHECK: Expand Whens
+circuit top :
+ module A :
+ wire p : UInt
+ when p :
+ reg r : UInt
+ on-reset r := UInt(10)
+ r := UInt(20)
+; CHECK: r := Register(mux-uu(reset, UInt(10), UInt(20)), mux-uu(reset, UInt(1), p))
+; CHECK: Finished Expand Whens
+