The idea: many masters, many slaves, one chip
A system on a chip has several blocks that start transfers, the masters: here a CPU, a DMA engine, a GPU and an accelerator (ACC). It has several blocks that answer, the slaves: here an SRAM, a DRAM controller, a UART and a timer. The wires that connect them are the interconnect. The bus protocol says what the signals mean in each cycle (that is on AMBA Buses). This page asks a different question: how many transfers can move at the same time, and what it costs.
To compare them fairly, every transfer on the page is the same size: 4 words, one header (or address) word and 3 data words. One word crosses one set of wires per clock cycle. All requests are ready at cycle 0, and a master sends its own requests in order. The panel on the right lists every packet: its latency (cycles until its last word arrives) and its wait (cycles lost to other masters). The summary under it keeps the result of each interconnect for the current traffic, so you can run the same traffic three times and compare.
The shared bus and its arbiter
A shared bus is one set of wires that every block taps into. Only one master may drive it at a time, or the signals would clash. An arbiter decides who goes next. This page uses round-robin: the arbiter keeps a pointer, grants the first requesting master at or after it, then moves the pointer just past the winner. So a master that was just served goes to the back of the line, and no one can starve.
A bus is cheap and simple, but it moves one transfer at a time, wherever the transfers go. Four requests to four different slaves take 4 × 4 = 16 cycles. CPU waits 0 cycles, DMA 4, GPU 8 and ACC 12 (Demo: shared bus, round-robin, 4 requests). The bus moves 1 word per cycle, and adding more masters only makes the line longer. A fixed-priority arbiter is simpler still, but a busy high-priority master can then shut out a low-priority one forever.
The crossbar
A crossbar gives every master its own row of wires and every slave its own column. At each of the 4 × 4 = 16 crossings sits a switch, the crosspoint. Closing the crosspoint at row CPU, column DRAM connects the CPU to the DRAM controller, while other crosspoints connect other pairs. Each slave port has its own arbiter, because the only conflict left is two masters that want the same slave.
With four different slaves, all four crosspoints close in the first slot and everything is done in 4 cycles: 4 words per cycle (Demo: crossbar, 4 different slaves at once). When CPU and GPU both want DRAM, DRAM's arbiter lets CPU go first and GPU goes in the next slot, so the run takes 8 cycles and GPU waits 4 (Demo: crossbar, two masters want DRAM). A master that loses also holds up its own later requests, even ones for a free slave. That is head-of-line blocking.
A network on chip: packets, flits, XY routing, wormhole
A network on chip (NoC) treats the chip like a tiny computer network. The chip is cut into tiles. Each tile has a router, and wires run only to the neighbouring routers. Here tile i sits at (x, y) = (i mod 2, i div 2) and holds master i and slave i: CPU and SRAM on tile 0, DMA and DRAM on tile 1, GPU and UART on tile 2, ACC and the timer on tile 3.
- A transfer becomes a packet, cut into flits (flow-control units): a head flit H with the destination, body flits B1 and B2, and a tail flit T. Each flit is one word.
- XY routing: a router first sends the head along x until the column is right, then along y. GPU at (0,1) to DRAM at (1,0) goes R2 → R3 → R1, 2 hops. The rule is fixed and needs no tables, and because a packet never turns from y back to x, packets cannot wait on each other in a circle (no deadlock).
- Wormhole flow control: each link has room for one flit. The head reserves each link it enters, and the body follows. The reservation ends when the tail has passed. If the head must wait, the whole packet stops where it is, spread over several links like a worm. Coloured links on the canvas are reserved; a red outline and letter mark a flit that could not move in that cycle.
One flit crosses one link per cycle: the inject link from the master to its router, each router-to-router hop, and the eject link into the slave. The head arrives after hops + 2 cycles, and the 3 flits behind it arrive one per cycle after that. So a packet that meets no one has a zero-load latency of hops + 5 cycles: 5 on its own tile, 6 for one hop, 7 for two (Demo: NoC, XY routing corner to corner).
In Demo: NoC hot spot, wormhole stalls all four masters write to DRAM. DMA sits on DRAM's own tile, so its head asks first and takes the eject link R1→DRAM; its packet is done in cycle 5. CPU's and ACC's heads wait at R1, and GPU's head waits at R3 behind ACC's worm. When the link frees up, round-robin gives it to ACC (done at 9), then CPU (13), then GPU (17). Only one packet can enter DRAM at a time, so the NoC takes 17 cycles, no better than the bus.
Latency against throughput
Cycles to finish each traffic pattern on the page (all transfers are 4 words; in brackets, words per cycle):
| Traffic | Shared bus | Crossbar 4×4 | NoC 2×2 mesh |
|---|---|---|---|
| one transfer, CPU → DRAM | 4 | 4 | 6 |
| 4 masters → 4 different slaves | 16 (1.00) | 4 (4.00) | 6 (2.67) |
| each master → slave on its own tile | 16 | 4 | 5 (3.20) |
| corner to corner, 2 hops each | 16 | 4 | 7 (2.29) |
| CPU and GPU both → DRAM | 16 | 8 (2.00) | 10 (1.60) |
| hot spot, all four → DRAM | 16 | 16 | 17 (0.94) |
| stream, 4 different slaves × 3 | 48 (1.00) | 12 (4.00) | 14 (3.43) |
Three things stand out. A single packet is slowest on the NoC, 6 cycles against 4, because every router hop costs a cycle (Demo: one transfer alone, bus then NoC). Many packets on different links move together, so the NoC beats the bus by far, and on a long stream the hop cost is paid only once at the start: 14 cycles for 48 words, close to the crossbar's 12 (Demo: the same stream on bus, crossbar, NoC). And no interconnect beats a busy slave: with all four masters on DRAM, all three need about 16 cycles.
What each one costs
With N masters and M slaves, and a NoC mesh of k × k tiles:
| Shared bus | Crossbar | 2D mesh NoC | |
|---|---|---|---|
| Wires | 1 shared set | N rows + M columns | 4k(k − 1) router links, plus 2 per tile |
| Switching logic | 1 arbiter, 1 multiplexer | N × M crosspoints, M arbiters | k² routers with 5 ports and small buffers |
| Transfers at once | 1 | up to min(N, M) | up to one per link |
| This page, 4 × 4 | 1 bus | 16 crosspoints | 4 routers, 8 links |
| 64 × 64 | 1 bus, 64-way arbiter | 4096 crosspoints | 64 routers, 224 links |
| Longest wire | across the chip | across the chip | to the next tile |
A bus is the cheapest and is fine for a few slow blocks. A crossbar gives the most bandwidth, but its area grows with N × M and its long wires get slow. For dozens of blocks, a NoC grows by adding tiles, and its short wires keep the clock fast. That is why many-core chips use meshes. Real chips often mix the three: a crossbar or NoC for the CPU, GPU and memory, and a simple bus behind a bridge for the slow peripherals.
See also AMBA Buses for the AXI, AHB and APB signals of a single transfer, clock by clock, and Interconnect Topologies for rings, meshes, tori, hypercubes and fat trees that link whole computers. On a multicore chip the interconnect also carries cache-coherence messages, which is what makes the traffic on False Sharing and MESI costly. A DMA engine is one more master on the interconnect, as on the DMA page.
See also the asynchronous FIFO that carries data safely between blocks running on different clocks.
See also Data-Parallel Training, where link bandwidth between GPUs decides how fast a ring all-reduce or a parameter server can average gradients.
See also a FIR filter accelerator, a slave for the CPU's register writes and a master for its own DMA on the same interconnect.
What the page leaves out
- Reads and responses: every transfer here is a write with no answer. A real read sends a request one way and the data back the other way, often over a second network.
- Split transactions and outstanding requests, address decoding, bus bridges and clock-domain crossings.
- Router pipelines of 2 to 5 cycles per hop, deeper buffers, credit-based flow control and virtual channels, which let a packet pass a blocked worm on the same link.
- Store-and-forward and virtual cut-through switching, adaptive routing, larger meshes, rings and tori on chip.
- Quality of service, weighted or priority arbitration, and the wire delay and power of each design.