aboutsummaryrefslogtreecommitdiff
path: root/test/features
diff options
context:
space:
mode:
authorazidar2015-09-24 14:40:56 -0700
committerazidar2015-09-24 14:40:56 -0700
commitd380b8cfd11d2fe1231774f7b9492aff959bb279 (patch)
tree7e3f04feb7c8c812272f05e8bb69ed5cd0ad1f59 /test/features
parent3482153532211219d72d388d2c854f6b4c13a81e (diff)
Updated conditional read example
Diffstat (limited to 'test/features')
-rw-r--r--test/features/CondRead.fir11
1 files changed, 3 insertions, 8 deletions
diff --git a/test/features/CondRead.fir b/test/features/CondRead.fir
index 8961715e..a9ae27ca 100644
--- a/test/features/CondRead.fir
+++ b/test/features/CondRead.fir
@@ -9,17 +9,12 @@ circuit CondRead :
smem mem : UInt<20>[128],clk
- poison xxx : UInt<20>
+ poison xxx : UInt<6>
wire data : UInt<20>
- data := xxx
- when pred :
- read accessor readport = mem[index]
- data := readport
-
- out := data
+ read accessor readport = mem[mux(pred,index,xxx)]
+ out := readport
-; CHECK: poison index_0 : UInt<6>
; CHECK: read accessor readport = mem[mux(pred,index,index_0)]
; CHECK: Done!