6.3.10 · D2Interconnects, Buses & SoC

Visual walkthrough — IP cores and SoC bus fabric

1,896 words9 min readBack to topic

This page rebuilds the parent's central result — the crossbar complexity formula — from absolutely nothing. We start with two chips that want to talk, and we grow the picture, one wire at a time, until the number falls out on its own.

You do not need to know what a "bus", "master", or "arbiter" is. We define each the instant it is needed, and we draw it.


Step 1 — Two blocks, one wire: what "talking" even means

WHAT. Put one master (call it ) on the left and one slave () on the right. Draw a single line between them.

WHY. Before counting many wires, we must agree what one connection is. A connection is any physical path over which a request can flow from a master to a slave. One master, one slave → exactly one path needed.

PICTURE. The blue box is the master, the green box is the slave, the yellow line is the one path that lets reach .

Figure — IP cores and SoC bus fabric
  • The first counts how many blocks can start a conversation.
  • The second counts how many blocks can answer.
  • Their product counts the master–slave pairs that might ever need to touch — here, just one.

Hold onto that word pair. The whole formula is really a count of pairs.


Step 2 — Add a second slave: one master, two destinations

WHAT. Keep . Add a second slave (say, a UART, while is RAM). Now might want either one.

WHY. A real CPU talks to many things: memory, a timer, a serial port. Each is a separate slave at a separate address. If must be able to reach both, it needs a path to each.

PICTURE. Two yellow lines leave — one to , one to . The little diamond where a line meets a slave is a switch: a gate that is either open (this path carries the current transaction) or closed.

Figure — IP cores and SoC bus fabric
  • = the single master doing the asking.
  • = the number of doors (, ) it might knock on.
  • Product switches, because each door needs its own gate.

Step 3 — Add a second master: now paths can happen at the same time

WHAT. Add master (a DMA engine — a block that copies memory without the CPU, see DMA). Give it its own pair of lines, one to each slave.

WHY — the key idea. In a simple bus only one master may speak at a time; if the CPU is using the wire, the DMA waits. A crossbar instead gives every master its own set of wires so two conversations can run concurrently while . That parallelism is the entire reason we spend the extra switches.

PICTURE. Two blue masters on the left, two green slaves on the right. Every master has a line to every slave. Count the diamonds: there are four.

Figure — IP cores and SoC bus fabric
  • = number of masters (rows in the grid).
  • = number of slaves (columns in the grid).
  • Why multiply? For each of the masters we lay down switches (Step 2 gave switches per master). Doing that times stacks identical rows → total. Multiplication is just " copies of ."

Step 4 — The collision problem: two masters, one slave

WHAT. Let both and want in the same clock cycle.

WHY. Two switches into are open at once → two masters shove data onto 's single input at the same instant. That is an electrical fight; the data is garbage. We need a referee.

PICTURE. Both masters aim at (red = the conflict). A red arbiter block sits on 's door and lets exactly one through; the other's request is held.

Figure — IP cores and SoC bus fabric

How many arbiters? A collision can only happen at a slave (that is where paths converge). So we need one arbiter per slave:

Same reasoning names the address comparators: each slave owns a range of addresses, and something must check "is this request's address mine?" — one comparator per slave, also .


Step 5 — The general grid: reading off all three counts

WHAT. Redraw with general masters and slaves. Label the rows and columns .

WHY. Steps 1–4 built every piece on tiny examples. Now we just read the grid to get the parent's formula for any size.

PICTURE. A full lattice. Every crossing is a switch (blue). The bottom of every column carries one arbiter + one address comparator (red).

Figure — IP cores and SoC bus fabric

Step 6 — Why it stops working: the growth curve

WHAT. Plot switch count as and grow together (say , so switches ).

WHY. The parent says flat crossbars "don't scale beyond ~10–20 ports." Here is why in one picture: doubling the ports quadruples the switches. Cost climbs as area, not as length.

PICTURE. The blue curve (crossbar) rockets past the yellow line (a single shared bus). At that is switches on the chip — the point where designers switch to a hierarchical topology or a Network-on-Chip.

Figure — IP cores and SoC bus fabric
  • is the count on the square grid.
  • Replacing by gives : four times the switches for two times the ports. That quadratic blow-up is the wall.

Step 7 — The degenerate cases: check the corners

Every honest derivation must survive its extremes. Feed the formula tiny/empty inputs.

Case switches Does the picture agree?
Nobody talks any No masters → no wires. ✔
Nothing to talk to any No slaves → no destinations. ✔
One-to-one link Exactly Step 1's single wire. ✔
Single shared bus but 1 path (bus shares 1 wire, not ) Cheaper, but only 1 transaction at a time — Step 3's parallelism is gone.

The formula degrades gracefully: set either factor to and you correctly get switches — no special-casing required.


The one-picture summary

Figure — IP cores and SoC bus fabric

One master–slave pair (Step 1) → a row of switches for one master (Step 2) → stack such rows for a full grid of switches (Step 3) → hang one arbiter under each of the columns to settle collisions (Step 4) → read off all costs (Step 5) → and watch the count explode as so we know when to stop (Step 6).

Recall Feynman retelling — say it back in plain words

Picture blocks that ask on the left and blocks that answer on the right. If one asker must reach several answerers, it needs one little on/off gate — a switch — for each answerer. Line up all the askers as rows and all the answerers as columns; wherever a row crosses a column you drop a switch. So the number of switches is just rows times columns: times . When two askers grab the same answerer, they collide, so each answerer keeps a referee (an arbiter) at its door — one referee per column, giving of them. The whole thing is a rectangle: rows columns squares. That is why the cost grows like the area of the rectangle, and why doubling everything quadruples the switches — which is exactly when engineers give up on the flat grid and build something smarter.

Recall

How many switches does a full crossbar of masters and slaves need? ::: — one per (master, slave) pair. Why one arbiter per slave and not per master? ::: Collisions happen only where paths converge — at a slave — so each slave (column) needs its own referee, giving arbiters. What do the extra switches buy over a single shared bus? ::: Concurrency — can run at the same time as . If you double both and , how does the switch count change? ::: It quadruples, because .

Related: Interconnect Topologies · Cache Coherence Protocols · Memory-Mapped I/O · DMA · PCIe