aboutsummaryrefslogtreecommitdiff
path: root/test/chisel3/EnableShiftRegister.fir
diff options
context:
space:
mode:
authorjackbackrack2015-04-13 18:24:37 -0700
committerjackbackrack2015-04-13 18:24:37 -0700
commite6beb7b3bbb745a7c7fde616bb349df1bdb7b764 (patch)
tree392bc8ed6dc497aaa98329133bd135d729426e3d /test/chisel3/EnableShiftRegister.fir
parentc140b1ffbcf7fb5b2bb05e93388b2c79f2ddf9f9 (diff)
new chisel3 tests
Diffstat (limited to 'test/chisel3/EnableShiftRegister.fir')
-rw-r--r--test/chisel3/EnableShiftRegister.fir24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/chisel3/EnableShiftRegister.fir b/test/chisel3/EnableShiftRegister.fir
new file mode 100644
index 00000000..aa7d36ae
--- /dev/null
+++ b/test/chisel3/EnableShiftRegister.fir
@@ -0,0 +1,24 @@
+circuit EnableShiftRegister :
+ module EnableShiftRegister :
+ input in : UInt(4)
+ output out : UInt(4)
+ input shift : UInt(1)
+
+ node T_14 : UInt(4) = UInt(0, 4)
+ reg r0 : UInt(4)
+ r0.init := T_14
+ node T_15 : UInt(4) = UInt(0, 4)
+ reg r1 : UInt(4)
+ r1.init := T_15
+ node T_16 : UInt(4) = UInt(0, 4)
+ reg r2 : UInt(4)
+ r2.init := T_16
+ node T_17 : UInt(4) = UInt(0, 4)
+ reg r3 : UInt(4)
+ r3.init := T_17
+ when shift :
+ r0 := in
+ r1 := r0
+ r2 := r1
+ r3 := r2
+ out := r3 \ No newline at end of file