[libre-riscv-dev] [Bug 216] LOAD STORE buffer needed

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Apr 19 10:51:06 BST 2020


--- Comment #20 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
the other thing, an aspect of the memory hazard and addr matching matrices:

* loads are separated completely from stores
* stores likewise
* atomic memory operations likewise (by marking them as both LD *and* ST)
* the *batch* order is what is preserved
* only one atomic ever gets sent through (batch of QTY 1).
* due to the expansion of the last 4 bits into a bitmap as part of addr_match,
no operations in any one "batch" will have overlapping bytes.  ever.

therefore there is no need - at all - to preserve "order" in any way shape or
form (hence why i said that we do not need a "queue" per se, we need more a L0

(this wording - L0 cache/buffer - came out of the discussion on comp.arch with
Ivan. 8 entries is likely to be sufficient for us)

to emphasise:

* *at no time* will the DMs put out a mixed batch of LDs, STs or Atomics.
* acknowledging, clearing and completing each batch before moving onto the next
is absolutely critical.
* except for IO and Atomics (which will only be sent down one at a time anyway)
the order of LDs (or STs) can be entirely arbitrary.

also we can get away with full IO memory order preservation by treating them as
"Atomic".  this will result in them only being sent one at a time, in strict

if the exact same dependency system were used at the L2 layer we could do full
SMP TSO with no difficulty.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-riscv-dev mailing list