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

34-bit memory read/write support? #819

Closed
KotorinMinami opened this issue Dec 9, 2024 · 1 comment
Closed

34-bit memory read/write support? #819

KotorinMinami opened this issue Dec 9, 2024 · 1 comment

Comments

@KotorinMinami
Copy link

The current Sail-RISCV model uses the Sail model from currency_interface in the Sail lib. interface), which only supports 32-bit and 64-bit memory reads and writes.

However, it is mentioned in the RISCV spec that in RV32, the physical memory has 34 bits, so is it possible to include support for 34-bit memory reads and writes?

@Alasdair
Copy link
Collaborator

Alasdair commented Dec 9, 2024

We actually support arbitrary PA types, the requirement is you have to be able to map those types into either 64 or 32 bits. When you instantiate the memory events you provide a pa_bits function that takes whatever physical address type the model has, and converts it to either 64 or 32 bits. For 34 bits, you can just zero-extend up to 64.

I think right now the pa_bits function in the sail-riscv model is just the identity function, but if you change that it should work.

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