forked from cores/microwatt
dcache: Fix obscure bug and minor cleanups
The obscure bug is that a non-cacheable load with update would never do the update and would never complete the instruction. This is fixed by making state NC_LOAD_WAIT_ACK go to LOAD_UPDATE2 if r1.req.update is set. The slow load forms with update can go to LOAD_UPDATE2 at the end rather than LOAD_UPDATE, thus saving a cycle. Loads with a cache hit need the LOAD_UPDATE state in the third cycle since they are not writing back until the 4th cycle, when the state is LOAD_UPDATE2. Slow loads (cacheable loads that miss and non-cacheable loads) currently go to LOAD_UPDATE in the cycle after they see r1.wb.ack = 1 for the last time, but that cycle is the cycle where they write back, and the following cycle does nothing. Going to LOAD_UPDATE2 in those cases saves a cycle and makes them consistent with the load hit case. The logic in the RELOAD_WAIT_ACK case doesn't need to check r1.req.load = '1' since we only ever use RELOAD_WAIT_ACK for loads. There are also some whitespace fixes and a typo fix. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>jtag-port
parent
1a244d3470
commit
1587d9e6eb
Loading…
Reference in New Issue