[libre-riscv-dev] partitioned compare and mux
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Fri Feb 7 14:13:46 GMT 2020
On Fri, Feb 7, 2020 at 2:07 PM Michael Nolan <mtnolan2640 at gmail.com> wrote:
> Luke Kenneth Casson Leighton <lkcl at lkcl.net> writes:
> > (sorry, needs to be on list michael, this is major internal design functionality)
> Oops sorry, didn't notice that you CC'd the mailing list, thought it was
> just sent to me.
> > basically if one partition bit is set, that's the condition to ripple the intermediary
> > output up to when the next partition bit is set.
> > it's a chain of crossbars again, basically. partition bit indicates "take from
> > previous crossbar or take from intermediate output".
> The code I have now to ripple up is slightly simpler, because the
> gt_combiner code will only set the MSB of the partition and not any bit
> in the partition if the result is true. It sounds though like you want
> something like this: (assume this is all in one partition)
> 0x8 -> 0xf
> 0x4 -> 0x7
> 0x2 -> 0x3
> 0x1 -> 0x1
yes - i just, ha, committed something, i realised i had a handle on it
(which is unusual for me) and it worked first time. however,
"working"... yes, i have it as a separate additional module...
> > interestingly we actually need that as a function in the vector predicate mask
> > code so if you can create a module for it that would be real handy.
> I can implement it as one module that can be shared, but cost slightly
> more logic in the case of the partitioned comparison, or as two
> diffferent modules, one for the partitioned comparison and one for the
> vector predicate mask.
...yes agreed it's sub-optimal. if you can take out the use of
RippleLSB (which i just added), that will be a useful module for
later, yes, for predicate mask processing.
i will move on to create a PartitionMux class now that i have
something i know will "work" on it, if you can do something less
logic-costly but don't remove RippleLSB itself?
also apologies i didn't update the formal tests but it will basically
be, where there are Assert output == 0, that will now be Assert
output == output and so on in a chain down to the relevant
More information about the libre-riscv-dev