aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorazidar2016-01-23 16:11:40 -0800
committerazidar2016-01-23 16:11:40 -0800
commit4426f118831a95869adf5e55bbff99c1951ac0ed (patch)
tree365a4c6fa8b7174ca60d97a15a6bc6d92248c2a1 /test
parentbc8a54c292f5e9d8a61571cbc814950ef2927842 (diff)
Fixed bug where the write mask wasn't being generated correctly
Diffstat (limited to 'test')
-rw-r--r--test/chirrtl/mask-bug.fir20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/chirrtl/mask-bug.fir b/test/chirrtl/mask-bug.fir
new file mode 100644
index 00000000..b580c075
--- /dev/null
+++ b/test/chirrtl/mask-bug.fir
@@ -0,0 +1,20 @@
+; RUN: firrtl -i %s -o %s.v -X verilog -p c 2>&1 | tee %s.out | FileCheck %s
+; CHECK: Done!
+circuit top :
+ module top :
+ input clk : Clock
+ wire p : UInt
+ wire q : UInt
+ cmem m : {a:UInt<4>,b:{c: UInt<4>,d:UInt<4>}}[10]
+ p <= UInt(1)
+ q <= UInt(1)
+ wire x : {a:UInt<4>,b:{c: UInt<4>,d:UInt<4>}}
+ x.a <= UInt(1)
+ x.b.c <= UInt(1)
+ x.b.d <= UInt(1)
+ when p :
+ write mport a = m[UInt(3)],clk
+ when q :
+ a <- x
+
+