[hardware] 🐛 Fix vrgather out-of-range index hang in the mask unit#477
Open
emiliengnr wants to merge 1 commit into
Open
[hardware] 🐛 Fix vrgather out-of-range index hang in the mask unit#477emiliengnr 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
vrgather/vrgatherei16with an index past the end of the source vector mustread 0 for that element (RVV 1.0 §16.4), and the mask unit correctly never requests
vd data for it. But the mask unit's issue gate still waited on
&masku_operand_vd_valid, so the gather never issued, the mask unit spun forever,and the cva6 host stalled on the accelerator handshake until reset.
Minimal reproducer (
NrLanes=2, VLEN=512, so VLMAX = VLEN/SEW = 64 at e8):Fix
Waive the
vd_validwait in the issue gate when the index is out of range(
vrgat_idx_oor_q), forVRGATHER/VRGATHEREI16. The result path alreadysubstitutes 0 for out-of-range elements, so no vd data is needed. Other ops are
unaffected.
Changelog
Fixed
Checklist