Architecture
Pipeline
A technique where multiple instructions execute simultaneously by dividing execution into stages, each handling a different instruction.
Detailed Explanation
Pipelining is like an assembly line—while one instruction is being decoded, another is fetching, another is executing. A 5-stage pipeline (IF-ID-EX-MEM-WB) can have 5 instructions in flight, achieving near 1 IPC (instruction per cycle) throughput despite each instruction taking 5 cycles.
Pipeline hazards (data dependencies, branches, resource conflicts) can cause stalls. Forwarding passes results between stages without waiting for writeback. Branch prediction keeps the pipeline filled despite control flow uncertainty.
