Pipelining in Microprocessors
1. Introduction
Pipelining is a technique in which multiple instructions are overlapped during execution. It divides
the instruction execution process into different stages so that multiple instructions can be processed
simultaneously.
2. Basic Concept
Without pipelining, each instruction completes all steps before the next starts. With pipelining, each
instruction enters a new stage while the previous instruction moves to the next stage, increasing
throughput.
3. Common 5-Stage Pipeline
1. Instruction Fetch (IF)
2. Instruction Decode (ID)
3. Execute (EX)
4. Memory Access (MEM)
5. Write Back (WB)
4. Types of Pipelines
• Instruction Pipeline
• Arithmetic Pipeline
• Processor Pipeline (Superscalar)
5. Pipeline Hazards
• Structural Hazards – resource conflict
• Data Hazards – instructions depend on each other
• Control Hazards – branch instructions cause delay
6. Solutions
• Forwarding / Bypassing
• Stalling
• Branch Prediction
• Separate instruction and data memory
7. Advantages
• Higher instruction throughput
• Better hardware utilization
• Faster execution
8. Disadvantages
• Complex hardware
• Hazard handling required
• Branch penalties reduce efficiency
9. Applications
Used in ARM, Intel, MIPS processors and modern CPUs.