You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IbexSetExceptionPCOnSpecialReqIfExpected is fired when (I think) it shouldn't.
The firmware does a CSR write to mstatus to (re)enable the interrupts. This triggers a pipeline flush in the core.
An interrupt is asserted at exactly the same time and IbexSetExceptionPCOnSpecialReqIfExpected fails.
So in this context, exception_req_pending is latching if there is an interrupt pending (and enabled) until exception_req_done is asserted.
// Set `expect_exception_pc_set` if exception req needs one and keep it asserted until
// exception req is done
expect_exception_pc_set <= (expect_exception_pc_set | exception_req_needs_pc_set) & ~exception_req_done;
This is asserted if exception_req has been latched and the control units move from a state different from DECODE to the DECODE state. This is true for both FLUSH and i.e. IRQ_TAKEN.
So the antecedent sequence expression is true if an interrupt exception was executed or if there is an interrupt pending (at the correct point in time) and the pipeline is flushed.
Observed Behavior
IbexSetExceptionPCOnSpecialReqIfExpected is fired when (I think) it shouldn't.
The firmware does a CSR write to mstatus to (re)enable the interrupts. This triggers a pipeline flush in the core.
An interrupt is asserted at exactly the same time and IbexSetExceptionPCOnSpecialReqIfExpected fails.
the firing assertion is:
The antecedent sequence expression is exception_req_pending && expect_exception_pc_set && exception_req_done.
Looking one at a time:
where
So in this context, exception_req_pending is latching if there is an interrupt pending (and enabled) until exception_req_done is asserted.
Which is latching exception_req_needs_pc_set:
handle_irq is asserted.
The problem is with exception_req_done.
This is asserted if exception_req has been latched and the control units move from a state different from DECODE to the DECODE state. This is true for both FLUSH and i.e. IRQ_TAKEN.
So the antecedent sequence expression is true if an interrupt exception was executed or if there is an interrupt pending (at the correct point in time) and the pipeline is flushed.
The consequent sequence expression is:
where
but this is not true because the exception (interrupt) is not handled since the pipeline is currently being flushed.
Expected Behavior
I don't think IbexSetExceptionPCOnSpecialReqIfExpected should fire in this scenario.
My Environment
Version of the Ibex source code:
1313104
No changes to the code
The text was updated successfully, but these errors were encountered: