[libre-riscv-dev] [Bug 186] Create decoder for SOC

bugzilla-daemon at libre-riscv.org bugzilla-daemon at libre-riscv.org
Mon Feb 24 19:42:06 GMT 2020


--- Comment #8 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Michael Nolan from comment #7)
> Oh no. RLWINM & friends is going to be fun to do with the partitioned
> shifter. Maybe it warrants its own module?

deefinitely.  there is actually a way to "construct" it from *two*

* create an "inversion" (bitwise inversion) of both the mask *and* A-input
* run through the SAME (existing) DynamicPartitionedShifter

this is how you do "right shift"

then, you basically do a hybrid combination of left-shift ORed with
right-shift, where the right-shift part is done (32-B) and the left-shift
part is (B)

however... because of the dynamic partitioning, obviously that's (16-B)
for 16-bit-wide partitions etc. etc.

now, we *could* hypothetically do that as micro-ops, exactly as we discussed
a few days ago:

* put the data first through the left-shifter and store it as a partial result
* put the data next through the left-shifter (after inversion)
* do the OR (and ANDing) operation as a third phase

i am tempted to suggest trying that, first, rather than writing a
"special dedicated RLWINM" operation.

do you want to give that a shot?  see if it's first possible to create a
Dynamic Right-Shifter out of a Dynamic Left-Shifter?

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

More information about the libre-riscv-dev mailing list