• Principles of pipelining
• Simple pipelining
• Structural Hazards
• Data Hazards
• Control Hazards
• Interrupts
• Multicycle operations
• Pipeline clocking
© 1998 by Hill, Wood, Sohi,
Smith and Vijaykumar and
Moshovos
ECE D52 Lecture Notes: Chapter 3
1
Sequential Execution Semantics
We will be studying techniques that exploit the semantics of
Sequential Execution.
Sequential Execution Semantics: instructions appear as if they executed in the program specified order and one after the other
Alternatively
At any given point in time we should be able to identify an instruction so that: 1. All preceding instructions have executed
2. None following has executed
© 1998 by Hill, Wood, Sohi,
Smith and Vijaykumar and
Moshovos
ECE D52 Lecture Notes: Chapter 3
2
Exploiting Sequential Semantics
• The “it should appear” is the key
• The only way one can inspect execution order is via the machine’s state
This includes registers, memory and any other named storage
We will looking at techniques that relax execution order while preserving sequential execution semantics
© 1998 by Hill, Wood, Sohi,
Smith and Vijaykumar and
Moshovos
ECE D52 Lecture Notes: Chapter 3
3
Steps of Instruction Execution
Instruction execution is not a monolithic action
Fetch
Decode
There are multiple microactions involved
Read Operands
Operation
Writeback Result
Determine Next Instruction
© 1998 by Hill, Wood, Sohi,
Smith and Vijaykumar and
Moshovos
ECE D52 Lecture Notes: Chapter 3
4
Pipelining: Partially Overlap Instructions
Unpipelined
time
1/Throughput
instructions latency Pipelined
1/Throughput
time instructions latency
Time sequential
Ideally: Time pipeline = ----------------------------------------PipelineDepth
This ignores fill and drain times
© 1998 by Hill, Wood, Sohi,
Smith and Vijaykumar and
Moshovos
ECE D52 Lecture Notes: Chapter 3
5
Sequential