SlideShare a Scribd company logo
1 of 24
BY:
Prof. Ruby Pandey
Computer Science Department
SISTec, Bhopal
rubypandey@sistec.ac.in
INSTRUCTION PIPELINING1
SISTec, Bhopal
Instruction Pipeline
 An instruction pipeline reads consecutive
instruction from memory while previous
instruction are executed in various stages of
pipeline.
 Instruction execution sequence:
 Instruction fetch
 Instruction decode
 Calculate the effective address
 Fetch the operand
 Execute the instruction
 Store the result
2
SISTec, Bhopal
Difficulties in instruction pipeline for
achieving the maximum rate
 Different stages of pipeline may takes different
times to execute.
 Some instruction may skip some stages for
example: immediate addressing and register
addressing may not require effective address
calculation
 The instruction fetch stage and operand fetch
stage will need to access memory at the same
time. In this case one have to wait while other
stage finishes its task.
3
SISTec, Bhopal
Combining the stages
 Fetch the Instruction
 Decode and Calculate EA
 Fetch Operand
 Execute and Write Back
 Assume that the processor has the separate
Instruction and data memories so that FI and FO
stage can be processed together.
4
SISTec, Bhopal
Timing diagram of Instruction
cycle
Step
s
1 2 3 4 5 6 7 8 9 10
1 FI DA FO EX
2 FI DA FO EX
3 FI DA FO EX
4 FI DA FO EX
5 FI DA FO EX
In
st
ru
ct
io
n
5
SISTec, Bhopal
Timing of Instruction pipeline
Step
s
1 2 3 4 5 6 7 8 9 10 11 12 13
1 FI DA FO EX
2 FI DA FO EX
3 FI DA FO EX
4 FI - - FI DA FO EX
5 FI DA FO EX
6 FI DA FO EX
7 FI DA FO EX
Instruction 3 is a branch
instruction
6
SISTec, Bhopal
Another Difficulty
 Delay may occur in the pipeline if EX segment
needs to store the result of the operation in the
data memory while the FO segment needs to
fetch an operand. In that case segment FO
must wait until segment EX has finished its
operation.
7
SISTec, Bhopal
Pipeline Conflicts
 Resource conflicts
 Data Dependency or Data Hazards
 Branch Difficulties
8
SISTec, Bhopal
Resource Conflicts
 It may be caused by access to memory by two
different instruction.
 Example: X=Y+Z
 R1 Y
 R2 R1+Z
 XR2
9
SISTec, Bhopal
Conflict in 3 and 4 cycle
Steps 1 2 3 4 5 6 7 8
1 FI DA FO EX
2 FI DA FO EX
3 * * FI DA FO EX
Above Problem be handled by :
Using separate instruction and data Memories
By Stalling of pipe
10
SISTec, Bhopal
Data Dependencies
 Conflicts arise when an Instruction depends on
the result of the previous instruction.
 Example :
 Inst 1 :X=Y+Z Inst 2: X1=X+1
1 2 3 4 5 6
1 FI DA FO EX
2 FI DA * FO EX
11
SISTec, Bhopal
Shuffling the instruction
 Inst 1: t=3 Inst 2:X=Y+Z Inst
3:X1=X+1
 After Shuffling
 Inst 1:X=Y+Z Inst 2: t=3 Inst 3: X1=X+1
1 2 3 4 5 6
1 FI DA FO EX
2 FI DA FO EX
3 FI DA FO EX
12
SISTec, Bhopal
DELAYED LOAD
 1. Load : R1 M[Address 1]
 2. Load : R2 M[Address 2]
 3. ADD : R3R1 + R2
 4. STORE : M[Address 3]  R3
1 2 3 4 5 6 7
1 FI DA FO EX
2 FI DA FO EX
3 FI DA FO EX
4 FI DA FO EX
Conflict
13
SISTec, Bhopal
1 2 3 4 5 6 7 8
1 FI DA FO EX
2 FI DA FO EX
3(NOP
)
FI DA FO EX
4 FI DA FO EX
5 FI DA FO EX
Delayed Load
14
SISTec, Bhopal
Operand Forwarding
 Example :
 Inst 1 :X=Y+Z Inst 2: X1=X+1
1 2 3 4 5
1 FI DA FO EX
2 FI DA FO EX
15
SISTec, Bhopal
Branch Difficulties
Step
s
1 2 3 4 5 6 7 8 9 10 11 12 13
1 FI DA FO EX
2 FI DA FO EX
3 FI DA FO EX
4 FI - - FI DA FO EX
5 FI DA FO EX
6 FI DA FO EX
7 FI DA FO EX
16
SISTec, Bhopal
Types of Branching
 Conditional
 Unconditional
 Handling of Branch
 Prefetch target Instruction
 Branch target Buffer
 Loop Buffer
 Branch Prediction
 Delayed Branch
17
SISTec, Bhopal
Prefetch Target Instruction
 For handling conditional Branching
 It stores the address of the target Instruction
and branch Instruction
 If the condition is successful then it continuous
from target Instruction

18
SISTec, Bhopal
Branch Target Buffer
 The BTB is an associative memory
 The BTB included in fetch segment of pipeline
 BTB Consist of the address of the previously
executed branch instruction and target instruction
 When the pipeline decode the branch Instruction it
searches in BTB for the address of the instruction.
 If it is found it continuous from the new path.
 If it is not found the pipeline shifts to a new
instruction stream and store the target Instruction
in BTB.
19
SISTec, Bhopal
Delayed Branch
 It rearranges the instruction and adding NOP
after a branch instruction.
 Example:
 Load from memory to R1
 Increment R2
 Add R3 to R4
 Subtract R5 from R6
 Branch to address X
20
SISTec, Bhopal
By NOP
1 2 3 4 5 6 7 8 9 10
1.Load I A E
2. INC I A E
3. ADD I A E
4. SUB I A E
5. BR
to X
I A E
6. NOP I A E
7. NOP I A E
8. Inst
in X
I A E
I : Inst Fetch A: ALU Operation E: Execute
21
SISTec, Bhopal
By Delayed branch
1 2 3 4 5 6 7 8
1.
LOAD
I A E
2. INC I A E
3. BR
TO X
I A E
4. ADD I A E
5. SUB I A E
6. INST
IN X
I A E
22
SISTec, Bhopal
Topics Left
 Interconnection Networks
 Single Bus Based Topology
 Crossbar network
 Multistage Network
 Hypercube
 Mesh Network
 Tree Network
 Vector Processor
 Array Processor
23
SISTec, Bhopal
Thank You
24
SISTec, Bhopal

More Related Content

What's hot

Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And CorrectionRenu Kewalramani
 
program flow mechanisms, advanced computer architecture
program flow mechanisms, advanced computer architectureprogram flow mechanisms, advanced computer architecture
program flow mechanisms, advanced computer architecturePankaj Kumar Jain
 
Moore and mealy machine
Moore and mealy machineMoore and mealy machine
Moore and mealy machineMian Munib
 
Superscalar & superpipeline processor
Superscalar & superpipeline processorSuperscalar & superpipeline processor
Superscalar & superpipeline processorMuhammad Ishaq
 
Types of instructions
Types of instructionsTypes of instructions
Types of instructionsihsanjamil
 
Digital to analog conversion
Digital to analog conversionDigital to analog conversion
Digital to analog conversionWaseemKhan00
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COARuchi Maurya
 
Stack organization
Stack organizationStack organization
Stack organizationchauhankapil
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipeliningMazin Alwaaly
 
Unit 5 I/O organization
Unit 5   I/O organizationUnit 5   I/O organization
Unit 5 I/O organizationchidabdu
 
AUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTESAUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTESsuthi
 
Io techniques & its types
Io techniques & its typesIo techniques & its types
Io techniques & its typesNehal Naik
 

What's hot (20)

Network flow problems
Network flow problemsNetwork flow problems
Network flow problems
 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And Correction
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
program flow mechanisms, advanced computer architecture
program flow mechanisms, advanced computer architectureprogram flow mechanisms, advanced computer architecture
program flow mechanisms, advanced computer architecture
 
Moore and mealy machine
Moore and mealy machineMoore and mealy machine
Moore and mealy machine
 
Superscalar & superpipeline processor
Superscalar & superpipeline processorSuperscalar & superpipeline processor
Superscalar & superpipeline processor
 
Types of instructions
Types of instructionsTypes of instructions
Types of instructions
 
Digital to analog conversion
Digital to analog conversionDigital to analog conversion
Digital to analog conversion
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COA
 
Stack organization
Stack organizationStack organization
Stack organization
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
Predicate logic
 Predicate logic Predicate logic
Predicate logic
 
Unit 5 I/O organization
Unit 5   I/O organizationUnit 5   I/O organization
Unit 5 I/O organization
 
Unit iv
Unit ivUnit iv
Unit iv
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
pipelining
pipeliningpipelining
pipelining
 
AUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTESAUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTES
 
Context switching
Context switchingContext switching
Context switching
 
Io techniques & its types
Io techniques & its typesIo techniques & its types
Io techniques & its types
 

Viewers also liked

Pipe stress engineering
Pipe stress engineeringPipe stress engineering
Pipe stress engineeringRicardo Soares
 
U.S. Concrete Pipe Market. Analysis And Forecast to 2020
U.S. Concrete Pipe Market. Analysis And Forecast to 2020U.S. Concrete Pipe Market. Analysis And Forecast to 2020
U.S. Concrete Pipe Market. Analysis And Forecast to 2020IndexBox Marketing
 
I3M 2013 – EMSS Conference - Pipe Spool Fabrication Simulation Model
I3M 2013 – EMSS Conference - Pipe Spool Fabrication Simulation ModelI3M 2013 – EMSS Conference - Pipe Spool Fabrication Simulation Model
I3M 2013 – EMSS Conference - Pipe Spool Fabrication Simulation ModelCCT International
 
Plumbing presentation by Jose Anacleto Soberano
Plumbing presentation by Jose Anacleto SoberanoPlumbing presentation by Jose Anacleto Soberano
Plumbing presentation by Jose Anacleto SoberanoEsOj Soberano
 
The Dakota Access Pipeline: Lessons Learned from the Standing Rock Protests f...
The Dakota Access Pipeline: Lessons Learned from the Standing Rock Protests f...The Dakota Access Pipeline: Lessons Learned from the Standing Rock Protests f...
The Dakota Access Pipeline: Lessons Learned from the Standing Rock Protests f...TWCA
 
Engineered Spring Supports (Practical, Hands-on Approach) Webinar
Engineered Spring Supports (Practical, Hands-on Approach) WebinarEngineered Spring Supports (Practical, Hands-on Approach) Webinar
Engineered Spring Supports (Practical, Hands-on Approach) WebinarPiping Technology & Products, Inc.
 
Project-Based Learning
Project-Based LearningProject-Based Learning
Project-Based LearningJose Gigante
 
pipe line calculation
pipe line calculationpipe line calculation
pipe line calculationjatinar123
 

Viewers also liked (13)

Pipeline hydraulic calculation
Pipeline hydraulic calculationPipeline hydraulic calculation
Pipeline hydraulic calculation
 
Pipe stress engineering
Pipe stress engineeringPipe stress engineering
Pipe stress engineering
 
Design, Application & Installation of Pipe Clamps Webinar
Design, Application & Installation of Pipe Clamps WebinarDesign, Application & Installation of Pipe Clamps Webinar
Design, Application & Installation of Pipe Clamps Webinar
 
U.S. Concrete Pipe Market. Analysis And Forecast to 2020
U.S. Concrete Pipe Market. Analysis And Forecast to 2020U.S. Concrete Pipe Market. Analysis And Forecast to 2020
U.S. Concrete Pipe Market. Analysis And Forecast to 2020
 
I3M 2013 – EMSS Conference - Pipe Spool Fabrication Simulation Model
I3M 2013 – EMSS Conference - Pipe Spool Fabrication Simulation ModelI3M 2013 – EMSS Conference - Pipe Spool Fabrication Simulation Model
I3M 2013 – EMSS Conference - Pipe Spool Fabrication Simulation Model
 
Plumbing presentation by Jose Anacleto Soberano
Plumbing presentation by Jose Anacleto SoberanoPlumbing presentation by Jose Anacleto Soberano
Plumbing presentation by Jose Anacleto Soberano
 
The Dakota Access Pipeline: Lessons Learned from the Standing Rock Protests f...
The Dakota Access Pipeline: Lessons Learned from the Standing Rock Protests f...The Dakota Access Pipeline: Lessons Learned from the Standing Rock Protests f...
The Dakota Access Pipeline: Lessons Learned from the Standing Rock Protests f...
 
Engineered Spring Supports (Practical, Hands-on Approach) Webinar
Engineered Spring Supports (Practical, Hands-on Approach) WebinarEngineered Spring Supports (Practical, Hands-on Approach) Webinar
Engineered Spring Supports (Practical, Hands-on Approach) Webinar
 
Types of pipes
Types of pipesTypes of pipes
Types of pipes
 
Project-Based Learning
Project-Based LearningProject-Based Learning
Project-Based Learning
 
plumbing
plumbingplumbing
plumbing
 
Underwater Welding
Underwater WeldingUnderwater Welding
Underwater Welding
 
pipe line calculation
pipe line calculationpipe line calculation
pipe line calculation
 

Similar to INSTRUCTION PIPELINING

Similar to INSTRUCTION PIPELINING (20)

Instruction pipelining
Instruction pipeliningInstruction pipelining
Instruction pipelining
 
Instruction pipelining
Instruction pipeliningInstruction pipelining
Instruction pipelining
 
Assembly p1
Assembly p1Assembly p1
Assembly p1
 
Pipeline
PipelinePipeline
Pipeline
 
Topic2a ss pipelines
Topic2a ss pipelinesTopic2a ss pipelines
Topic2a ss pipelines
 
6.pptx
6.pptx6.pptx
6.pptx
 
CEFv6 in a nutshell
CEFv6 in a nutshellCEFv6 in a nutshell
CEFv6 in a nutshell
 
Pipeline r014
Pipeline   r014Pipeline   r014
Pipeline r014
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazard
 
Pipelining
PipeliningPipelining
Pipelining
 
Pipelining in computer architecture
Pipelining in computer architecturePipelining in computer architecture
Pipelining in computer architecture
 
Bm33388392
Bm33388392Bm33388392
Bm33388392
 
Bm33388392
Bm33388392Bm33388392
Bm33388392
 
B sc e 5.2 mp unit 2 soft ware(alp)
B sc e 5.2 mp unit 2 soft ware(alp)B sc e 5.2 mp unit 2 soft ware(alp)
B sc e 5.2 mp unit 2 soft ware(alp)
 
Stack and subroutine
Stack and subroutineStack and subroutine
Stack and subroutine
 
Stack and subroutine
Stack and subroutineStack and subroutine
Stack and subroutine
 
SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...
SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...
SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...
 
Lecture5
Lecture5Lecture5
Lecture5
 
Lecture5(1)
Lecture5(1)Lecture5(1)
Lecture5(1)
 
Core pipelining
Core pipelining Core pipelining
Core pipelining
 

Recently uploaded

FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756dollysharma2066
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Delhi Call girls
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayNZSG
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear RegressionRavindra Nath Shukla
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Centuryrwgiffor
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...Any kyc Account
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Lviv Startup Club
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Neil Kimberley
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...amitlee9823
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...Paul Menig
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxWorkforce Group
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Roland Driesen
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...lizamodels9
 

Recently uploaded (20)

FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
Forklift Operations: Safety through Cartoons
Forklift Operations: Safety through CartoonsForklift Operations: Safety through Cartoons
Forklift Operations: Safety through Cartoons
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear Regression
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
 

INSTRUCTION PIPELINING

  • 1. BY: Prof. Ruby Pandey Computer Science Department SISTec, Bhopal rubypandey@sistec.ac.in INSTRUCTION PIPELINING1 SISTec, Bhopal
  • 2. Instruction Pipeline  An instruction pipeline reads consecutive instruction from memory while previous instruction are executed in various stages of pipeline.  Instruction execution sequence:  Instruction fetch  Instruction decode  Calculate the effective address  Fetch the operand  Execute the instruction  Store the result 2 SISTec, Bhopal
  • 3. Difficulties in instruction pipeline for achieving the maximum rate  Different stages of pipeline may takes different times to execute.  Some instruction may skip some stages for example: immediate addressing and register addressing may not require effective address calculation  The instruction fetch stage and operand fetch stage will need to access memory at the same time. In this case one have to wait while other stage finishes its task. 3 SISTec, Bhopal
  • 4. Combining the stages  Fetch the Instruction  Decode and Calculate EA  Fetch Operand  Execute and Write Back  Assume that the processor has the separate Instruction and data memories so that FI and FO stage can be processed together. 4 SISTec, Bhopal
  • 5. Timing diagram of Instruction cycle Step s 1 2 3 4 5 6 7 8 9 10 1 FI DA FO EX 2 FI DA FO EX 3 FI DA FO EX 4 FI DA FO EX 5 FI DA FO EX In st ru ct io n 5 SISTec, Bhopal
  • 6. Timing of Instruction pipeline Step s 1 2 3 4 5 6 7 8 9 10 11 12 13 1 FI DA FO EX 2 FI DA FO EX 3 FI DA FO EX 4 FI - - FI DA FO EX 5 FI DA FO EX 6 FI DA FO EX 7 FI DA FO EX Instruction 3 is a branch instruction 6 SISTec, Bhopal
  • 7. Another Difficulty  Delay may occur in the pipeline if EX segment needs to store the result of the operation in the data memory while the FO segment needs to fetch an operand. In that case segment FO must wait until segment EX has finished its operation. 7 SISTec, Bhopal
  • 8. Pipeline Conflicts  Resource conflicts  Data Dependency or Data Hazards  Branch Difficulties 8 SISTec, Bhopal
  • 9. Resource Conflicts  It may be caused by access to memory by two different instruction.  Example: X=Y+Z  R1 Y  R2 R1+Z  XR2 9 SISTec, Bhopal
  • 10. Conflict in 3 and 4 cycle Steps 1 2 3 4 5 6 7 8 1 FI DA FO EX 2 FI DA FO EX 3 * * FI DA FO EX Above Problem be handled by : Using separate instruction and data Memories By Stalling of pipe 10 SISTec, Bhopal
  • 11. Data Dependencies  Conflicts arise when an Instruction depends on the result of the previous instruction.  Example :  Inst 1 :X=Y+Z Inst 2: X1=X+1 1 2 3 4 5 6 1 FI DA FO EX 2 FI DA * FO EX 11 SISTec, Bhopal
  • 12. Shuffling the instruction  Inst 1: t=3 Inst 2:X=Y+Z Inst 3:X1=X+1  After Shuffling  Inst 1:X=Y+Z Inst 2: t=3 Inst 3: X1=X+1 1 2 3 4 5 6 1 FI DA FO EX 2 FI DA FO EX 3 FI DA FO EX 12 SISTec, Bhopal
  • 13. DELAYED LOAD  1. Load : R1 M[Address 1]  2. Load : R2 M[Address 2]  3. ADD : R3R1 + R2  4. STORE : M[Address 3]  R3 1 2 3 4 5 6 7 1 FI DA FO EX 2 FI DA FO EX 3 FI DA FO EX 4 FI DA FO EX Conflict 13 SISTec, Bhopal
  • 14. 1 2 3 4 5 6 7 8 1 FI DA FO EX 2 FI DA FO EX 3(NOP ) FI DA FO EX 4 FI DA FO EX 5 FI DA FO EX Delayed Load 14 SISTec, Bhopal
  • 15. Operand Forwarding  Example :  Inst 1 :X=Y+Z Inst 2: X1=X+1 1 2 3 4 5 1 FI DA FO EX 2 FI DA FO EX 15 SISTec, Bhopal
  • 16. Branch Difficulties Step s 1 2 3 4 5 6 7 8 9 10 11 12 13 1 FI DA FO EX 2 FI DA FO EX 3 FI DA FO EX 4 FI - - FI DA FO EX 5 FI DA FO EX 6 FI DA FO EX 7 FI DA FO EX 16 SISTec, Bhopal
  • 17. Types of Branching  Conditional  Unconditional  Handling of Branch  Prefetch target Instruction  Branch target Buffer  Loop Buffer  Branch Prediction  Delayed Branch 17 SISTec, Bhopal
  • 18. Prefetch Target Instruction  For handling conditional Branching  It stores the address of the target Instruction and branch Instruction  If the condition is successful then it continuous from target Instruction  18 SISTec, Bhopal
  • 19. Branch Target Buffer  The BTB is an associative memory  The BTB included in fetch segment of pipeline  BTB Consist of the address of the previously executed branch instruction and target instruction  When the pipeline decode the branch Instruction it searches in BTB for the address of the instruction.  If it is found it continuous from the new path.  If it is not found the pipeline shifts to a new instruction stream and store the target Instruction in BTB. 19 SISTec, Bhopal
  • 20. Delayed Branch  It rearranges the instruction and adding NOP after a branch instruction.  Example:  Load from memory to R1  Increment R2  Add R3 to R4  Subtract R5 from R6  Branch to address X 20 SISTec, Bhopal
  • 21. By NOP 1 2 3 4 5 6 7 8 9 10 1.Load I A E 2. INC I A E 3. ADD I A E 4. SUB I A E 5. BR to X I A E 6. NOP I A E 7. NOP I A E 8. Inst in X I A E I : Inst Fetch A: ALU Operation E: Execute 21 SISTec, Bhopal
  • 22. By Delayed branch 1 2 3 4 5 6 7 8 1. LOAD I A E 2. INC I A E 3. BR TO X I A E 4. ADD I A E 5. SUB I A E 6. INST IN X I A E 22 SISTec, Bhopal
  • 23. Topics Left  Interconnection Networks  Single Bus Based Topology  Crossbar network  Multistage Network  Hypercube  Mesh Network  Tree Network  Vector Processor  Array Processor 23 SISTec, Bhopal