Skip to content

[hardware] 🐛 Fix vrgather deadlock on staggered lane handshakes#480

Open
emiliengnr wants to merge 1 commit into
pulp-platform:mainfrom
emiliengnr:fix/vrgather-staggered-lane-handshake
Open

[hardware] 🐛 Fix vrgather deadlock on staggered lane handshakes#480
emiliengnr wants to merge 1 commit into
pulp-platform:mainfrom
emiliengnr:fix/vrgather-staggered-lane-handshake

Conversation

@emiliengnr

Copy link
Copy Markdown

Hello, here is a pull request for a bug I found.

Problem

The mask unit issues each vrgather/vrgatherei16 index request as a broadcast to
all 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:

  • it keys on 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
  • it is a 1-cycle memory, not held.

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 the
whole broadcast request pops, then release it for the next request.

Changelog

Fixed

  • Fix vrgather deadlock when the lanes accept the broadcast index request on different cycles

Checklist

  • Automated tests pass
  • Changelog updated
  • Code style guideline is observed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant