Added multi-dim memory test (requires iverilog git head)

This commit is contained in:
Clifford Wolf 2014-08-12 10:37:47 +02:00
parent 5215723c64
commit cad98bcd89
1 changed files with 11 additions and 0 deletions

View File

@ -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