[libre-riscv-dev] [Bug 173] dynamic partitioned "shift"

bugzilla-daemon at libre-riscv.org bugzilla-daemon at libre-riscv.org
Thu Feb 13 18:53:23 GMT 2020


http://bugs.libre-riscv.org/show_bug.cgi?id=173

--- Comment #17 from Michael Nolan <mtnolan2640 at gmail.com> ---
> it does... however i think the Switch statement really has to go.  if
> you
> run "proc" "opt" then "show top" on a 64-bit shifter, it's awful.
> the MUX chain is absolutely dreadful: each "switch" statement gets
> turned
> into a "if x == 0b00001 if x == 0b00010 if x == 0b000011"... with the
> results *chained* between each!

oh. 

> * start with ~p0&~p1&~p2&~p3...&~pN, and start with M=0
> * select aNbM and OR that into the output, then increment M by 1
> * take the front of the AND-chain, remove the invert on the FIRST item
>   (~p0 becomes p0)
> * select aNbM and OR that into the output, then increment M by 1 more
> * DROP the front of the AND-chain (p0 on the first iteration)
> * repeat until you get down to a list of only one item, this should
>   be when M=max: drop the invert and select aNbM.
> 
> am i making any sense? :)

sort of, I'll give it a closer look when I work on it tomorrow.

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


More information about the libre-riscv-dev mailing list