Seoul National University

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.
COMP25212 Further Pipeline Issues. Cray 1 COMP25212 Designed in 1976 Cost $8,800,000 8MB Main Memory Max performance 160 MFLOPS Weight 5.5 Tons Power.
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
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
Pipelined Processor II (cont’d) CPSC 321
MIPS Pipeline Default behaviour and pipeline organization The University of British ColumbiaEECE 476© 2005 Guy Lemieux.
Chapter 6. (1)Long cycle time (2)Idle transistors.
CIS429/529 Winter 2007 Pipelining-1 1 Pipeling RISC/MIPS64 five stage pipeline Basic pipeline performance Pipeline hazards Branch hazards More pipeline.
1 Lecture 17: Basic Pipelining Today’s topics:  5-stage pipeline  Hazards and instruction scheduling Mid-term exam stats:  Highest: 90, Mean: 58.
Pipelining II Andreas Klappenecker CPSC321 Computer Architecture.
Pipelining III Andreas Klappenecker CPSC321 Computer Architecture.
CIS429.S00: Lec10- 1 Control Hazards Created by branch statements BEQZLOC ADDR1,R2,R3. LOCSUBR1,R2,R3 PC needs to be computed but it happens too late in.
CIS629 Fall 2002 Pipelining 2- 1 Control Hazards Created by branch statements BEQZLOC ADDR1,R2,R3. LOCSUBR1,R2,R3 PC needs to be computed but it happens.
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?
Pipelined Processor II CPSC 321 Andreas Klappenecker.
7/2/ _23 1 Pipelining ECE-445 Computer Organization Dr. Ron Hayne Electrical and Computer Engineering.
Appendix A Pipelining: Basic and Intermediate Concepts
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.
Pipelining Basics Assembly line concept An instruction is executed in multiple steps Multiple instructions overlap in execution A step in a pipeline is.
-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.
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.
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.
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.
Pipeline Architecture I Slides from: Bryant & O’ Hallaron
Oct. 18, 2000Machine Organization1 Machine Organization (CS 570) Lecture 4: Pipelining * Jeremy R. Johnson Wed. Oct. 18, 2000 *This lecture was derived.
1 Seoul National University Pipelining Basics. 2 Sequential Processing Seoul National University.
HazardsCS510 Computer Architectures Lecture Lecture 7 Pipeline Hazards.
HazardsCS510 Computer Architectures Lecture Lecture 7 Pipeline Hazards.
11 Pipelining Kosarev Nikolay MIPT Oct, Pipelining Implementation technique whereby multiple instructions are overlapped in execution Each pipeline.
CSCE 212 Chapter 6 Enhancing Performance with Pipelining Instructor: Jason D. Bakos.
Instruction-Level Parallelism
CDA3101 Recitation Section 8
Instruction Level Parallelism
ARM Organization and Implementation
Lecture 14 Y86-64: PIPE – pipelined implementation
Lecture 16: Basic Pipelining
Morgan Kaufmann Publishers
Lecture: Pipelining Basics
Lecture 07: Pipelining Multicycle, MIPS R4000, and More
Lecture: Pipelining Basics
Appendix A - Pipelining
Processor Pipelining Yasser Mohammad.
Morgan Kaufmann Publishers The Processor
Team A.W.E.S.O.M.-O 4000 February 27, 2007.
Pipelining Multicycle, MIPS R4000, and More
Pipelining review.
Lecture 16: Basic Pipelining
Pipelined Implementation : Part I
Pipelined Implementation : Part II
Pipelined Implementation : Part I
Lecture 5: Pipelining Basics
CSC 4250 Computer Architectures
Control unit extension for data hazards
Pipeline Architecture I Slides from: Bryant & O’ Hallaron
Overview What are pipeline hazards? Types of hazards
Lecture: Pipelining Basics
MIPS Pipelined Datapath
Pipelining Hazards.
Presentation transcript:

Seoul National University Pipelining Basics

Sequential Processing Seoul National University Sequential Processing

Seoul National University Pipelined Processing

Basic Steps of Execution Seoul National University Basic Steps of Execution 1. Instruction fetch step ( F ) 2. Instruction decode/register fetch step ( D ) 3. Execution/effective address step ( E ) 4. Memory access (M) 5. Register write-back step (W)

Pipelined Instruction Execution Seoul National University Pipelined Instruction Execution Sequential Execution Pipelined Execution addq %rcx, %rax subq %rdx, %rbx andq %rdx, %rcx

Basic Pipeline F D E M W Clock number 1 2 3 4 5 6 7 8 9 Seoul National University Basic Pipeline Clock number Instruction number 1 2 3 4 5 6 7 8 9 Instruction i F D E M W Instruction i + 1 Instruction i + 2 Instruction i + 3 Instruction i + 4

Major Hurdles of Pipelining Seoul National University Major Hurdles of Pipelining Structural Hazard Data Hazard Control Hazard

Structural Hazard F D E M W F D E M W F D E M W F D E M W F D E M W Seoul National University Structural Hazard F D E M W F D E M W F D E M W F D E M W Clock number Instruction number 1 2 3 4 5 6 7 8 9 Load Instruction F D E M W Instruction i + 1 Instruction i + 2 Instruction i + 3 Instruction i + 4

Solutions to Structural Hazard Seoul National University Solutions to Structural Hazard Resource Duplication example Separate I and D caches for memory access conflict Multi-port register file for register file access conflict

Data Hazard (RAW hazard) Seoul National University Data Hazard (RAW hazard) addq %rdx, %rax subq %rax, %rcx F D E M W F D E M W Time

Solutions to Data Hazard Seoul National University Solutions to Data Hazard Freezing the pipeline (Internal) Forwarding Compiler scheduling

Freezing The Pipeline ALU result to next instruction Seoul National University Freezing The Pipeline ALU result to next instruction Load result to next instruction F D E M W addq %rdx, %rax stall stall stall F D subq %rax, %rcx F D E M W mrmovq 0(%rdx), %rax addq %rdx, %rax stall stall stall F D

(Internal) Forwarding Seoul National University (Internal) Forwarding ALU result to next instruction (Stall X) Load result to next instruction (Stall 1) F D E M W addq %rdx, %rax F D E M W subq %rax, %rcx F D E M W mrmovq 0(%rdx), %rax stall F D E M addq %rdx, %rax Load interlock

For 5-stage pipeline, 3 cycle penalty 15% branch frequency. CPI = 1.45 Seoul National University Control Hazard Caused by PC-changing instructions ((conditional/unconditional) Jump, Call/Return) (Example) Branch Instruction F D E M W Branch successor stall Branch successor + 1 Branch successor + 2 Branch successor + 3 Branch successor + 4 Branch successor + 5 For 5-stage pipeline, 3 cycle penalty 15% branch frequency. CPI = 1.45

Branch Prediction Predict-taken ~60% success rate Seoul National University Branch Prediction Predict-taken Taken branch instruction F D E M W Branch target Branch target + 1 Branch target + 2 Branch target + 3 Untaken branch instruction F D E M W Branch target idle Branch target + 1 Branch target + 2 Untaken branch instruction + 1 ~60% success rate