6.3.11 · D4Interconnects, Buses & SoC

Exercises — Infinity Fabric - mesh interconnects

2,709 words12 min readBack to topic

This page is a self-test. Every problem has a fully worked solution hidden inside a collapsible callout — try the problem first, then reveal. Problems climb five levels: L1 Recognition → L2 Application → L3 Analysis → L4 Synthesis → L5 Mastery.

We build on the parent note 6.3.11 Infinity Fabric - mesh interconnects (Hinglish) and its English original. Before we start, three symbols will keep reappearing — let us fix them in plain words so nothing is ever used unexplained.

Look at the grid above: the blue path only ever turns at right angles. That right-angle-only rule is why we add the two distances instead of using a straight diagonal line — the fabric has no diagonal wires.


Level 1 — Recognition

Exercise 1.1

Match each interconnect to its scaling weakness: (a) shared bus, (b) ring, (c) 2D mesh. Options: (i) latency grows like , (ii) only one transaction at a time / electrical loading, (iii) latency grows only like .

Recall Solution
  • (a) shared bus → (ii). All cores tap one wire, so only one talker at a time and each extra core adds capacitance that lowers the safe clock.
  • (b) ring → (i). Average trip is a quarter of the loop, so hops grow linearly with node count.
  • (c) mesh → (iii). Distances grow like because you fold nodes into a square — much slower growth.

Exercise 1.2

A router in Intel's mesh has how many ports, and what are they?

Recall Solution

5 ports: four cardinal directions — North, South, East, West — plus one local port that connects the router to its own agent (the core + L2 slice it serves). Four to talk to neighbours, one to talk to "home".


Level 2 — Application

Exercise 2.1 (FCLK → bandwidth)

Infinity Fabric between a chiplet and the I/O die is 32 B wide per direction and runs at . Find the one-directional and bidirectional bandwidth.

Recall Solution

What we do: bytes-per-cycle × cycles-per-second. Why multiply: each tick moves 32 bytes; there are ticks per second, so total bytes/second is the product. Bidirectional (a second identical lane runs the other way):

Exercise 2.2 (XY routing hop count)

A 4×4 mesh, using the coordinate convention fixed above (origin bottom-left, = column East, = row North). Core at sends to using dimension-ordered XY routing (move all X first, then all Y). How many hops, and list the coordinates visited?

Recall Solution

X phase: from to hops east: . Y phase: from to hops north: . Path visited: .

Figure s02 below draws exactly this route. How to read it: the yellow segment is the X phase — two hops due east along row — and the green segment is the Y phase — three hops due north up column . The two red dots are source and destination. Notice the path bends only once, at the corner : XY routing always finishes all of X before touching Y, which is what makes the routing decision so cheap in hardware.


Level 3 — Analysis

Exercise 3.1 (ring vs mesh for N = 16)

Take , cost per hop cycles. Compute average ring latency, average mesh latency (4×4) using the exact Manhattan average, and the speedup factor.

Recall Solution

Ring: hops , so cycles. Mesh (exact): with , use hops (the approximate would over-count by the dropped term). So cycles. Speedup: The mesh is about 1.6× lower latency at this size — and the gap widens as grows because the ring scales like while the mesh scales like .

Exercise 3.2 (bisection bandwidth)

For the same ring and 4×4 mesh, count the links crossing a cut that splits the network in half (bisection). Which has higher bisection bandwidth, and by what factor?

Recall Solution

Bisection = fewest links you must cut to separate the network into two equal halves; it caps the traffic that can flow between the halves.

  • Ring: slicing a loop crosses exactly 2 links (the loop is cut in two places).
  • Mesh (4×4): cut between two columns — that severs one full column of horizontal links links.

Figure s03 below shows that cut. How to read it: the dashed yellow vertical line is the bisection — it slices the 4×4 grid into a left half (2 columns) and a right half (2 columns). The four thick red segments are the horizontal links it severs, one per row. Count them: exactly . Compare that to a ring, where any halving line crosses only the two arcs of the loop.


Level 4 — Synthesis

Exercise 4.1 (chiplet worst-case read latency budget)

EPYC-style design: a core on chiplet 0 reads a cache line whose home L3 slice is on chiplet 7. Given: intra-chiplet lookup ≈ 5 cycles; each chiplet↔I/O-die crossing ≈ 20 ns at . A read is a round trip: the request travels chiplet 0 → I/O die → chiplet 7 (two crossings), and the data reply travels chiplet 7 → I/O die → chiplet 0 (two more crossings). Express one 20 ns crossing in FCLK cycles, then give the full round-trip total in cycles.

Recall Solution

Convert 20 ns to fabric cycles: one cycle lasts . Count the crossings for a read (round trip): request path = 2 crossings, reply path = 2 crossings → 4 crossings total. Add intra-chiplet lookup: cycles for the full request-to-data round trip. Insight: the fabric crossings, not the cache lookup, dominate — and because a read must come back, the return path doubles the crossing count. This is exactly why AMD keeps the memory controllers on a central I/O die so every chiplet is symmetric (relates to 6.2.8-NUMA-Architecture non-uniform access). Note: the parent note's "~75 cycles" quotes only the one-way request path (2 crossings + lookup ≈ 77); the full read latency is roughly double that.

Exercise 4.2 (directory vs broadcast traffic)

A line is shared by cores out of . A write forces invalidation. How many probe messages does broadcast snooping send versus directory-based targeted snooping? Give the ratio.

Recall Solution

Broadcast: the request goes to every core → probes (all except the writer). Directory: the home L3 slice knows the exact sharer list, so it probes only the holders (or if the writer already holds it; use per statement). Why directory scales: broadcast is per write; directory is with typically 1–3, independent of core count. This is the heart of AMD's Scalable Coherent Protocol — see 6.3.5-Cache-Coherency-Protocols.


Level 5 — Mastery

Exercise 5.1 (balanced-fabric design)

You are designing a desktop chip. Memory is DDR5-6000 (6000 MT/s), dual channel, 8 B per channel per transfer. For the fabric to not bottleneck memory, its one-directional bandwidth must at least match memory bandwidth. The fabric is 32 B wide per direction. What minimum FCLK achieves balance? Then state the FCLK:MCLK ratio.

Recall Solution

Step 1 — memory bandwidth. DDR "MT/s" already counts both edges, so transfers/s per channel. Step 2 — required FCLK. Fabric moves 32 B/cycle; set : Step 3 — the ratio. MCLK (the memory clock) is half the MT/s rate: . So the balanced ratio is Insight: a 1:1 FCLK:MCLK ratio is exactly why enthusiasts tune FCLK to track memory speed — drop below it and the fabric starves the cores of the bandwidth the DIMMs can supply.

Exercise 5.2 (when does mesh overtake ring?)

Find the smallest (assume a perfect square so the mesh is a square grid, using the coordinate convention fixed above) for which the exact mesh average hops are strictly less than ring average hops, i.e. .

Recall Solution

Test perfect squares directly with the exact mesh formula vs ring :

  • : mesh , ring → tie, mesh not strictly less.
  • : mesh , ring → mesh strictly wins. This matches the real-world "~10–12 core" crossover once you add routing and area overheads that push the practical break-even a little higher than the pure-math . In short: the mathematics tips in the mesh's favour at , but the messy engineering realities of building bigger routers delay the real switch until roughly a dozen cores.

Recall Self-test checkpoints

Bus weakness ::: one transaction at a time + electrical loading (one shared wire). Ring average hops for N nodes ::: N/4 (exact). Exact mesh average hops for k×k grid ::: 2(N−1)/(3√N), which → 2√N/3 for large N. Why directory beats broadcast snooping ::: O(k) targeted probes vs O(N) broadcast, k = sharers. A read's worst-case latency counts how many fabric crossings ::: four (request out + data reply, each two crossings). Balanced FCLK:MCLK ratio ::: 1:1 so fabric bandwidth matches memory bandwidth. Smallest square N where mesh strictly beats ring ::: N = 9.

Connections