3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-08 20:21:25 +00:00
yosys/tests/memories/read_two_mux.v
David Shah 4b49c0201e Merge pull request #1153 from YosysHQ/dave/fix_multi_mux
memory_dff: Fix checking of feedback mux input when more than one mux
2019-07-09 18:46:39 +01:00

16 lines
330 B
Verilog

// expect-wr-ports 1
// expect-rd-ports 1
// expect-no-rd-clk
module top(input clk, input we, re, reset, input [7:0] addr, wdata, output reg [7:0] rdata);
reg [7:0] bram[0:255];
(* keep *) reg dummy;
always @(posedge clk) begin
rdata <= re ? (reset ? 8'b0 : bram[addr]) : rdata;
if (we)
bram[addr] <= wdata;
end
endmodule