10_Pipelining
10_Pipelining
Pipelining
• Strategies
• Performance
• Hazards
Example Register Organizations
Pentium 4 Organization
PowerPC Register Organization
Simple Instruction Cycle Model
— Implementing parallelism
Prefetch
• Fetch instructions
• Decode instructions
This is pipelining
Pipeline “stations”
— Data
— Control
Structural Hazards
— CPU
— Etc.
Example: Resource Hazard
— a register
Types of Data Hazards
– Example?
– Example?
Control Hazard
Solutions include:
— Multiple Pipeline streams
— Prefetching the branch target
— Using a Loop Buffer
— Branch Prediction
— Delayed Branch
— Reordering of Instructions
— Multiple Copies of Registers
— Get branch target early
Multiple Streams
• Have two pipelines
• Prefetch each branch into a separate
pipeline
• Use appropriate pipeline
Challenges:
• Leads to bus & register contention
• Multiple branches lead to further pipelines
being needed
Prefetch Branch Target
• Execute (EX)
— ALU operations, cache access, register update
• Writeback (WB)
— Update registers & flags
— Results sent to cache & bus interface write buffers
80486 Instruction Pipeline Examples