fix: BRAM being written to via read port

This commit is contained in:
Luca 2024-12-29 20:36:55 +01:00
parent 3e3306bca3
commit 09ca6c6bc0
1 changed files with 3 additions and 1 deletions

View File

@ -10,7 +10,7 @@ module xc7_bram #(
input [23:0] in_addr,
input [1:0] in_wren,
);
wire [31:0] porta_out [NUM_BLOCKS-1:0];
wire [31:0] porta_out [0:NUM_BLOCKS-1];
wire [15:0] porta_addr, portb_addr;
assign out_data = porta_out[out_addr[16:11]][15:0];
@ -30,6 +30,8 @@ module xc7_bram #(
.ADDRARDADDR(porta_addr),
.CLKARDCLK (out_clk),
.ENARDEN (1'b1),
.DIADI (32'b0),
.WEA (4'b0),
.ADDRBWRADDR(portb_addr),
.CLKBWRCLK (in_clk),
.ENBWREN (in_addr[16:11] == i),