AMBA AXI · Module 6
WSTRB Write Strobes
Master AXI's WSTRB write strobes — one byte-enable per byte lane, how they enable sparse and unaligned writes, how the valid lanes follow from address and AxSIZE, and why a subordinate must honor them exactly.
WSTRB is the AXI signal that turns the write-data bus from "write the whole word" into "write exactly these bytes." It is a byte-enable mask — one bit per byte lane — and it is the mechanism behind every byte write, halfword write, unaligned write, and sparse transfer on AXI. Unlike AxUSER (no defined meaning) the strobes have a precise, mandatory semantics: a subordinate must write only the asserted lanes and leave the rest untouched. Getting WSTRB wrong corrupts neighbouring bytes silently, which is why this signal is critical to understand exactly. This chapter covers what the strobes are, how the valid lanes follow from address and AxSIZE, and how to debug and verify them.
1. What WSTRB Is
WSTRB accompanies the write-data channel: one strobe bit per byte lane of WDATA.
WSTRB[n] = 1→ byte lanencarries valid data and must be written.WSTRB[n] = 0→ byte lanenis masked — the subordinate must not modify that byte.
Its width is DATA_WIDTH / 8: a 32-bit data bus has WSTRB[3:0] (4 lanes), a 64-bit bus has WSTRB[7:0] (8 lanes), a 128-bit bus has 16, and so on. WSTRB exists per write-data beat (WVALID/WREADY handshake) — each beat of a burst carries its own strobes — and follows the channel's stability rules. There is no read equivalent: reads always return whole bytes and the manager takes what it needs; strobes are a write-only concept.
2. A Partial Write on the Wire
The classic use is writing some bytes of a word. Here a 32-bit beat carries WDATA = 0xAABBCCDD with WSTRB = 4'b0110 — only the middle two byte lanes are committed:
wstrb-lanes — partial write, WSTRB = 4'b0110
5 cycles3. Which Lanes Are Valid — Address and AxSIZE
The asserted strobes are not arbitrary — they must be consistent with the transaction's address and AxSIZE (and the beat's position in the burst). The valid byte lanes are exactly the bytes the transfer addresses:
| Transfer | Address (low bits) / size | Valid lanes (32-bit bus) | WSTRB |
|---|---|---|---|
| Full word, aligned | 0x...0, size = 4 bytes | 0,1,2,3 | 4'b1111 |
| Single byte at offset 0 | 0x...0, size = 1 | 0 | 4'b0001 |
| Single byte at offset 2 | 0x...2, size = 1 | 2 | 4'b0100 |
| Halfword at offset 0 | 0x...0, size = 2 | 0,1 | 4'b0011 |
| Halfword at offset 2 | 0x...2, size = 2 | 2,3 | 4'b1100 |
So a narrow transfer (AxSIZE < bus width) or an unaligned address shifts the asserted strobes to the addressed byte lanes; bytes outside the addressed range must have their strobes deasserted. Asserting a strobe for a byte the address/size doesn't cover (or vice versa) is a protocol violation. Within a burst, each beat's valid lanes advance per the burst type and size (the address arithmetic from Chapters 6.1–6.2).
4. Why It's Critical — Honoring the Strobes
WSTRB is mandatory semantics, not a hint. A subordinate (memory, register block, bridge) must commit only the asserted byte lanes and leave masked bytes unchanged:
The strobes are exactly what lets a master do a byte or halfword write without a read-modify-write: it drives the full data bus but asserts only the relevant strobes, and the subordinate updates just those bytes. They also carry sparse writes (non-contiguous valid bytes within a beat, e.g., 4'b1010) and unaligned writes (the first/last beats of an unaligned burst use partial strobes). It is legal for a beat to have all strobes deasserted (WSTRB = 0) — a beat that writes nothing — though it still consumes a beat and counts toward the burst length.
5. Common Misconceptions
6. Debugging Insight
7. Verification Insight
8. Interview Questions
9. Summary
WSTRB is the AXI byte-enable mask for writes — one strobe bit per byte lane of WDATA (WSTRB[n]=1 commits lane n, 0 masks it), width DATA_WIDTH/8, present per write-data beat. It is the mechanism for byte/halfword writes, sparse writes, and unaligned bursts — the master drives the full bus and asserts only the strobes for the bytes it means to write, so no read-modify-write is needed. The asserted lanes are not free: they must match exactly the bytes the address and AxSIZE cover, and they advance per beat across a burst (partial first/last beats on unaligned transfers). Reads have no strobe.
The reason this signal is critical: its semantics are mandatory, and its bugs are silent data corruption, not protocol errors. A subordinate must commit only the strobed bytes — ignoring WSTRB clobbers the neighbouring bytes the master intended to preserve, and a byte-lane mapping error writes the right data to the wrong byte. So both debug and verification hinge on a byte-granular view: line up strobes against address and size, and check writes against a byte-accurate reference model. Next: RESP and LAST — consolidating the BRESP/RRESP response codes and the WLAST/RLAST burst-terminator semantics in one place.
10. What Comes Next
You've mastered the write strobes; next, the responses and burst terminators:
- 6.8 — RESP & LAST Signals (coming next) — consolidating
BRESP/RRESP(OKAY/EXOKAY/SLVERR/DECERR) andWLAST/RLASTsemantics.
Previous: 6.6 — AxUSER & Sideband Signals. Related: 6.1 — AxADDR, AxLEN & AxSIZE and 6.2 — AxBURST for how addresses and sizes drive the valid lanes. For the broader protocol catalog, see the AMBA family overview doc.