Add Load/Store Unit #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "programmerjake/cpu:load_store"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This covers all the logic between the rename/execute/retire circuits and the d-cache, this includes the store queue, store-to-load forwarding, speculatively loading from the cache, managing dependencies between loads/stores, etc.
The d-cache just has to handle running loads/stores of sets of bytes in proper sequence, as well as a separate speculative load interface (which only returns data for cache hits). There's also space in the d-cache interface for reporting writes/flushes caused by i/o devices or other cpu cores, but actually handling those is left for another PR for libre-chip/grant-tracking#20.
It tests by making random sequences of up to 8 loads/stores and running them and randomly causing cancels (within the limits of what the load/store unit was told about if instructions are speculative) and then when all instructions have retired it verifies that the final memory state matches what's expected (which includes both cacheable memory's values as well as the exact sequence of I/O reads/writes). it runs that test sequence 40 times with different random seeds.
I added
ExecuteToUnitInterface::other_units_cant_cause_cancels_beforeto the rename/execute/retire logic to tell units when the only thing that can cancel a µOp is the same unit it's in, this allows more efficient load/store pipelining because the load/store unit doesn't have to wait for a load/store to be fully non-speculative before running it since it can cause globally-visible side-effects which can't happen until the CPU knows it isn't mis-speculated.I also added a flag for uncacheable load/stores to
LoadStoreMOp.Closes: libre-chip/grant-tracking#17
Closes: libre-chip/grant-tracking#18
59970cd316to7038be9268Add Load/Store Unitto WIP: Add Load/Store Unit7038be9268to6e3486bfbb6e3486bfbbtoacecc74ea0acecc74ea0to405ed7b6c5405ed7b6c5to017eff9e97WIP: Add Load/Store Unitto Add Load/Store Unit