[hardware] 🐛 Bar mask-op acceptance while vrgather/vcompress owns MaskB#479
Open
emiliengnr wants to merge 1 commit into
Open
[hardware] 🐛 Bar mask-op acceptance while vrgather/vcompress owns MaskB#479emiliengnr 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 mask-producing compare that keeps its destination (
use_vd_op), e.g.vmsltorvmsleu, reads its oldvdthrough the shared MaskB operand queue.vrgather/vcompressalso borrow MaskB through an ad-hoc path, and the block at theend of the
sequencerprocess rewritesoperand_request[MaskB]/_push[MaskB]unconditionally while
vrgat_state_q == REQUESTING. A mask op accepted in that windowhas its
vdrequest silently overwritten, so the mask unit waits forever for anoperand nobody asked the register file for, and Ara wedges (only reset recovers).
VFU_Nonealready guards against this;VFU_MaskUnitdid not.Stall-detector evidence (
seed19633/seed12524):MSK=1, compare operands arrived(
aluv=11),vdnever did (vdv=00), and the gather FSM is back toIDLE— therequest was lost, not delayed.
Fix
For a
use_vd_opmask op, hold acceptance until the ad-hoc user releases the queue(
vrgat_state_q == IDLE), mirroring the existingVFU_Noneguard. Mask ops that donot read
vdpush nothing on MaskB and are accepted freely.Related / ordering
This guard waits for the gather/compress FSM to return to
IDLE, which is guaranteedby the vrgather-FSM safety exit in #469. Please review/merge this with #469: on its
own against current
mainthe FSM can still stick (the bug #469 fixes), in which casethe guard waits on that pre-existing hang rather than introducing a new one. It is the
VFU_MaskUnitsibling of theVFU_NoneMaskB guard in #475.Changelog
Fixed
Checklist