diff options
author | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-10-08 14:51:57 +0200 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-10-08 15:44:07 +0200 |
commit | dc8da76282e806e7ffd632af3e6c11d645ff5699 (patch) | |
tree | 4b29e8f1442736a28f4cbe1583cee3d219d461b2 /tests/memories | |
parent | 772b9a108a7370f090790e1887585cfabbf11ac7 (diff) | |
download | yosys-dc8da76282e806e7ffd632af3e6c11d645ff5699.tar.gz yosys-dc8da76282e806e7ffd632af3e6c11d645ff5699.tar.bz2 yosys-dc8da76282e806e7ffd632af3e6c11d645ff5699.zip |
Fix a regression from #3035.
Diffstat (limited to 'tests/memories')
-rw-r--r-- | tests/memories/trans_addr_enable.v | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/memories/trans_addr_enable.v b/tests/memories/trans_addr_enable.v new file mode 100644 index 000000000..f366f41ad --- /dev/null +++ b/tests/memories/trans_addr_enable.v @@ -0,0 +1,21 @@ +// expect-wr-ports 1 +// expect-rd-ports 1 +// expect-rd-clk \clk + +module top(input clk, we, rae, input [7:0] addr, wd, output [7:0] rd); + +reg [7:0] mem[0:255]; + +reg [7:0] rra; + +always @(posedge clk) begin + if (we) + mem[addr] <= wd; + + if (rae) + rra <= addr; +end + +assign rd = mem[rra]; + +endmodule |