aboutsummaryrefslogtreecommitdiff
path: root/test/passes/jacktest/Stack.fir
diff options
context:
space:
mode:
authorazidar2015-07-13 16:22:43 -0700
committerazidar2015-07-14 11:29:55 -0700
commit271e1bf5ed56847c1ce7d50bdb7f1db9ccc5ea55 (patch)
tree8b1cdfcfc97a9710bd1bc5be973578f712cfa253 /test/passes/jacktest/Stack.fir
parent0bfb3618b654a4082cc2780887b3ca32e374f455 (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.fir22
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