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

mtimecmp is memory-mapped but stimecmp is not #1896

Open
omerguzelelectronicguy opened this issue Mar 10, 2025 · 2 comments
Open

mtimecmp is memory-mapped but stimecmp is not #1896

omerguzelelectronicguy opened this issue Mar 10, 2025 · 2 comments

Comments

@omerguzelelectronicguy
Copy link

In the section of stimecmp, it is not mentioned that stimecmp is memory-mapped. However, mtimecmp is. I wonder the reason for chosing one of them is memory mapped and the other one not. In the riscv aclint spec, there is only mtimecmp but the memory region was 2-times of the Machine-level Software Interrupt Device. I thought stimecmp or the supervisor timer interrupts will be driven from aclint in the future release, just like mtimecmp is. Am I missing a specific reason?

@aswaterman
Copy link
Member

@omerguzelelectronicguy
Copy link
Author

@aswaterman Thanks for the answer. I already read that part of the spec (read again). I understand the reason for adding stimecmp. It is to have timer interrupt for supervisor level without the help of the mahcine mode timer interrupts. I didn't understand why it is a CSR rather than a memory-mapped register like mtimecmp. Is the STIMECMP register placed as CSR because CSR instructions are faster than memory instructions?

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