AMBA AXI · Module 4
The Write Data (W) Channel
The AXI W channel in detail — WDATA, the WSTRB byte strobes that enable partial writes, beat sequencing, WLAST, and why AXI4 dropped WID.
AW declared the shape of the write; the W (write data) channel delivers the bytes. It carries three things per beat — WDATA (the data), WSTRB (byte-lane strobes that say which bytes are valid), and WLAST (the end-of-burst marker) — and it delivers exactly the AWLEN+1 beats AW promised. The signal that makes W more than "just data" is WSTRB: it lets a write touch only some bytes of a beat, which is how AXI does partial and unaligned writes — and getting it wrong corrupts memory silently. This chapter details WDATA/WSTRB/WLAST, the beat sequencing, and why AXI4 removed WID. Burst-address math and strobe-in-burst corner cases are Module 6–7; here it's the W channel itself.
1. W Delivers the Data the AW Shape Described
If AW is "where and what shape," W is "here are the bytes." Each W beat carries one transfer's worth of data, and the manager streams AWLEN+1 of them to fulfill the burst AW launched. W is decoupled from AW (Chapter 2.4): in AXI4 the data may arrive before, with, or after the address — the subordinate pairs W data to its AW by transaction order, not by timing.
Three signals per beat (plus the WVALID/WREADY handshake):
WDATA— the data for this beat, as wide as the data bus.WSTRB— one byte-lane strobe per byte ofWDATA: bit i says "byte i ofWDATAis valid — write it."WLAST— asserted on the final beat of the burst.
2. WSTRB — The Byte-Lane Strobes
WSTRB is the W channel's defining feature and the read path's nothing-equivalent. There is one strobe bit per byte lane of the data bus (a 32-bit bus has 4 strobe bits; a 128-bit bus has 16). Strobe bit i gates byte i of WDATA: if set, the subordinate writes that byte; if clear, it leaves the corresponding memory byte untouched.
This is the mechanism for partial and sparse writes. Writing a single byte into a 16-byte-wide bus means asserting one strobe bit and clearing the other fifteen. An unaligned or sub-word write (a CPU storing a byte or halfword) becomes a full-width beat with only the relevant strobes set. The subordinate must honor the strobes exactly:
// Conceptual — a W beat, and how WSTRB masks the write per byte lane.
typedef struct packed {
logic [DW-1:0] wdata; // data for this beat
logic [DW/8-1:0] wstrb; // byte-lane enables: bit i ↔ wdata[8*i +: 8]
logic wlast; // 1 on the final beat of the burst
} w_beat_t;
// At the subordinate: write ONLY the enabled byte lanes.
for (int i = 0; i < DW/8; i++)
if (wstrb[i])
mem[addr][8*i +: 8] = wdata[8*i +: 8]; // bytes with wstrb[i]=0 are untouchedThe classic bug is a subordinate that ignores WSTRB and writes the whole beat: now a sub-word write clobbers the bytes that should have been preserved — silent corruption that only shows when someone reads those neighboring bytes back. WSTRB is mandatory to honor, not optional.
3. WLAST and Beat Sequencing
WLAST marks the final beat of the write burst. The manager streams beats — WDATA/WSTRB for beat 0, beat 1, … — and asserts WLAST on beat number AWLEN+1 (the last). The subordinate uses WLAST to know the data phase is complete (and, per Module 3, only then may it assert BVALID). A single-beat write (AWLEN=0) asserts WLAST on its one and only beat.
The beat count is the contract from AW: the manager must deliver exactly AWLEN+1 W beats and assert WLAST on the last one. Delivering too few, too many, or asserting WLAST on the wrong beat is a protocol violation that leaves the write malformed (and often hangs the transaction, since the subordinate is waiting for the WLAST that defines completion). The W channel doesn't re-send the address or length — it just produces the agreed number of beats in order.
4. No WID in AXI4
A signal you might expect but won't find: AXI4 has no WID. In AXI3, write data carried a WID so that write data from different transactions could be interleaved on the W channel. AXI4 removed both: write data must be delivered in the same order as the addresses were issued, one transaction's full burst before the next's, so there's no need to tag each W beat with an ID. (AXI4-Stream and the read channel have their own IDs; the memory-mapped write data channel simply doesn't in AXI4.)
The practical consequence: with AXI4, the W beats for outstanding writes are not interleaved — they go in AW-issue order. This simplifies subordinates (no per-ID write-data reassembly) and is one of the AXI3→AXI4 cleanups from Chapter 2.5. If you're bridging from AXI3, de-interleaving WID-tagged write data into AXI4's in-order stream is part of the converter's job.
5. The W Beats on a Waveform
A burst on the W channel: WVALID/WREADY move one beat per cycle, WDATA (and WSTRB) change each beat, and WLAST rises on the final one.
W channel — a 4-beat write burst
7 cycles6. Common Misconceptions
7. Debugging Insight
8. Verification Insight
9. Interview Questions
10. Summary
The W channel delivers the bytes AW's shape described: each beat carries WDATA, WSTRB, and WLAST, moved by the WVALID/WREADY handshake. WSTRB is the channel's defining signal — one strobe per byte lane, enabling partial and sparse writes by writing only the marked bytes and leaving the rest untouched; a subordinate must honor it exactly or it silently corrupts neighboring bytes. WLAST marks the final beat, and the manager must deliver exactly AWLEN+1 beats in order with WLAST on the last — the count is the contract from AW, not re-sent on W. And AXI4 has no WID: write-data interleaving is forbidden, so data flows in AW-issue order (the AXI3 cleanup).
Debug W by anchoring on AW (count beats, check WLAST position) and treating WSTRB as first-class (it's where partial-write corruption hides); verify it with a scoreboard that masks by WSTRB per lane and stimulus that exercises sparse strobes and alignments. With the address (AW) and data (W) channels covered, only the write's acknowledgement remains — the B channel.
11. What Comes Next
The data has been delivered; the write isn't done until it's confirmed:
- 4.3 — The Write Response (B) Channel (coming next) — why a write needs an explicit response, and
BRESP/BIDsemantics. - 4.4 — Write Ordering & WLAST (coming soon) — ordering,
WLAST, and the AXI3→AXI4WIDchange in depth.
Previous: 4.1 — The Write Address (AW) Channel. For the broader protocol catalog, see the AMBA family overview doc.