diff options
| author | azidar | 2015-07-13 16:22:43 -0700 |
|---|---|---|
| committer | azidar | 2015-07-13 16:22:43 -0700 |
| commit | 9b6d8514a3be860562d8d524fa425c87d1537e8a (patch) | |
| tree | ca46b9703046e23068860b5c5d8d6af01296c000 /test/passes/jacktest/Stack.fir | |
| parent | 1ed6d4a47c92072b12db4b784f239071e4928049 (diff) | |
Added tests for clocks. Added remove scope and special chars passes. Added tests. Made more tests pass
Diffstat (limited to 'test/passes/jacktest/Stack.fir')
| -rw-r--r-- | test/passes/jacktest/Stack.fir | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/test/passes/jacktest/Stack.fir b/test/passes/jacktest/Stack.fir index 4bce2bd4..5bbec6d2 100644 --- a/test/passes/jacktest/Stack.fir +++ b/test/passes/jacktest/Stack.fir @@ -5,31 +5,33 @@ circuit Stack : input push : UInt<1> input pop : UInt<1> input en : UInt<1> + input clk : Clock + input reset : UInt<1> output dataOut : UInt<32> input dataIn : UInt<32> - cmem stack_mem : UInt<32>[16] - reg sp : UInt<5> - on-reset sp := UInt<5>(0) - reg out : UInt<32> - on-reset out := UInt<32>(0) + cmem stack_mem : UInt<32>[16],clk + reg sp : UInt<5>,clk,reset + onreset sp := UInt<5>(0) + reg out : UInt<32>,clk,reset + onreset out := UInt<32>(0) when en : node T_30 = lt(sp, UInt<5>(16)) - node T_31 = bit-and(push, T_30) + node T_31 = and(push, T_30) when T_31 : infer accessor T_32 = stack_mem[sp] T_32 := dataIn - node T_33 = add-wrap(sp, UInt<1>(1)) + node T_33 = addw(sp, UInt<1>(1)) sp := T_33 else : node T_34 = gt(sp, UInt<1>(0)) - node T_35 = bit-and(pop, T_34) + node T_35 = and(pop, T_34) when T_35 : - node T_36 = sub-wrap(sp, UInt<1>(1)) + node T_36 = subw(sp, UInt<1>(1)) sp := T_36 node T_37 = gt(sp, UInt<1>(0)) when T_37 : - node T_38 = sub-wrap(sp, UInt<1>(1)) + node T_38 = subw(sp, UInt<1>(1)) infer accessor T_39 = stack_mem[T_38] out := T_39 dataOut := out |
