Worked examples — Network-on-Chip (NoC) topologies
This page is a drill. We take the five topologies from the parent note and squeeze every kind of question out of them: normal cases, tiny/degenerate networks, the extreme limits, a word problem, and an exam-twist. Before we start, one promise: no symbol appears here that we haven't already earned. Let's re-pin the three numbers we keep computing, in plain words.
Keep the number 128 Gb/s per link in your pocket — most examples reuse it.
The scenario matrix
Every question this topic throws is one of these cells. Each worked example below is tagged with the cell it fills.
| # | Case class | What makes it tricky | Filled by |
|---|---|---|---|
| A | Normal mesh — rectangular, interior + edge nodes | mixing the two grid dimensions | Ex 1 |
| B | Torus wraparound — does the shortcut help? | deciding wrap vs. no-wrap per axis | Ex 2 |
| C | Hypercube routing — bit-flip path | reading routes off binary labels | Ex 3 |
| D | Fat-tree bandwidth — link fattening | link width changes per level | Ex 4 |
| E | Ring degenerate — worst bisection | tiny bisection, even vs odd | Ex 5 |
| F | Zero/degenerate input — mesh, , ring | formulas at their edge | Ex 6 |
| G | Limiting behaviour — big- growth order | which topology wins as | Ex 7 |
| H | Real-world word problem — pick a topology under a power budget | translating English → constraints | Ex 8 |
| I | Exam twist — non-square torus, odd dimension floor | traps | Ex 9 |
Example 1 — Normal mesh (cell A)

Figure s01, read it before the steps: a 3-row by 5-column grid of yellow node-dots joined by white links. A thick pink line traces the worst-case route from the bottom-left node rightwards four links then up two links to the top-right node — that is the diameter path. A vertical blue dotted line drops between two columns; it crosses one horizontal link in each of the 3 rows, so it severs 3 links — that is the bisection cut.
Steps.
-
Identify the two grid sizes: rows , columns . Why this step? The mesh diameter formula needs both dimensions separately, because you travel each axis independently — no diagonals exist on a grid.
-
Diameter: worst case is one corner to the opposite corner (the pink path in figure s01). Why this step? You must walk 2 rows and 4 columns; each walked link is one hop, and there is no shortcut, so you sum them.
-
Bisection: split the 15 nodes as evenly as possible. Since is odd, a perfectly equal split is impossible, so "halves" means 7 nodes on one side and 8 on the other (differ by one — allowed by the definition above). The blue dotted vertical cut in figure s01 achieves such a split and severs the fewest links: one horizontal link per row, i.e. links. A horizontal cut instead would sever links — more, so we reject it. Why this step? Bisection width is the minimum balanced cut. The vertical cut severs links; that minimum is the true bottleneck.
Recall Verify Example 1
Units: hops are dimensionless (link counts) ✓. Bandwidth: ✓. Sanity: diameter 6 matches the mesh (also 6) because — same total travel. Good, a wider-but-shorter grid can tie a square one.
Example 2 — Torus wraparound (cell B)

Figure s02, read it before the steps: the same rectangular grid of yellow node-dots and white links, but now every row's leftmost and rightmost node are joined by a blue dashed wrap link, and every column's top and bottom node likewise — these dashed links are the shortcuts. A thick pink segment shows one such shortcut on a single row: node 0 jumps straight to node 5 in one wrap-hop instead of walking five links.
Steps.
-
Torus diameter formula: where means round down (the biggest whole number ). Why the floor? On a ring of nodes you never walk more than half the ring — past the halfway point it's shorter to go the other way. Half of , rounded down, is that worst-case half-trip.
-
Plug in , : Why this step? Each axis contributes its own half-ring worst case; the two axes are independent so we add.
-
Compare to the mesh (Ex-1 style): mesh . So the wrap does help on both axes, cutting 8 → 5. Why this step? The blue dashed wrap links in figure s02 are the shortcuts; on a 6-long axis, node 0 reaches node 5 in one wrap-hop instead of five.
-
Bisection: split the nodes into two equal halves of 12 each (24 is even, so a perfectly equal split exists). A vertical cut now severs twice as many links as the mesh: one straight link per row and one wrap link per row cross the same vertical line, because the ring on each row is a loop and any cut of a loop passes through it twice. Why this step? links straight, plus 4 wrap links, gives 8 links across the minimum balanced cut; doubling the links doubled the bandwidth.
Recall Verify Example 2
Diameter: ✓, and (mesh) ✓ so wrap helps. Bisection: ✓, exactly double a mesh's .
Example 3 — Hypercube bit-flip routing (cell C)

Figure s03, read it before the steps: sixteen yellow node-dots, each labelled with its 4-bit binary code, drawn as two nested squares (a cube-of-cubes projection). Thin white links join every pair of nodes whose labels differ in exactly one bit. Thick pink arrows trace the routing path : at each arrow exactly one bit of the label flips, and after four arrows we arrive at 6.
Steps.
-
Write both node numbers in 4-bit binary. Bit has "place value" : bit 0 = 1s, bit 1 = 2s, bit 2 = 4s, bit 3 = 8s. Why binary? A hypercube node is labelled by bits, and a link exists only between nodes that differ in exactly one bit. So the labels are the map.
-
Compare bit by bit. Symbol ("XOR") outputs 1 where the two bits differ, 0 where they agree: Why XOR? It literally spotlights the disagreeing bits. Each 1 in the answer is one link we must cross to fix that bit.
-
Count the 1s (the Hamming distance): has four 1s → 4 hops. Why this equals hop count? Each hop flips exactly one bit; you need to flip four bits; therefore four hops minimum, and any order works.
-
Walk the path flipping bits low-to-high (each step follows the pink arrows in figure s03): Why this order? Order is free — the XOR guarantees all four flips land us on 6 regardless of sequence.
Recall Verify Example 3
, popcount ✓. Final node after flipping all bits of 9: ✓. Path endpoints correct, 4 hops ✓.
Example 4 — Fat-tree link fattening (cell D)
Here is the tree's branching factor — the number of children each internal switch has. A binary fat-tree has (every switch fans out to two children). We use throughout this example.

Figure s04, read it before the steps: a binary tree drawn bottom-up. The bottom row has 8 yellow leaf-dots (the processing elements). Above them sit 4 switches, then 2, then a single root at top. The links get visibly thicker each level up: thin white leaf links (128 Gb/s), thicker blue level-1 links (256 Gb/s), thickest pink links into the root (512 Gb/s). The thickening is the "fat" in fat-tree.
Steps.
-
Levels of a binary () fat-tree with leaves: switch levels above the leaves. Link bandwidth doubles each level up. Why double? Half as many switches at each higher level must carry all the traffic below, so each higher link must be twice as fat to avoid choking.
-
Root link bandwidth. The rule from the parent note: root link . Why ? The single top cut splits the tree into two halves of leaves each; the root must carry all cross-traffic between them.
-
Bisection bandwidth: cut the tree at its narrowest balanced point. For a fat-tree the tightest balanced cut is right at the root — it splits the 8 leaves into two groups of 4, and the only links crossing that cut are the links into the root. In a binary fat-tree the root is reached by 2 top links (one from each level-2 switch), each of width Gb/s, so 4 leaf-equivalent links = 512 Gb/s cross the cut. Why and not ? The minimum balanced cut severs only the links entering the root, which together carry leaf-links worth of bandwidth — not every leaf link. The fattening keeps this cut from being worse than the leaves' aggregate, but the bisection is set at the root cut, giving Gb/s. The point of "fat" is that this root cut is not a bottleneck relative to a thin tree, not that it magically doubles the aggregate.
-
Diameter: leaf up to root, then down to another leaf: hops. Why ? Up the tree is levels (that is why , the branching factor, sits in the base of the log — more children per switch means fewer levels); back down is another levels; worst case does both. With : .
Recall Verify Example 4
Root: ✓. Bisection: Gb/s ✓ (the minimum balanced cut is at the root — 4 leaf-links' worth, not 8). Diameter: ✓.
Example 5 — Ring, the bisection villain (cell E)

Figure s05, read it before the steps: eight yellow node-dots arranged evenly around a circle, numbered 0–7, joined by white links into one closed loop. A horizontal blue dotted line slices the loop; because the loop is a single closed curve, the line crosses it in exactly two places — severing 2 links. A thick pink arc traces the diameter route from node 0 to node 4 (4 hops, the far side of the ring).
Steps.
-
Diameter hops. Why? A ring is a single loop of nodes; the farthest node is diametrically opposite, half-way around either direction.
-
Bisection: no matter where you cut a ring into two equal halves of 4 nodes each, a straight line crosses exactly 2 links (the two arcs of the loop, as shown in figure s05). Why only 2? A ring is one loop; any cut of a loop severs it in exactly two places. This is constant — it never grows with .
-
"Terrible?" Compare per-node: 8 nodes sharing 256 Gb/s across the cut = 32 Gb/s effective per node, versus the mesh's much larger bisection. As grows the ring's bisection stays 256 while traffic grows — the bottleneck worsens. Why this matters: bisection bandwidth is the ceiling for balanced all-to-all traffic; a fixed ceiling with rising demand is the definition of a bottleneck (Latency and Throughput Trade-offs).
Recall Verify Example 5
Diameter ✓. Bisection ✓, independent of .
Example 6 — Degenerate & zero inputs (cell F)
Steps.
-
(a) mesh. row, columns. . Why the 0? With one row there's nothing to travel vertically, so that term vanishes — the mesh has collapsed into a line (a ring without the wrap). The formula degrades gracefully.
-
(b) 1-node network. Diameter (a node is 0 hops from itself). Bisection: you cannot split one node into two non-empty groups, so bisection is undefined / effectively 0. Why 0 hops? Diameter is the max distance between two distinct nodes; with one node there is no pair, so the max over an empty set is 0 by convention. This is the true "zero input."
-
(c) 2-node ring. Diameter : the two nodes are 1 hop apart. Commit to one convention: we model a ring as an undirected cycle graph, where between any two adjacent nodes there is exactly one link. At the "cycle" degenerates — graph theory would place two parallel edges between the two nodes, but the standard NoC convention is a single physical link, so we use one link. Applying the ring bisection formula blindly would claim 2 links cross the cut — but there is only one link in the degenerate 2-node ring, so the formula overcounts here. The honest value from the definition (minimum links to split 2 nodes into 1+1) is 1 link: Why the formula breaks: the "" in counts the two arcs of a genuine loop, but a 2-node ring has no genuine loop (a cycle needs nodes), so only one link exists to cut. Edge cases are exactly where blind formula-plugging fails.
Recall Verify Example 6
(a) ✓. (b) diameter ✓. (c) diameter ✓; bisection committed to Gb/s (single-link convention), not the formula's spurious 256 ✓.
Example 7 — Limiting behaviour as (cell G)

Figure s06, read it before the steps: a plot of diameter (vertical axis, hops) against node count (horizontal axis, drawn on a log scale so doublings are evenly spaced). Three curves rise: a steep pink line labelled "ring " that shoots up to 512, a gentler blue curve labelled "mesh " reaching 62, and a nearly-flat yellow curve labelled "hypercube " barely reaching 10. The visual gap between the curves is the scalability story.
Steps.
-
Square mesh: (since ). . Why ? A square grid side is , and diameter — it grows like .
-
Hypercube: need . . Why ? Each dimension doubles the node count, so the number of dimensions (and hops) is — the slowest-growing of the three.
-
Ring: . Why ? A ring's worst case is half the ring, so it grows linearly — the fastest-growing, by far the worst.
-
Rank (fastest→slowest growth): Ring → Mesh → Hypercube . Why this ordering — the visual reasoning behind it: watch what happens to each formula when you double (one step right on figure s06's log axis).
- Ring : doubling doubles — the pink line's height doubles every step, so it rockets upward. Linear growth means the diameter is a fixed fraction of the whole network, so it never stops climbing.
- Mesh : doubling multiplies by only — the blue curve rises, but each doubling adds a smaller jump than the ring. The square-root cushions the growth because widening a square grid by side spreads nodes over two dimensions, not one.
- Hypercube : doubling adds just +1 hop (one more dimension = one more bit) — the yellow curve is nearly flat. Adding a whole dimension only costs a single extra flip, so diameter grows the slowest possible way. The numbers confirm the ordering visually and arithmetically: . Why this matters: for thousand-core chips only the log-class topologies keep latency sane — at the cost of high router degree (System-on-Chip (SoC) Design).
Recall Verify Example 7
Mesh ✓; hypercube ✓; ring ✓. Ordering ✓. Doubling test: ring , mesh , hypercube ✓.
Example 8 — Real-world word problem (cell H)
Steps.
-
Tabulate degree and diameter for each candidate at :
- Ring: degree 2, .
- Mesh : degree 4 (interior), .
- Hypercube : degree 4, . Why these numbers? Degree drives router power (Power Management in SoCs); diameter drives worst-case latency.
-
Apply the latency constraint " hops": ring ✓ (just barely), mesh ✓, hypercube ✓. All pass. Why check this first? A design that violates a hard constraint is disqualified regardless of power.
-
Apply the power priority (minimize degree): ring wins with degree 2, half the ports of mesh/hypercube. Why degree, not diameter, decides? The problem says power is the strict budget and traffic is light & local — so bisection bandwidth (the ring's weakness) barely matters, while low port count directly saves power.
-
Choice: Ring. It meets the 8-hop ceiling exactly, has minimal degree 2, lowest wiring/power, and the light local traffic never stresses its poor bisection. Why not mesh? Mesh's better latency (6 vs 8) isn't needed here, and its degree-4 routers burn more power — a bad trade under this budget.
Recall Verify Example 8
Ring diameter the limit ✓ (satisfies ). Degrees: ring 2 mesh 4 hypercube 4 ✓. Ring is the min-degree feasible option ✓.
Example 9 — Exam twist: non-square torus with odd dimension (cell I)
Steps.
-
Correct diameter: hops. Why floor each term separately? On an odd-length ring of 5, the farthest node is 2 hops away, not 2.5 — you can't take half a hop. Rounding the sum (the student's ) double-counts fractional hops that don't exist.
-
Spot the student's error: they computed . The truth floors before adding: . The mistake inflates the diameter by 1. Why does order matter? ; flooring first is the physically correct per-axis half-ring, and it's smaller.
-
Bisection: . Why and ? Cut across the short axis (3 rows) to sever the fewest links, then double for the torus wrap. .
Recall Verify Example 9
✓ (student's 4 is wrong). Bisection ✓.
Recall Self-test
A mesh diameter? ::: hops. A torus diameter? ::: hops. Hops from hypercube node 0 to node 15 (in a 4-cube)? ::: , four 1s → 4 hops. Why does a ring's bisection never grow? ::: any cut of a single loop severs exactly 2 links.
See also: Routing Algorithms (how packets actually pick these paths), Cache Coherence Protocols (what traffic rides the network), Latency and Throughput Trade-offs (why diameter vs. bisection is a design tension).