[Libre-soc-isa] [Bug 908] indexed remap needs defined behavior for out-of-bounds indexes

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Aug 16 08:01:22 BST 2022


https://bugs.libre-soc.org/show_bug.cgi?id=908

--- Comment #4 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #3)
> the (In reply to Jacob Lifshay from comment #2)
> > (In reply to Luke Kenneth Casson Leighton from comment #1)
> 
> > you don't have to do the comparisons in instruction issue...
> 
> then that forces a Hazard Dependency which is exactly what is to be
> avoided.
> 
> > for reads, they can be done in the alu or register read or operand
> > forwarding stages, 
> 
> no chance.
> 
> i already said that that goes into a Shadow Cancellation
> Matrix

Trying to use shadow cancellation at all for predicting the shuffle or
predicate for dynamic shuffles is imho a bad idea, they're dynamic specifically
because they're likely change all the time. The huge number of pipeline flushes
caused by mispredictions would kill performance (think 10x as slow).

The solution is to instead have the output be always produced, and if that
predicate bit is zero, mux in the old output element. This is how predication
normally works on GPUs or CPUs (with the optimization of using the register
write-enable to do the muxing for some microarchitectures).

Likewise for inputs, the dynamic shuffle waits till all input elements are
available, and only then, reads them based on the indexes. if there's an
out-of-bound input, all you need is to replace whatever junk you read with a
zero, you don't need to respect dependencies for that since it'll just be
zeroed.

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


More information about the Libre-SOC-ISA mailing list