Tom Kelliher, CS 240
Jan. 28, 2000
Examples of pipelines.
More Pipelines.
Assume:
Instruction class times:

Clock periods for the two implementations?
Execution example:

Note that pipelined register file reads are done during the second half of the clock cycle and writes are done during the first half. Why?
Consider the speedup:
Do we achieve that?
Consider the execution of 1,000 instructions and compute the actual speedup.
What happened? The cost of the pipeline registers.
Consider:
A pipelined datapath:

Consider four instructions: R-mode, a branch, LW, SW.
Observations:
Example: unified L1 cache/memory.

Solutions:
Static prediction. Truly static. Compile-time determined.
Dynamic prediction. Branch history tables. One-, two-bit counters.
Assumes you know branch outcome early.
Code scheduling:

Consideration: deeper pipelines.
Data not available when needed.
ALU example:

Fixed by forwarding.
Memory example:

How can this be fixed?