6.3.6Interconnects, Buses & SoC

Network-on-Chip (NoC) topologies

3,092 words14 min readdifficulty · medium4 backlinks

Core Intuition

Traditional buses work for2-8 cores, but beyond that, contention (multiple cores fighting for the bus) and wire delay (signals take multiple cycles to cross the chip) kill performance. NoC solves this by:

  1. Paralelism: Multiple packets travel simultaneously on different links
  2. Locality: Data routes through nearby routers, reducing hops
  3. Scalability: Adding cores doesn't collapse the network
Figure — Network-on-Chip (NoC) topologies

Fundamental Concepts

Why Packet-Switching on a Chip?

Derivation of the need:

  1. Wire delay dominates in modern tech nodes: A 10mm wire at 7nm takes ~20 cycles to propagate a signal.
  2. Shared bus bandwidth: Bbus=fwB_{\text{bus}} = f \cdot w (frequency × wire width). For 64cores sharing 128-bit bus at 2GHz: 2GHz128b=256Gb/s2 \text{GHz} \cdot 128b = 256 \text{Gb/s} total, so 4 Gb/s per core—too little.
  3. Dedicated point-to-point links scale linearly: Each router-router link provides full bandwidth, and multiple links operate in parallel.

Major NoC Topologies

1. Mesh (2D Grid)

Why these formulas?

  • Diameter: Worst case is corner-to-oppositecorner. In an N×MN \times M grid, you move (N1)(N-1) steps in one dimension and (M1)(M-1) in the other. No diagonal moves, so D=(N1)+(M1)D = (N-1) + (M-1).
  • Bisection bandwidth: Cut the grid in half. The smaller dimension determines how many links cross the cut. For a 4×44 \times 4 mesh, cutting vertically severs 4 links.

Pros: Simple layout, matches 2D chip floorplan, easy routing (XY-routing).
Cons: High diameter → high latency for distant nodes. Edge nodes have lower degree → asymetric performance.


2. Torus (Wraparound Mesh)

Derivation of diameter:
In a torus, you can "wrap around." For an N×NN \times N torus, the farthest node is at distance N/2\lfloor N/2 \rfloor in each dimension (wrap if >N/2> N/2). Example: 8×88 \times 8 torus, node (0,0) to (7,7). Instead of 14 hops (mesh), go (0,0) → (0, -1≡7) in 1 hop, then 4 hops to (4,7), then 3 to (7,7) = 8 hops. Actually, 8/2+8/2=8\lfloor 8/2 \rfloor + \lfloor 8/2 \rfloor = 8.

Pros: Lower diameter, higher bisection BW, symmetric (all nodes equal).
Cons: Wraparound wires are long (cross entire chip edge) → higher power, harder physical layout.


3. Hypercube

Derivation:
Label nodes 0 to 2k12^k - 1 in binary. Node i=k1bk2b0i =_{k-1} b_{k-2} \ldots b_0 connects to i2ji \oplus 2^j (flip bit jj). Example: 4D hypercube (k=4k=4, 16 nodes). Node 5 = 0101 connects to:

  • 520=0100=45 \oplus 2^0 = 0100 = 4 (flip bit 0)
  • 521=0111=75 \oplus 2^1 = 0111 = 7 (flip bit 1)
  • 522=001=15 \oplus 2^2 = 001 = 1 (flip bit 2)
  • 523=1101=135 \oplus 2^3 = 1101 = 13 (flip bit 3)

Diameter: Any node reaches any other by flipping at most kk bits (Hamming distance ≤ kk).

Pros: Logarithmic diameter (best scalability). High bisection BW.
Cons: Degree grows with NN → complex routers. Non-planar (hard to lay out in 2D silicon).


4. Fat-Tree

Why "fat"?
Traditional trees bottleneck at the root (all traffic funnels through one link). Fat-tree doubles link bandwidth at each level up. For a binary tree with NN leaves:

  • Level 0 (leaves): Each link = BB
  • Level 1: Links = 2B2B
  • Level 2: Links = 4B4B
  • Root: Link = NB/2NB/2

This maintains constant bisection bandwidth across all cuts.

Pros: High bandwidth, fault-tolerant (multiple paths to root).
Cons: Area/power scales poorly (root switches huge). Deep hierarchy → latency.


5. Ring

Why diameter = N/2\lfloor N/2 \rfloor?
Worst case: Opposite side of ring. In a 10-node ring, node 0 to node 5is 5 hops (clockwise or counter-clockwise). For NN nodes, max = N/2\lfloor N/2 \rfloor.

Pros: Simplest layout, lowest wiring cost, low power.
Cons: Awful bisection BW (major bottleneck), high average latency.


Comparative Analysis

Topology Diameter Bisection BW Degree Best For
Mesh O(N1/2)O(N^{1/2}) O(N1/2)O(N^{1/2}) 4 2D chips, balanced cost
Torus O(N1/2/2)O(N^{1/2}/2) O(N1/2)O(N^{1/2}) 4 Lower latency, uniform traffic
Hypercube O(logN)O(\log N) O(N)O(N) O(logN)O(\log N) High performance, non-planar OK
Fat-Tree O(logN)O(\log N) O(N)O(N) Varies Datacenters, bandwidth-critical
Ring O(N)O(N) O(1)O(1) 2 Low-cost, light traffic

Common Mistakes


Design Trade-Offs

Latency vs. Throughput

  • Low latency: Hypercube, torus (low diameter).
  • High throughput: Fat-tree, hypercube (high bisection BW).
  • Mesh: Compromise—moderate both.

Power vs. Performance

PNoC=ProuterNrouters+PlinkNlinksLlinkP_{\text{NoC}} = P_{\text{router}} \cdot N_{\text{routers}} + P_{\text{link}} \cdot N_{\text{links}} \cdot L_{\text{link}}

Where PlinkCV2fαP_{\text{link}} \propto C \cdot V^2 \cdot f \cdot \alpha (CC = wire capacitance, α\alpha = activity factor).

Why this matters: Long links (torus wraparound, fat-tree root) have high CC → high PlinkP_{\text{link}}. Hypercube has more routers → high NroutersN_{\text{routers}}. Mesh minimizes both.

Scalability

  • Mesh/Torus: Scale to 100s of nodes (Intel's 72-core Xeon Phi uses 2D mesh).
  • Hypercube: Hard limit ~1024 nodes (10-port routers are impractical).
  • Ring: Dead beyond 8-10 nodes (bisection BW collapse).

Real-World Examples

  1. Intel Xeon Phi (Knights Landing): 72 cores, 2D mesh NoC. Each tile = core + L2 cache slice + router. Chose mesh for 2D layout, reasonable diameter (18 hops max), 4-port routers.
  2. Tilera TILE-Gx: 64 cores, 8×8 mesh. XY-routing (go X then Y) for deadlock-free deterministic paths.
  3. AMD Ryzen (Infinity Fabric): Not pure NoC, but uses mesh-inspired topology for die-to-die links in chiplet designs.
  4. Nvidia GPUs: Internal interconnect resembles torus for SM (streaming multiprocessor) clusters—wraparound for symmetric latency.

Active Recall Practice

Recall Explain to a 12-Year-Old

Imagine your chip is a city with 64 neighborhoods (cores). You need to send letters (data) between them. A bus is one road everyone shares—traffic jam! A NoC is a whole road network. The topology is the map: how roads connect.

  • Mesh: Roads in a grid, like city blocks. Simple, but corners to corners are far.
  • Torus: Grid + secret tunnels (wraparound)—cuts distance in half!
  • Hypercube: Every neighborhood has shortcuts to neighborhoods whose "address" differs by1 bit. Super fast, but needs lots of roads per place.
  • Fat-Tree: Roads get wider as you go to the "downtown" hub, so downtown never jams.
  • Ring: One big loop. Cheap, but opposite side of the loop is slow.

The best map depends on: How much space do you have? How much power? Do all neighborhoods talk equally, or do some talk a lot? Chip designers pick the map that fits their needs!


Connections

  • Bus Architectures: NoC replaces shared buses at scale.
  • Cache Coherence Protocols: NoC routes coherence messages (snoops, invalidations).
  • Routing Algorithms: XY, adaptive, deadlock avoidance for NoC packet paths.
  • System-on-Chip (SoC) Design: NoC is the backbone of modern SoCs.
  • Power Management in SoCs: NoC links can be power-gated when idle.
  • Latency and Throughput Trade-offs: NoC topology directly impacts both.

#flashcards/hardware

What is a Network-on-Chip (NoC)? :: A packet-switched on-chip interconnect where cores/memory connect via routers and links, enabling parallel data transfer and scalable communication beyond traditional buses.

What are the key metrics for NoC topologies?
Hop count (routers traversed), bisection bandwidth (max data across cut), diameter (max hops between any two nodes), degree (links per router).
What is the diameter formula for an N×MN \times M mesh?
D=(N1)+(M1)D = (N-1) + (M-1), because worst case is corner-to-corner Manhattan distance with no diagonal moves.
How does torus diameter compare to mesh?
Torus diameter N/2+M/2\lfloor N/2 \rfloor + \lfloor M/2 \rfloor is roughly half of mesh diameter due to wraparound links creating shortcuts.
What is the bisection bandwidth of a 4×4 mesh with 64-bit links at 2 GHz?
Bb=464b2GHz=512Gb/sB_b = 4 \cdot 64b \cdot 2\text{GHz} = 512 \text{Gb/s} (4links cross the midline cut).
Why does torus have higher bisection BW than mesh?
Torus has twice the bisection BW because wraparound links add cross-cut paths: Bb=2min(N,M)BlinkB_b = 2 \cdot \min(N,M) \cdot B_{\text{link}}.
What is the degree of a hypercube with NN nodes?
Degree = k=log2(N)k = \log_2(N), because each node connects to nodes differing by one bit flip across kk dimensions.
What is the diameter of a hypercube?
D=log2(N)D = \log_2(N), because any two nodes differ by at most kk bits, requiring kk hops to flip all differing bits.
How are hypercube connections determined?
Node ii connects to i2ji \oplus 2^j for j=0,1,,k1j = 0, 1, \ldots, k-1 (flip each bit position once).
What is the main disadvantage of hypercube topology?
Non-planar layout (hard to map to 2D silicon) and degree grows with NN (10+ ports for 1024 nodes), making routers complex and expensive.
What makes a fat-tree "fat"?
Links get wider (more bandwidth) toward the root, doubling at each level to prevent bottlenecks: root link = NBlink/2N \cdot B_{\text{link}}/2.
What is the diameter of a fat-tree?
D=2logk(N)D = 2\log_k(N) (hop up to root, then down to destination through kk-ary tree levels).
What is the bisection bandwidth of a ring?
Bb=2BlinkB_b = 2 \cdot B_{\text{link}} (only 2 links cross any cut, making it a severe bottleneck).
Why is ring topology rarely used beyond 8 nodes?
Diameter O(N)O(N) and bisection BW O(1)O(1) cause severe congestion as NN grows; all cross-traffic shares 2 links.
What is the main advantage of mesh topology?
Simple 2D layout matching silicon floorplan, moderate diameter/bisection BW, and only 4-port routers (low cost).
What is the hidden cost of torus wraparound links?
They span entire chip edges (10+ mm), causing high capacitance, power drain, and need for repeaters/upper metal layers.
Why doesn't fat-tree eliminate all bottlenecks?
It prevents root bottleneck but not hot-spot (many-to-one) traffic, where the destination's last-hop link is still only BB capacity.
What is the NoC power equation?
PNoC=ProuterNrouters+PlinkNlinksLlinkP_{\text{NoC}} = P_{\text{router}} \cdot N_{\text{routers}} + P_{\text{link}} \cdot N_{\text{links}} \cdot L_{\text{link}}, where PlinkCV2fαP_{\text{link}} \propto C \cdot V^2 \cdot f \cdot \alpha.
What NoC topology does Intel Xeon Phi use?
2D mesh (72 cores, 8×9 grid), chosen for 2D layout, reasonable diameter (18 hops max), and 4-port routers.
What is XY-routing?
A deterministic routing algorithm for mesh/torus: packets move in X dimension first, then Y, preventing deadlock by avoiding cyclic dependencies.

Concept Map

replaces

suffers

limits

uses

moves data as

structured by

determines

example

worst hops

cross midline

connects via

enable

Network-on-Chip

Shared Bus

Contention and Wire Delay

Scalability

Packet Switching

Flits

Topology

Latency Bandwidth Power

2D Mesh Grid

Diameter = N-1 + M-1

Bisection Bandwidth

Routers and Links

Parallel Packet Flow

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, jab chip mein cores ki sankhya badhti jaati hai—2-4 se lekar 100+ tak—tab purana shared bus system fail ho jaata hai. Socho ek single highway pe 100 cities ka traffic, contention ho jaata hai aur wire delay bhi problem banti hai kyunki signal ko chip ke ek kone se doosre kone tak jaane mein 20+ cycles lag jaate hain. Isliye Network-on-Chip (NoC) aaya, jisme chip ko ek chhota internet maana jaata hai—har core ek "router" ki tarah kaam karta hai, links ke through connected hota hai, aur data packets/flits ki form mein travel karta hai. Iska sabse bada faayda ye hai ki multiple packets ek saath alag-alag links pe chal sakte hain (parallelism), data nearby routers ke through jaata hai (locality), aur naye cores add karne se network collapse nahi hota (scalability).

Ab yahan topology—matlab routers aapas mein kaise connect hain—sab kuch decide karti hai: latency, bandwidth, power aur fault tolerance. Do main topologies samajhna zaroori hai. Mesh ek 2D grid hai jahan har interior node apne 4 neighbours (North/South/East/West) se juda hota hai. Iska diameter (worst-case hops) hota hai (N-1)+(M-1), kyunki corner se opposite corner tak jaane mein diagonal move nahi hota. Torus basically wahi mesh hai lekin extra wraparound links ke saath (leftmost node directly rightmost se jud jaata hai). Ye chhota sa change diameter ko aadha kar deta hai—N/2 + M/2—aur bisection bandwidth double kar deta hai, plus har node ka degree uniform 4 ho jaata hai, toh edge nodes wali asymmetric performance problem bhi khatam.

Ye topics kyun matter karte hain? Kyunki modern multi-core aur many-core processors (jaise GPUs, server chips) ki actual performance NoC design pe hi depend karti hai—chahe individual core kitna bhi tez ho, agar data ko point A se B tak jaane mein zyada hops lagenge toh latency badhegi aur overall system slow ho jaayega. Interview aur exam dono mein diameter, bisection bandwidth aur hop count ke formulas se numerical questions aate hain, isliye Mesh vs Torus ka trade-off—simplicity vs lower latency—clearly samajhna important hai.

Go deeper — visual, from zero

Test yourself — Interconnects, Buses & SoC

Connections