[hw] Stall CSR issue until the core response channel can accept the write-back - #120
Open
emiliengnr wants to merge 1 commit into
Open
[hw] Stall CSR issue until the core response channel can accept the write-back#120emiliengnr wants to merge 1 commit into
emiliengnr wants to merge 1 commit into
Conversation
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.
Hello, here is a pull request for a bug I found.
Problem
A
vsetvliwrite-back to the core can be dropped, and the core then hangs with no trap. The retireblock in
spatz_controller.svdrives the response registeri_spatz_rsp_registerfrom twoproducers. The VFU producer checks
rsp_ready_dbefore it raises valid. The CSR producer does not.retire_csrfires only whilespatz_req_validis high, which pops the instruction from theone-entry request buffer that same cycle, and nothing holds the CSR response behind it. A write-back
raised while
rsp_ready_dis low is lost. Snitch clearssb_q[rd]only on an accepted response.The scoreboard bit then stays set for the rest of the run and every later instruction naming that
register stalls in fetch.
Fix
Stall a CON op in the request buffer while the response register cannot take an entry, using the
term the file already applies to the execution units:
retire_csrthen fires only on a cycle the channel accepts, and the op retries from the buffer theway a stalled VFU op does.
Bypassis tied to1'b0sorsp_ready_dreflects the register fullflags and not the core ready wire straight through. Every build already sets
RegisterRsp, so noconfiguration changes.