aboutsummaryrefslogtreecommitdiff
path: root/test/features
diff options
context:
space:
mode:
authorazidar2016-01-17 15:51:43 -0800
committerazidar2016-01-17 15:51:43 -0800
commit6e898b3cecdc3a6f65e58930beb13857c7e36c31 (patch)
tree7eee007bedce502ce597daa5e4bb86590653b76f /test/features
parent0b05d1f7203b186233a843cf8bd3e4c6d4149caa (diff)
Fixed error where memory of size 1 would create an index of size 0. This can be fixed in the future with a pass that removes these memories
Diffstat (limited to 'test/features')
-rw-r--r--test/features/MemSize1.fir11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/features/MemSize1.fir b/test/features/MemSize1.fir
new file mode 100644
index 00000000..a29d3fc5
--- /dev/null
+++ b/test/features/MemSize1.fir
@@ -0,0 +1,11 @@
+; 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
+ output out : UInt<32>
+ input i : UInt<1>
+ cmem m : UInt<32>[1]
+ read mport r = m[i],clk
+ out <= r
+