[hardware] 🐛 Fix vrgather deadlock on staggered lane handshakes#480
Open
emiliengnr wants to merge 1 commit into
Open
[hardware] 🐛 Fix vrgather deadlock on staggered lane handshakes#480emiliengnr 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
The mask unit issues each
vrgather/vrgatherei16index request as a broadcast toall lanes and pops it from the request FIFO once every lane has handshaked it. The
per-lane mask that records which lanes already took the current request is written
wrong on two counts:
masku_vrgat_req_ready_i[lane]alone, which is the lane spill's"has room" signal and is high even when no valid request is being offered, so it
can mask a lane that never actually handshaked; and
The lanes handshake several cycles apart (their MaskB command counters drift), so the
mask unit can re-offer the same un-popped head to a lane that already accepted it.
That lane double-accepts, its MaskB counter desyncs from the other lane, the
"all lanes acked in one cycle" pop condition never lines up, the request FIFO fills,
index generation stalls, and the vrgather deadlocks. Only reset recovers.
Fix
Latch each lane's real handshake (
valid && ready) and hold the mask sticky until thewhole broadcast request pops, then release it for the next request.
Changelog
Fixed
Checklist