AMBA AXI · Module 8
Same-ID Ordering Rules
AXI's same-ID ordering guarantee — transactions sharing an AxID complete in issue order — what it does and does not cover (different IDs, read-vs-write), and why same-ID across multiple slaves can serialize and hurt performance.
Chapter 8.2 leaned on a guarantee repeatedly: same ID means in order. Now we state it precisely, because it's the rule that makes outstanding transactions predictable — and the boundaries of what it does and doesn't promise are exactly where ordering bugs and performance traps live. The rule is narrow on purpose: it orders transactions sharing an ID, and nothing else. It says nothing about different IDs (they may reorder — Chapter 8.4) and nothing about reads versus writes (a separate concern). And it has a sharp performance edge: same-ID transactions spread across multiple slaves can force the interconnect to serialize. This chapter pins down the guarantee and its limits.
1. The Rule
The same-ID ordering rule, stated for each direction:
- Reads: read transactions issued with the same
ARIDreturn their data in the order the addresses were issued. Read data for an earlier same-ID read arrives before a later same-ID read's data. - Writes: write transactions issued with the same
AWIDcomplete — theirBresponses return — in the order the addresses were issued.
That's the whole guarantee: for a given ID, completion order equals issue order. A subordinate or interconnect may have the later transaction's result ready first, but it must hold it back and deliver the earlier same-ID one first. This is what lets a manager that needs ordering simply reuse one ID and trust the sequence.
2. A Same-ID Read Stream on the Wire
Three same-ID reads return their data strictly in issue order, regardless of which the subordinate finished first:
same-id-order — three ARID=3 reads return in issue order
7 cycles3. What the Rule Does Not Cover
The guarantee is deliberately narrow. Two things it explicitly does not promise:
- Different IDs are not ordered. Transactions with different
AxIDs have no ordering relationship — the system may complete them in any order (Chapter 8.4). The rule only orders within one ID. - Reads and writes are not ordered relative to each other.
ARIDandAWIDlive in separate ID spaces; a read and a write — even with the same numeric ID value — have no ordering guarantee between them. If a manager needs a write to land before a dependent read (or vice versa), it must enforce that itself, typically by waiting for the first transaction's response before issuing the second. AXI's IDs order reads among reads and writes among writes, never reads against writes.
Missing either limit is a classic bug source: assuming different-ID transactions stay ordered, or assuming a same-valued read and write are ordered. Neither holds.
4. Same ID Across Multiple Slaves — The Serialization Trap
Here's the performance edge. The interconnect must preserve same-ID ordering even when same-ID transactions target different slaves. But different slaves have different latencies and respond independently — so to guarantee that same-ID response 0 (from a slow slave) precedes same-ID response 1 (from a fast slave), the interconnect must hold back the fast slave's response until the slow one is done. Effectively, same-ID traffic to multiple slaves serializes at the rate of the slowest, and the interconnect needs buffering/blocking to enforce it.
The consequence: reusing one ID across transactions that hit different slaves can badly hurt throughput (head-of-line blocking across slaves). Many systems therefore follow a guideline — keep one ID to one slave, or use distinct IDs for transactions that can target different slaves — so the ordering constraint never forces cross-slave serialization. This is the practical reason ID assignment must consider not just ordering need but where transactions go.
5. Common Misconceptions
6. Debugging Insight
7. Verification Insight
8. Interview Questions
9. Summary
The same-ID ordering rule is AXI's core ordering guarantee, and it's narrow by design: for a given AxID, completion order equals issue order — same-ARID reads return data in issue order, same-AWID writes return B responses in issue order, with the system holding back any ready-early later transaction to preserve it. The limits are as important as the rule: different IDs are not ordered (they may reorder — 8.4), and reads and writes are not ordered relative to each other (separate ID spaces — the manager must enforce any read/write dependency by waiting on responses). And there's a performance edge: same-ID transactions across multiple slaves force the interconnect to serialize (holding fast responses behind slow ones), so one-ID-per-slave or distinct IDs avoid cross-slave head-of-line blocking.
The discipline this yields: use one ID to order same-direction accesses (accepting in-order, possibly serialized completion), distinct IDs for independent accesses (throughput via reordering), and explicit response-waits for read/write dependencies (which IDs can't express). Bugs are either assumed ordering that wasn't guaranteed (data hazards) or over-imposed ordering that wasn't needed (lost throughput). Next: the flip side — different-ID and out-of-order completion — the reordering this rule deliberately permits, and the hazards it introduces.
10. What Comes Next
You've got the ordering guarantee; next, the reordering it permits:
- 8.4 — Different-ID & Out-of-Order Completion (coming next) — how different-ID transactions reorder, the throughput it buys, and the hazards to manage.
Previous: 8.2 — Transaction IDs. Related: 6.3 — AxID for ID mechanics, and 8.1 — Why Outstanding Transactions Exist for the concurrency this orders. For the broader protocol catalog, see the AMBA family overview doc.