AMBA AXI · Module 17
Missing LAST
Diagnose a burst that never ends because WLAST/RLAST is missing or mis-timed — the two failure modes (LAST never asserts, or asserts on the wrong beat), how a missing LAST hangs the response while a premature LAST truncates the transaction, the beat-count vs. LAST cross-check, and the systematic method to localize it.
A stuck handshake (17.1) hangs because a beat never transfers. A missing or mis-timed LAST hangs for a different reason: the beats transfer fine, but the burst never ends — WLAST (write) or RLAST (read) is the explicit end-of-burst marker, and if it never asserts (or asserts on the wrong beat), the receiver's burst-tracking never closes. A missing WLAST means the slave keeps waiting for "more" write data and never issues the B response; a missing RLAST means the manager never knows the read burst finished. This chapter diagnoses both failure modes — LAST that never comes versus LAST on the wrong beat — explains why each produces its symptom, and gives the decisive cross-check: does the LAST-marked beat coincide with beat LEN?
1. Why LAST Matters and the Two Failure Modes
WLAST/RLAST is the protocol's explicit signal that "this beat is the final one of the burst." A receiver counts beats and uses LAST to know when to stop and complete the transaction. There are two ways it goes wrong: LAST never asserts (the burst-tracking never closes → hang), or LAST asserts on the wrong beat — too early (burst truncated, beats lost or misattributed) or too late (extra beats expected). Both stem from a disagreement between the burst length (AxLEN) and where LAST actually fires.
2. The Missing-WLAST Hang
The most common case: a write burst transfers all its data beats, but WLAST is never asserted on the final beat. The slave's write engine is counting beats and waiting for WLAST to move to its response state — without it, the engine sits in the data phase forever, never issues B, and the manager hangs waiting for the response. The waveform shows beats flowing normally, then silence where WLAST and B should be.
Missing WLAST — write hangs with no B
10 cycles// The slave waits for WLAST to leave the data phase. If WLAST never comes,
// it never reaches W_RESP, so BVALID never asserts → manager hangs.
W_DATA: if (s_wvalid && s_wready) begin
beat_q <= beat_q + 1;
if (s_wlast) begin // <-- if this never fires, the burst never ends
s_bvalid <= 1'b1; wstate <= W_RESP;
end
end
// Robust slaves ALSO check beat_q against the latched AWLEN and flag a mismatch,
// rather than trusting WLAST alone.3. Premature or Late LAST — Truncation and Misattribution
The subtler failure is LAST on the wrong beat. Premature LAST (asserted before beat LEN) ends the burst early: the slave completes after fewer beats than AWLEN+1, so the remaining data beats are either lost or — worse — misattributed to the next transaction, corrupting it. Late LAST (or LAST never reached because LEN was over-counted) leaves the receiver expecting beats that don't come. Both desynchronize the beat stream from the burst boundaries.
Premature WLAST — burst truncated
9 cyclesThe defining contrast: missing LAST hangs (obvious, the bus freezes), while premature LAST silently corrupts (insidious, no hang — the transaction just completed wrong and poisoned the next). The premature case is more dangerous precisely because it doesn't announce itself.
4. The Decisive Cross-Check: LAST vs. Beat Count
Both failure modes reduce to one check: does LAST assert on exactly beat LEN (counting from 0, so the (LEN+1)-th beat)? A robust receiver counts beats itself and compares its count to LAST rather than trusting either alone — a mismatch is the bug, and which way it mismatches tells you the failure mode. The monitor (16.3) and protocol assertions (16.2) implement exactly this cross-check, so the diagnosis is usually already flagged.
5. Common Misconceptions
6. Debugging Insight
7. Verification Insight
8. Interview Questions
9. Summary
A missing or mis-timed LAST hangs or corrupts a burst not because beats fail to transfer, but because the burst never ends correctly. WLAST/RLAST is the explicit end-of-burst marker; the two failure modes are LAST never asserts (burst-tracking never closes → the write slave never issues B, the read never completes → a hang) and LAST on the wrong beat — premature (truncates the burst, orphaning or misattributing remaining beats → silent corruption) or late/over-counted (receiver expects beats that don't come). The defining contrast: missing LAST hangs loudly; premature LAST corrupts silently and is therefore more dangerous, often surfacing as a later transaction's failure.
The decisive diagnosis is the LAST-vs-beat-count cross-check: does LAST assert on exactly beat LEN (the (LEN+1)-th)? The receiver counts independently and reconciles its count with LAST and the declared AxLEN — and the direction of any disagreement names the mode (no LAST by LEN → hang/late; LAST before LEN → truncation). This is exactly the protocol assertion (16.2) and monitor (16.3) check, so the bug is usually pre-flagged. The robust-design principle is defensive cross-checking: a receiver must not trust the producer's LAST alone but validate it against the counted beats vs. the contracted LEN, degrading an upstream LAST bug into a flagged, contained error rather than a hang or corruption. Missing LAST is a liveness failure (watchdog + liveness assertion); premature LAST is a safety failure (count assertion + scoreboard catching the misattribution). Next, we go one layer deeper to the LEN/SIZE fields themselves, where a mis-latched length makes LAST and the engine agree on a wrong burst.
10. What Comes Next
You can now diagnose a burst that ends wrong; next, a burst whose declared shape is wrong:
- 17.3 — Wrong LEN / Wrong SIZE (coming next) — catching beat-count and beat-width mismatches at the
AxLEN/AxSIZEfields, where the burst's declared shape itself is wrong andLASTmay fire consistently with the wrong length.
Previous: 17.1 — Stuck VALID / Stuck READY. Related: 6.8 — RRESP, BRESP & RLAST for the LAST semantics, 15.3 — AXI Write FSM for the write engine's WLAST-driven completion, and 16.2 — AXI Assertions (SVA) for the LAST-vs-count assertion.