diff options
| author | jackbackrack | 2015-04-13 18:24:37 -0700 |
|---|---|---|
| committer | jackbackrack | 2015-04-13 18:24:37 -0700 |
| commit | e6beb7b3bbb745a7c7fde616bb349df1bdb7b764 (patch) | |
| tree | 392bc8ed6dc497aaa98329133bd135d729426e3d /test/chisel3/RegisterVecShift.fir | |
| parent | c140b1ffbcf7fb5b2bb05e93388b2c79f2ddf9f9 (diff) | |
new chisel3 tests
Diffstat (limited to 'test/chisel3/RegisterVecShift.fir')
| -rw-r--r-- | test/chisel3/RegisterVecShift.fir | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/chisel3/RegisterVecShift.fir b/test/chisel3/RegisterVecShift.fir new file mode 100644 index 00000000..772c3d54 --- /dev/null +++ b/test/chisel3/RegisterVecShift.fir @@ -0,0 +1,34 @@ +circuit RegisterVecShift : + module RegisterVecShift : + input load : UInt(1) + output out : UInt(4) + input shift : UInt(1) + input ins : UInt(4)[4] + + reg delays : UInt(4)[4] + when reset : + node T_39 : UInt(4) = UInt(0, 4) + node T_40 : UInt(4) = UInt(0, 4) + node T_41 : UInt(4) = UInt(0, 4) + node T_42 : UInt(4) = UInt(0, 4) + wire T_43 : UInt(4)[4] + T_43.0 := T_39 + T_43.1 := T_40 + T_43.2 := T_41 + T_43.3 := T_42 + delays := T_43 + node T_44 : UInt(3) = UInt(5, 3) + node T_45 : UInt(3) = bit-and(T_44, load) + node T_46 : UInt(3) = UInt(4, 3) + node T_47 : UInt(1) = equal(T_45, T_46) + when T_47 : + delays.0 := ins.0 + delays.1 := ins.1 + delays.2 := ins.2 + delays.3 := ins.3 + else : when shift : + delays.0 := ins.0 + delays.1 := delays.0 + delays.2 := delays.1 + delays.3 := delays.2 + out := delays.3
\ No newline at end of file |
