aboutsummaryrefslogtreecommitdiffstats
path: root/tests/simple/memory.v
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-12 10:37:47 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-12 10:37:47 +0200
commitcad98bcd89cd9747f3ea9e35eed8d9bbedd64d7a (patch)
tree7eb6075523bf2a3e09b29467601444b5319f1899 /tests/simple/memory.v
parent5215723c64037ba1ee7884423aee1b9c307b5850 (diff)
downloadyosys-cad98bcd89cd9747f3ea9e35eed8d9bbedd64d7a.tar.gz
yosys-cad98bcd89cd9747f3ea9e35eed8d9bbedd64d7a.tar.bz2
yosys-cad98bcd89cd9747f3ea9e35eed8d9bbedd64d7a.zip
Added multi-dim memory test (requires iverilog git head)
Diffstat (limited to 'tests/simple/memory.v')
-rw-r--r--tests/simple/memory.v11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/simple/memory.v b/tests/simple/memory.v
index 9fed1bf3b..db06c56d2 100644
--- a/tests/simple/memory.v
+++ b/tests/simple/memory.v
@@ -194,3 +194,14 @@ always @(posedge clk) begin
end
endmodule
+
+// ----------------------------------------------------------
+
+module memtest08(input clk, input [3:0] a, b, c, output reg [3:0] y);
+ reg [3:0] mem [0:15] [0:15];
+ always @(posedge clk) begin
+ y <= mem[a][b];
+ mem[a][b] <= c;
+ end
+endmodule
+