6.3.1 · D3Interconnects, Buses & SoC

Worked examples — Bus topologies and arbitration

2,496 words11 min readBack to topic

This page is the practice ground for Bus topologies and arbitration. The parent note gave you the ideas: shared buses, crossbars, fixed-priority and round-robin arbitration, time-division multiplexing (TDM). Here we compute — and we deliberately hunt for the corners: the tiniest system, the biggest, the tie, the starving master, the fully-loaded slot table.

Before we touch a single number, let us pin down the vocabulary so nothing is used unexplained.


The scenario matrix

Every question this topic can ask falls into one of these cells. The worked examples below are labelled with the cell they cover, and together they fill the whole table.

Cell Scenario class The corner it stresses
A Shared-bus bandwidth split many masters, one pipe — the bottleneck
B Crossbar switch count & aggregate BW quadratic hardware growth; the cap
C Degenerate crossbar ( or ) when a crossbar collapses to a plain wire
D Fixed-priority worst-case latency the starving lowest-priority master
E Round-robin bounded latency the guarantee, and the "just-missed-my-turn" worst case
F TDM bandwidth allocation fractional slot shares; the unused-slot waste
G Single-master edge () arbitration with nobody to fight
H Real-world word problem mixed: pick topology + scheme, justify
I Exam-style twist a "fair-looking" scheme that still starves

Cells map to examples: A→Ex1, B→Ex2, C→Ex3, D→Ex4, E→Ex5, F→Ex6, G→Ex7, H→Ex8, I→Ex9.


Worked examples

Example 1 — Shared bus, the bandwidth split (Cell A)

Forecast: guess the per-master number before reading on. Bigger or smaller than 100 MB/s?

  1. Identify the shared resource. Why this step? On a shared bus only one transaction happens at a time (time-division multiplexing). The total is not multiplied by having more masters — it is divided among them.
  2. Apply the split. The saturated per-master share is Why this step? masters take equal turns, so each sees a tenth of the pipe.
  3. Compute. .

Verify: Sanity check — 10 masters 13.3 MB/s MB/s . The parts add back to the whole pipe. ✓ (This is exactly the "13 MB/s per device" figure from the parent's PCI example.)


Example 2 — Crossbar: switches and aggregate bandwidth (Cell B)

Forecast: guess the switch count — is it 7, 11, or something bigger?

Look at the figure: every master row crosses every slave column, and a switch (●) sits at each crossing.

Figure — Bus topologies and arbitration
  1. Count the crossings. Why this step? Each master needs an independent path to each slave, so the switches form an grid.
  2. Cap the concurrency. Why this step? Two masters cannot share one slave at the same instant — so the number of simultaneous transfers can never exceed the smaller of and .
  3. Aggregate bandwidth. Each of those 4 concurrent links runs at full speed:

Verify: Only 4 slaves exist, so at most 4 transfers land at once — the bandwidth is bottlenecked by slaves, not the 7 masters. If we'd (wrongly) used we'd claim 140 GB/s, which is impossible: 3 masters would have nowhere to write. The is doing real work. ✓


Example 3 — Degenerate crossbar (Cell C)

Forecast: Does a crossbar still help here, or has it collapsed?

  1. Switch count. switches — just one column. Why this step? With one slave there is only one destination column of the grid.
  2. Concurrency cap. . Why this step? Everybody wants the same slave, so only one transfer can proceed at a time.
  3. Aggregate bandwidth. .

Verify: With one slave the crossbar offers no parallelism — it degenerates into a shared bus with an arbiter in front of the single slave. The 5 masters split exactly as in Example 1. So a crossbar only pays off when . ✓ This is the degenerate corner that catches people who assume "crossbar = always parallel."


Example 4 — Fixed-priority worst-case latency (Cell D)

Forecast: Is 's wait bounded or infinite?

  1. List who jumps the queue. Why this step? Fixed priority always serves the highest requester first. is served only when no higher master is requesting.
  2. Sum the higher-priority transactions. With higher masters each needing : if and each want the bus exactly once ahead of .
  3. Now the pathological case. Why this step? If continuously re-requests, step 1 never clears — 's wait is unbounded (starvation). The 8 µs figure only holds when higher masters have finite demand.

Verify: Units: , a time — correct. And the honest answer to the second half is : fixed priority gives no latency bound to the bottom master. This is exactly why the parent flags "debug port waits indefinitely." ✓


Example 5 — Round-robin bounded latency (Cell E)

Forecast: Will round-robin's bound be , , or ?

The figure shows the circular counter that hands out turns.

Figure — Bus topologies and arbitration
  1. Set up the "just-missed" worst case. Why this step? The longest a master can wait is right after its turn passed — now everyone else goes before it comes around again.
  2. Count the intervening masters. In modulo- order, masters go first — that is masters.
  3. Multiply by the per-turn cap.

Verify: Every master now has a finite guarantee of 9 µs — no starvation, unlike Example 4 where could wait forever. The price: a busy master waits behind idle ones. Units check: . ✓


Example 6 — TDM slot allocation (Cell F)

Forecast: Will the three shares add up to the full 800 MB/s, or is some bandwidth stranded?

  1. Slot fraction → bandwidth. Why this step? A master gets the whole pipe only during its slots; over a full cycle it sees the fraction of the total .
  2. Compute each.
  3. Check slot conservation. . Why this step? If the assigned slots exactly fill the cycle, no slot is idle and no bandwidth is wasted.

Verify: Bandwidths sum to — the whole pipe is accounted for, nothing stranded. Had we assigned only 7 slots, one slot ( MB/s) would sit idle every cycle even if a master is desperate — TDM's rigidity cost. ✓


Example 7 — Single master, (Cell G)

Forecast: Does arbitration even mean anything here?

  1. Plug into the round-robin bound. Why this step? There is nobody else in the circle, so the master never waits.
  2. Arbiter logic needed. Why this step? With one requester there is no conflict to resolve — the grant can be tied permanently high. Zero arbitration gates required.

Verify: A single-master bus needs no arbiter and has zero contention latency — the degenerate baseline every scheme must reduce to. Both formulas ( for fixed priority with 0 higher masters, and for round-robin) correctly collapse to . ✓


Example 8 — Real-world word problem: pick the topology (Cell H)

Forecast: Guess the crossbar's speed-up factor over the shared bus.

  1. Shared-bus throughput. All 5 masters split one pipe: total, each (Cell A logic).
  2. Crossbar throughput. Why this step? Independent masters hitting different banks run concurrently, up to :
  3. Speed-up. . The crossbar wins fivefold because the accesses are to different slaves.
  4. Arbitration choice. Why this step? Audio DMA needs a guaranteed deadline. Fixed priority could starve it if it's low; round-robin bounds its wait to ; TDM gives it a reserved slot so its bandwidth is deadline-guaranteed. Choose TDM (or round-robin with a reserved share) — never plain fixed priority for a hard-real-time master.

Verify: Shared GB/s each vs crossbar GB/s aggregate; and speed-up , exactly as theory predicts. Units all GB/s. ✓


Example 9 — Exam twist: the "fair-looking" scheme that still starves (Cell I)

Forecast: True round-robin bounds waits — does this variant still?

  1. Trace the scan. Why this step? "Resume from master 0" is the trap: after each grant the pointer resets to , not to 's successor. So the scan order is always from the top.
  2. Follow the greedy master. always requests and is always scanned first → is granted every single round. The scan never reaches while is active.
  3. Diagnose. This is fixed priority in disguise — the reset destroys the "rotate the starting point" property that makes real round-robin fair. 's wait is unboundedstarvation.
  4. The fix. After granting master , advance the start pointer to so the previously-served master goes to the back of the line. Then the bound is restored.

Verify: Broken variant: waits (starves). Correct rotating variant: bound . The single word "resume from 0 vs from " flips fair into unfair — the classic exam gotcha. ✓


Recall

Round-robin worst-case wait for masters, per-turn cap
Crossbar switch count for masters and slaves
Crossbar peak concurrent transfers
TDM bandwidth for a master with of slots on pipe
Why fixed priority can be unsafe for a real-time master
the lowest-priority master can starve indefinitely (unbounded latency)
What a crossbar with degenerates into
a plain shared bus (no parallelism, )

Connections