-
Notifications
You must be signed in to change notification settings - Fork 53
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 for issue #745 #775
Fix for issue #745 #775
Conversation
…y logic into the FSM. SEC clean. Signed-off-by: Oystein Knauserud <[email protected]>
…ld get the wrong debug_cause. This would happen if a synchronous debug reason was in WB at the same time, the taken NMI/interrupt would kill WB but that was not reflected in the debug cause. Signed-off-by: Oystein Knauserud <[email protected]>
…pt + single step. SEC clean if an ebreak with dcsr.ebreakm is not flagged as an exception. Bugfix for not flagging ebreak as exception if dcsr.ebreakm is set will come in a separate PR. Signed-off-by: Oystein Knauserud <[email protected]>
…eted). Signed-off-by: Oystein Knauserud <[email protected]>
rtl/cv32e40x_controller_fsm.sv
Outdated
@@ -493,6 +496,8 @@ module cv32e40x_controller_fsm import cv32e40x_pkg::*; | |||
assign sync_debug_allowed = !xif_in_wb; | |||
|
|||
// Debug pending for any other synchronous reason than single step | |||
// Note that the WB stage may be killed for interrupts and NMIs, thus invalidating the instruction causing the sync debug entry. | |||
// Exception triggers to not set pending_sync_debug, as they need to take the single step path through the FSM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to -> do
"as they need to take the single step path through the FSM": Why? (Add the reasoningnear line 1046; there are comments there, but they don't give me a high level reason why exception triggers are special)
…ingle step debug entry in the controller FSM. Signed-off-by: Oystein Knauserud <[email protected]>
Merging in spite of failing ECA check as Øystein Knauserud is actually covered by the requested legal agreement. |
Refactored debug_cause decision.
1: Removed large ternary debug_cause assignment, replaced by priority between synchronous debug causes only.
2: Moved most priority logic into FSM, setting debug_cause_n whenever ctrl_fsm_ns == DEBUG_TAKEN.