6.3.6 · D2 · HinglishInterconnects, Buses & SoC

Visual walkthroughNetwork-on-Chip (NoC) topologies

3,642 words17 min read↑ Read in English

6.3.6 · D2 · Hardware › Interconnects, Buses & SoC › Network-on-Chip (NoC) topologies

Yeh parent note Network-on-Chip (NoC) topologies ke peeche ki picture-story hai. Ise upar se neeche padho; har symbol earn hone ke baad use hota hai.


KYA. Ek node ek router hai jisme ek core attached hai — ise ek dot ki tarah draw karo. Ek link do dots ke beech ek wire hai — ise ek line ki tarah draw karo. Ek hop ek link ke upar ek safar hai. Agar ek packet 3 links cross karke apni destination tak pahunchta hai, toh woh trip 3 hops ki hai.

KYUN. Isse pehle ki hum "kitna dur" ya "kitna zyada" ki baat karein, humein sabse chhote countable pieces chahiye. Is page par baaki sab kuch dots, lines, aur hops count karna hai. Yahi poora trick hai.

PICTURE. Do dots ek line se jude hue = ek hop. Teesra dot add karo aur packet ab 2 hops mein far end tak pahunchta hai. Hops ki number literally utni hi lines hain jinke upar se tum walk karte ho.


Step 2 — Mesh ko layout karo aur distance ko "blocks walked" ki tarah padho

KYA. Nodes ko ek grid par arrange karo: columns, rows. Har interior dot apne 4 neighbours se juda hai: North, South, East, West. Koi diagonal wires nahi hain.

KYUN. Ek chip ek flat rectangle hai, isliye routers ki ek flat rectangular grid woh layout hai jo sabse kam wire waste karti hai. Isliye Mesh default hai. Lekin "no diagonals" ka ek consequence hai jo hum measure karenge: across aur upar jaane ke liye, tum corner nahi kaat sakte — tum use city blocks ki tarah walk karte ho.

PICTURE. Bottom-left corner se top-right corner tak ke red path ko dekho. Woh right, right, right jaata hai (columns ke across) phir up, up, up (rows upar). Woh kabhi diagonally nahi ja sakta, isliye woh hamesha dono directions ka poora payment karta hai.


Step 3 — Do corners ko apart push karo: Mesh diameter

KYA. Jo do dots sabse zyada door hain woh opposite corners hain. Bottom-left column , row par hai; top-right column , row par hai.

KYUN. Diameter worst case ke roop mein define hoti hai, isliye hum woh pair dhundna chahte hain jo Step 2 ka formula maximize kare. Corners dono aur ko ek saath maximize karte hain.

PICTURE. Amber staircase poori width ( columns) aur poori height ( rows) span karti hai. Amber steps count karo: woh count hi diameter hai.

Ek mesh ke liye: hops — bilkul parent note se match karta hai.


Step 4 — Chip ko half mein kato: Mesh bisection bandwidth

KYA. Grid ko do equal halves mein split karo. Ek square grid ke liye hum kisi bhi taraf cut kar sakte hain — ek vertical cut (columns ko half karna) ya horizontal cut (rows ko half karna) — aur count karo ki knife kitne links sever karti hai. Ek vertical cut ek link per row sever karta hai ( of them); ek horizontal cut ek link per column sever karta hai ( of them). Hum woh cut rakhte hain jo kam links sever kare, kyunki wahi asli bottleneck hai. Har severed link bits per second carry karta hai. Multiply karo.

KYUN. Imagine karo ki ek half ke har node ko doosri half ke ek node se ek saath baat karni hai. Saara traffic exactly anhi links se squeeze hoga jo cut ne sever ki hain. Isliye bisection bandwidth "sabka chip ke across baat karna" traffic ki sachchi ceiling hai — yeh woh number hai jo diameter nahi bata sakta. Hum fewest-link cut choose karte hain kyunki bottleneck tightest squeeze se define hota hai, loosest se nahi.

PICTURE. Dashed cyan vertical cut horizontal link per row sever karta hai; faint dashed horizontal cut vertical link per column sever karta hai. Square grid par dono same count sever karte hain; tall thin grid par shorter cut jeet jaati hai. Har cut wire amber glow karta hai.

Ek mesh ke liye ke saath: parent ke worked example se match karta hai.


Step 5 — Ek rule badlo: edges wrap karo → Torus

KYA. Same mesh lo aur wraparound links add karo: sabse left column sabse right se jud jaata hai, top row bottom se jud jaati hai. Ab grid dono directions mein loop hai.

KYUN. Mesh mein, corner-to-corner expensive tha kyunki tum poori width walk karte the. Agar far edge ab ek single hop door hai (wrap ke through), toh worst case shrink ho jaata hai. Yahi wajah hai ki torus exist karta hai: same layout, shorter worst path.

PICTURE. Amber wrap arrow right edge se seedha left edge par ek hop mein leap karta hai. Achanak "farthest" node sirf half grid door hai har direction mein, kyunki tum jo bhi taraf shorter ho woh jaate ho.

Ek ke liye: vs. mesh drop, bilkul parent ki figure. Cost: woh wrap wires poori chip cross karti hain → zyada power, dekho Power Management in SoCs.


Step 6 — Rule ko aur zyada badlo: nodes ko binary mein label karo → Hypercube

KYA. nodes ko binary names se tak do ( bits). Do nodes ko connect karo agar aur sirf agar unke names ek bit mein alag hon.

KYUN. Mesh mein, "distance" blocks walked thi. Yahaan distance ban jaati hai do names ke beech kitne bits alag hain (Hamming distance). Kyunki har hop exactly ek bit flip karta hai, hops ki number un bits ki number ke barabar hai jo agree nahi karti. Bits flip karna ek grid cell step karne se kahin zyada powerful move hai — tum poori address space mein jump kar sakte ho.

PICTURE. Node se , , tak links hain — har neighbour ek flipped bit hai (flipped bit amber glow karta hai). Kisi bhi node tak pahunchne ka matlab hai galat bits ko ek ek karke fix karna.

Ab doosra metric — bisection. names ko do halves mein split karo top bit dekh ke: saare names jo se start hote hain left par, saare jo se start hote hain right par. Is cut ko cross karne wale sirf wahi links hain jo woh top bit flip karte hain — aur har node ka exactly ek aisa link hai. Toh cut ek link per node-pair sever karta hai, yaani links.

Cost. Har node ko links chahiye, isliye router size chip ke saath grow karta hai — ek classic latency-vs-cost trade-off. Aur dimension ka cube flat draw nahi ho sakta, isliye 2D silicon mein lay out karna mushkil hai.


Step 7 — Root ki taraf wires moto karo → Fat-Tree

KYA. Ek tree build karo: bottom par leaves cores hain, internal nodes switches hain, aur sab kuch ek single root ki taraf funnel karta hai aur wapas neeche. Pehle branching factor fix karo: ek ==-ary tree== ka matlab hai ki har switch ke neeche exactly children hain. Toh ek binary tree hai (2 children each), ek quad tree hai, aur aise aage. Yeh ek number control karta hai ki tree kitni tezi se fan out karta hai. Doosri trick yeh hai ki upar jaate waqt har level par links wider (zyada wires) hote jaate hain — level 0 links carry karte hain, level 1 , level 2 , aur aise aage. Yahi widening hai isliye ise fat-tree kehte hain.

KYUN. Ek plain tree root par bottleneck ho jaata hai: saara left-to-right traffic ek thin link se funnel hota hai. Agar hum har level upar link width double karein, toh root itna wide hai ki sab kuch carry kar sake — bottleneck disappear ho jaata hai. Toh fat-tree uniform bandwidth buy karta hai wires kharach karke jahaan traffic concentrate hota hai.

PICTURE. Amber links climb karte waqt thick hote jaate hain: leaves par thin, ek level upar twice as thick, phir usse bhi upar twice again, root par fattest. Ek packet ek common ancestor switch tak upar jaata hai, phir apni destination par wapas neeche.

"Up then down = " kyun — agli picture mein trace karo. Tree ki height levels hai: har level upar jaana multiply karta hai ki neeche kitne leaves hain se, isliye sab leaves cover karne mein multiplications lagte hain. Ek leaf se doosre dur leaf tak ek packet ka leaves par koi sideways link nahi hota — uska ek hi route hai ki woh us lowest switch tak climb kare jo dono leaves ka ancestor ho, phir descend kare. Worst case mein woh common ancestor root hota hai, isliye packet full levels climb karta hai aur full levels descend karta hai: .

Cost. Woh wide root switches area aur power mein huge hain, isliye fat-trees datacenters mein zyada rule karti hain banasbat tiny SoCs ke.


Step 8 — Degenerate extreme: ise loop tak strip karo → Ring

KYA. Har node ko exactly 2 links do, ek single cycle banao. Yeh minimum possible network hai jo ab bhi sabko connect karta hai.

KYUN. Hum yeh case isliye include karte hain kyunki yeh failure mode dikhata hai: ek node ke paas sirf 2 links hone par, ring ke through koi bhi cut sirf 2 links sever karta hai, chahe kitne bhi nodes hon. Bisection bandwidth grow karna band ho jaati hai — ek constant par stuck ho jaati hai.

PICTURE. Dashed cut ring ko slice karta hai aur exactly 2 wires (amber) touch karta hai, jabki diameter opposite node tak ka lamba rasta hai — ring ka aadha.

Jab 64 cores network ko coherence broadcasts se flood karte hain, woh flood narrowest cut survive karna chahta hai — Ring ka flat choke karta hai, jabki Hypercube aur Fat-Tree () breathe karte hain.


Ek-picture summary

Har topology same dots hain alag connection rule ke saath, aur har rule do numbers move karta hai — diameter (kitna dur, worst case) aur bisection (kitna zyada, tightest cut par).

Recall Feynman retelling — kisi dost ko samjhane ki tarah bolo

Routers ka ek sheher imagine karo as dots. Ek hop ek road pe ek drive hai. Do sawaal decide karte hain ki sheher kaam karta hai ya nahi: "sabse lamba safar kisi ko kabhi bhi karna pad sakta hai?" (woh hai diameter) aur "agar mein sheher ko half mein split karun, toh kitni roads saara cross-town traffic carry karti hain?" (woh hai bisection bandwidth). Ek plain grid se shuru karo — mesh. Koi diagonal roads nahi, isliye corner-to-corner trip poori width aur poori height ke liye pay karti hai: hops. Ise halves mein kato aur tum ek road per row (ya per column, jo bhi kam ho) sever karte ho, isliye bandwidth roads wide hai. Agar ek side mein odd number of towns hain, toh do halves ek town se differ karti hain lekin cut ab bhi same number of roads cross karta hai — formula nahi budta. Edges ko around wrap karotorus — aur far edge ek hop door hai, worst trip half ho jaati hai aur cut ki width double ho jaati hai (ek straight knife hamesha ek loop ko do jagahon par cross karta hai). Grid ki jagah, dots ko binary mein name karo aur un names ko connect karo jo ek bit mein alag hainhypercube — aur ek trip bas "galat bits ek ek karke fix karo" hai, isliye worst trip sirf bits lambi hai, aur top bit par split karne se pata chalta hai ki roads cut cross karti hain. Ek tree grow karo aur root ki taraf wires moto karofat-tree — jahan har switch ke children hain isliye tree levels tall hai; ek packet shared ancestor tak climb karta hai aur wapas neeche aata hai, woh height do baar pay karta hai (), aur kyunki wires har level upar double hoti hain, koi level bottleneck nahi hota, isliye poora roads worth bandwidth survive karta hai. Sab kuch strip karke ek single loop banao — ring — aur har cut hamesha sirf 2 roads touch karta hai, isliye yeh kabhi scale nahi karta. Yahi poora page hai: same dots, ek rule badlo, diameter aur bisection ko move hote dekho.