The Wonderful World of Pipelining

An Overview

CS 561 - CS 350 Pipelining



Background

 

Laundry Example

 

RISC Pipelines

 

Pipelining Hazards

 

Examples

 

 

 

© 2004


RISC Pipelines


A RISC processor pipeline operates in much the same way, although the stages in the pipeline are different. While different processors have different numbers of steps, they are basically variations of these five, used in the MIPS R3000 processor:

  1. fetch instructions from memory
  2. read registers and decode the instruction
  3. execute the instruction or calculate an address
  4. access an operand in data memory
  5. write the result into a register

If you glance back at the diagram of the laundry pipeline, you'll notice that although the washer finishes in half an hour, the dryer takes an extra ten minutes, and thus the wet clothes must wait ten minutes for the dryer to free up. Thus, the length of the pipeline is dependent on the length of the longest step. 

Ideally, each of the stages in a RISC processor pipeline should take 1 clock cycle so that the processor finishes an instruction each clock cycle and averages one cycle per instruction (CPI).

 

      BACK Laundry Example 2                                                 NEXT Hazards