Pipelining Seminar
Pipelining Seminar
-Jeya Sieola J
Pipelining is a particular way of organizing concurrent activity in a
computer system.
Pipelining is a process of arrangement of hardware elements of the
CPU such that its overall performance is increased. Simultaneous
Pipelining execution of more than one instruction takes place in a pipelined
processor.
2
Now consider a computer that has two separate hardware units, one for
fetching instructions and another for executing them, as shown in Figure 3.2.
The instruction fetched by the fetch unit is deposited in an intermediate storage
buffer, B1. This buffer is needed to enable the execution unit to execute the
instruction while the fetch unit is fetching the next instruction. The results of
execution are deposited in the destination location specified by the instruction.
The data can be operated by the instructions are inside the block labeled
"Execution unit".
In the first clock cycle, the fetch unit fetches an instruction I1 (step
F1 ) and stores it in buffer Bl at the end of the clock cycle.
In the second clock cycle, the instruction fetch unit proceeds with the
fetch operation for instruction I2 (step F2). Meanwhile, the execution
unit performs the operation specified by instruction I1, which is
available to it in buffer Bl (step E1). By the end of the second clock
cycle, the execution of instruction I1 is completed and instruction I2 is
available. Instruction I2 is stored in B1, replacing I1, which is no
longer needed. Step E2 is performed by the execution unit during the
third clock cycle, while instruction I3 is being fetched by the fetch unit.
In this manner, both the fetch and execute units are kept busy all the
time. 4
These units are capable of performing their tasks simultaneously and without interfering
with one another. Information is passed from one unit to the next through the storage
5
buffer.
Eg:
During cycle 4
• Buffer B1 holds instruction 3, which is fetched in cycle 3, and it is being
decoded by the instruction-decoding unit.
• Buffer B2 holds both the source operands for instruction I2 and the
specification of the operation to be performed.
• Buffer B3 holds the results produced by the execution unit and the
destination information for instruction I1.
A 4-stage pipeline
Advantages:
7
Disadvantages:
8
By the end of the third clock cycle,
Completed instruction/instructions – I1, I2
Currently processing instruction – I3
Which instruction is present in the buffer-I3
Replaced instruction- I2
10
Data Hazards
11
Structural Hazards
12
Control Hazards
13
THANK YOU!