[libre-riscv-dev] microwatt decoder tables: M-Form and X-Form switched RS and RB

Luke Kenneth Casson Leighton lkcl at lkcl.net
Mon Jun 1 13:20:45 BST 2020

anton, paul, and team, hi,

we noticed that in microwatt decode1.vhdl tables, M-Form has:

* op1 is RA
* op2 is a constant or RB, which is in the *3rd* field (M-Form) position
* op3 is RS, which is in the *second* Form position

where in X-Form it is:

* op1 is RA
* op2 is a constant or RB, where RB is from the *2nd* field
* op3 is RS (or RC), which is in the 3rd position.

so decode1.vhdl has this, for rldcl:

we're going to flip that to:

this will put the shift-rot pipeline "in line" with the arithmetic
(and logical) ones.

it *might* be the case that if you did the same thing, you would be
able to cut at least one pair of 64-bit MUXes from microwatt, because
RS and RB (2nd and 3rd operands) would no longer be
special-case-swapped for any Shift-Rot operations.  i mention it
because microwatt is intended to be tiny.



crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68

More information about the libre-riscv-dev mailing list