fix: Error handler valid/ready protocol violations#93
Draft
DanielKellerM wants to merge 1 commit intopulp-platform:develfrom
Draft
fix: Error handler valid/ready protocol violations#93DanielKellerM wants to merge 1 commit intopulp-platform:develfrom
DanielKellerM wants to merge 1 commit intopulp-platform:develfrom
Conversation
Guard FSM state transitions on rsp_ready_i so rsp_valid_o is not deasserted before the handshake completes. Add missing eh_valid_i check in WAIT_LAST_W to prevent sampling garbage eh_i data.
There was a problem hiding this comment.
Pull request overview
Fixes the iDMA backend error-handler FSM to comply with valid/ready handshake semantics by preventing premature rsp_valid_o deassertion and avoiding sampling eh_i when eh_valid_i is low.
Changes:
- Gate error-state transitions in
IDLEonrsp_ready_iso the FSM only leavesIDLEafter the response handshake completes. - Add missing
eh_valid_iguard inWAIT_LAST_W, matching the existingWAITbehavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
rsp_ready_isorsp_valid_ois not deasserted before the handshake completeseh_valid_icheck inWAIT_LAST_Wto prevent sampling garbageeh_idata (copy-paste omission fromWAITstate)Detailed
Bug 1: When a write error occurs and the downstream consumer back-pressures (
rsp_ready_i=0), the old FSM unconditionally transitions out ofIDLE. On the next cycle, the defaults kick in andrsp_valid_odrops to0even though the handshake never completed. That's a valid/ready protocol violation once you assert valid, you can't retract it before ready.Bug 2: In
WAIT_LAST_W,the old code checkedeh_i == CONTINUEwithout first gating oneh_valid_i. So whatever garbage happened to be on theeh_ibus could triggereh_ready_o=1and a state transition, even with no valid request from the error handler frontend.Test plan
simple.txtanderror_simple.txtpass (0 errors)