aboutsummaryrefslogtreecommitdiff
path: root/test/passes/expand-whens/reg-wdoc.fir
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes/expand-whens/reg-wdoc.fir')
-rw-r--r--test/passes/expand-whens/reg-wdoc.fir20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/passes/expand-whens/reg-wdoc.fir b/test/passes/expand-whens/reg-wdoc.fir
new file mode 100644
index 00000000..ad2089c2
--- /dev/null
+++ b/test/passes/expand-whens/reg-wdoc.fir
@@ -0,0 +1,20 @@
+; RUN: firrtl -i %s -o %s.flo -X flo -p c | tee %s.out | FileCheck %s
+circuit top :
+ module top :
+ wire p : UInt
+ when p :
+ reg r : UInt
+ on-reset r := UInt(10)
+ r := UInt(20)
+
+; CHECK: Expand Whens
+
+; CHECK: circuit top :
+; CHECK: module top :
+; CHECK: wire p : UInt
+; CHECK: reg r : UInt
+; CHECK: p := UInt(1)
+; CHECK: r := mux(reset, UInt(10), UInt(20))
+
+; CHECK: Finished Expand Whens
+