Skip to content

AMBA AXI · Module 12

Mux/Demux & ID-Based Routing

How the AXI interconnect routes the forward path by address (demux) and the response path back by ID (mux) — ID extension with source bits, response demultiplexing to the right manager, ID-width budgeting, and order preservation.

The interconnect has two routing directions to get right: the forward path (a manager's request → the correct subordinate) and the response path (a subordinate's response → the correct manager). These use different keys: the forward path routes by address (decode → demux), and the response path routes by ID (mux back to the originating manager). The mechanism that makes response routing work with multiple managers is ID extension — appending source bits so responses can be demultiplexed home. This chapter ties together the demux/mux structure, ID-based return routing, ID-width budgeting, and order preservation (building on Chapters 8.2 and 8.5).

1. Forward by Address, Back by ID

The two directions route on two different keys:

  • Forward (request) — demux by address: a manager's request enters the interconnect, the decoder (Chapter 12.3) maps AxADDR to a subordinate port, and the request is demultiplexed to that port. One manager fans out to many possible subordinates; the address selects which.
  • Response — mux by ID: subordinates return responses (BID/RID carrying the transaction's ID); the interconnect multiplexes responses from many subordinates back to the managers, using the ID to route each response to the originating manager. Many subordinates fan in to many managers; the ID selects which manager.

So routing is asymmetric in key: address forward, ID backward. The address says where a request goes; the ID says where a response came from (and thus must return to). Both must be correct for a transaction to complete end-to-end.

Manager request demuxed by address to a subordinate; subordinate responses muxed back to the manager by ID.Managerissues requestDemux (by address)decode → subordinate portSubordinatesserve requestMux (by ID)route response → managerResponse hometo originating manager12
Figure 1 — forward demux by address, response mux by ID. A manager's request is demultiplexed to the subordinate its AxADDR decodes to (forward path, address key). Responses from subordinates are multiplexed back to the originating manager using the transaction ID (response path, ID key). Address routes requests out; ID routes responses home.

2. The Round Trip

A transaction's full path through the interconnect, both directions:

Manager request decoded and demuxed to subordinate with extended ID; subordinate response muxed back to manager by ID, extension stripped.ManagerInterconnectSubordinaterequest (AxADDR,AxID)demux by address; extend ID with source bitsdemux by address;extend ID with…response (BID/RID = extended ID)response(BID/RID =…mux by ID → originating manager; strip extensionmux by ID →originating manager…
Figure 2 — the round trip. The manager issues a request; the interconnect decodes the address and demuxes it to the target subordinate (extending the ID with source bits); the subordinate responds with the extended ID; the interconnect uses those bits to mux the response back to the originating manager, stripping the extension so the manager sees its original ID. Address out, ID home.

3. ID Extension — How Responses Find Home

The response mux works because of ID extension (Chapter 8.2). When a manager's transaction enters the interconnect, the interconnect appends source-identifying bits to its AxID — encoding which manager/port it came from. The subordinate sees this wider ID and echoes it on the response (BID/RID). On the way back, the interconnect reads those source bits to demultiplex the response to the correct originating manager, then strips them so the manager sees its original ID.

This is what lets multiple managers reuse the same ID value (e.g., two masters both using ARID=0) without collision: the appended source bits keep them distinct internally, and they're the routing key for the response mux. So ID extension is the mechanism behind response routing — without it, the interconnect couldn't tell whose response is whose when managers share ID values. The original ID is preserved end-to-end (extended going in, stripped coming out), so each manager's view of its own IDs is unchanged.

Two managers' ARID=0 extended with source bits to distinct IDs; responses routed back by source bits and stripped.Manager 0ARID=0Manager 1ARID=0Extend → {src,0}{0,0} vs {1,0}Subordinatesees distinct IDsRoute back by srcbitstrip → original ID12
Figure 3 — ID extension enables response routing. The interconnect appends source bits to each manager's AxID (so two managers' ARID=0 become distinct {src0,0} and {src1,0} at the subordinate); the subordinate echoes the extended ID on its response; the interconnect routes by the source bits back to the right manager and strips them. The source bits are the response mux's routing key.

4. ID-Width Budgeting and Order Preservation

Two consequences of ID extension:

ID-width budgeting. Because the interconnect appends source bits, the ID width grows toward the subordinate — the subordinate (and the path to it) must carry the full extended width: roughly subordinate_ID_width ≥ manager_ID_width + ceil(log2(number_of_managers/ports)). If the subordinate's ID width is too narrow to hold the manager ID plus source bits, the extra bits are lost, and responses misroute to the wrong manager (a silent multi-master data-corruption bug, Chapter 8.5). So ID width must be budgeted across the interconnect hierarchy at integration time.

Order preservation. The response mux must preserve same-ID ordering (Chapter 8.3): responses with the same (full) ID must return to the manager in issue order, while different-ID responses may interleave. So the mux isn't a simple combinational select — it must respect per-ID ordering as it merges responses, including across subordinates (which can force the serialization of Chapter 8.5). The demux/mux logic is where the interconnect's ordering guarantees are physically enforced.

Subordinate ID width must hold manager ID plus source bits or responses misroute; response mux preserves same-ID order.Append sourcebits (ID growstoward sub)Sub ID width ≥ mgrwidth + source bitsMux preservessame-ID orderResponses routehome, in order
Figure 4 — ID-width budgeting and ordering. The interconnect's appended source bits make the subordinate-side ID wider than the manager-side; the subordinate ID width must be ≥ manager width + source bits, or responses misroute. The response mux must also preserve same-ID order (in issue order) while letting different IDs interleave — enforcing the ordering guarantees in the routing path.

5. Common Misconceptions

6. Debugging Insight

7. Verification Insight

8. Interview Questions

9. Summary

The interconnect routes in two directions with two keys: forward by address (decode AxADDR → demultiplex the request to the target subordinate) and response back by ID (multiplex responses to the originating manager using BID/RID). The response mux works via ID extension (Chapter 8.2): the interconnect appends source bits to each manager's AxID so transactions stay distinct (letting managers reuse ID values), the subordinate echoes the extended ID, and the interconnect routes responses home by those bits and strips them so each manager sees its original ID. Two consequences: the ID width grows toward the subordinate — which must carry manager_width + source_bits or responses misroute (budget it) — and the response mux must preserve same-ID ordering while letting different IDs interleave.

The defining insight is the address-forward / ID-backward asymmetry: address says where a request goes (destination in address space), ID says where a response returns (origin manager), and ID extension bridges them by capturing the origin on the way in. Forward bugs are address-side (wrong slave); backward bugs are ID-side (wrong manager, misrouting, ordering) — and the response/ID bugs only surface with multiple managers and ID collisions, so that's the essential verification stress. Next: putting it all together — a full multiple-managers-and-subordinates topology end-to-end.

10. What Comes Next

You've got the routing mechanism; next, the full multi-master/multi-slave picture:

Previous: 12.4 — Arbiter & Arbitration. Related: 8.2 — Transaction IDs and 8.5 — Interconnect Implications for the ID-extension foundation. For the broader protocol catalog, see the AMBA family overview doc.