aboutsummaryrefslogtreecommitdiff
path: root/test/passes/jacktest/MemorySearch.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/MemorySearch.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/MemorySearch.fir')
-rw-r--r--test/passes/jacktest/MemorySearch.fir16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/passes/jacktest/MemorySearch.fir b/test/passes/jacktest/MemorySearch.fir
index 59352162..ca530ea2 100644
--- a/test/passes/jacktest/MemorySearch.fir
+++ b/test/passes/jacktest/MemorySearch.fir
@@ -5,10 +5,12 @@ circuit MemorySearch :
input target : UInt<4>
output address : UInt<3>
input en : UInt<1>
+ input clk : Clock
+ input reset : UInt<1>
output done : UInt<1>
- reg index : UInt<3>
- on-reset index := UInt<3>(0)
+ reg index : UInt<3>,clk,reset
+ onreset index := UInt<3>(0)
wire elts : UInt<4>[7]
elts[0] := UInt<4>(0)
elts[1] := UInt<4>(4)
@@ -18,16 +20,16 @@ circuit MemorySearch :
elts[5] := UInt<4>(5)
elts[6] := UInt<4>(13)
infer accessor elt = elts[index]
- node T_35 = bit-not(en)
+ node T_35 = not(en)
node T_36 = eq(elt, target)
node T_37 = eq(index, UInt<3>(7))
- node T_38 = bit-or(T_36, T_37)
- node end = bit-and(T_35, T_38)
+ node T_38 = or(T_36, T_37)
+ node end = and(T_35, T_38)
when en : index := UInt<1>(0)
else :
- node T_39 = bit-not(end)
+ node T_39 = not(end)
when T_39 :
- node T_40 = add-wrap(index, UInt<1>(1))
+ node T_40 = addw(index, UInt<1>(1))
index := T_40
done := end
address := index