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:
Ross Thompson 2021-07-10 22:34:47 -05:00
parent d9fa3af94d
commit 282bde7205

View File

@ -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;