forked from Github_Repos/cvw
It was possible for a load/store followed by tlb miss and update to have an exception and still commit its result to memory or register.
This commit is contained in:
parent
7844d3f064
commit
6a8e917e06
18
wally-pipelined/src/cache/dcachefsm.sv
vendored
18
wally-pipelined/src/cache/dcachefsm.sv
vendored
@ -169,7 +169,7 @@ module dcachefsm
|
||||
end
|
||||
|
||||
// Flush dcache to next level of memory
|
||||
else if(FlushDCacheM & ~(ExceptionM | PendingInterruptM)) begin
|
||||
else if(FlushDCacheM) begin
|
||||
NextState = STATE_FLUSH;
|
||||
DCacheStall = 1'b1;
|
||||
SelAdrM = 2'b11;
|
||||
@ -178,7 +178,7 @@ module dcachefsm
|
||||
end
|
||||
|
||||
// amo hit
|
||||
else if(AtomicM[1] & (&MemRWM) & CacheableM & ~(ExceptionM | PendingInterruptM) & CacheHit) begin
|
||||
else if(AtomicM[1] & (&MemRWM) & CacheableM & CacheHit) begin
|
||||
SelAdrM = 2'b10;
|
||||
DCacheStall = 1'b0;
|
||||
|
||||
@ -194,7 +194,7 @@ module dcachefsm
|
||||
end
|
||||
end
|
||||
// read hit valid cached
|
||||
else if(MemRWM[1] & CacheableM & ~(ExceptionM | PendingInterruptM) & CacheHit) begin
|
||||
else if(MemRWM[1] & CacheableM & CacheHit) begin
|
||||
DCacheStall = 1'b0;
|
||||
LRUWriteEn = 1'b1;
|
||||
|
||||
@ -207,7 +207,7 @@ module dcachefsm
|
||||
end
|
||||
end
|
||||
// write hit valid cached
|
||||
else if (MemRWM[0] & CacheableM & ~(ExceptionM | PendingInterruptM) & CacheHit) begin
|
||||
else if (MemRWM[0] & CacheableM & CacheHit) begin
|
||||
SelAdrM = 2'b10;
|
||||
DCacheStall = 1'b0;
|
||||
SRAMWordWriteEnableM = 1'b1;
|
||||
@ -223,29 +223,25 @@ module dcachefsm
|
||||
end
|
||||
end
|
||||
// read or write miss valid cached
|
||||
else if((|MemRWM) & CacheableM & ~(ExceptionM | PendingInterruptM) & ~CacheHit) begin
|
||||
else if((|MemRWM) & CacheableM & ~CacheHit) begin
|
||||
NextState = STATE_MISS_FETCH_WDV;
|
||||
CntReset = 1'b1;
|
||||
DCacheStall = 1'b1;
|
||||
end
|
||||
// uncached write
|
||||
else if(MemRWM[0] & ~CacheableM & ~(ExceptionM | PendingInterruptM)) begin
|
||||
else if(MemRWM[0] & ~CacheableM) begin
|
||||
NextState = STATE_UNCACHED_WRITE;
|
||||
CntReset = 1'b1;
|
||||
DCacheStall = 1'b1;
|
||||
AHBWrite = 1'b1;
|
||||
end
|
||||
// uncached read
|
||||
else if(MemRWM[1] & ~CacheableM & ~(ExceptionM | PendingInterruptM)) begin
|
||||
else if(MemRWM[1] & ~CacheableM) begin
|
||||
NextState = STATE_UNCACHED_READ;
|
||||
CntReset = 1'b1;
|
||||
DCacheStall = 1'b1;
|
||||
AHBRead = 1'b1;
|
||||
end
|
||||
// fault
|
||||
else if(AnyCPUReqM & (ExceptionM | PendingInterruptM)) begin
|
||||
NextState = STATE_READY;
|
||||
end
|
||||
else NextState = STATE_READY;
|
||||
end
|
||||
|
||||
|
@ -198,7 +198,9 @@ module lsu
|
||||
assign SelReplayCPURequest = (NextState == STATE_T0_REPLAY) | (NextState == STATE_T0_FAULT_REPLAY);
|
||||
assign SelHPTW = (CurrState == STATE_T3_DTLB_MISS) | (CurrState == STATE_T4_ITLB_MISS) |
|
||||
(CurrState == STATE_T5_ITLB_MISS) | (CurrState == STATE_T7_DITLB_MISS);
|
||||
assign IgnoreRequest = CurrState == STATE_T0_READY & (ITLBMissF | DTLBMissM);
|
||||
assign IgnoreRequest = (CurrState == STATE_T0_READY & (ITLBMissF | DTLBMissM | ExceptionM | PendingInterruptM)) |
|
||||
((CurrState == STATE_T0_REPLAY | CurrState == STATE_T0_FAULT_REPLAY)
|
||||
& (ExceptionM | PendingInterruptM));
|
||||
|
||||
assign WalkerInstrPageFaultF = WalkerInstrPageFaultRaw | CurrState == STATE_T0_FAULT_REPLAY;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user