Skip to content

Improve Handling of RV32E #94

@PhilippvK

Description

@PhilippvK

The handling of the Embedded Extension (Register file size (RFS) = 16) is suboptimal for several reasons:

  • Realibility is degraded. Consider the ADD instruction as an example:
behavior: if(rd >=RFS || rs1 >= RFS || rs2 >= RFS) raise(0, 2); else if (rd != 0) X[rd] = X[rs1] + X[rs2];
# vs.
behavior: if (rd != 0) X[rd] = X[rs1] + X[rs2];
  • Checking constraints and calling raise(...) inside of behavior makes analysing the behavior more difficult.
  • Illegal Instructions (due to register file limitations) which can be solely determined based on the encoding and static architectureal state should not be raised during decoding instead.
  • This adds a lot of redundant code, because we basically have roughly the same checks for almost every (standard) instruction. Declaring it only once for RV32E would be way cleaner

Let's discuss how to handle the embedded extension in a more sophisticated way.

@jopperm @eyck @AtomCrafty @wysiwyng

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions