How Do SoC Interconnects and Memory Maps Work?

An SoC interconnect connects every master to every slave it may use. Each slave owns an address range in the memory map; when a master issues a transfer, the interconnect decodes its address, routes it to the slave that owns it, and returns a decode error if nobody does. When two masters want the same slave at once, an arbiter decides who goes first. Slow peripherals usually sit behind a bridge to a simpler bus such as APB.

What you'll learn

  • What a memory map is, with a worked example
  • How address decoding picks a slave
  • Arbitration between masters
  • Bridges from AXI to APB
  • How to choose base addresses
Two masters, three slavesA CPU and a DMA engine connect as masters to an AXI interconnect. It routes transfers to a UART at 0x4000_0000, GPIO at 0x4001_0000 and a custom peripheral at 0x4400_0000.CPUDMAAXI interconnectUART0x4000_0000GPIO0x4001_0000Custom0x4400_0000
The interconnect decodes each address and arbitrates when both masters want the same slave.

A memory map, worked

SlaveBaseSizeLast address
UART0x4000_00004 KiB0x4000_0FFF
GPIO0x4001_00004 KiB0x4001_0FFF
Custom peripheral0x4400_000064 KiB0x4400_FFFF

Each base is aligned to its size, so decoding needs only the upper address bits. For the 64 KiB custom range, bits 31 to 16 must equal 0x4400; bits 15 to 0 are the offset within the slave, and the peripheral uses only bits 3 and 2 of those to pick one of its four registers. An address such as 0x4000_2000 matches no slave, so the interconnect answers DECERR.

Arbitration

When the CPU and the DMA both address the UART in the same cycle, the interconnect grants one and stalls the other by holding its READY low. Common policies are fixed priority (simple, but a busy high-priority master can starve the others) and round robin (each requester gets a turn). Separate slaves can be served at the same time in a crossbar interconnect, which is why a DMA copy to the custom peripheral need not stop the CPU talking to the UART.

Bridges to APB

Peripherals such as UARTs and timers need neither AXI's bandwidth nor its complexity. An AXI-to-APB bridge turns each AXI transfer into an APB one: a setup clock, then an access clock that may be stretched by the slave's PREADY. The APB verification project on this site tests exactly such a slave.

Choosing base addresses

  • Align every base to the size of its range, so decoding is a simple compare of the top bits.
  • Leave gaps for growth, so a new peripheral doesn't move the others.
  • On a Zynq, put PL peripherals in the general-purpose port's window, 0x4000_0000 to 0x7FFF_FFFF for M_AXI_GP0, which Vivado's address editor does for you.
  • Write the map down in one place and generate headers for software from it.

Common mistakes

  • Overlapping ranges, which make the decoder ambiguous.
  • Bases not aligned to their size, which needs a full comparator.
  • Forgetting that software uses byte addresses: register 3 of a 32-bit slave is at offset 0xC.
  • Hard-coding addresses in drivers instead of using generated headers.

Check your understanding

  • Q1. Which slave answers 0x4001_0004? Answer: GPIO, at offset 4.
  • Q2. What does the interconnect return for an address no slave owns? Answer: a decode error, DECERR.
  • Q3. A slave needs 256 bytes. Which bases are allowed if bases must be aligned? Answer: any multiple of 0x100.

The SoC series

Related

Sources

Last verified

The address decoding is checked in the site's tests (lib/content2Numbers.test.js) on 17 November 2026; the Zynq address window is from UG585.