Pipelining Basic Concept
Pipelining Basic Concept
Intermediate Concepts
What Is A Pipeline?
• Pipelining is used by virtually all modern
microprocessors to enhance performance by
overlapping the execution of instructions.
• A common analogue for a pipeline is a factory
assembly line. Assume that there are three stages:
1. Welding
2. Painting
3. Polishing
• For simplicity, assume that each task takes one hour.
What Is A Pipeline?
• If a single person were to work on the product it
would take three hours to produce one product.
• If we had three people, one person could work on
each stage, upon completing their stage they could
pass their product on to the next person (since each
stage takes one hour there will be no waiting).
• We could then produce one product per hour
assuming the assembly line has been filled.
Pipelining
• Pipelining is the process of accumulating instruction from the
processor through a pipeline. It allows storing and executing
instructions in an orderly process. It is also known as pipeline
processing.
• Pipelining is a technique where multiple instructions are
overlapped during execution. Pipeline is divided into stages
and these stages are connected with one another to form a
pipe like structure. Instructions enter from one end and exit
from another end.
• Pipelining increases the overall instruction throughput.
In pipeline system, each segment consists of an input register followed by
a combinational circuit. The register is used to hold data and
combinational circuit performs operations on it. The output of
combinational circuit is applied to the input register of the next segment.
Design of a basic pipeline
S1 I1 I2
S2 I1 I2
S3 I1 I2
S4 I1 I2
S1 I1 I2
S2 I1 I2
S3 I1 I2
S4 I1 I2
• .
Types of Pipeline
R2<- R2 + R3
R5<- R2 + R4
Structural Hazards
IF ID EX MEM WB
branch IF ID EX MEM WB
IF IF ID EX MEM WB
Control Hazards (other solutions)