Skip to content

AMBA AXI · Module 9

Read & Write Ordering

The canonical statement of AXI's per-ID ordering guarantees — same-ARID reads in order, same-AWID writes in order, no order across different IDs, and no inherent order between reads and writes — and how a master enforces ordering for dependencies.

Module 9 sharpens the ordering model that Module 8 introduced operationally. This opening chapter is the canonical reference: a single, precise statement of what AXI guarantees about transaction ordering, organized around the two ordered-stream systems the protocol actually provides — reads ordered by ARID, writes ordered by AWID — and the deliberate gaps between them. Get this matrix exactly right and every dependency, hazard, and barrier question in the rest of Module 9 follows from it. The headline: AXI orders same-ID, same-direction transactions and nothing else — everything beyond that is the master's job.

1. The Two Ordered-Stream Systems

AXI provides ordering through AxID, and reads and writes are separate ID spaces, giving two independent ordered-stream systems:

  • Reads: transactions sharing an ARID form an ordered read stream — their data returns in issue order.
  • Writes: transactions sharing an AWID form an ordered write stream — their B responses return in issue order.

Within each system, same ID = ordered, different ID = independent (Module 8.3/8.4). The two systems run in parallel and unsynchronizedARID=5 and AWID=5 are different identifiers in different spaces with no relationship. So "ordering" in AXI always means "within one direction, within one ID."

Reads ordered within ARID and writes ordered within AWID are two separate systems with no cross-ordering.ManagerSubordinateAR — ARID=2 (read A)AR — ARID=2 (read B)AW — AWID=2 (writeX)R — read A then B (ordered)R — read Athen B…B — write X (noorder vs reads)
Figure 1 — AXI's two independent ordered-stream systems. Reads are ordered by ARID (same-ARID reads return data in issue order); writes are ordered by AWID (same-AWID writes return B responses in issue order). The read and write systems are separate ID spaces with no ordering between them — ARID=5 and AWID=5 are unrelated.

2. The Complete Ordering Matrix

Stated exhaustively, here is everything AXI guarantees — and doesn't:

RelationshipOrdered?
Two reads, same ARID✅ Yes — data in issue order
Two writes, same AWID✅ Yes — B responses in issue order
Two reads, different ARID❌ No — may complete in any order
Two writes, different AWID❌ No — may complete in any order
A read and a write (any IDs, even same value)❌ No — separate spaces, no order

That's the entire guarantee. The two ✅ rows are the only ordering AXI gives you for free; everything else is unordered so the system can reorder for throughput (Module 8.4). Note the last row especially: a read and a write are never ordered by the bus, regardless of their ID values — this is the most commonly mis-assumed entry and the subject of Chapter 9.2.

ordering-rules — same-ID reads ordered; write response independent

7 cycles
Two same-ARID reads return R0 then R1 in order on the read-data channel; a write B response appears independently with no fixed order relative to the reads.same-ARID reads in order: R0, R1reads ordered (ARID=2)reads ordered (ARID=2)B response independent of readsB response independent…aclkrvalidridX222222rdataXR0R0R1R1R1R1bvalidbidXXXXX22t0t1t2t3t4t5t6
Figure 2 — ordering-rules: the guarantee matrix as observed behavior. Two same-ARID reads (R0, R1) return data in issue order, while a write's B response is free to land anywhere relative to them. Same-direction + same-ID is ordered; the read/write streams are independent on their separate channels.

3. Enforcing Order for Dependencies

Because the bus orders so little, a master with a dependency must enforce the order itself. The universal mechanism is wait for the response:

  • Order write → dependent read (read must see the written value): issue the write, wait for its B response, then issue the read. (Same ID won't help — different spaces.)
  • Order read → dependent write (write must not clobber until the read is done): issue the read, wait for its final R beat, then issue the write.
  • Order two same-direction accesses: simpler — give them the same ID (the same-ID rule orders them) or wait, depending on whether you also need them at the same slave (recall same-ID across slaves serializes, 8.3).

So the master's toolkit is exactly two tools: shared ID (for same-direction ordering, free-ish) and response-wait serialization (for read/write ordering and stronger guarantees, costs latency). Choosing where to spend the response-wait — only at genuine dependencies — is the art of a high-performance correct master.

Same-direction order via shared ID; read/write dependency via wait for the first transaction's response before issuing the second.same dir, orderedread vs writenoneWhat ordering isneeded?Same-direction →shared IDRead/write dep →wait forresponse, thenissueIndependent →distinct IDs(max throughput)
Figure 3 — enforcing dependency order. For same-direction ordering, share an ID (same-ID rule). For read/write dependencies (which IDs can't order), serialize: issue the first, wait for its response (B for a write, final R for a read), then issue the dependent second. Spend response-waits only at true dependencies.

4. Why AXI Orders So Little

The minimalism is deliberate (Module 8.4): every mandatory ordering constraint forces buffering, blocking, or serialization somewhere, costing throughput. By guaranteeing only same-ID same-direction order, AXI lets the interconnect and subordinates reorder everything else — bypassing slow accesses, scheduling across banks, keeping channels busy. The protocol optimizes for the common case (independent, reorderable traffic) and makes the rarer case (true dependencies) the master's explicit responsibility, rather than penalizing all traffic with conservative global ordering.

The practical contract for a correct master: assume no ordering you didn't explicitly create (shared ID or response-wait). Everything else may legally reorder — and one day, on some interconnect or workload, it will.

Minimal bus ordering enables system reordering for throughput; the master enforces ordering only at real dependencies.Minimal guaranteesame-ID, same-directiononlySystem reorders restthroughputMaster enforces depsshared ID / response-wait12
Figure 4 — the design trade-off. AXI guarantees minimal ordering (same-ID, same-direction) so the system is free to reorder everything else for throughput. The cost is pushed to the master, which must create ordering only where a real dependency exists. Minimal-guarantee + master-enforced-dependencies is the AXI ordering philosophy.

5. Common Misconceptions

6. Debugging Insight

7. Verification Insight

8. Interview Questions

9. Summary

AXI's ordering model is a short, exact matrix: same-ARID reads complete in order, same-AWID writes complete in order, and nothing else is ordered — not different IDs (either direction), and never a read against a write (separate ID spaces, regardless of ID value). These are two independent ordered-stream systems (reads by ARID, writes by AWID) running in parallel and unsynchronized. The minimalism is deliberate: guaranteeing little lets the system reorder freely for throughput, pushing dependency ordering onto the master.

The master's toolkit is exactly two tools: shared ID for same-direction ordering, and response-wait serialization for read/write dependencies (and stronger guarantees) — spent only where a real dependency exists. Every ordering bug reduces to a matrix-row mismatch: the design needed ✅ where the bus gives ❌, fixed by creating the order. The robust mental model is "assume no ordering you didn't explicitly create" — correct on every compliant implementation and minimal in serialization. Next: a closer look at the read/write independence this chapter introduced — why the two channels are deliberately decoupled and what that enables and demands.

10. What Comes Next

You've got the ordering matrix; next, the read/write decoupling at its center:

  • 9.2 — Read/Write Independence (coming next) — why the read and write channels have no inherent ordering, what that decoupling enables, and the hazards it leaves to the master.
  • 9.3 — Exclusive Access (coming soon) — the exclusive monitor and EXOKAY atomic-access mechanism.

Previous: 8.6 — Verification Challenges. Related: 8.3 — Same-ID Ordering Rules and 8.4 — Different-ID & Out-of-Order Completion — the operational basis of this matrix. For the broader protocol catalog, see the AMBA family overview doc.