-
Notifications
You must be signed in to change notification settings - Fork 231
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
[rtl/core] make FIRQs level-triggered #176
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the CPU fast interrupt requests are now level-triggered and need to stay asserted until explicitly acknowledged by the CPU (by reading/writing specific memory-mapped registers in the IRQ-causing peripheral module) -> to comply with the RISC-V priv. spec; especially the behavior of MIE and MIP CSRs
stnolting
added
enhancement
New feature or request
risc-v compliance
Modification to comply with official RISC-V specs.
labels
Oct 8, 2021
request is cleared by reading or writing control register
- console output edits - procesor_check: test if PMP test fails because of locked PMP entry - fixed minor issue in number of PMP entries evaluation
a debugger halt request will also resume CPU operation after it was send to sleep mode via 'wfi' instruction
a pending WDT interrupt is cleared by resetting the watchdog (or by disabling it)
enable FIRQs only when they are actually relevant for evaluation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
risc-v compliance
Modification to comply with official RISC-V specs.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a makeover of the processor's fast interrupts (FIRQ) interrupt system.
Old Version (Current State)
The current version of the CPU uses an internal interrupt queue to store fast interrupt request from the processor-internal peripherals. Currently, these request are single-shot (high for exactly one cycle) and are stored in the CPU queue until acknowledge by the hardware (before executing the trap handler).
New Version (This PR)
The reworked version uses level-triggered FIRQs that behave like the standard RISC-V interrupt (i.e. the MTIME machine timer interrupt):
mip
(machine interrupt pending) register💡 Goals
Affected peripheral devices
WDT
(FIRQ 0)CFS
(FIRQ 1)UART0
(FIRQ 2, 3)UART1
(FIRQ 4, 5)SPI
(FIRQ 6)TWI
(FIRQ 7)XIRQ
(FIRQ 8)NEOLED
(FIRQ 9)SLINK
(FIRQ 10, 11)mip
bit will remain set until the interrupt request is cleared (clearing and re-enablingmie
bits will not clear any pending IRQs anymore)