Skip to content

AMBA AXI · Module 12

Decoder & Address Map

How the AXI interconnect decoder maps AxADDR to a subordinate port — the address map structure, the decode process, unmapped-address DECERR, region constraints (no overlaps/holes), and decode timing/latency.

The interconnect's routing job (Chapter 12.1) is implemented by the decoder and the address map. The address map assigns each subordinate a region of the global address space; the decoder compares each transaction's AxADDR against that map to select the target subordinate port. This is the mechanism that turns an address into a destination — and getting the map right (no overlaps, no unexpected holes, correct sizes) is foundational to a working SoC. This chapter covers the address-map structure, the decode process, unmapped-address handling (DECERR), the region constraints, and decode timing.

1. The Address Map

The address map is the interconnect's table of which address range belongs to which subordinate port. Each subordinate occupies a region defined by a base address and a size (e.g., DRAM at 0x8000_00000xFFFF_FFFF, a peripheral block at 0x4000_00000x4000_FFFF). Together the regions partition (part of) the global address space among the subordinates.

The map is the contract for the whole system: software, masters, and the interconnect must agree on it. It defines where each subordinate "lives" so that an AxADDR unambiguously identifies one destination. Regions are typically aligned and power-of-two sized so the decoder can select a port by comparing just the high address bits (cheap, fast hardware) rather than a full magnitude compare.

Address map: DRAM region, peripheral region, accelerator region, each a base+size mapped to a subordinate port.0x8000_0000 – 0xFFFF_FFFF→ DRAM (S0)0x4001_0000 – 0x4001_FFFF→ Accelerator (S2)0x4000_0000 – 0x4000_FFFF→ Peripherals (S1)unmapped ranges→ DECERR (default slave)Aligned / power-of-twodecode on high bits12
Figure 1 — the address map. Each subordinate occupies a base+size region of the global address space (DRAM, peripherals, accelerator, …). The map partitions the address space so any AxADDR identifies one subordinate. Regions are typically aligned/power-of-two so the decoder selects a port from the high address bits.

2. The Decode Process

When a transaction arrives, the decoder:

  1. Takes its AxADDR.
  2. Determines which region the address falls in (typically by comparing high address bits against each region's base/mask).
  3. Routes the transaction to that region's subordinate port (and remembers the mapping so the response routes back, via the extended ID).

If the address matches no region (a hole / unmapped address), the decoder routes it to a default slave that returns DECERR — the protocol's "no subordinate here" response (Chapter 6.8). The decoder may also drive AxREGION (Chapter 6.5) so a subordinate exposing multiple regions knows which one without re-decoding the address itself.

Because the 4 KB boundary rule (Chapter 7.6) guarantees a burst stays within one region, the decoder only needs to decode the single start address — it can route the whole burst on that one decision, never having to split a transaction mid-flight. This is exactly why the 4 KB rule exists: it keeps decode simple and single-shot.

decode-timing — address decode to subordinate port select

5 cycles
AWADDR 0x40010000 is presented, the decoder produces port select S2 one cycle later, and the transaction is routed to subordinate 2.decode AxADDR → route to S2AxADDR=0x4001_0000 presentedAxADDR=0x4001_0000 pre…decoded → port S2 (registered)decoded → port S2 (reg…aclkawvalidawaddrX40010000400100004001000040010000sel_portXXS2S2S2s2_validt0t1t2t3t4
Figure 2 — decode-timing: AxADDR is presented, the decoder compares it against the address map (often registered, adding a cycle of latency), selects the target subordinate port (S2 here), and routes the transaction. Because the 4 KB rule confines a burst to one region, the single start-address decode routes the whole burst.

3. Region Constraints — No Overlaps, Defined Holes

A valid address map has hard constraints:

  • No overlapping regions. Two subordinates' regions must not overlap — an address in the overlap would be ambiguous (which subordinate?). Overlapping regions are an illegal/broken map.
  • Holes decode to DECERR. Address ranges assigned to no subordinate are unmapped; accesses to them return DECERR from the default slave. Holes are legal (not all of the space is populated) but accessing one is an error the system should handle.
  • Alignment/size for clean decode. Regions sized to powers of two and aligned to their size let the decoder use simple high-bit masking, avoiding expensive full-range compares.

Two related subtleties: aliasing — if the decoder compares only some address bits, an address can alias into a region (sometimes intentional — mirroring a small subordinate across a larger window; sometimes a decode bug); and security — the decoder can incorporate AxPROT (Chapter 6.5) so a secure-only region rejects non-secure accesses at decode time (a TrustZone check in the routing path).

Decode: if AxADDR matches one region route there; if it overlaps two the map is illegal; if it matches none return DECERR.one matchno matchoverlap = bugAxADDRMatches oneregion → routeto that portMatches noregion → DECERR(default slave)Matches two →illegal map(ambiguous)
Figure 3 — address-map constraints. Regions must not overlap (an overlap address is ambiguous — illegal map). Unmapped holes are legal but accesses to them return DECERR via the default slave. Power-of-two aligned regions enable cheap high-bit decode. Watch for aliasing (partial-bit decode mirroring a region) and security checks (AxPROT at decode for secure regions).

4. Decode Timing

The decode is on the address path, so it costs latency and affects timing closure:

  • A combinational decoder produces the port select in the same cycle the address arrives — lowest latency, but the compare logic is in the critical path (can limit clock frequency on a large map).
  • A registered/pipelined decoder adds a cycle (or more) of latency but breaks the critical path, helping frequency on big interconnects.

So decode is a latency-vs-frequency trade, like any pipelining choice. A large address map (many regions) means more comparison logic; pipelining it keeps the interconnect fast at the cost of a cycle on every transaction's address phase. Since the address phase is amortized over a burst (4 KB-confined), a cycle of decode latency is usually a fine trade for the frequency it buys. The decode latency adds to the overall transaction latency, which feeds back into the outstanding-depth needed to hide it (Chapters 8.1/8.5).

Combinational decode is low-latency but limits frequency; registered decode adds a cycle but raises frequency.Combinationalin-cycle select, low latencyCritical pathlimits frequency (large map)Registered+1 cycle latencyBreaks critical pathhigher frequency12
Figure 4 — decode timing trade-off. A combinational decoder selects the port in-cycle (lowest latency, but the compare is in the critical path, limiting frequency on large maps). A registered/pipelined decoder adds a cycle but breaks the critical path (higher frequency). Decode latency adds to transaction latency, feeding the outstanding depth needed to hide it.

5. Common Misconceptions

6. Debugging Insight

7. Verification Insight

8. Interview Questions

9. Summary

The decoder implements the interconnect's routing by mapping AxADDR to a subordinate port using the address map — the table assigning each subordinate a base+size region of the global address space. The decode process matches the address to a region (usually by high-bit comparison, enabled by power-of-two aligned regions) and routes the transaction there; an unmapped hole routes to a default slave returning DECERR, and the 4 KB rule lets a single start-address decode route a whole burst. The map's constraints are hard: no overlaps (ambiguous), holes are legal but error, and alignment enables cheap decode; the decoder may also drive AxREGION and incorporate AxPROT security checks.

Decode sits on the address path, so it's a latency-vs-frequency trade (combinational = low latency but critical-path; registered = +1 cycle but higher frequency), and its latency feeds the outstanding depth needed to hide it. Its bugs are routing problems — wrong-slave (map error/overlap), unexpected DECERR (unmapped/wrong address), missing DECERR (aliasing), timing (combinational on a big map), security leaks (missing AxPROT check) — all localizing to the map or decode logic. Verify the whole map: every region, every boundary, every hole, plus security. Next: the arbiter — how the per-subordinate arbitration that the decoder feeds resolves contention.

10. What Comes Next

You've got address decode; next, resolving the contention it creates:

Previous: 12.2 — Crossbar Architecture. Related: 7.6 — The 4KB Boundary Rule for why one decode routes a burst, and 6.5 — AxPROT, AxQOS & AxREGION for region/security signals. For the broader protocol catalog, see the AMBA family overview doc.