11 Pipelining Kosarev Nikolay MIPT Oct, 2009. 22 Pipelining Implementation technique whereby multiple instructions are overlapped in execution Each pipeline.

Slides:



Advertisements
Similar presentations
Lecture 4: CPU Performance
Advertisements

Final Project : Pipelined Microprocessor Joseph Kim.
1 Pipelining Part 2 CS Data Hazards Data hazards occur when the pipeline changes the order of read/write accesses to operands that differs from.
CMSC 611: Advanced Computer Architecture Pipelining Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
COMP 4211 Seminar Presentation Based On: Computer Architecture A Quantitative Approach by Hennessey and Patterson Presenter : Feri Danes.
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
Lecture Objectives: 1)Define pipelining 2)Calculate the speedup achieved by pipelining for a given number of instructions. 3)Define how pipelining improves.
CMPT 334 Computer Organization
Review: Pipelining. Pipelining Laundry Example Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 30 minutes Dryer.
Pipelining Hwanmo Sung CS147 Presentation Professor Sin-Min Lee.
Pipelining Preview Basics & Challenges
Lecture 6: Pipelining MIPS R4000 and More Kai Bu
COMP381 by M. Hamdi 1 Pipeline Hazards. COMP381 by M. Hamdi 2 Pipeline Hazards Hazards are situations in pipelining where one instruction cannot immediately.
S. Barua – CPSC 440 CHAPTER 6 ENHANCING PERFORMANCE WITH PIPELINING This chapter presents pipelining.
1 Lecture 17: Basic Pipelining Today’s topics:  5-stage pipeline  Hazards and instruction scheduling Mid-term exam stats:  Highest: 90, Mean: 58.
L18 – Pipeline Issues 1 Comp 411 – Spring /03/08 CPU Pipelining Issues Finishing up Chapter 6 This pipe stuff makes my head hurt! What have you.
L17 – Pipeline Issues 1 Comp 411 – Fall /1308 CPU Pipelining Issues Finishing up Chapter 6 This pipe stuff makes my head hurt! What have you been.
CSCE 212 Quiz 9 – 3/30/11 1.What is the clock cycle time based on for single-cycle and for pipelining? 2.What two actions can be done to resolve data hazards?
DLX Instruction Format
Computer ArchitectureFall 2007 © October 31, CS-447– Computer Architecture M,W 10-11:20am Lecture 17 Review.
Appendix A Pipelining: Basic and Intermediate Concepts
Computer ArchitectureFall 2008 © October 6th, 2008 Majd F. Sakr CS-447– Computer Architecture.
ENGS 116 Lecture 51 Pipelining and Hazards Vincent H. Berk September 30, 2005 Reading for today: Chapter A.1 – A.3, article: Patterson&Ditzel Reading for.
Instruction Sets and Pipelining Cover basics of instruction set types and fundamental ideas of pipelining Later in the course we will go into more depth.
-1.1- PIPELINING 2 nd week. -2- Khoa Coâng Ngheä Thoâng Tin – Ñaïi Hoïc Baùch Khoa Tp.HCM PIPELINING 2 nd week References Pipelining concepts The DLX.
Pipeline Hazard CT101 – Computing Systems. Content Introduction to pipeline hazard Structural Hazard Data Hazard Control Hazard.
CSC 4250 Computer Architectures September 15, 2006 Appendix A. Pipelining.
Lecture 7: Pipelining Review Kai Bu
Pipelining. 10/19/ Outline 5 stage pipelining Structural and Data Hazards Forwarding Branch Schemes Exceptions and Interrupts Conclusion.
Memory/Storage Architecture Lab Computer Architecture Pipelining Basics.
Lecture 05: Pipelining Basics & Hazards Kai Bu
Chapter 2 Summary Classification of architectures Features that are relatively independent of instruction sets “Different” Processors –DSP and media processors.
1 Appendix A Pipeline implementation Pipeline hazards, detection and forwarding Multiple-cycle operations MIPS R4000 CDA5155 Spring, 2007, Peir / University.
EEL5708 Lotzi Bölöni EEL 5708 High Performance Computer Architecture Pipelining.
Pipelining Enhancing Performance. Datapath as Designed in Ch. 5 Consider execution of: lw $t1,100($t0) lw $t2,200($t0) lw $t3,300($t0) Datapath segments.
Pipelining (I). Pipelining Example  Laundry Example  Four students have one load of clothes each to wash, dry, fold, and put away  Washer takes 30.
Comp Sci pipelining 1 Ch. 13 Pipelining. Comp Sci pipelining 2 Pipelining.
Pipeline Hazards. CS5513 Fall Pipeline Hazards Situations that prevent the next instructions in the instruction stream from executing during its.
CMPE 421 Parallel Computer Architecture
1 Pipelining Part I CS What is Pipelining? Like an Automobile Assembly Line for Instructions –Each step does a little job of processing the instruction.

Branch Hazards and Static Branch Prediction Techniques
Oct. 18, 2000Machine Organization1 Machine Organization (CS 570) Lecture 4: Pipelining * Jeremy R. Johnson Wed. Oct. 18, 2000 *This lecture was derived.
Pipelining Example Laundry Example: Three Stages
HazardsCS510 Computer Architectures Lecture Lecture 7 Pipeline Hazards.
HazardsCS510 Computer Architectures Lecture Lecture 7 Pipeline Hazards.
Introduction to Computer Organization Pipelining.
Lecture 9. MIPS Processor Design – Pipelined Processor Design #1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System.
CS203 – Advanced Computer Architecture Pipelining Review.
CDA3101 Recitation Section 8
ARM Organization and Implementation
CSCI206 - Computer Organization & Programming
Lecture: Pipelining Basics
Lecture 07: Pipelining Multicycle, MIPS R4000, and More
Pipelining.
Pipeline Implementation (4.6)
CDA 3101 Spring 2016 Introduction to Computer Organization
Appendix A - Pipelining
Pipelining.
Pipelining Multicycle, MIPS R4000, and More
Lecture 5: Pipelining Basics
CSC 4250 Computer Architectures
CSCI206 - Computer Organization & Programming
Overview What are pipeline hazards? Types of hazards
Pipeline Control unit (highly abstracted)
Pipelining.
MIPS Pipelining: Part I
Seoul National University
Lecture: Pipelining Basics
Pipelining Hazards.
Presentation transcript:

11 Pipelining Kosarev Nikolay MIPT Oct, 2009

22 Pipelining Implementation technique whereby multiple instructions are overlapped in execution Each pipeline step (stage) completes a part of instruction Time to move instruction one step is processor cycle. Cycle length – time required for the slowest pipe stage Pipelining yields a reduction in the average execution time per instruction –Time per instruction = time per instruction on unpipelined machine / number of pipe stages –CPI (clocks per instruction) = 1/IPC (instructions per cycle)

33 Simple RISC pipeline InstructionClock number number i IFIDEXMEMWB i+1 IFIDEXMEMWB i+2 IFIDEXMEMWB

44 Basic pipe stages 5 basic pipe stages for each instruction Instruction fetch (IF) –Send PC to memory and fetch the current instruction. Update PC. Decode / register fetch (ID) –Decode instruction and / then read registers for source operands from RF (register file). Check branch, compute branch target address. Execution / effective address (EX) –ALU operates to calculate effective address / perform operation Memory access (MEM) –Access memory using effective address Write-back (WB) –Write result from memory or ALU to RF

55 General restrictions Ensure that different instructions don’t interfere with one another (pipeline registers used) Don’t perform two different instructions with the same data path on the same cycle

66 Pipeline hazards Prevent the next instruction from executing in its designated clock cycle Reduce performance from its ideal speedup gain by pipelining 3 types of hazards –Structural – arise from resource conflicts –Data – an instruction depends on the results of the previous instruction due to overlapping in the pipeline –Control – arise from instructions that change the PC Hazards may cause pipeline stalls (or bubbles) Speedup = Pipeline depth / (1+pipeline stall cycles per instruction)

77 Structural hazards Arise due to resource conflicts Common cases –Functional units is not fully pipelined (e.g. divider) –Resource is not duplicated enough (e.g. RF ports) Why designer allows them? –The reason is cost

88 Data hazards Due to change in the order of read/write accesses to operands (in cmp with unpipelined) Conflict could be minimized by bypassing (forwarding) –ADD r1 = r2, r3 –SUB r4 = r1, r5 –AND r6 = r1, r7 –XOR r8 = r1, r9 Stall otherwise (by pipeline interlock logic) –LD r1 = r2, (r3) –SUB r4 = r1, r5 –AND r6 = r1, r7 –XOR r8 = r1, r9

99 Control hazards Arise from instructions that change PC Taken / not taken branches Methods to deal with branches –Stall the pipeline –Treat as not-taken –Delayed branch –Branch instruction –Sequential successor (in branch delay slot) –Branch target if taken –Cancelling branch Speedup = Pipeline depth / (1+branch frequency * branch penalty)