From d380b8cfd11d2fe1231774f7b9492aff959bb279 Mon Sep 17 00:00:00 2001 From: azidar Date: Thu, 24 Sep 2015 14:40:56 -0700 Subject: Updated conditional read example --- test/features/CondRead.fir | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'test') 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! -- cgit v1.2.3