Skip to content

Conversation

emanueleparisi
Copy link

@emanueleparisi emanueleparisi commented Jun 10, 2024

Implement the Smcsrind/Sscsrind standard extension to CVA6. This extension confers two benefits:

  • It provides a means to access an array of registers via CSRs without requiring allocation of large chunks of the limited CSR address space.
  • It enables software to access each of an array of registers by index, without requiring a switch statement with a case for each register.

The current implementation makes the following changes:

  1. Add the appropriate definitions for the CSR_*ISELECT and CSR_*IREG* inside the riscv_pkg.sv.
  2. Defines two handy types (csrind_isel_t and csrind_ireg_t) in ariane_pkg.sv to represent the selection register and the alias registers.
  3. Add three CSRs (miselect, siselect, and vsiselect) in csr_regfile.sv.
  4. Modify the CSR read/write logic in csr_regfile.sv to read and write the added CSRs.

@emanueleparisi
Copy link
Author

Additionally, please find the smcsrind.txt file containing a C source usable to test the implemented extension in cheshire (main branch).

@emanueleparisi emanueleparisi marked this pull request as ready for review June 10, 2024 11:21
@emanueleparisi emanueleparisi requested a review from niwis as a code owner June 10, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant