[libre-riscv-dev] priority picker
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Tue Mar 17 21:51:57 GMT 2020
i just created something called "MultiPriorityPicker" which is quite cute.
PriorityPicker is an important "selector" of which (unary-encoded). This is
used to select which Function Unit's output will get access to a given register
file port, for example.
Except... what happens if we have multiple register file ports? (which we do)
Err... who gets access to which port?
that's what the MultiPriorityPicker is for. basically it is an array
of PriorityPickers (see
the PriorityPickers are connected in a cascade, where the output of
each *accumulates* a mask that *prevents* downstream PriorityPickers
from picking already-picked outputs.
in addition, in order to help select a particular "port", an index
(currently in binary, i may change that to unary later) is set - again
in an incrementing cascade - such that whichever Picker's output has a
"1" set it is *guaranteed* to also be allocated a unique "index" as
this "index" can be used to say which "port" on the register file, for
example, that the "Picker" is permitted to write (or read) from.
it also has uses for the LOAD/STORE buffer: namely the
Load/Store-FunctionUnit's have to know which "port" to write into the
(multi-input) LD/ST Buffer (aka cache).
all good fun.
More information about the libre-riscv-dev