Exercises — Infinity Fabric - mesh interconnects
6.3.11 · D4· Hardware › Interconnects, Buses & SoC › Infinity Fabric - mesh interconnects
Yeh page ek self-test hai. Har problem ka poora worked solution ek collapsible callout ke andar chhupa hua hai — pehle problem khud try karo, phir reveal karo. Problems paanch levels pe chadhti hain: L1 Recognition → L2 Application → L3 Analysis → L4 Synthesis → L5 Mastery.
Hum parent note 6.3.11 Infinity Fabric - mesh interconnects (Hinglish) aur uske English original pe build karte hain. Shuru karne se pehle, teen symbols baar baar aayenge — inhe simple words mein fix kar lete hain taaki kuch bhi unexplained na rahe.
Upar grid dekho: blue path sirf right angles pe hi turn karta hai. Woh right-angle-only rule hi kyun hai ki hum dono distances add karte hain instead of straight diagonal line use karne ke — fabric mein diagonal wires nahi hote.
Level 1 — Recognition
Exercise 1.1
Har interconnect ko uski scaling weakness se match karo: (a) shared bus, (b) ring, (c) 2D mesh. Options: (i) latency jaisi badhti hai, (ii) ek waqt mein sirf ek transaction / electrical loading, (iii) latency sirf jaisi badhti hai.
Recall Solution
- (a) shared bus → (ii). Saare cores ek wire tap karte hain, isliye ek waqt mein sirf ek talker aur har extra core capacitance add karta hai jo safe clock ko low karta hai.
- (b) ring → (i). Average trip loop ka quarter hota hai, isliye hops node count ke saath linearly badhte hain.
- (c) mesh → (iii). Distances jaisi badhti hain kyunki tum nodes ko square mein fold karte ho — bahut slow growth.
Exercise 1.2
Intel ke mesh mein ek router ke kitne ports hote hain, aur wo kya hain?
Recall Solution
5 ports: chaar cardinal directions — North, South, East, West — plus ek local port jo router ko uske apne agent (core + L2 slice jo wo serve karta hai) se connect karta hai. Chaar neighbours se baat karne ke liye, ek "home" se baat karne ke liye.
Level 2 — Application
Exercise 2.1 (FCLK → bandwidth)
Infinity Fabric ek chiplet aur I/O die ke beech per direction 32 B wide hai aur pe run karta hai. One-directional aur bidirectional bandwidth nikalo.
Recall Solution
Kya karte hain: bytes-per-cycle × cycles-per-second. Kyun multiply karte hain: har tick 32 bytes move karta hai; ticks per second hain, isliye total bytes/second unka product hai. Bidirectional (ek aur identical lane doosri taraf run karta hai):
Exercise 2.2 (XY routing hop count)
Ek 4×4 mesh, upar fix ki gayi coordinate convention use karte hue (origin bottom-left, = column East, = row North). Core pe hai jo ko dimension-ordered XY routing use karke bhejta hai (pehle saara X move karo, phir saara Y). Kitne hops, aur visited coordinates list karo?
Recall Solution
X phase: se tak → hops east: . Y phase: se tak → hops north: . Visited path: .
Figure s02 neeche exactly yahi route draw karta hai. Kaise padhen: yellow segment X phase hai — do hops due east row ke saath — aur green segment Y phase hai — teen hops due north column ke upar. Do red dots source aur destination hain. Notice karo path sirf ek baar bend karta hai, corner pe: XY routing hamesha saara X finish karta hai Y touch karne se pehle, jo hardware mein routing decision ko itna sasta banata hai.
Level 3 — Analysis
Exercise 3.1 (ring vs mesh for N = 16)
lo, cost per hop cycles. Average ring latency, average mesh latency (4×4) exact Manhattan average use karke compute karo, aur speedup factor nikalo.
Recall Solution
Ring: hops , isliye cycles. Mesh (exact): ke saath, use karo hops (approximate dropped term se over-count karta). Isliye cycles. Speedup: Mesh is size pe roughly 1.6× lower latency hai — aur gap badhta hai jab badhta hai kyunki ring ki tarah scale karta hai jabki mesh ki tarah.
Exercise 3.2 (bisection bandwidth)
Ussi ring aur 4×4 mesh ke liye, un links ko count karo jo ek cut cross karta hai jo network ko aadha split karta hai (bisection). Kiski bisection bandwidth zyada hai, aur kitne factor se?
Recall Solution
Bisection = wo kam se kam links jo tumhe cut karne padenge network ko do equal halves mein separate karne ke liye; yeh traffic ko cap karta hai jo halves ke beech flow kar sakta hai.
- Ring: loop ko slice karna exactly 2 links cross karta hai (loop do jagah cut hota hai).
- Mesh (4×4): do columns ke beech cut karo — woh horizontal links ka ek poora column sever karta hai links.
Figure s03 neeche woh cut dikhata hai. Kaise padhen: dashed yellow vertical line bisection hai — yeh 4×4 grid ko left half (2 columns) aur right half (2 columns) mein slice karti hai. Chaar thick red segments woh horizontal links hain jo woh sever karta hai, ek per row. Count karo: exactly . Ise ring se compare karo, jahan koi bhi halving line sirf loop ke do arcs cross karti hai.
Level 4 — Synthesis
Exercise 4.1 (chiplet worst-case read latency budget)
EPYC-style design: chiplet 0 pe ek core ek cache line read karta hai jiska home L3 slice chiplet 7 pe hai. Diya gaya: intra-chiplet lookup ≈ 5 cycles; har chiplet↔I/O-die crossing ≈ 20 ns at . Ek read ek round trip hai: request chiplet 0 → I/O die → chiplet 7 jaati hai (do crossings), aur data reply chiplet 7 → I/O die → chiplet 0 jaata hai (do aur crossings). Ek 20 ns crossing ko FCLK cycles mein express karo, phir full round-trip total cycles mein do.
Recall Solution
20 ns ko fabric cycles mein convert karo: ek cycle rehta hai. Ek read ke liye crossings count karo (round trip): request path = 2 crossings, reply path = 2 crossings → 4 crossings total. Intra-chiplet lookup add karo: cycles full request-to-data round trip ke liye. Insight: fabric crossings, cache lookup nahi, dominate karte hain — aur kyunki read wapas aana chahiye, return path crossing count double kar deta hai. Exactly issi liye AMD memory controllers ek central I/O die pe rakhta hai taaki har chiplet symmetric ho (relate karta hai 6.2.8-NUMA-Architecture non-uniform access se). Note: parent note ka "~75 cycles" sirf one-way request path quote karta hai (2 crossings + lookup ≈ 77); full read latency roughly double hai.
Exercise 4.2 (directory vs broadcast traffic)
Ek line mein se cores ke saath shared hai. Ek write invalidation force karta hai. Broadcast snooping kitne probe messages bhejta hai versus directory-based targeted snooping? Ratio do.
Recall Solution
Broadcast: request har core ko jaati hai → probes (writer ke siwa sab). Directory: home L3 slice exact sharer list jaanta hai, isliye sirf holders ko probe karta hai (ya agar writer already hold karta hai; statement ke hisaab se use karo). Kyun directory scale karta hai: broadcast har write pe hai; directory hai jahan typically 1–3 hota hai, core count se independent. Yahi AMD ke Scalable Coherent Protocol ki core baat hai — dekho 6.3.5-Cache-Coherency-Protocols.
Level 5 — Mastery
Exercise 5.1 (balanced-fabric design)
Tum ek desktop chip design kar rahe ho. Memory DDR5-6000 (6000 MT/s) hai, dual channel, 8 B per channel per transfer. Fabric memory bottleneck na bane isliye uski one-directional bandwidth memory bandwidth se kam se kam match karni chahiye. Fabric per direction 32 B wide hai. Minimum FCLK kya achieve karta hai balance? Phir FCLK:MCLK ratio batao.
Recall Solution
Step 1 — memory bandwidth. DDR "MT/s" dono edges count karta hai, isliye transfers/s per channel. Step 2 — required FCLK. Fabric 32 B/cycle move karta hai; set karo : Step 3 — ratio. MCLK (memory clock) MT/s rate ka aadha hai: . Isliye balanced ratio hai: Insight: 1:1 FCLK:MCLK ratio exactly isliye enthusiasts FCLK ko memory speed track karne ke liye tune karte hain — neeche giro aur fabric cores ko woh bandwidth bhookha rakh deta hai jo DIMMs supply kar sakti hain.
Exercise 5.2 (mesh ring ko kab overtake karta hai?)
Sabse chota nikalo (assume karo perfect square taaki mesh ek square grid ho, upar fix ki gayi coordinate convention use karte hue) jiske liye exact mesh average hops strictly ring average hops se less hain, yaani .
Recall Solution
Perfect squares ko directly exact mesh formula vs ring se test karo:
- : mesh , ring → tie, mesh strictly less nahi.
- : mesh , ring → mesh strictly jeet ta hai. Yeh real-world "~10–12 core" crossover se match karta hai jab tum routing aur area overheads add karo jo practical break-even ko pure-math se thoda zyada push karte hain. Short mein: mathematics pe mesh ke favour mein tip karta hai, lekin bade routers banane ki messy engineering realities asli switch ko roughly ek dozen cores tak delay karti hain.
Recall Self-test checkpoints
Bus weakness ::: ek waqt mein ek transaction + electrical loading (ek shared wire). N nodes ke liye ring average hops ::: N/4 (exact). k×k grid ke liye exact mesh average hops ::: 2(N−1)/(3√N), jo bade N ke liye 2√N/3 → ho jaata hai. Kyun directory broadcast snooping ko beat karta hai ::: O(k) targeted probes vs O(N) broadcast, k = sharers. Ek read ki worst-case latency kitne fabric crossings count karti hai ::: chaar (request out + data reply, har ek do crossings). Balanced FCLK:MCLK ratio ::: 1:1 taaki fabric bandwidth memory bandwidth se match kare. Sabse chota square N jahan mesh strictly ring ko beat karta hai ::: N = 9.
Connections
- Parent: 6.3.11 Infinity Fabric - mesh interconnects (Hinglish)
- Prerequisites & neighbours: 6.3.1-Bus-ArchitectureBasics, 6.3.5-Cache-Coherency-Protocols, 6.2.8-NUMA-Architecture, 6.4.3-PCIe-Topology, 5.1.7-Memory-BandwidthCalculation, 7.2.4-Network-Topologies