Skip to content

Control and Status Register issues #2

@TheThirdOne

Description

@TheThirdOne

There are a few issues with the control and status register implementation. All of these are solvable, but there is a little awkwardness involved with each.

  • CSRs are only accessible by number in the instruction set. This can be fixed with gratuitous psuedo-ops or defining a new type of register token that can be a number or a name.
  • CSRs can not have read only sections. Many CSRs such as uip have bits which cannot be modified (but change value in hardware). The adding read only stuff should be pretty easy, but also making it so it updates properly is where some awkwardness comes in.
  • RDCYCLE[H], RDTIME[H], RDINSTRET[H] don't exist. RDCYCLE AND RDINSTRET should be easy to implement given the above issue is done. RDTIME is a bit more problematic, because it is not clear if it should always be updating or not. It shouldn't be a big issue though; these should not be commonly used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions