GATE CS - COMPUTER ORGANIZATION:CPU Design and Pipelining
Mastering cpu design and pipelining concepts and implementation.
CPU Design and Pipelining for GATE CS
GATE pipeline questions are numerical: speedup, stalls from hazards, and occasionally forwarding. Draw the stage timeline.
Classic 5-stage sketch
IF → ID → EX → MEM → WB. Ideal speedup approaches number of stages when the pipeline is full and hazard-free.
Speedup (idealized)
Without pipeline: time ≈ for instructions, stages, stage time .
With pipeline (no stalls): ≈ .
Speedup ≈ as grows.
Hazards
| Hazard | Cause | Mitigations |
|---|---|---|
| Structural | Resource conflict | Duplicate units / separate I/D caches |
| Data | Need result not ready | Forwarding, stall, reorder |
| Control | Branch outcome unknown | Predict, delay slot, flush |
Worked: load-use stall
If EX needs a value loaded in the previous instruction’s MEM, even with forwarding you may need one stall. GATE states whether forwarding exists — read the assumption.
CPI with stalls
for a single-issue pipeline that would otherwise be CPI 1.