This PR fixes a bug that could happen when a WB cache request gets killed while the _cachectrl is in the WAIT_REFILL_VALID state. When receiving the kill request, the _cachectrl went immediately back to the IDLE state. However, the AXI request was already issued and could be associated to the following cache request, effectively sending back the wrong data to the CPU. By not going immediately back to IDLE, the cache waits for the AXI response to arrive before going back to IDLE. Since this case is quite rare, the bottleneck introduced by not going immediately back to IDLE is minimal. The bug was found while running the WB TB. In this screenshot, the first request for addresss 0x10D1C gets killed and the cache_ctrl starts working on the next requets.
Later, the request for address 0x1D72 receives an AXI bypass response which is not the one it was supposed to receive but associates it with the current cache request:
Which causes the bug:
This PR fixes a bug that could happen when a WB cache request gets killed while the _cachectrl is in the WAIT_REFILL_VALID state. When receiving the kill request, the _cachectrl went immediately back to the IDLE state. However, the AXI request was already issued and could be associated to the following cache request, effectively sending back the wrong data to the CPU. By not going immediately back to IDLE, the cache waits for the AXI response to arrive before going back to IDLE. Since this case is quite rare, the bottleneck introduced by not going immediately back to IDLE is minimal. The bug was found while running the WB TB. In this screenshot, the first request for addresss 0x10D1C gets killed and the cache_ctrl starts working on the next requets. Later, the request for address 0x1D72 receives an AXI bypass response which is not the one it was supposed to receive but associates it with the current cache request: Which causes the bug: