You are on page 1of 23

DEPARTMENT OF TECHNICAL EDUCATION

ANDHRA PRADESH
Name : V Bapuji Naik
Designation : Lecturer
Branch : Computer Engineering
Subject : Computer Architecture
Institute : Government Polytechnic, Proddatur
Year/Semester : 3rd Semester
Subject : Computer Architecture
Code No : CM- 303
Major Topic : Pipeline & Array Processing
Duration : 100 Mints
Sub Topic : Pipeline processing
Teaching Aids : Animations, Diagrams

CM303.69TO70 1
OBJECTIVE

On the completion of this period, you would


be able to understand

• Concept of Pipeline Processing


• Types of Pipelines

CM303.69TO70 2
RECAP

• In the previous class, we have discussed about


parallel processing.

CM303.69TO70 3
What is Pipelining?

• It is a technique of splitting one task into multiple


subtasks, and executing the subtasks of
successive tasks parallelly, in multiple hardware
units

CM303.69TO70 4
What is Pipelining?
(Cont…)

• Each unit performs a subtask on the input


received from the interstage buffer that stores
the output of the previous unit

• Likewise all units can perform their operations


simultaneously

CM303.69TO70 5
What is the advantage?

• The objective is to achieve the increased throughput due to


overlap between the execution of the successive tasks.
• The time taken for the execution of each task is the same
as that of sequential ( non pipeline) execution
• But due to concurrent execution of successive tasks, a
number of tasks that can be executed within a given time is
higher

CM303.69TO70 6
Advantage (cont..)

• That is a pipelined hardware provides better


throughput (number of tasks executed per
unit time) than a non-pipelined hardware

CM303.69TO70 7
Concept ‘Pipelining’ coined from?

• The term ‘pipelining’ is borrowed from the traditional


production floor
• In production floor, a product is assembled as a
pipeline in multiple stages at different stations
• At each station, one step of the assembly operation is
executed and the partially completed product is
transferred to the next station where it carries out the
next step

CM303.69TO70 8
Pipelining .. Example

• Assembling cars at manufacturing units

• Filling bottles of cool drink at production units

• Switching Jeans pants at readymade units

CM303.69TO70 9
Types of Pipelines

• The are two types of pipelines

1. Instruction Pipeline

2. Arithmetic Pipeline

CM303.69TO70 10
Types of Pipelines
Contd..

• An Instruction Pipeline splits an instruction cycle


actions into multiple steps that are executed one-by-
one in different sections of the processor
• An Arithmetic Pipeline divides an arithmetic
operation, steps each of which are executed one-by-
one.

CM303.69TO70 11
Instruction Pipeline

• An Instruction Pipeline consists of multiple sections


each of which perform one of the functions of the
instruction cycle for all the instructions
• The processor hardware is structured into different
independent sections (stages)
• The actual number of sections in the pipeline is
designed by the computer architect

CM303.69TO70 12
Instruction Pipeline
(Contd..)

• A four stage pipe line

S1 S2 S3 S4
IF ID OF EX

Fig69.1

IF :Instruction Fetch ID :Instruction Decode


OF : Operand Fetch EX :Execution
S1, S2, S3, S4 are the stage1, stage2, stage3, & Stage4

CM303.69TO70 13
Instruction Pipeline
(Contd..)

• Process of executing an instruction involves 4 major


steps:

1. Instruction Fetch (IF) from the main memory

2. Instruction Decode (ID), identifying the operation


to be performed

3. Operand Fetch (OF), if needed in the execution

4. Execution (EX) of the decoded arithmetic logic


operation

CM303.69TO70 14
Instruction Pipeline
(Contd..)

Space – time diagram for non pipelined processor

instructions

I3 IF ID OF EX

I2 IF ID OF EX

I1 IF ID OF EX
1 2 3 4 5 6 7 8 9 10 11 12

Fig69.2 time
CM303.69TO70 15
Instruction Pipeline

(Contd..)

• In a non pipelined computer, these four steps


must be completed before the next instruction
can be issued

• That means it takes 4 pipeline cycles to


complete one instruction, so that 12 cycles
are needed to complete three instructions

CM303.69TO70 16
Instruction Pipeline(Cont..)
Space – time diagram for pipelined processor
instructions

I6 IF ID OF EX
I5 IF ID OF EX
I4 IF ID OF EX
I3 IF ID OF EX
I2 IF ID OF EX
I1 IF ID OF EX
1 2 3 4 5 6 7 8 9 10 11 12

CM303.69TO70 time 17
Instruction Pipeline
(Contd..)
• In a pipelined computer, successive instructions are
executed in an overlapped fashion.

• That means instruction cycle has been effectively reduced


to one-fourth of the original cycle time by such overlapped
execution

• it takes 4 pipeline cycles to complete one instruction, but at


the completion of the first instruction, 3/4th of the second
instruction is being completed & so on so forth

• Only 9 cycles are needed to complete six instructions


CM303.69TO70 18
Arithmetic Pipeline

An Arithmetic Pipeline divides an arithmetic


operation, such as a multiply, into multiple
arithmetic steps each of which are executed
one-by-one in different arithmetic sections in
the ALU

CM303.69TO70 19
SUMMARY

In this lecture we have discussed


• Pipelining

• Instruction pipeline

CM303.69TO70 20
Quiz

CM303.69TO70 21
Quiz

1. What is the main advantage of pipelining

a) Throughput can be increased


b) Number of tasks executed with in a given time
is higher
c) Both a & b
d) None of the above

CM303.69TO70 22
Frequently asked questions

1. Briefly explain pipelining concept


2. How pipelining concept is different from non
pipelining
3. Explain pipelining concept with an example
4. Describe instruction pipeline

CM303.69TO70 23

You might also like