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

Spike throws exception on PMP CSR access #1046

Closed
Abdulwadoodd opened this issue Jul 15, 2022 · 3 comments
Closed

Spike throws exception on PMP CSR access #1046

Abdulwadoodd opened this issue Jul 15, 2022 · 3 comments

Comments

@Abdulwadoodd
Copy link

Abdulwadoodd commented Jul 15, 2022

For the following PMP CSRs access, SPIKE throws an exception:

  • pmpcfgx where x is [4,15]
  • pmpaddrx where x is [16, 63]

I have written a test where I configure the pmp16cfg entry in TOR mode and hence used pmpcfg4 which in turn uses pmpaddr16 to pmpaddr19. SPIKE throws exceptions on these CSR accesses, unlike SAIL. SAIL is giving the expected results and working fine after these changes has made in sail-riscv.
The test file is attached below and it is run under riscof framework.

pmp-addr_match-tor_mode.txt

@aswaterman
Copy link
Collaborator

Not a bug. The ISA spec says that "implementations may support zero, 16, or 64 PMP CSRs."

The SAIL model was correct both before and after your change. Spike is correct today.

@Abdulwadoodd
Copy link
Author

True, but do we have support for 64 PMP CSRs in Spike?
Apparently, encoding.h file in this repo contains all 64 PMP CSRs but Spike supports only 16 PMP CSRs.

@aswaterman
Copy link
Collaborator

As a matter of courtesy, please don’t submit feature requests as bug reports.

encoding.h is an auto-generated file that doesn’t relate to what spike supports.

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

No branches or pull requests

2 participants