Skip to content

AMBA AXI · Module 4

Write Ordering & WLAST

How AXI ties the write channels together — WLAST as the data-phase terminator, AW↔W ordering, and the AXI3→AXI4 WID change that removed write-data interleaving.

The three write channels are decoupled — but a write is still one transaction, so something must tie AW, W, and B back together. Two mechanisms do it: WLAST, which terminates the data phase and tells the subordinate where one write's data ends, and the ordering rule, which pairs each W burst to its AW even though the channels run independently. This chapter details WLAST timing, how AW and W relate in time (independent, but paired by order), and the AXI3→AXI4 WID change that removed write-data interleaving — a favorite interview topic and a real bridge headache. It builds on the AW/W/B channels (4.1–4.3); the response codes are next.

1. WLAST — The Data-Phase Terminator

WLAST answers a question the W channel must answer for every burst: where does this write's data end? Because the channels are decoupled and (in AXI4) carry no per-beat ID, the subordinate can't know the burst length from the W channel alone — so the manager asserts WLAST on the final beat to mark the boundary.

WLAST has three jobs, and all three depend on it being on the right beat:

  • It ends the data phase. The subordinate now has all the write data and may proceed to respond.
  • It gates B. Per the B-after-W ordering (Module 3.5), BVALID may assert only after the WLAST beat is accepted.
  • It must match AWLEN. WLAST must land on beat number AWLEN+1 — the count declared on AW. If it lands early or late, the subordinate and the AW disagree on the burst length, malforming the transaction.

So WLAST is the W channel's self-description of its own length, and it must agree with what AW promised.

2. WLAST Timing

On the waveform, WLAST is high for exactly the final beat's transfer and low for all earlier beats.

WLAST — asserted on the final beat only

7 cycles
In a four-beat write, WLAST is low for beats 0 to 2 and high on beat 3, the final beat; the data phase ends at that beat and B may then respond.beats 0–2: WLAST lowWLAST=1 on beat 3 (AWLEN+1) → data phase endsWLAST=1 on beat 3 (AWL…aclkwvalidwreadywdataXD0D1D2D3XXwlastt0t1t2t3t4t5t6
Figure 1 — WLAST timing for a 4-beat write (AWLEN=3). WLAST is low for beats 0–2 and asserted only on beat 3 (the AWLEN+1-th), where it transfers with the last WDATA. That beat ends the data phase and is the gate the subordinate waits for before it may drive B. WLAST on the wrong beat means the burst length disagrees with AWLEN.

A subtle but common bug: a burst whose WLAST never asserts (off-by-one length logic, or a counter that misses) leaves the subordinate waiting forever for the data phase to end — so it never drives B and the write hangs. WLAST isn't optional bookkeeping; it's the terminator the whole transaction depends on.

3. AW ↔ W Ordering — Independent, but Paired by Order

AW and W are independent channels (Chapter 2.4): in AXI4 the write data may arrive before, with, or after the write address. A manager that already has data ready can stream W beats before the AW handshake; another can send AW first and W later. The subordinate must accept either timing.

Three legal timings: W data before AW, W data with AW, or W data after AW; all are valid because AW and W are independent channels paired by transaction order.W before AWW with AWW after AWAll legal —subordinateaccepts anytiming
Figure 2 — AW and W are independent in time. The write data on W may be presented before, simultaneously with, or after the address on AW; the subordinate accepts any of these orderings. What it must NOT rely on is a fixed AW-then-W timing — the channels are decoupled, and pairing is by transaction order, not arrival timing.

But independent timing does not mean arbitrary pairing. Because AXI4 has no WID, the subordinate pairs them by order: the first AW pairs with the first complete W burst (the one ending in its WLAST), the second with the second, and so on. So the rule is: addresses are issued in order, write-data bursts are delivered in order, and the Nth burst belongs to the Nth address — regardless of the relative timing of the two channels.

4. The Write-Data Ordering Rule

Stated precisely for AXI4: a manager must deliver its write-data bursts in the same order it issued the addresses, one complete burst at a time. No interleaving — a transaction's beats (through WLAST) all come before the next transaction's first beat. This is what lets the subordinate pair W to AW by order without any ID.

Addresses AW0 and AW1 issued in order; W burst 0 delivered fully then W burst 1; the subordinate pairs each W burst to the address in the same order, needing no WID.no interleavingAW0, then AW1(addresses, inorder)W burst 0 (full, →WLAST)W burst 1 (full, →WLAST)Paired by order:burst 0→AW0,burst 1→AW1
Figure 3 — pairing by order. Addresses AW0 then AW1 are issued in order; the W channel delivers burst 0 in full (through its WLAST), then burst 1 in full. The subordinate pairs burst 0 → AW0 and burst 1 → AW1 by position. Because bursts are not interleaved, no WID is needed to tell them apart.

In subordinate terms, this is a clean queue — no per-ID reassembly:

Azvya Education Pvt. Ltd.VLSI Mentor
Snippet
// Conceptual — AXI4 pairs the Nth write-data burst to the Nth address, in order.
// (No WID: write data is NOT interleaved, so just collect one full burst at a time.)
always @(posedge aclk) begin
  if (awvalid && awready)            aw_q.push('{awid, awaddr, awlen}); // addresses in order
  if (wvalid && wready) begin
    cur_burst.push(wdata, wstrb);
    if (wlast) begin
      txn = aw_q.pop();              // this completed burst belongs to the oldest AW
      apply_write(txn, cur_burst);   // pair by order — no ID matching needed
      cur_burst.clear();
    end
  end
end

5. AXI3 → AXI4: The WID Change

This is where the history matters. AXI3 had a WID signal on the write-data channel, and it existed for one purpose: to allow write-data interleaving — beats from different outstanding write transactions could be mixed together on the W channel, each beat tagged with the WID of the transaction it belonged to, so the subordinate could sort them out.

AXI4 removed WID and forbade write-data interleaving. Write data must now be sent in address order, one full burst at a time — exactly the rule above. The trade was deliberate: interleaving added significant complexity to subordinates (per-ID write-data reassembly buffers) for little real-world benefit, since most masters didn't interleave anyway. Removing it makes AXI4 write subordinates much simpler.

AXI3 interleaves write-data beats from different transactions tagged by WID and needs per-ID reassembly; AXI4 removed WID and sends each transaction's burst contiguously in address order with no reassembly.AXI3WID present — beats interleavable(A,B,A,B…)Slave reassembles per WIDcomplex write-data buffersAXI4no WID — bursts contiguous, in orderSlave just pairs by orderno reassembly — simpler12
Figure 4 — AXI3 vs AXI4 write data. AXI3 allowed interleaving: beats from transaction A and B mixed on W, each tagged by WID, requiring the subordinate to reassemble per ID. AXI4 removed WID and forbids interleaving: each transaction's burst is contiguous and in address order, so the subordinate needs no reassembly. A bridge from AXI3 to AXI4 must de-interleave.

The practical fallout: bridging AXI3 → AXI4 requires de-interleaving the WID-tagged write data into contiguous, in-order bursts (and dropping WID); bridging the other way may need to add it. It's one of the specific behaviours a generation converter must reconcile (Chapter 2.5).

6. Common Misconceptions

7. Debugging Insight

8. Verification Insight

9. Interview Questions

10. Summary

A write is decoupled across three channels but remains one transaction, tied together by WLAST and ordering. WLAST terminates the data phase: it must assert on beat AWLEN+1, it tells the subordinate the data is complete, and it gates B (B-after-W). A missing or mis-placed WLAST either hangs the write or makes the burst length disagree with AW. AW and W are independent in time — in AXI4 the data may precede, accompany, or follow the address — but they are paired by order: the Nth complete W burst belongs to the Nth address, because AXI4 has no WID and forbids write-data interleaving.

That last point is the AXI3→AXI4 change: AXI3's WID allowed interleaved write data (requiring per-ID reassembly in the subordinate); AXI4 removed it for simplicity, mandating contiguous, in-order bursts — so an AXI3→AXI4 bridge must de-interleave. Debug by checking WLAST position against AWLEN and confirming W bursts are contiguous and in issue order; verify with WLAST-alignment and no-interleaving assertions plus all-three AW/W timings. With ordering and WLAST settled, the last write topic is decoding the response itself.

11. What Comes Next

The write path is nearly complete; only the response semantics remain:

Previous: 4.3 — The Write Response (B) Channel. For the broader protocol catalog, see the AMBA family overview doc.