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

fix(raise_intr): fix raise_intr to allow clearing values in mip. #82

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

NewPaulWalker
Copy link

@NewPaulWalker NewPaulWalker commented Jan 2, 2025

For external and timer interrupts from outside, we choose to let the DUT inform the REF when there is a pending interrupt and trigger it.
For these types of interrupts, we set the corresponding bit in mip to 1 so Spike can trigger the interrupt itself.

Moreover, we cannot modify these bits in mip using the csrrw instruction because the corresponding bit of mip is non-writable.

Therefore, after triggering the interrupt, we should also clear the corresponding bit in mip; otherwise, it will persist in mip indefinitely.

For external and timer interrupts, we choose to let the DUT inform the REF when there is a pending
interrupt and trigger it.
For these types of interrupts, we set the corresponding bit in `mip` to 1 to trigger the interrupt.
Moreover, we cannot modify these bits in `mip` using the `csrrw` instruction.
Therefore, after triggering the interrupt, we should also clear the corresponding bit in `mip`;
otherwise, it will persist in `mip` indefinitely.
@Tang-Haojin Tang-Haojin merged commit 124f1fd into difftest Jan 3, 2025
18 checks passed
@Tang-Haojin Tang-Haojin deleted the fix-raise-intr-1 branch January 3, 2025 03:57
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

Successfully merging this pull request may close these issues.

2 participants