mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Replaced async reset flip flops with sync reset flip flops in cache and bpread.
This commit is contained in:
parent
7d516c65e7
commit
d98baf90a3
@ -49,7 +49,7 @@ module cachereplacementpolicy
|
|||||||
logic LRUWriteEnD;
|
logic LRUWriteEnD;
|
||||||
|
|
||||||
/* verilator lint_off BLKLOOPINIT */
|
/* verilator lint_off BLKLOOPINIT */
|
||||||
always_ff @(posedge clk, posedge reset) begin
|
always_ff @(posedge clk) begin
|
||||||
if (reset) begin
|
if (reset) begin
|
||||||
RAdrD <= '0;
|
RAdrD <= '0;
|
||||||
MemPAdrMD <= '0;
|
MemPAdrMD <= '0;
|
||||||
|
6
wally-pipelined/src/cache/cacheway.sv
vendored
6
wally-pipelined/src/cache/cacheway.sv
vendored
@ -111,7 +111,7 @@ module cacheway #(parameter NUMLINES=512, parameter BLOCKLEN = 256, TAGLEN = 26,
|
|||||||
assign VictimTagWay = SelFlush ? FlushThisWay : VicDirtyWay;
|
assign VictimTagWay = SelFlush ? FlushThisWay : VicDirtyWay;
|
||||||
|
|
||||||
|
|
||||||
always_ff @(posedge clk, posedge reset) begin
|
always_ff @(posedge clk) begin
|
||||||
if (reset)
|
if (reset)
|
||||||
ValidBits <= {NUMLINES{1'b0}};
|
ValidBits <= {NUMLINES{1'b0}};
|
||||||
else if (InvalidateAll)
|
else if (InvalidateAll)
|
||||||
@ -134,14 +134,14 @@ module cacheway #(parameter NUMLINES=512, parameter BLOCKLEN = 256, TAGLEN = 26,
|
|||||||
|
|
||||||
generate
|
generate
|
||||||
if(DIRTY_BITS) begin
|
if(DIRTY_BITS) begin
|
||||||
always_ff @(posedge clk, posedge reset) begin
|
always_ff @(posedge clk) begin
|
||||||
if (reset)
|
if (reset)
|
||||||
DirtyBits <= {NUMLINES{1'b0}};
|
DirtyBits <= {NUMLINES{1'b0}};
|
||||||
else if (SetDirtyD & (WriteEnableD | VDWriteEnableD)) DirtyBits[WAdrD] <= 1'b1;
|
else if (SetDirtyD & (WriteEnableD | VDWriteEnableD)) DirtyBits[WAdrD] <= 1'b1;
|
||||||
else if (ClearDirtyD & (WriteEnableD | VDWriteEnableD)) DirtyBits[WAdrD] <= 1'b0;
|
else if (ClearDirtyD & (WriteEnableD | VDWriteEnableD)) DirtyBits[WAdrD] <= 1'b0;
|
||||||
end
|
end
|
||||||
|
|
||||||
always_ff @(posedge clk, posedge reset) begin
|
always_ff @(posedge clk) begin
|
||||||
SetDirtyD <= SetDirty;
|
SetDirtyD <= SetDirty;
|
||||||
ClearDirtyD <= ClearDirty;
|
ClearDirtyD <= ClearDirty;
|
||||||
end
|
end
|
||||||
|
2
wally-pipelined/src/cache/dcachefsm.sv
vendored
2
wally-pipelined/src/cache/dcachefsm.sv
vendored
@ -144,7 +144,7 @@ module dcachefsm
|
|||||||
assign CntEn = PreCntEn & AHBAck;
|
assign CntEn = PreCntEn & AHBAck;
|
||||||
|
|
||||||
|
|
||||||
always_ff @(posedge clk, posedge reset)
|
always_ff @(posedge clk)
|
||||||
if (reset) CurrState <= #1 STATE_READY;
|
if (reset) CurrState <= #1 STATE_READY;
|
||||||
else CurrState <= #1 NextState;
|
else CurrState <= #1 NextState;
|
||||||
|
|
||||||
|
2
wally-pipelined/src/cache/icachefsm.sv
vendored
2
wally-pipelined/src/cache/icachefsm.sv
vendored
@ -116,7 +116,7 @@ module icachefsm
|
|||||||
logic PreCntEn;
|
logic PreCntEn;
|
||||||
|
|
||||||
// the FSM is always runing, do not stall.
|
// the FSM is always runing, do not stall.
|
||||||
always_ff @(posedge clk, posedge reset)
|
always_ff @(posedge clk)
|
||||||
if (reset) CurrState <= #1 STATE_READY;
|
if (reset) CurrState <= #1 STATE_READY;
|
||||||
else CurrState <= #1 NextState;
|
else CurrState <= #1 NextState;
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ module RASPredictor
|
|||||||
.q(PtrQ));
|
.q(PtrQ));
|
||||||
|
|
||||||
// RAS must be reset.
|
// RAS must be reset.
|
||||||
always_ff @ (posedge clk, posedge reset) begin
|
always_ff @ (posedge clk) begin
|
||||||
if(reset) begin
|
if(reset) begin
|
||||||
for(index=0; index<StackSize; index++)
|
for(index=0; index<StackSize; index++)
|
||||||
memory[index] <= {`XLEN{1'b0}};
|
memory[index] <= {`XLEN{1'b0}};
|
||||||
|
Loading…
Reference in New Issue
Block a user