AMBA AXI · Module 17
ID Mismatch
Diagnose AXI responses delivered to the wrong transaction — a BID/RID that doesn't match the outstanding AWID/ARID, broken same-ID ordering, or an interconnect ID-remapping bug. Why a mismatched ID corrupts the manager's outstanding tracking even when the data is correct, and how to trace it through the ID-tag mechanism.
A wrong response code (17.5) is the bus reporting a problem; a wrong response ID is the bus delivering a correct response to the wrong transaction. AXI uses ID tags (AWID/BID, ARID/RID) to associate each response with its request, which is what allows multiple outstanding and out-of-order transactions (Module 8). When the ID is wrong — a BID/RID that doesn't match any outstanding AWID/ARID, or that matches the wrong one — the manager attributes the response to the wrong request, corrupting its outstanding tracking even though the data and response code may be perfectly correct. This is among the most insidious bugs: nothing is malformed, no error is raised, but transactions get crossed. This chapter diagnoses the ID-mismatch family — unmatched IDs, broken same-ID ordering, and interconnect remapping bugs — and the ID-tag mechanism you trace through.
1. What IDs Do and How a Mismatch Corrupts Tracking
Every AXI transaction carries an ID: the request (AWID/ARID) and its response (BID/RID) share the same ID, and the manager uses it to match each returning response to the outstanding request it issued. This tag is what enables multiple outstanding and out-of-order completion: responses can come back in any order across IDs, and the manager sorts them out by ID. A mismatch — a response whose ID doesn't correspond to the right outstanding request — breaks this matching: the manager either can't find an outstanding request for the ID (orphan response) or matches it to the wrong request (crossed transactions), corrupting its tracking even when the payload is correct.
2. The Crossed-Response Signature
The clearest mismatch: a response comes back with an ID that doesn't match the request it's actually answering. The manager, matching by ID, delivers the response to the wrong outstanding transaction — so transaction A's data is attributed to transaction B and vice versa. The sequence shows two outstanding reads with different IDs whose R responses come back with swapped IDs.
3. Broken Same-ID Ordering and the Orphan Response
Two more mismatch modes. Broken same-ID ordering: AXI requires responses for the same ID to return in request order (Module 8); if two same-ID transactions complete out of order, the manager matches the first response to the first outstanding same-ID request — attributing the second's data to the first. Orphan response: a BID/RID arrives that matches no outstanding request (an ID never issued, or a duplicate response), so the manager has nowhere to put it — a protocol violation that often indicates a duplicated or fabricated response.
4. The Interconnect ID-Remapping Bug
In an interconnect, manager IDs are remapped: the fabric appends source-port bits to make IDs unique across managers (Module 8/12), routes responses by the appended bits, and strips them before returning to the original manager. Each step is a place an ID mismatch can originate: appending wrong bits, routing by the wrong field, or failing to strip (returning a wider ID than the manager sent) or stripping wrong (returning the wrong original ID). So an ID mismatch in a multi-master system is frequently an interconnect remapping bug, not a slave or manager bug — and tracing it means following the ID transformation through the fabric.
5. Common Misconceptions
6. Debugging Insight
7. Verification Insight
8. Interview Questions
9. Summary
An ID mismatch delivers a correct response to the wrong transaction — the data and response code are fine, but the ID binding is broken. AXI's ID tags (AWID/BID, ARID/RID) match each response to its request, enabling multiple outstanding and out-of-order completion across IDs; a mismatch breaks the matching, producing an orphan (response ID matches no outstanding request — implying a duplicated/fabricated response and a missing real one) or a crossed response (matched to the wrong request, so right data lands in the wrong transaction). The modes are: crossed/swapped IDs, broken same-ID ordering (same-ID responses must be in issue order; different-ID may reorder freely), and the interconnect remap bug (the fabric appends source-port bits, routes by them, and strips them — any of append/route/strip can mis-handle the ID, and this is the usual origin in multi-master systems).
The defining property is that an ID mismatch is silent — no error code, nothing malformed — so it's detectable only by transaction-matching: the monitor reconstructs by ID and the scoreboard maintains per-ID outstanding queues, checking that every response matches its request (catching orphan/crossed), that same-ID responses are in order, and (for interconnects, via dual-port observation) that the end-to-end ID binding survives the remap. It's a relationship bug — every individual element is correct, only the binding between transactions is wrong — which is why it's invisible to per-signal assertions and per-beat data checks and catchable only by stateful, transaction-level checking. This is the ordering/transaction category of the rule catalog made concrete: the bug is in the relationships between transactions, and only a relationship-checking component sees it. It manifests only under multi-outstanding, interleaved, ID-colliding traffic. Next, the hardest hang: a genuine deadlock, traced through the dependency graph.
10. What Comes Next
You can now trace mis-routed responses; next, the hardest hang of all:
- 17.7 — Debugging Deadlock (coming next) — finding and breaking AXI deadlocks via the dependency graph, where multiple channels and transactions wait on each other in a cycle that no single signal reveals.
Previous: 17.5 — BRESP / RRESP Errors. Related: 8.3 — Same-ID Ordering and 8.4 — Different-ID Ordering for the ordering rules, and 16.3 — AXI Monitors for the per-ID transaction reconstruction that catches mismatches.