[libre-riscv-dev] store computation unit
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Sun Jun 9 01:23:05 BST 2019
On Sun, Jun 9, 2019 at 12:41 AM Mitchalsup <mitchalsup at aol.com> wrote:
> I remember back in 1991 when I was doing this for the first time. IT is hard
> to get you head all the way around the problem <space>. The good news
> is you only need to do it once--then it can be regurgitated almost at will and
> almost instantly. My MDM is in the second book I sent last week. It had to
> deal with AGENs OoO from the get go.
ahhh, the key sentence is, " initialized so that memory reference
instructions are dependent upon all uncompleted
memory reference instructions already in the Execution Window."
that's the key. "don't know == dependency". so yes, all LDs *and*
STs have to have a dependency until AGEN.
i was just about to think, "um what about LDs/STs that have had AGEN
done, and a new LD/ST gets added?" of course you still make the new
LD/ST dependent on the older LD/STs, because it's the new one that has
the unknown address.
so, continuining the parallels:
* the ALU-like LD/ST-capable CU's "request release" signal is now the
direct mirror-equivalent of "AGEN release".
* thus (ignoring the priority picker), we can AND the req_rel signal
with the "readable/writable" (now "loadable / storable"), this gives
the "ENable" signals to put the addresses into the AGEN match
* some of those will generate "clashes", some will not, however the
results will need to be ANDed with the "ENable" vector to determine
which ones can drop dependencies back at the MDM and which can *not*
be dropped. otherwise you could accidentally drop "unknown"
* meanwhile, *only* those signals that (after AGEN clash detection)
did not match may go through to the CU to tell it that it can proceed
to the next phase: actually do the LD/ST read/write to memory.
* i *believe* that we still have to keep the MDM dependency around
until such time as the LD/ST has actually completed (or come back with
a cache miss). the reason being that there may be new instructions
which use the same address.
* only when the LD/ST is actually completed to memory can we drop both
the Reg DM Dep (in the case of LD) *and* the MDM Dep.
* special case: for ST we could have dropped the Reg DM Dep slightly
early, caveat: *not on a cache miss chance!*
> It was only about 10 years later that I realized much of my MDM was, in effect,
> a memory ScoreBoard.
More information about the libre-riscv-dev