diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-06-20 12:06:58 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2019-06-20 12:06:58 +0200 |
commit | 7f1461d64b3b4db44b627429ca422acfbcbb6809 (patch) | |
tree | 577eadad515a8a0e02c686d1907b60f8c7621210 /tests | |
parent | 3b1e5264d8e333937fa9c06075b092bfd27be317 (diff) | |
parent | 6a6dd5e0575950174e3abde7a13a3e3be73e5299 (diff) | |
download | yosys-7f1461d64b3b4db44b627429ca422acfbcbb6809.tar.gz yosys-7f1461d64b3b4db44b627429ca422acfbcbb6809.tar.bz2 yosys-7f1461d64b3b4db44b627429ca422acfbcbb6809.zip |
Merge branch 'towoe-unpacked_arrays'
Diffstat (limited to 'tests')
-rw-r--r-- | tests/simple/arrays02.sv | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/simple/arrays02.sv b/tests/simple/arrays02.sv new file mode 100644 index 000000000..76c2a7388 --- /dev/null +++ b/tests/simple/arrays02.sv @@ -0,0 +1,16 @@ +module uut_arrays02(clock, we, addr, wr_data, rd_data); + +input clock, we; +input [3:0] addr, wr_data; +output [3:0] rd_data; +reg [3:0] rd_data; + +reg [3:0] memory [16]; + +always @(posedge clock) begin + if (we) + memory[addr] <= wr_data; + rd_data <= memory[addr]; +end + +endmodule |