5.2.9 · D1 · HinglishProcessor Datapath & Pipelining

FoundationsPipeline throughput and CPI

2,119 words10 min read↑ Read in English

5.2.9 · D1 · Hardware › Processor Datapath & Pipelining › Pipeline throughput and CPI

Yeh page wo har vocabulary piece build karta hai jis par parent note Pipeline throughput and CPI rely karta hai. Hum "clock tick kya hota hai?" se shuru karte hain aur tab tak rukenge nahi jab tak tum parent mein har symbol bina rukke read kar sako.


1. Clock aur clock period

Neeche figure ke top pe dekho: square wave upar aur neeche ja rahi hai. Ek poore up-and-down box ki width hai. Count karo ki ek second mein kitne boxes fit hote hain, aur woh count hai.

Figure — Pipeline throughput and CPI

Yeh topic ko kyun chahiye. Parent mein har performance number — throughput, speedup — ultimately "kaam kiya per second" hai. Kyunki processor sirf clock ticks par kaam karta hai, hume pata hona chahiye ki ek tick kitni der chalti hai. Isliye , mein appear karta hai.


2. Ek instruction aur uske stages

Ek instruction run karne ke liye processor order mein kai kaam karta hai. Classic split 5 stages ka hai, har ek ka do-letter naam hai:

Neeche figure mein, ek instruction ek horizontal strip hai jo in 5 coloured blocks mein kati hui hai. Har block ek kaam hai. Ek stage ki delay likhi jaati hai — woh time jo ek kaam ko chahiye. Parent unhe likhta hai.

Figure — Pipeline throughput and CPI

Yeh topic ko kyun chahiye. Pipeline clock period hai. Tum woh line tab tak nahi padh sakte jab tak tum nahi jaante ki per-stage time hai aur hand-off cost hai.


3. max aur Σ — stage times combine karne ke do tarike

Parent do symbols use karta hai jo "numbers ki ek list ko fold karke ek number banaate hain". Woh opposite sawaalon ke jawab dete hain.

Agla figure wahi paanch stage-bars do baar dikhata hai: left par, sirf sabse uunche bar ko point karta hai; right par, saare bars ko end-to-end ek lambe bar mein stack karta hai.

Figure — Pipeline throughput and CPI

4. Instructions ko overlap karna — pipeline diagram padhna

Ab assembly line par ek saath bahut saare instructions rakho. Har instruction ek row hai; time left se right clock ticks mein chalta hai. Kyunki station IF us waqt free hai jab instruction 1 ID par move karta hai, instruction 2 iske bilkul peeche IF mein enter kar sakta hai. Rows diagonally slide karti hain.

Figure — Pipeline throughput and CPI

Figure ko dhyaan se padho:

  • Fill-up stretch pehle kuch ticks hain jahan line abhi puri nahi bhari (sirf kuch stations busy hain).
  • Ek baar full hone par, bilkul ek instruction har tick finish hoti hai — yahi poora point hai.
  • instructions ko -stage line se run karne mein ticks lagte hain: pehle wali ko puri tarah push karne ke liye ticks, phir baaki mein se har ek ke liye ek extra tick.

5. CPI, IPC aur throughput — teen scoreboards

Ab upar diye har symbol se parent ki headline quantities define kar sakte hain.


6. Hazards, stalls aur bubbles — kyun real CPI 1 se upar hai

Yeh topic ko kyun chahiye. Parent ka poora doosra half ko wapas 1 ki taraf push karne ke baare mein hai — forwarding use karke data stalls mitaao aur better branch prediction se control stalls mitaao, aur superscalar designs se CPI ko 1 se bhi neeche push karo.


7. Speedup — do duniyon ki comparison

Dhyaan do yeh exactly Section 3 ka " over " idea hai — ab tum formula padh sakte ho aur usmein har symbol jaante ho. Yeh directly raw CPU performance metrics se connect hota hai.


Prerequisite map

Clock period T and rate f

Throughput = 1 over T times CPI

Instruction split into k stages

Stage delays t_i and t_reg

max gives T_pipe, sum gives T_single

Speedup = sum over max

Overlap diagram: one finish per tick

CPI, IPC, IPS definitions

Hazards cause stalls and bubbles

CPI_actual = 1 plus stalls


Equipment checklist

Khud test karo — sirf tab reveal karo jab tum zor se jawab de chuke ho.

Agar ek clock 2 GHz par run karta hai, toh picoseconds mein uska period kya hai?
ps.
kya represent karta hai, aur uske upar kya add karta hai?
stage ki delay hai; woh extra time hai jo pipeline register ko stages ke beech hand-off latch karne ke liye chahiye.
kya compute karta hai, aur pipeline isko kyun care karta hai?
Sabse badi single stage delay; saare stages saath tick karte hain toh sabse slow wala clock period set karta hai.
kya compute karta hai, aur yeh kaunse non-pipelined time ke barabar hai?
Saari stage delays end-to-end ka sum; yeh single-cycle period ke barabar hai.
hone par CPI 1 ki taraf kyun approach karta hai?
Total ticks ; se divide karne par jab , se far larger ho.
CPI aur IPC ke beech relationship batao.
Woh reciprocals hain: .
aur CPI ke terms mein throughput likho.
.
Bubble kya hai aur throughput ke saath kya karta hai?
Stall ke dauran insert kiya gaya NOP; us tick mein koi instruction complete nahi hoti, toh throughput gir jaata hai.
ka formula kya hai?
.
Speedup do combined stage-time expressions ke kaunse ratio ke barabar hai?
divided by — sum divided by max plus register overhead.