6.3.9 · D3Interconnects, Buses & SoC

Worked examples — System-on-Chip (SoC) integration

4,480 words20 min readBack to topic

This page is the drill hall for the parent topic. The parent told you what the pieces are (IP blocks, interconnect, CDC, power domains). Here we throw every kind of scenario at you and work each one to a number, so that on the exam or in a real design review you never meet a case you have not already seen.

Before any formula appears, remember the four number-producing tools this topic uses. We will re-earn each one as it shows up. Every symbol is defined the moment it appears:

  • Crossbar bandwidth — where = number of masters (things that issue requests, e.g. CPU), = number of slaves (things that answer, e.g. memory), = bandwidth of one link in GB/s. Answers "how many transfers can happen at once?"
  • Metastability MTBF — where = time we give a flop to settle, = the transistor's settling time-constant. Answers "how long between crashes if I wait ?"
  • Dynamic power — where (activity factor) = the fraction of clock cycles on which a node actually switches (a pure number between 0 and 1; if a wire toggles every other cycle, ), (capacitance) = the electrical "bucket size" of all the wires being charged, in farads (bigger nodes store more charge), = supply voltage, = clock frequency. Answers "how much energy per second does switching burn?"
  • Address decode address[31:12] == base — full derivation of this notation is done fresh in Example 7 (do not trust the shorthand until then). For now read it loosely as "does this request's high bits match a peripheral's start tag?" Answers "which slave owns this request?"

The scenario matrix

Every SoC-integration question is one cell of this grid. The worked examples below are tagged with the cell(s) they cover, so by the end every cell is filled.

Cell Case class What makes it tricky Covered by
A Crossbar — best case (, all distinct) max parallelism Ex 1
B Crossbar — worst case (all target one slave) serialization Ex 1
C Crossbar — degenerate (, single memory) Ex 2
D Crossbar — (more masters than slaves) ports on slave side limit Ex 2
E CDC — single bit, MTBF sizing exponential in wait time Ex 3
F CDC — multi-bit bus, tiny-but-nonzero failure 2-flop fails, must switch tool Ex 4
G Power — steady power-gating savings + overhead duty cycle weighting, break-even Ex 5
H Power — voltage scaling (DVFS), law quadratic in Ex 6
I Address map — no overlap / decode half-open ranges, off-by-one traps Ex 7
J Word problem (real phone SoC) pick the right tool Ex 8
K Exam twist (combine two tools) interconnect and power together Ex 9
L Limiting behaviour (, ) edge sanity checks Ex 10

Example 1 — Crossbar best case vs worst case (cells A, B)

Forecast: guess before reading. Best case should be "several links at once"; worst case should be "just one link". Write your two numbers down.

Figure — System-on-Chip (SoC) integration

Figure caption — the crossbar grid. Each row is a master (CPU, GPU, DMA, DSP), each column is a slave (S0…S5). A cell at (row , column ) is the possible path from master to slave . A lit amber cell is an active transfer this cycle. The rule the picture enforces: the crossbar can light at most one cell per row (a master issues one thing at a time) and one cell per column (a slave answers one master at a time). The four amber cells drawn all sit in different rows and different columns — that is the best case, and counting them gives you the answer to part (a) directly. Now the steps:

  1. Count how many cells can be lit at once. Using the "one-per-row and one-per-column" rule you can see in the figure, the maximum number of simultaneously lit cells is the smaller of #rows and #columns. Why this step? This is exactly why the tool is and not or — a slave with a single port (one column) cannot answer two masters in the same cycle, so lit cells can never exceed the number of columns, nor the number of rows.
  2. Plug in for best case. . So GB/s. Why this step? means every master can find its own distinct slave (its own column) → all four transfer in parallel, exactly the four amber cells in the figure.
  3. Worst case: all target slave 0. Now only column 0 can be lit, and only one cell in it. So one transfer: GB/s. Why this step? Arbitration serializes the four requests through the single port (single column) of slave 0.

Verify: Best case GB/s is the single-link GB/s — matches "4 parallel lanes" = 4 lit cells. Worst case equals one link — matches "everyone queues" = one lit cell. Units: (links)(GB/s) = GB/s. ✓


Example 2 — Single memory & more masters than slaves (cells C, D)

Forecast: (a) is a degenerate case — one door for eight people. (b) has more masters than doors.

Figure — System-on-Chip (SoC) integration

Figure caption — two collapsed grids. Left grid: rows (masters) but only one column, so at most one amber cell lights — the crossbar has degenerated into a shared bus. Right grid: rows, columns, with three amber cells in distinct columns — the slave side (3 columns) caps how many can light, no matter how many rows crowd in. The picture makes obvious: count the columns whenever there are fewer columns than rows.

  1. (a) Apply . , so GB/s. Why this step? One slave = one port = one transfer per cycle, no matter how many masters. The extra 7 masters just wait — the crossbar collapses to a shared bus (left grid).
  2. (b) Slave side is the bottleneck. , so GB/s. Why this step? Even with 8 eager masters, only 3 slaves can answer at once. When , the answer is capped by — the master count stops mattering above (right grid, 3 lit columns).

Verify: In (a), adding masters never raises bandwidth past — sanity: a single memory cannot exceed its own port. In (b), and so the cap sits on the slave side. ✓


Example 3 — CDC single-bit synchronizer MTBF (cell E)

First we must earn the MTBF tool. When the first flop of a synchronizer samples a signal that is changing, its output can hang at a half-voltage ("metastable") for a while before snapping to 0 or 1. The chance it is still undecided after waiting a time shrinks like , where (~ ns) is how fast the transistor "makes up its mind". Because failures get rarer exponentially, the mean time between failures is

What are the two device constants, physically? A metastable flop behaves like a ball balanced on a hill: the further off-centre it starts, the faster it rolls off. (resolution time-constant, units: seconds, ~ ns) is how fast it rolls — a property of the transistor's gain and load, so bigger/faster transistors give smaller and settle sooner. (metastability window constant, units: seconds, ~ ns) measures how wide the "danger window" around the clock edge is — the sliver of input arrival times that can trigger a metastable event at all. It comes from the flop's aperture (setup+hold region) and is measured on the bench for a given cell. Together the denominator counts metastable events attempted per second: how wide the window is () how often we sample () how often the data toggles into that window (). The exponential numerator then says how many of those attempts survive the wait. We use the exponential, not a linear model, because settling is a decay process — the deeper you wait, the disproportionately safer you get.

Figure — System-on-Chip (SoC) integration

Figure caption — the resolution decay. The amber curve is : the probability a flop is still undecided after waiting . It falls off a cliff. The vertical cyan lines mark ns (2-flop) and ns (3-flop) — see how the second flop pushes you far down the tail.

Forecast: , and is enormous, so expect years, not seconds.

  1. Compute the exponent. , and . Why this step? This factor is the whole payoff of adding the second flop.
  2. Compute the denominator (failures/second scale). s. Why this step? This is how often a metastable event is even attempted — more clocking and more toggling means more chances to fail.
  3. Divide. s. Why this step? Yields the actual mean time — here it's tiny, telling us 2 flops is not enough at these rates.

Verify: s is embarrassingly short — good, it demonstrates why fast/heavily-toggling signals need a third flop (add another ns): the exponent jumps to , , MTBF s 1500 years. Exponential wait wins decisively. ✓


Example 4 — Multi-bit bus: 2-flop failure probability (cell F)

Forecast: feels like it should "mostly work". Let's put a number on the failure.

  1. Model one bit's skew probability. Each of the 32 bits synchronizes independently. When several bits change on the same source cycle, any one bit can resolve one destination cycle late if it went metastable and settled slowly. Let be the probability a given transitioning bit resolves one cycle late; from the same physics as Example 3, per event — small, but strictly greater than zero. Why this step? We replace the vague "it might break" with a real per-bit probability so we can add up 32 bits.
  2. Combine across the bus. The word is captured wrong if at least one of the (up to) 32 bits is skewed. With bits transitioning together, the chance the whole word is captured cleanly is , so Why this step? Independent bits multiply; the failure probability grows roughly linearly with the number of bits changing. It is tiny but not zero — and it recurs on every multi-bit change, so over billions of transfers corruption is inevitable. (This is the correction: not "absolute zero probability", but "small per bit, per word, accumulating to certain failure over time".)
  3. Switch the tool so effectively becomes 1. Use a handshake (hold the 32 bits static, synchronize only a 1-bit valid) or an async FIFO with Gray-coded pointers so only one pointer bit changes per step. Why Gray code? Because a single-bit change makes , collapsing back to the single-bit MTBF we already sized safely in Example 3.

Verify: With small and , — thirty-two times worse than one bit, and never exactly zero. Reducing to recovers Example 3's reliability. Consistency: 1 bit ⇒ Example 3 applies; 32 bits ⇒ must reduce control to 1 bit. ✓ See Clock Domain Crossing Techniques and AXI Protocol for the async bridge that does this.


Example 5 — Power-gating savings and its break-even (cell G)

Forecast: (a) ≈ "leakage times off-fraction". (b) overhead is tiny per event but multiplied by frequency of gating.

  1. (a) Baseline (idle-powered) average. W. Why this step? Weight each state by its fraction of time — that is what "average power" means.
  2. (a) Ideal power-gated average. Active still W; off state draws : total W. Naive savings W. Why this step? Power-gating removes both dynamic and static power in the off window; the removed part is exactly the W of leakage.
  3. (b) Add the transition penalty. Waking times/s at mJ costs W. Why this step? Each on/off cycle re-charges the domain's capacitance — that energy, times how often you do it, is a continuous power cost that eats into the W saved.
  4. (b) Net savings. W still saved. Break-even is where W, i.e. gate cycles/s. Above that, gating loses. Why this step? Quantifies the parent note's warning: power-gating only pays when the block stays off long enough that leakage saved > wake-up energy. The s latency also means you must not gate a block needed again within tens of s.

Verify: Overhead W; net W ⇒ worth it here. Break-even /s; our ✓. Units: (events/s)(J) = W. ✓ See Power Management in SoCs.


Example 6 — DVFS and the law (cell H)

Here the tool is . We use , not , because each switching node charges a capacitor to voltage , storing energy — energy scales with the square. That is why lowering voltage is the single most powerful knob.

Forecast: both (0.64) and (0.6) drop — expect roughly one-third of original.

Figure — System-on-Chip (SoC) integration

Figure caption — two bars. The tall amber bar is (arbitrary units); the short cyan bar is . The gap you can see is the removed. Note the voltage contribution () does more work than the frequency contribution () — the square bites harder.

  1. Form the ratio so cancel. Why this step? Only the changing quantities matter for a fractional answer; the constant activity factor and capacitance divide out top and bottom.
  2. Compute. ; ; . Why this step? Multiply the voltage-square factor by the frequency factor.
  3. Interpret. , so power falls to — a reduction. Why this step? A ratio is meaningless until we translate it into "how much did we save?"; is the fraction of power removed, which is the number an engineer actually reports to justify the DVFS state.

Verify: Reduction . Cross-check the two knobs separately: voltage alone , frequency alone ; product . ✓ This is why phones cut voltage and clock together.


Example 7 — Address map: half-open ranges and decode (cell I)

Before any hex, we must re-earn the decode notation from scratch, since the summary only sketched it.

Forecast: 4 KB bytes, so the next block starts one past ...0FFF.

  1. Choose interval convention. We describe each window as the half-open interval — start inclusive, end exclusive. So a 4 KB block at 0x4000_0000 is , meaning its last valid byte is 0x4000_0FFF. Why this step? Half-open intervals kill off-by-one bugs: the next block starts exactly at the previous block's end value, with no overlap and no gap-of-one. Inclusive/inclusive would force awkward everywhere.
  2. Size in hex. 4 KB ; 64 KB . Why this step? Sizes must be powers of two so the bit-slice decode of step 5 is a clean prefix compare.
  3. Lay out the two 4 KB blocks. UART: → last byte 0x4000_0FFF. GPIO starts at the previous end value: → last byte 0x4000_1FFF. Why this step? Each start = previous half-open end; both starts are 4 KB-aligned (low 12 bits zero), so they decode cleanly.
  4. Place the 64 KB DMA block with the natural-alignment rule. A block of size must start at a multiple of so its start and end share the same high bits (one prefix compare selects it). For DMA, , so base mod 0x10000 == 0. The next free byte after GPIO is 0x4000_2000, but not aligned. Round up to the next multiple: 0x4001_0000 (since ). DMA occupies → last byte 0x4001_FFFF. Why this step? Placing DMA at 0x4000_2000 would make its 64 KB span cross a boundary, so a single prefix compare could no longer isolate it. The rounding creates a deliberate unused gap 0x4000_20000x4000_FFFF — normal and cheap.
  5. Decode UART. Route to UART iff address[31:12] == 0x40000. Why this step? Dropping the low 12 bits (the in-window offset) leaves the unique 20-bit page tag = the UART base.
  6. Boundary tests (half-open in action). 0x4000_0FFF >> 12 = 0x40000 → UART ✓ (it is the last byte of UART's half-open interval). 0x4000_1000 >> 12 = 0x40001not UART; it is GPIO's start (included in GPIO, excluded from UART). Why this step? This is the classic off-by-one: the boundary address 0x4000_1000 belongs to GPIO precisely because UART's interval is half-open and excludes its own end.

Verify: UART span bytes ✓. No overlap, no gap-of-one: UART end value 0x4000_1000 = GPIO start ✓. DMA base 0x40010000 is a multiple of 0x10000 (aligned) ✓ and its half-open interval does not touch GPIO's end 0x40002000. Routing: 0x40000FFF>>12=0x40000 (UART) but 0x40001000>>12=0x40001 (GPIO) — differ ✓. ✓


Example 8 — Real phone SoC word problem (cell J)

Forecast: don't blindly use — read the active count.

Figure — System-on-Chip (SoC) integration

Figure caption — three competing caps. Three cyan bars: masters present (), memory ports (), masters active (). An amber line marks the smallest — the binding limit (). Concurrency is set by the shortest bar; here the active count ties the port count.

  1. Pick the tool. Bandwidth question ⇒ crossbar formula . Why this step? The word problem asks "how much data per second", exactly what the crossbar tool produces; MTBF and power tools answer different questions and do not apply.
  2. Find concurrent transfers. Limited by three numbers — masters present (6), memory ports (4), masters actually active (4). The binding limit is . Why this step? Real workloads are capped by whichever is smallest; here active-master count ties the port count, both giving 4.
  3. Compute. GB/s. Why this step? Multiply simultaneous transfers by per-link bandwidth to get the aggregate rate sustained.

Verify: GB/s theoretical peak GB/s — this workload saturates the memory ports. Units GB/s. ✓ If only 2 masters were active, it would drop to GB/s.


Example 9 — Exam twist: bandwidth and power together (cell K)

Forecast: more links = faster; energy might tie because energy = work, not time.

Figure — System-on-Chip (SoC) integration

Figure caption — power×time = area. Two rectangles on a power-vs-time plane: Option A is tall and thin (2 W for 3 s); Option B is short and wide (1 W for 6 s). Their areas are equal — both enclose J. The picture shows why the fast option does not automatically save energy: same enclosed area.

  1. Transfer times. A: aggregate GB/s ⇒ s. B: GB/s ⇒ s. Why this step? Time = data ÷ bandwidth; this combines the crossbar tool (aggregate GB/s) with a rate divide (rate → duration).
  2. Energy each. J. J. Why this step? Energy = total power × time; count all active links since every link burns power simultaneously.
  3. Conclude. Option A is twice as fast (3 s vs 6 s) but both use the same 6 J. Why this step? The twist is that speed and energy are different questions — the fast option saves no energy here because total work (bytes) and per-byte energy are equal. The tie-breaker is race-to-idle: A finishes 3 s earlier and can power-gate (Example 5), saving leakage B keeps paying.

Verify: J since work is fixed and per-byte energy equal. . Race-to-idle: after finishing, A can gate and save leakage B still pays. ✓ Combines Network-on-Chip (NoC)-style bandwidth thinking with Power Management in SoCs.


Example 10 — Limiting behaviour sanity checks (cell L)

  1. (a) . , so — the raw failure rate with no synchronizer. Meaning: zero wait = zero protection. Why this step? Confirms the exponential collapses to the unprotected baseline, as it must; a nonsense edge case would make us distrust the formula.
  2. (b) . quadratically. Meaning: at zero voltage the logic burns no dynamic power (and also does no work — the trade-off). Why this step? The tool must vanish at ; it does, and faster than linear, confirming the quadratic dependence.
  3. (c) , fixed. . Meaning: past , adding slaves buys nothing — bandwidth saturates at . Why this step? Shows the other clamp of : eventually the master side becomes the bottleneck, so both limbs of the formula behave.

Verify: (a) ✓. (b) ✓. (c) for , ✓. Every tool degrades sensibly at its boundary — no case left unshown.


Recall Self-test (reveal after trying)

Crossbar : peak aggregate? ::: GB/s. Why does a 2-flop synchronizer fail on a 32-bit bus? ::: Each bit has a tiny nonzero skew probability ; word failure , small but never zero → certain over billions of transfers. Use handshake or async FIFO. DVFS drops by (frequency unchanged) — dynamic power ratio? ::: , a cut. Power-gate a block idle of the time with W leakage, ignoring overhead — savings? ::: W. With address[31:12]==0x40000, does 0x4000_1000 reach UART? ::: No — it shifts to 0x40001; it belongs to GPIO (half-open interval excludes UART's end).

Related depth: AMBA Bus Standards, AXI Protocol, Physical Design Flow, Formal Verification Methods.