[Libre-soc-isa] [Bug 1242] SV REMAP: store REMAP indices in 16 64-bit SPRs

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Jan 2 00:49:54 GMT 2024


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

--- Comment #3 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Jacob Lifshay from comment #1)
> if there's separate registers, i think it makes it easier to handle
> out-of-range indexes because svindex can simply do
> 
> for i in range(VL):
>     v = READ_INPUT(i)
>     index[i] = 0 if v >= VL else v

to be clear, this means that out of range indexes cause you to access element 0
instead.
e.g. if the input indexes are [1, 2345, 0, 2]
and you run:
sv.index *input
# svremap something set *in2 to be remapped
sv.mv *out, *in2

then out = [in2[1], in2[0], in2[0], in2[2]]

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


More information about the Libre-SOC-ISA mailing list