mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
changed always_ff to always in sram1p1rw to fix testbench complaint
This commit is contained in:
parent
38edbde966
commit
713df785d1
@ -66,20 +66,20 @@ module sram1p1rw #(parameter DEPTH=128, WIDTH=256) (
|
|||||||
// READ first SRAM model
|
// READ first SRAM model
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
end else begin
|
end else begin
|
||||||
integer index2;
|
integer i;
|
||||||
if (WIDTH%8 != 0) // handle msbs if not a multiple of 8
|
if (WIDTH%8 != 0) // handle msbs if not a multiple of 8
|
||||||
always_ff @(posedge clk)
|
always @(posedge clk)
|
||||||
if (ce & we & bwe[WIDTH/8])
|
if (ce & we & bwe[WIDTH/8])
|
||||||
RAM[addr][WIDTH-1:WIDTH-WIDTH%8] <= #1 din[WIDTH-1:WIDTH-WIDTH%8];
|
RAM[addr][WIDTH-1:WIDTH-WIDTH%8] <= #1 din[WIDTH-1:WIDTH-WIDTH%8];
|
||||||
|
|
||||||
always_ff @(posedge clk) begin
|
always @(posedge clk) begin
|
||||||
if(ce) begin
|
if(ce) begin
|
||||||
if(we) begin
|
|
||||||
for(index2 = 0; index2 < WIDTH/8; index2++)
|
|
||||||
if(ce & we & bwe[index2])
|
|
||||||
RAM[addr][index2*8 +: 8] <= #1 din[index2*8 +: 8];
|
|
||||||
end
|
|
||||||
dout <= #1 RAM[addr];
|
dout <= #1 RAM[addr];
|
||||||
|
if(we) begin
|
||||||
|
for(i = 0; i < WIDTH/8; i++)
|
||||||
|
if(bwe[i])
|
||||||
|
RAM[addr][i*8 +: 8] <= #1 din[i*8 +: 8];
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user