SlideShare a Scribd company logo
1 of 32
PRESENTED BY



OSAMA TAHIR
  09-EE-88
Shibu lijack
 A Technique used in Advance Microprocessor where
  Microprocessor begins executing the second instruction
  before the first has been completed

 An implementation technique that overlaps the execution
  of multiple instructions.
Instruction
                                 Fetch
We devide its execution into
 5 stages
                               Instruction
                                Decode
 1)
 2)                (ID)        Execution
                                  cycle
 3)

                                Memory
 5)
                                 Access


                               Write Back
                                   Cycle
Instruction           Instr. Decode         Execute           Memory         Write
            Fetch                Reg. Fetch          Addr. Calc         Access         Back
  Next PC




                                                                         MUX
                                Next SEQ PC
               Adder




                                                                Zero?
           4                       RS1




                                                      MUX MUX
                                   RS2
Address




                Memory




                                          Reg File
                         Inst




                                                                 ALU
                                                                                   L




                                                                          Memory
                                   RD




                                                                           Data
                                                                                   M




                                                                                        MUX
                                                                                   D
                                          Sign
                                  Imm    Extend




                                                       WB Data
 TO MAKE FAST CPU’S


 It yields a reduction in the average execution time per
  execution.
 Hazards are those situations ,that prevent the next
  instruction in the instruction stream from
  executing during its designated clock cycle

 It may reduce the speed and the performance of
The microprocessor






 Strucural Hazard arises due to the Resource conflict
 hardware cannot support this combination of instructions - two
  instructions need the same resource.
 Attempt to use the same resource by two or more instructions at the
  same time
Example:


Single Memory for instructions and data

    Accessed by IF stage
    Accessed at same time by MEM stage
Solution 1: Delay Access to Resource
    Must have mechanism to delay access to resource
    Stall the pipeline until resource is available
Solution 2: Add more hardware resources
   This is most appropriate to structural hazards; if a piece of hardware
   has to be used twice in an instruction, see if there is a way to
   duplicate the hardware.
TYPES...




 Data hazards occur when the pipeline changes the order of
  read/write accesses to operands so that the order differs from
  the order they see by sequentially executing instructions on
  an unpipelined machine.
 Data hazards can occur when two instructions use data from
  the same register.
 Arises due to data dependency between instructions
CLASSIFICATION

                   RAW (read after write )
 the current instruction must wait to read data until after a
  previous instruction writes the correct data.
    Instruction J should read an operand after it is written by I
   Called a data dependence in compiler terminology
        I: mul R1, R2, R3             # R1 is written
        J: sub R4, R1, R3             # R1 is read

   Hazard occurs when J reads the operand before I writes
    it
(WAR) Write After Read


 the current instruction must wait to write data until after a previous
  instruction reads the old data,

 Instruction J should write its result after it is read by I

      I: sub R4, R1, R3 # R1 is read
      J: add R1, R2, R3 # R1 is written

 Hazard occurs when J writes R1 before I reads it
Write After Write(WAW)


 The current instruction must wait to write data until after a
  previous instruction writes to the same register.

 Inst J should write its result after I
 Called output-dependence in compiler terminology
      I: sub R1, R4, R3                 # R1 is written
      J: add R1, R2, R3                 # R1 is written
  again

         writes a state element in the first half of clock cycle and reads it in
the next half)

          If the data is available somewhere, but is just not where we want
it, we can create extra data paths to ``forward'' the data to where it is needed.
This is the best solution, since it doesn't slow the machine down and doesn't
change the semantics of the instruction set.

        We can simply make the later instruction wait until the hazard
resolves itself. This is undesireable because it slows down the machine, but
may be necessary.
TYPES...




 we fetch instructions one after another in order. As long
  as location of the next instruction is known, this process
  can go forward. When a branch instruction is fetched, the
  next instruction location is not known until the branch
  instruction finishes execution. Thus, we may have to wait
  until the correct location of the next instruction is known
  before fetching more instructions.

 Control hazards occur less frequently than data hazards
 Stall
       We can simply make the later instruction wait until the hazard
resolves itself. This is undesireable because it slows down the machine, but
may be necessary

 Forward Data
        If the data is available somewhere, but is just not where we want
it, we can create extra data paths to ``forward'' the data to where it is needed.
 Predict
         assume an outcome and continue fetching (undo if prediction is
wrong)
References
 http://ieeexplore.ieee.org/search/srchabstract.jsp?tp=&arnumber=4237770
  &queryText%3Dcontrol+hazards+in+pipelining%26openedRefinements%
  3D*%26searchField%3DSearch+All
 http://www.cs.iastate.edu/~prabhu/Tutorial/PIPELINE/hazards.html
 http://wearcam.org/ece385/lectureB/structuralhazardwithsinglecache.gif
 http://www.scribd.com/doc/21393075/Pipeline-Hazards-Part-1
piplining ...very nice
piplining ...very nice

More Related Content

What's hot (8)

RTOS MICRO CONTROLLER OPERATING SYSTEM-2
RTOS MICRO CONTROLLER OPERATING SYSTEM-2RTOS MICRO CONTROLLER OPERATING SYSTEM-2
RTOS MICRO CONTROLLER OPERATING SYSTEM-2
 
Stefano Giordano
Stefano GiordanoStefano Giordano
Stefano Giordano
 
Instrumenting parsecs raytrace
Instrumenting parsecs raytraceInstrumenting parsecs raytrace
Instrumenting parsecs raytrace
 
CHAP7.DOC.doc
CHAP7.DOC.docCHAP7.DOC.doc
CHAP7.DOC.doc
 
T2: What the Second Generation Holds
T2: What the Second Generation HoldsT2: What the Second Generation Holds
T2: What the Second Generation Holds
 
Real time-embedded-system-lec-03
Real time-embedded-system-lec-03Real time-embedded-system-lec-03
Real time-embedded-system-lec-03
 
MicroC/OS-II
MicroC/OS-IIMicroC/OS-II
MicroC/OS-II
 
Aca 2
Aca 2Aca 2
Aca 2
 

Similar to piplining ...very nice

Talk on Parallel Computing at IGWA
Talk on Parallel Computing at IGWATalk on Parallel Computing at IGWA
Talk on Parallel Computing at IGWADishant Ailawadi
 
IRJET- Performance Analysis of RSA Algorithm with CUDA Parallel Computing
IRJET- Performance Analysis of RSA Algorithm with CUDA Parallel ComputingIRJET- Performance Analysis of RSA Algorithm with CUDA Parallel Computing
IRJET- Performance Analysis of RSA Algorithm with CUDA Parallel ComputingIRJET Journal
 
Pipeline and data hazard
Pipeline and data hazardPipeline and data hazard
Pipeline and data hazardWaed Shagareen
 
EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj...
 EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj... EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj...
EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj...D Y PATIL COLLEGE OF ENGINEERING PUNE
 
03. top level view of computer function & interconnection
03. top level view of computer function & interconnection03. top level view of computer function & interconnection
03. top level view of computer function & interconnectionnoman yasin
 
Efficient algorithm for rsa text encryption using cuda c
Efficient algorithm for rsa text encryption using cuda cEfficient algorithm for rsa text encryption using cuda c
Efficient algorithm for rsa text encryption using cuda ccsandit
 
Efficient algorithm for rsa text encryption using cuda c
Efficient algorithm for rsa text encryption using cuda cEfficient algorithm for rsa text encryption using cuda c
Efficient algorithm for rsa text encryption using cuda ccsandit
 
Cs2253 coa-2marks-2013
Cs2253 coa-2marks-2013Cs2253 coa-2marks-2013
Cs2253 coa-2marks-2013Buvana Buvana
 
Design & Simulation of RISC Processor using Hyper Pipelining Technique
Design & Simulation of RISC Processor using Hyper Pipelining TechniqueDesign & Simulation of RISC Processor using Hyper Pipelining Technique
Design & Simulation of RISC Processor using Hyper Pipelining TechniqueIOSR Journals
 
Introduction to map reduce
Introduction to map reduceIntroduction to map reduce
Introduction to map reduceM Baddar
 
White Paper: Perforce Administration Optimization, Scalability, Availability ...
White Paper: Perforce Administration Optimization, Scalability, Availability ...White Paper: Perforce Administration Optimization, Scalability, Availability ...
White Paper: Perforce Administration Optimization, Scalability, Availability ...Perforce
 
Nt1330 Unit 1 Problem Analysis Paper
Nt1330 Unit 1 Problem Analysis PaperNt1330 Unit 1 Problem Analysis Paper
Nt1330 Unit 1 Problem Analysis PaperJoanna Paulsen
 

Similar to piplining ...very nice (20)

Talk on Parallel Computing at IGWA
Talk on Parallel Computing at IGWATalk on Parallel Computing at IGWA
Talk on Parallel Computing at IGWA
 
Reconfigurable computing
Reconfigurable computingReconfigurable computing
Reconfigurable computing
 
IRJET- Performance Analysis of RSA Algorithm with CUDA Parallel Computing
IRJET- Performance Analysis of RSA Algorithm with CUDA Parallel ComputingIRJET- Performance Analysis of RSA Algorithm with CUDA Parallel Computing
IRJET- Performance Analysis of RSA Algorithm with CUDA Parallel Computing
 
H344250
H344250H344250
H344250
 
Pipeline and data hazard
Pipeline and data hazardPipeline and data hazard
Pipeline and data hazard
 
EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj...
 EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj... EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj...
EMBEDDED SYSTEM DESIGN ARM architecture support for operating system by sanj...
 
03. top level view of computer function & interconnection
03. top level view of computer function & interconnection03. top level view of computer function & interconnection
03. top level view of computer function & interconnection
 
Assembly p1
Assembly p1Assembly p1
Assembly p1
 
Efficient algorithm for rsa text encryption using cuda c
Efficient algorithm for rsa text encryption using cuda cEfficient algorithm for rsa text encryption using cuda c
Efficient algorithm for rsa text encryption using cuda c
 
Efficient algorithm for rsa text encryption using cuda c
Efficient algorithm for rsa text encryption using cuda cEfficient algorithm for rsa text encryption using cuda c
Efficient algorithm for rsa text encryption using cuda c
 
Cs2253 coa-2marks-2013
Cs2253 coa-2marks-2013Cs2253 coa-2marks-2013
Cs2253 coa-2marks-2013
 
DLD1.pdf
DLD1.pdfDLD1.pdf
DLD1.pdf
 
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
 
13 tm adv
13 tm adv13 tm adv
13 tm adv
 
Design & Simulation of RISC Processor using Hyper Pipelining Technique
Design & Simulation of RISC Processor using Hyper Pipelining TechniqueDesign & Simulation of RISC Processor using Hyper Pipelining Technique
Design & Simulation of RISC Processor using Hyper Pipelining Technique
 
Introduction to map reduce
Introduction to map reduceIntroduction to map reduce
Introduction to map reduce
 
White Paper: Perforce Administration Optimization, Scalability, Availability ...
White Paper: Perforce Administration Optimization, Scalability, Availability ...White Paper: Perforce Administration Optimization, Scalability, Availability ...
White Paper: Perforce Administration Optimization, Scalability, Availability ...
 
Bc0040
Bc0040Bc0040
Bc0040
 
Nt1330 Unit 1 Problem Analysis Paper
Nt1330 Unit 1 Problem Analysis PaperNt1330 Unit 1 Problem Analysis Paper
Nt1330 Unit 1 Problem Analysis Paper
 
Co question 2008
Co question 2008Co question 2008
Co question 2008
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

piplining ...very nice

  • 1.
  • 3.
  • 5.  A Technique used in Advance Microprocessor where Microprocessor begins executing the second instruction before the first has been completed  An implementation technique that overlaps the execution of multiple instructions.
  • 6. Instruction Fetch We devide its execution into 5 stages Instruction Decode 1) 2) (ID) Execution cycle 3) Memory 5) Access Write Back Cycle
  • 7. Instruction Instr. Decode Execute Memory Write Fetch Reg. Fetch Addr. Calc Access Back Next PC MUX Next SEQ PC Adder Zero? 4 RS1 MUX MUX RS2 Address Memory Reg File Inst ALU L Memory RD Data M MUX D Sign Imm Extend WB Data
  • 8.  TO MAKE FAST CPU’S   It yields a reduction in the average execution time per execution.
  • 9.  Hazards are those situations ,that prevent the next instruction in the instruction stream from executing during its designated clock cycle  It may reduce the speed and the performance of The microprocessor
  • 12.  Strucural Hazard arises due to the Resource conflict  hardware cannot support this combination of instructions - two instructions need the same resource.  Attempt to use the same resource by two or more instructions at the same time
  • 13.
  • 14. Example: Single Memory for instructions and data  Accessed by IF stage  Accessed at same time by MEM stage
  • 15.
  • 16.
  • 17. Solution 1: Delay Access to Resource  Must have mechanism to delay access to resource  Stall the pipeline until resource is available Solution 2: Add more hardware resources This is most appropriate to structural hazards; if a piece of hardware has to be used twice in an instruction, see if there is a way to duplicate the hardware.
  • 18.
  • 20.  Data hazards occur when the pipeline changes the order of read/write accesses to operands so that the order differs from the order they see by sequentially executing instructions on an unpipelined machine.  Data hazards can occur when two instructions use data from the same register.  Arises due to data dependency between instructions
  • 21. CLASSIFICATION RAW (read after write )  the current instruction must wait to read data until after a previous instruction writes the correct data.  Instruction J should read an operand after it is written by I Called a data dependence in compiler terminology I: mul R1, R2, R3 # R1 is written J: sub R4, R1, R3 # R1 is read  Hazard occurs when J reads the operand before I writes it
  • 22. (WAR) Write After Read  the current instruction must wait to write data until after a previous instruction reads the old data,  Instruction J should write its result after it is read by I I: sub R4, R1, R3 # R1 is read J: add R1, R2, R3 # R1 is written  Hazard occurs when J writes R1 before I reads it
  • 23. Write After Write(WAW)  The current instruction must wait to write data until after a previous instruction writes to the same register.  Inst J should write its result after I  Called output-dependence in compiler terminology  I: sub R1, R4, R3 # R1 is written  J: add R1, R2, R3 # R1 is written again
  • 24.
  • 25. writes a state element in the first half of clock cycle and reads it in the next half)  If the data is available somewhere, but is just not where we want it, we can create extra data paths to ``forward'' the data to where it is needed. This is the best solution, since it doesn't slow the machine down and doesn't change the semantics of the instruction set.  We can simply make the later instruction wait until the hazard resolves itself. This is undesireable because it slows down the machine, but may be necessary.
  • 27.  we fetch instructions one after another in order. As long as location of the next instruction is known, this process can go forward. When a branch instruction is fetched, the next instruction location is not known until the branch instruction finishes execution. Thus, we may have to wait until the correct location of the next instruction is known before fetching more instructions.  Control hazards occur less frequently than data hazards
  • 28.  Stall We can simply make the later instruction wait until the hazard resolves itself. This is undesireable because it slows down the machine, but may be necessary  Forward Data If the data is available somewhere, but is just not where we want it, we can create extra data paths to ``forward'' the data to where it is needed.  Predict assume an outcome and continue fetching (undo if prediction is wrong)
  • 29.
  • 30. References  http://ieeexplore.ieee.org/search/srchabstract.jsp?tp=&arnumber=4237770 &queryText%3Dcontrol+hazards+in+pipelining%26openedRefinements% 3D*%26searchField%3DSearch+All  http://www.cs.iastate.edu/~prabhu/Tutorial/PIPELINE/hazards.html  http://wearcam.org/ece385/lectureB/structuralhazardwithsinglecache.gif  http://www.scribd.com/doc/21393075/Pipeline-Hazards-Part-1