mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Fixed the spurious AHB requests to address 0. Somehow by not having a default
(else) in the fsm branch selection for STATE_READY in the d cache it was possible to take an invalid branch through the fsm.
This commit is contained in:
parent
d9fa3af94d
commit
282bde7205
9
wally-pipelined/src/cache/dcache.sv
vendored
9
wally-pipelined/src/cache/dcache.sv
vendored
@ -370,6 +370,7 @@ module dcache
|
||||
|
||||
|
||||
// fsm state regs
|
||||
/* -----\/----- EXCLUDED -----\/-----
|
||||
flopenl #(.TYPE(statetype))
|
||||
FSMReg(.clk(clk),
|
||||
.load(reset),
|
||||
@ -377,6 +378,12 @@ module dcache
|
||||
.val(STATE_READY),
|
||||
.d(NextState),
|
||||
.q(CurrState));
|
||||
-----/\----- EXCLUDED -----/\----- */
|
||||
|
||||
always_ff @(posedge clk, posedge reset)
|
||||
if (reset) CurrState <= #1 STATE_READY;
|
||||
else CurrState <= #1 NextState;
|
||||
|
||||
|
||||
// next state logic and some state ouputs.
|
||||
always_comb begin
|
||||
@ -436,7 +443,9 @@ module dcache
|
||||
else if(|MemRWM & FaultM & ~DTLBMissM) begin
|
||||
NextState = STATE_READY;
|
||||
end
|
||||
else NextState = STATE_READY;
|
||||
end
|
||||
|
||||
STATE_AMO_UPDATE: begin
|
||||
NextState = STATE_AMO_WRITE;
|
||||
SaveSRAMRead = 1'b1;
|
||||
|
Loading…
Reference in New Issue
Block a user