Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the Smcsrind/Sscsrind extension v1.0 #53

Open
wants to merge 4 commits into
base: pulp-v1
Choose a base branch
from

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
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