Skip to content

The link never deadlocks under everyday traffic – only a full-depth burst finds it

best-practice / plausible-pass

SpecAt reset, credits equal DEPTH (16), the receive buffer’s capacity, since nothing is in flight. A full-depth burst is one 16-flit transfer: the receiver returns no credit until all 16 flits land, then returns all 16. (Everyday traffic acks per flit and never nears the limit, so it isn’t modeled.)

link_model is what a model writes with confidence from that spec: credits = DEPTH - 1 reads like the index idiom used everywhere else (buf[DEPTH-1] is the last slot). But credits is a count, not an index. Right now the burst never completes.

Fix link_model so a full-depth burst completes.

Source on GitHub

off_by_one_credit_deadlocks_a_full_depth_burst.sv