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

Address translation in MMU #63

Closed
ShravanSubbaraman opened this issue Jul 18, 2018 · 3 comments
Closed

Address translation in MMU #63

ShravanSubbaraman opened this issue Jul 18, 2018 · 3 comments
Assignees

Comments

@ShravanSubbaraman
Copy link

I want to perform address translation using the MMU. Currently my core is running in M mode wherein i don't have the capability to perform the address translation.

What all changes has to be done to get the address translation to work. Like where in the ISA should i change? Are there any changes to the core that i have to do with respect to this?

@zarubaf
Copy link
Contributor

zarubaf commented Jul 18, 2018

First, why would you want to do address translation in machine mode, claryfing your use-case may help me to answer you.
RISC-V does not allow you to translate instruction fetch requests in M mode. You can do translated load/stores though if you set the mprv field in mstatus. The privilege level with which address translation is done is determined by the value in mpp.

https://github.com/pulp-platform/ariane/blob/a006526c6f1b9cab24dc6b39a672036c7f014f46/src/csr_regfile.sv#L463

I suggest you take a closer look at the RISC-V privileged specification.

@ShravanSubbaraman
Copy link
Author

I am not trying to perform the address translation in the M mode. I want to visualize the address translation feature to be working in my MMU. For which i will have to switch modes. Now to do that what are the changes that i have to incorporate?

@zarubaf
Copy link
Contributor

zarubaf commented Jul 19, 2018

That is nothing specific to Ariane and you can figure this out by reading the RISC-V privileged spec. But basically you need to set satp, set mpp to U-mode (which it should be by default after reset) and do an mret. ISA questions like those are better suited for the RISC-V mailing lists.

@zarubaf zarubaf closed this as completed Jul 19, 2018
@zarubaf zarubaf self-assigned this Jul 19, 2018
jzuckerman pushed a commit to sld-columbia/ariane that referenced this issue Sep 12, 2021
Add support for Vivado HLS generated IPs and float interfaces
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