diff --git a/tests/arch/common/blockram.v b/tests/arch/common/blockram.v index c7e5aca05..09bc77863 100644 --- a/tests/arch/common/blockram.v +++ b/tests/arch/common/blockram.v @@ -45,7 +45,7 @@ module sync_ram_sdp #(parameter DATA_WIDTH=8, ADDRESS_WIDTH=10) endmodule // sync_ram_sdp -module sync_ram_sdp_wwr #(parameter DATA_WIDTH=8, ADDRESS_WIDTH=10, WRITE_SHIFT=1) // wd=16, wa=9 +module sync_ram_sdp_wwr #(parameter DATA_WIDTH=8, ADDRESS_WIDTH=10, SHIFT_VAL=1) // wd=16, wa=9 ( input wire clk_w, clk_r, write_enable, input wire [WORD-1:0] data_in, @@ -54,36 +54,32 @@ module sync_ram_sdp_wwr #(parameter DATA_WIDTH=8, ADDRESS_WIDTH=10, WRITE_SHIFT= output wire [DATA_WIDTH-1:0] data_out ); - localparam ADDRESS_WIDTH_W = ADDRESS_WIDTH-WRITE_SHIFT; + localparam ADDRESS_WIDTH_W = ADDRESS_WIDTH-SHIFT_VAL; localparam BYTE = DATA_WIDTH; - localparam WORD = DATA_WIDTH<>WRITE_SHIFT]; + data_out_r <= memory[address_in_r]; end - wire [WRITE_SHIFT-1:0] inner_address; - assign inner_address = address_in_r[WRITE_SHIFT-1:0]; - genvar i; - generate - for (i=0; i>READ_SHIFT; - assign inner_address = address_in_w[READ_SHIFT-1:0]; + reg [BYTE-1:0] memory [0:DEPTH-1]; always @(posedge clk_w) begin - if (write_enable) - for (i=0; i