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

The address of CSR instreth register bug #49

Closed
mvlamar opened this issue Sep 27, 2019 · 2 comments
Closed

The address of CSR instreth register bug #49

mvlamar opened this issue Sep 27, 2019 · 2 comments

Comments

@mvlamar
Copy link

mvlamar commented Sep 27, 2019

Hi,
According to Table 2.2 on page 9 of the manual riscv-privilegied-v1.10, the CSR instreth register has the address 0xC82, ie 3202, not 3201, as defined in the Rars.
Is there any plan to implement time and timeh registers?

[]
Marcus Vinicius

@TheThirdOne
Copy link
Owner

You are absolutely right and I have pushed the fix.

As for time and timeh, there is some discussion of them in #3 and @zacharyselk ended up making a tool to handle a MMIO time register and interrupts.

The gist of why the time CSR is not implemented is that just assigning it from system time seems like it might lead to problems when interactively debugging a program. So I decided to leave it unimplemented at least until I had a few community who might have an opinion on what behavior it should have.

I am certainly open to implementing those CSRs if you think that a direct mapping from system time is a good solution.

@mvlamar
Copy link
Author

mvlamar commented Oct 1, 2019

I agree.

@mvlamar mvlamar closed this as completed Oct 1, 2019
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