[Libre-soc-dev] efficient decoding algorithm for variable-length instructions

Luke Kenneth Casson Leighton lkcl at lkcl.net
Thu Nov 26 21:19:47 GMT 2020


On Thu, Nov 26, 2020 at 8:31 PM Luke Kenneth Casson Leighton
<lkcl at lkcl.net> wrote:

> https://libre-soc.org/openpower/opcode_regs_deduped/
>
> of those 8 LDST, i would be very surprised if they could not be
> covered by one single SVPrefix (the one we already developed, the only
> thing to think through is LD/ST-update)

that's what i just started here:
https://git.libre-soc.org/?p=libreriscv.git;a=commitdiff;h=9d03bc824c9a39577c74d8e757d0986e93dc6377

it's more (but less) categories because i had forgotten to add
immediate-categorisation (which has not quite been added in a
unique-ifying way), and started matching the profile names
(LDST-1R-1W-imm) to RISC-V equivalents (S-immediate Type)

this is pretty straightforward yet also immediately highlights that
things like "ldux" are not included... *because they were never in
RISC-V*, and that, consequently, regardless of route, *an SV Prefix
would still have to be created*.

however this cuts literally months off the development cycle, which is
time we cannot afford anyway.

here's what i propose, that we give it until... sunday to go over this
and match up these reg-profiles with "old" SV Prefix formats, and see
if they're still relevant.  if by that time we determine that there's
only say a 20% match and the other 80% are "just never going to work"
i'd say that yes, very reluctantly, we would be forced into a position
of chucking even what little there is that could be hoped to be
salvaged from SV on RISC-V.

sound good?

l.



More information about the Libre-soc-dev mailing list