6.3.9 · D4Interconnects, Buses & SoC

Exercises — System-on-Chip (SoC) integration

2,398 words11 min readBack to topic

This page is a self-test ladder. Each rung climbs one cognitive level, from "can you recognise the term?" up to "can you architect a whole subsystem?". Every problem has a full worked solution hidden inside a collapsible callout — try first, then reveal.

Parent topic: System-on-Chip (SoC) integration. If you get stuck on a concept, the linked notes rebuild it: AXI Protocol, Clock Domain Crossing Techniques, Power Management in SoCs, Network-on-Chip (NoC), AMBA Bus Standards, Physical Design Flow, Formal Verification Methods.

Before we start, three symbols are used repeatedly. We define each in plain words now so nothing is "assumed later":


Level 1 — Recognition

Exercise 1.1 (L1)

Match each block to whether it is normally a master or a slave on the interconnect: (a) ARM Cortex CPU core, (b) DDR memory controller, (c) DMA engine, (d) UART register block.

Recall Solution 1.1

A master issues read/write requests on its own initiative; a slave only ever answers a request aimed at its address range.

  • (a) CPU — master (fetches instructions, reads/writes data).
  • (b) DDR controller — slave (it is targeted by an address; it responds).
  • (c) DMA engine — master (it moves data by issuing its own reads/writes — that is the whole point of DMA).
  • (d) UART registers — slave (the CPU pokes its config registers).

Answer: master = a, c ; slave = b, d.

Exercise 1.2 (L1)

Name the three AMBA bus flavours mentioned in the parent note and order them from highest performance to simplest/lowest-speed.

Recall Solution 1.2

From the AMBA Bus Standards family:

  • AXI — high performance, supports out-of-order, burst, separate read/write channels.
  • AHB — mid-tier shared bus.
  • APB — simplest, low-speed, ideal for peripheral registers like the UART.

Level 2 — Application

Exercise 2.1 (L2)

A crossbar has masters and slaves. Each link runs at GB/s. Compute the best-case total bandwidth using

Recall Solution 2.1

WHAT we do: plug into the formula. WHY the : at most one transfer can enter each slave port per cycle, and at most one can leave each master port — so the number of simultaneous transfers is capped by whichever side has fewer ports. See the figure below — three coloured paths run in parallel, the 4th master must wait.

Figure — System-on-Chip (SoC) integration

Exercise 2.2 (L2)

A UART IP has an APB slave port; your CPU speaks AXI. Its registers occupy a 4 KB window at 0x4000_0000. (a) What glue block must you insert? (b) Give the decode rule for the interconnect using the top address bits.

Recall Solution 2.2

(a) An AXI-to-APB bridge — it translates AXI's channelled protocol into APB's simple enable/select handshake. Without it the two protocols never agree and the bus hangs. (b) A 4 KB window means the low 12 bits () are the offset inside the peripheral, so the decoder inspects address[31:12]: Careful: 0x4000_0000 >> 12 = 0x40000 (5 hex digits), not 0x4000.

Exercise 2.3 (L2)

CPU runs at 1 GHz; the UART needs a 50 MHz clock. What integer divider do you program, and what extra hardware is mandatory on control signals crossing between the two clocks?

Recall Solution 2.3

So uart_clk = cpu_clk / 20. Because 1 GHz and 50 MHz are effectively asynchronous domains, every control signal crossing needs a CDC synchroniser (see Clock Domain Crossing Techniques) — a two-flop synchroniser for single-bit signals.


Level 3 — Analysis

Exercise 3.1 (L3)

Same crossbar as 2.1 (, , GB/s). All four masters now target the same slave (DRAM). What is the delivered bandwidth, and by what factor did it drop from best case?

Recall Solution 3.1

A slave has one port. If everyone wants DRAM, transactions serialise through that single port: Drop factor vs. best case: Lesson: the crossbar didn't get slower — the access pattern collapsed the parallelism. This is why hot-spot slaves (DRAM) often get multiple ports / banks.

Exercise 3.2 (L3)

An engineer bolts a plain two-flop synchroniser onto each of the 32 bits of an AXI data bus crossing into a slower domain. Explain precisely why the receiver reads garbage, and name the correct fix.

Recall Solution 3.2

Why it breaks: each bit's synchroniser resolves metastability independently. On any given crossing cycle some bits may have settled and some may still be resolving, so the 32-bit word the receiver latches is a mix of old and new bits — a value that never existed. This is bit skew, and it is invisible on single-bit signals. Correct fixes: (i) a handshake — hold the 32-bit data static while a synchronised valid pulse tells the receiver "sample now, all bits are stable"; or (ii) an async FIFO using Gray-coded pointers (only one pointer bit changes per step, so the pointer itself is safe to synchronise). See Clock Domain Crossing Techniques.

Exercise 3.3 (L3)

A GPU power domain draws 2 W when idle (almost all leakage) and 10 W when active, and is active only 10% of the time. If you power-gate it whenever idle, what is the average power saved versus leaving it always powered on?

Recall Solution 3.3

Baseline (never gated): idle 90% at 2 W, active 10% at 10 W: Gated: during idle the domain is fully off (0 W); active period unchanged: Average saved: This matches the parent note's shortcut W, because we saved exactly the idle-leakage term. See Power Management in SoCs.


Level 4 — Synthesis

Exercise 4.1 (L4)

You integrate an Image Signal Processor (ISP) into a mobile SoC. It: (a) has an AXI master port (streams pixels to DRAM), (b) sits in its own power domain that is off when the camera is idle, (c) runs at 400 MHz while the CPU runs at 1.2 GHz. List every integration mechanism you must add, and say what each one prevents.

Recall Solution 4.1

Walk the four integration axes from the parent note:

  1. Interconnect: ISP is an AXI master → wire it as a new master port on the AXI crossbar; assign DRAM (its target) an address range in the decoder. Prevents: protocol mismatch / mis-routing.
  2. Power domain plumbing (Power Management in SoCs):
    • Power switches gated by the PMU (turn the ISP domain on/off).
    • Isolation cells clamp ISP outputs to a known value while it is off. Prevents: floating outputs leaking current into live neighbours.
    • Level shifters if the ISP runs at a different voltage than the AXI fabric. Prevents: a low-domain "high" not registering as high in the higher-voltage domain.
    • Retention flops (on an always-on rail) for any config registers that must survive power-down. Prevents: losing configuration on wake.
  3. Clock Domain Crossing (Clock Domain Crossing Techniques): 400 MHz ↔ 1.2 GHz are asynchronous. The AXI stream crossing needs an async AXI bridge / async FIFO (multi-bit → handshake, not raw two-flop). Prevents: metastability and 32-bit bit-skew.
  4. Interrupt wiring: connect isp_irq (frame-done) to a free interrupt-controller input so the CPU is notified. Prevents: CPU polling / missed frames.

Exercise 4.2 (L4)

The ISP clock is . Find the integer divider , and confirm the two clocks are asynchronous even though is an integer — one sentence on why CDC is still required.

Recall Solution 4.2

Even with an exact integer divide, the divided clock's edges are generated by a separate PLL/divider path with its own phase and jitter; the tool treats them as asynchronous unless the entire clock tree is provably phase-locked, so CDC synchronisers are still mandatory across the boundary.


Level 5 — Mastery

Exercise 5.1 (L5)

A many-core accelerator has 16 masters. (a) Which interconnect architecture (shared bus / crossbar / NoC) do you pick and why? (b) A full crossbar to 16 slaves costs area . Compare crossbar area growth to shared-bus and argue quantitatively why NoC wins at this scale.

Recall Solution 5.1

(a) With 16 masters we are past the crossbar sweet spot (3–8). Choose a Network-on-Chip (Network-on-Chip (NoC)) — packet-switched routers scale to 100+ cores. (b) Crossbar area grows as the full connectivity matrix: A shared bus is wire-bundle but serialises everyone → useless bandwidth at 16 masters. A NoC spends area on routers that grows roughly linearly ( number of nodes) while still allowing many simultaneous packet flows. So: the crossbar's quadratic blow-up is what makes it uneconomical here, while the shared bus's single serial path throttles throughput. NoC is the only option that scales in both area and bandwidth.

Exercise 5.2 (L5)

Estimate how the crossbar switch-cell count grows going from 4 masters/4 slaves to 16/16, and state the growth factor. Then state the general rule for why fabrics "don't scale".

Recall Solution 5.2

Doubling both dimensions quadruples cells; a increase in each dimension gives a increase overall. Rule: area scales as the product (quadratic when ), so every doubling of node count multiplies fabric cost by . That superlinear cost is exactly why the industry switches from crossbars to packet-switched NoCs (linear-ish scaling) past a handful of masters.


Recall Quick numeric recap (self-check)

Crossbar best case ::: GB/s Crossbar worst case (shared slave) ::: GB/s, a drop UART divider (1 GHz → 50 MHz) ::: 20 ISP divider (1.2 GHz → 400 MHz) ::: 3 Decode bits for a 4 KB window ::: top 20 bits, address[31:12] == 0x40000 GPU power-gating average saving ::: 1.8 W Crossbar area 4×4 → 16×16 ::: 16 → 256 cells, growth