6.3.2 · D2 · HinglishInterconnects, Buses & SoC

Visual walkthroughPCI Express (PCIe) architecture and generations

1,940 words9 min read↑ Read in English

6.3.2 · D2 · Hardware › Interconnects, Buses & SoC › PCI Express (PCIe) architecture and generations

Yeh page ek PCIe link ki effective bandwidth ko bilkul scratch se build karta hai. Hum do wires aur ek wiggling voltage se shuru karte hain, aur famous number "x16 Gen 3 = 15.75 GB/s per direction" tak pahunchte hain. Har symbol ko use karne se pehle earn kiya gaya hai. Upar se neeche padho; har step mein ek picture hai jo idea carry karti hai.

Parent topic: PCI Express (PCIe) architecture and generations.


Step 1 — Ek lane do choti wire-pairs hoti hai

KYA. PCIe ki sabse choti unit ek lane hai. Ek lane mein chaar wires hote hain: do data bahar bhejte hain (transmit pair, TX), aur do data andar laate hain (receive pair, RX).

KYO do wires per direction, ek kyun nahi? Ek akeli wire voltage ko ek shared ground ke against measure karti hai. Aas-paas ka koi bhi electrical noise us voltage ko upar ya neeche push karta hai aur receiver dhoka kha jaata hai. Isliye PCIe same signal do wires par bhejta hai lekin sign flip karke — ise differential signalling kehte hain. Receiver sirf do wires ke beech ka difference dekhta hai.

Yahan wire A ka voltage hai, wire B ka voltage hai, aur unka difference real signal hai. Agar noise dono wires mein same amount add kare, toh cancel ho jaata hai: . Noise gayab ho jaata hai.

PICTURE. Red aur teal traces do wires hain; noise bump dono ko equally hit karta hai, isliye plum "difference" line clean rehti hai.

Figure — PCI Express (PCIe) architecture and generations

Step 2 — Voltage wiggles se bits bante hain: raw pulse rate

KYA. Transmitter differential voltage ko "high" aur "low" ke beech flip karta hai. Har flip ek bit bhejne ka mauka hai. Yeh maukey har second kitni baar milte hain isko transfer rate kehte hain, jo GT/s mein measure hoti hai (gigatransfers per second) — har second billions of signalling opportunities.

KYO ise "transfers" bolte hain, "bits" kyun nahi? Kyunki — jaise hum Step 6 mein dekhenge — early generations mein ek transfer actually ek raw bit hota hai, lekin encoding kuch bits chura leti hai. "Transfer" naam rakhne se yaad rehta hai: yeh line rate hai, data rate abhi nahi.

PCIe Gen 3 ke liye, ek lane itni speed par run karta hai:

jahan raw per-lane transfer rate hai. Yeh voltage decisions har second hain, har direction mein.

PICTURE. Ek square wave: har shaded slot ek "transfer" hai — ek 1 ya 0 hone ka mauka. Slots per second gino toh milta hai.

Figure — PCI Express (PCIe) architecture and generations

Step 3 — Har bit tumhara nahi: encoding tax

KYA. Raw stream pure data nahi ho sakti. Receiver ke paas koi alag clock wire nahi hoti; use timing data se hi recover karni hoti hai. Toh PCIe stream mein extra bits add karta hai. Gen 3 se aage ka scheme 128b/130b hai: tumhare har 128 data bits ke liye, 2 housekeeping bits insert hote hain, jo ek 130-bit block banate hain.

KYO yeh extra 2 bits? Yeh mark karte hain ki har block kahan se shuru hota hai aur guarantee karte hain ki voltage itni baar flip hoti rahe ki receiver locked rahe. Inke bina, identical bits ki lambi run receiver ko "andheron mein kho" deti — koi edges nahi jiske against time kare.

Hum encoding efficiency define karte hain = line ka woh fraction jo actually tumhara data hai:

Yahan tumhare payload bits hain aur kul bits hain jo actually bheje gaye. Toh line ka "tax" hai.

PICTURE. 130 slots ki ek bar: 128 orange "tumhara data" slots, 2 plum "sync" slots. Tax woh patli plum sliver hai.

Figure — PCI Express (PCIe) architecture and generations

Step 4 — Ek lane, ek direction: rate ko efficiency se multiply karo

KYA. Ab Step 2 aur 3 combine karo. Ek lane, ek direction par useful data rate raw rate times efficiency hoti hai:

raw transfer rate hai (Step 2), usable fraction hai (Step 3), aur result gigabits per second (Gb/s) mein hai, kyunki yahan har transfer ek bit hai.

KYO multiply? Rate kehti hai "har second kitne bits wire cross karte hain"; efficiency kehti hai "unka kitna fraction tumhara hai". Fraction-of-a-rate ek multiplication hai — bilkul "60 mph part of the trip ke liye" ki tarah.

PICTURE. Ek funnel: 8 Gb/s upar se daalta hai, 1.54% tax side se nikalti hai, 7.877 Gb/s pure data neeche se tapakta hai.

Figure — PCI Express (PCIe) architecture and generations

KYA. Ek link kaafi identical lanes ko side by side bundle karta hai. Lanes ki sankhya link width hai, jo = x1, x2, x4, x8, ya x16 (sabse wide standard) likhte hain. Kyunki har lane fully independent hai, unki data rates simply add hoti hain:

parallel lanes ki sankhya hai, aur Gb/s Step 4 ka single-lane result hai.

KYO add, kuch aur clever kyun nahi? Is level par lanes ke beech koi shared clock nahi hai aur koi arbitration nahi — 16 independent pipes har ek 7.877 Gb/s move karte hue Gb/s saath move karte hain. Simple addition.

PICTURE. Solah parallel pipes, har ek par 7.877 Gb/s likha hua, ek mote pipe mein merge hote hue jis par 126 Gb/s likha hai.

Figure — PCI Express (PCIe) architecture and generations

Step 6 — Bits se bytes, aur do-direction ka sawaal

KYA. Data storage bytes mein measure hoti hai, aur 1 byte = 8 bits. Convert karo:

Case-sensitive units notice karo: Gb/s gigabits hai, GB/s gigabytes hai — 8 ka factor ka fark. Yeh famous x16 Gen 3 = 15.75 GB/s number hai.

Do-direction ki subtlety. Kyunki link full-duplex hai (Step 1), same 15.75 GB/s usi waqt doosri taraf bhi flow karti hai. Isliye aggregate hai:

PICTURE. Ek do-taraf ki sadak: 15.75 GB/s northbound, 15.75 GB/s southbound, junction par sign "31.5 GB/s total" likha hua.

Figure — PCI Express (PCIe) architecture and generations

Step 7 — Degenerate aur edge cases

Har woh scenario jo reader ko mil sakta hai, taaki kuch surprise na kare.

  • x1 link (). Formula abhi bhi kaam karta hai: GB/s ≈ 985 MB/s per direction. Yeh sabse chota real link hai.
  • x32 "ghost". Spec paper par x32 define karta hai, lekin koi hardware ship nahi hota. Real calculations mein use mat karo.
  • Gen 1 / Gen 2 (8b/10b). Yahan hai aur ek transfer abhi bhi ek raw bit hai, toh Gen 1 x1 = GB/s = 250 MB/s. Same formula, alag aur .
  • Gen 6 (PAM-4). Rules thoda bend hote hain: do voltage levels ki jagah, PAM-4 chaar levels use karta hai (), toh har symbol bits carry karta hai. "64 GT/s" figure mein yeh doubling pehle se fold in hai, aur efficiency FLIT framing use karti hai (). Hamari derivation ki shape survive karti hai — sirf aur change hote hain.

PICTURE. Ek chota table-figure: teen eye-diagrams side by side — NRZ (2 levels, wide open eye), PAM-4 (4 levels, teen cramped eyes), yeh dikhate hue ki PAM-4 ko error correction kyun chahiye (uske voltage gaps as tall hain).

Figure — PCI Express (PCIe) architecture and generations

Ek-picture summary

Poori derivation multiply-and-convert ki ek chain hai: raw rate → sirf apna fraction rakho → lanes stack karo → bytes mein convert karo → full-duplex ke liye double karo.

Figure — PCI Express (PCIe) architecture and generations
Recall Feynman retelling — kisi dost ko bina notation ke batao

Socho ek pipe hai jo wire mein 8 billion pulses per second push kar sakta hai. Lekin tum sab use nahi kar sakte — har 65 mein se lagbhag 1 pulse ek chota "timing marker" hota hai taaki doosra end jaane ki woh kahan hai, toh sirf 98.46% pulses tumhara actual data hain. Isse ek pipe mein lagbhag 7.877 billion useful bits per second milte hain. Ek bada graphics-card slot 16 aisi pipes ko side by side bundle karta hai, toh 16 se multiply karo → 126 billion bits per second. Computer log bytes mein count karte hain, aur 8 bits mein ek byte banta hai, toh 8 se divide karo → ek taraf lagbhag 15.75 billion bytes per second. Aur kyunki data dono taraf ek saath flow kar sakta hai, agar dono directions add karo toh double milta hai, 31.5. Magic formula sirf yeh hai: rate, times useful fraction, times kitni pipes, divided by 8 — aur double karo agar dono directions count kar rahe ho. Har fancy generation sirf "8 billion" aur "useful fraction" change karta hai; recipe kabhi nahi badlti.

Reveal-me checks:

"GT/s" (transfers/second) figure kya measure karta hai — data bits ya raw line pulses?
Raw line pulses (signalling opportunities); encoding tax abhi remove nahi hua hai.
End mein 8 se divide kyun karte hain?
Bits (Gb/s) se bytes (GB/s) mein convert karne ke liye, kyunki 1 byte = 8 bits.
x16 Gen 3 ke liye per-direction bandwidth kya hai?
15.75 GB/s (aur dono directions ke liye 31.5 GB/s aggregate).
Kya 8b/10b → 128b/130b jaane se 13× zyada data milta hai?
Nahi — isse lagbhag 1.23× zyada usable data milta hai; 13× sirf wasted fraction ka shrink hai.