aboutsummaryrefslogtreecommitdiff
path: root/test/chisel3/EnableShiftRegister.fir
diff options
context:
space:
mode:
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