mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Modified the cache's sram model so if it used to synthesize flip flops it terminates the read critical path at the address's input rather than the output read data.
This commit is contained in:
parent
8a51fe76c1
commit
76bba541a7
8
wally-pipelined/src/cache/sram1rw.sv
vendored
8
wally-pipelined/src/cache/sram1rw.sv
vendored
@ -14,13 +14,19 @@ module sram1rw #(parameter DEPTH=128, WIDTH=256) (
|
|||||||
);
|
);
|
||||||
|
|
||||||
logic [WIDTH-1:0][DEPTH-1:0] StoredData;
|
logic [WIDTH-1:0][DEPTH-1:0] StoredData;
|
||||||
|
logic [$clog2(WIDTH)-1:0] AddrD;
|
||||||
|
|
||||||
|
|
||||||
always_ff @(posedge clk) begin
|
always_ff @(posedge clk) begin
|
||||||
ReadData <= StoredData[Addr];
|
AddrD <= Addr;
|
||||||
if (WriteEnable) begin
|
if (WriteEnable) begin
|
||||||
StoredData[Addr] <= #1 WriteData;
|
StoredData[Addr] <= #1 WriteData;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
assign ReadData = StoredData[AddrD];
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
/* verilator lint_on ASSIGNDLY */
|
/* verilator lint_on ASSIGNDLY */
|
||||||
|
Loading…
Reference in New Issue
Block a user