Skip to content

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 endsWLAST (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.

Two failure modes: LAST never asserts causes a hang; LAST on wrong beat truncates (early) or over-extends (late) the burst.LAST never assertsburst never endsHangno completion / no BLAST on wrong beatearly or lateTruncated / over-extendedbeats lost or expected12
Figure 1 — the two LAST failure modes. LAST never asserts: beats transfer but the burst never ends, so the receiver waits forever for the final beat and never completes (write: no B response; read: burst never closes) — a hang. LAST on the wrong beat: too early truncates the burst (remaining beats lost or misattributed to the next transaction); too late leaves the receiver expecting more. Both come from a LAST-vs-LEN disagreement.

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
Four W beats transfer but WLAST never asserts; the slave never completes; BVALID never comes.4 beats transferno WLAST → no B → hangWLAST expected here (missing)WLAST expected here (m…ACLKWVALIDWREADYWDATA.D0 D1 D2 WLASTBVALIDt0t1t2t3t4t5t6t7t8t9
Figure 2 — a missing WLAST hangs the write. Four W data beats transfer normally (WVALID/WREADY handshakes), but WLAST is never asserted on the fourth beat. The slave's write engine keeps waiting for the final beat, never enters its response state, and BVALID never asserts — the manager hangs forever waiting for the B response. The beats moved fine; the burst simply never ended. The signature is a complete-looking data phase with no LAST and no response.
Azvya Education Pvt. Ltd.VLSI Mentor
Snippet
// 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 cycles
AWLEN=3 burst but WLAST asserts on beat 1; slave ends early; beats 2 and 3 are orphaned or misattributed.beats 0,1premature WLAST → early BD2,D3 orphanedWLAST on beat 1 (should be beat 3)WLAST on beat 1 (shoul…ACLKWVALIDWREADYWDATA.D0 D1 D2WLASTBVALIDt0t1t2t3t4t5t6t7t8
Figure 3 — premature LAST truncates and misattributes. A burst declared with AWLEN=3 (4 beats) asserts WLAST on beat 1 (the second beat) instead of beat 3. The slave ends the burst after 2 beats and issues B; the remaining 2 beats (D2, D3) are now orphaned — either dropped or, if the slave starts a new transaction, misattributed to it, corrupting both. Premature LAST is more insidious than missing LAST because it doesn't hang — it silently corrupts.

The 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.

At each beat, compare count to LEN and LAST: LAST at beat LEN is correct; LAST early is truncation; no LAST by LEN is a hang/late.yesLAST before LENLEN passed, noLASTCount beats vs.declared LENLAST assertsat beat ==LEN?Correct burstLAST early →truncation/corruptionNo LAST by LEN →hang / late
Figure 4 — the LAST-vs-LEN cross-check that localizes the bug. Count beats and compare to the declared LEN at the moment LAST asserts (or should). If LAST never fires by beat LEN → missing-LAST hang. If LAST fires before beat LEN → premature/truncation. If beat LEN passes with no LAST → over-count/late. The receiver trusts neither LAST nor its count alone but cross-checks them; the direction of the mismatch names the failure mode. This is exactly what the protocol assertion and monitor enforce.

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 beatpremature (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/AxSIZE fields, where the burst's declared shape itself is wrong and LAST may 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.