1 Seoul National University Pipelining Basics. 2 Sequential Processing Seoul National University.

Slides:



Advertisements
Similar presentations
Lecture 4: CPU Performance
Advertisements

Final Project : Pipelined Microprocessor Joseph Kim.
1 ECE369 ECE369 Pipelining. 2 ECE369 addm (rs), rt # Memory[R[rs]] = R[rt] + Memory[R[rs]]; Assume that we can read and write the memory in the same cycle.
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.
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.
Lecture Objectives: 1)Define pipelining 2)Calculate the speedup achieved by pipelining for a given number of instructions. 3)Define how pipelining improves.
Pipelining Hwanmo Sung CS147 Presentation Professor Sin-Min Lee.
Pipelining Preview Basics & Challenges
1 Seoul National University Wrap-Up. 2 Overview Seoul National University Wrap-Up of PIPE Design  Exception conditions  Performance analysis Modern.
Real-World Pipelines: Car Washes Idea  Divide process into independent stages  Move objects through stages in sequence  At any instant, multiple objects.
Pipeline Enhancements for the Y86 Architecture
Pipelined Processor II (cont’d) CPSC 321
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.
PipelinedImplementation Part I CSC 333. – 2 – Overview General Principles of Pipelining Goal Difficulties Creating a Pipelined Y86 Processor Rearranging.
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.
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?
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
Pipelining Basics Assembly line concept An instruction is executed in multiple steps Multiple instructions overlap in execution A step in a pipeline is.
Pipelining III Topics Hazard mitigation through pipeline forwarding Hardware support for forwarding Forwarding to mitigate control (branch) hazards Systems.
David O’Hallaron Carnegie Mellon University Processor Architecture PIPE: Pipelined Implementation Part I Processor Architecture PIPE: Pipelined Implementation.
-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.
1 Seoul National University Pipelined Implementation : Part I.
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.
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.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Oct. 18, 2000Machine Organization1 Machine Organization (CS 570) Lecture 4: Pipelining * Jeremy R. Johnson Wed. Oct. 18, 2000 *This lecture was derived.
Appendix A. Pipelining: Basic and Intermediate Concept
Pipelining Pipelining is a design feature that allows multiple instructions to be run simultaneously. Speeds up the execution of instruction processing.
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.
Lecture 9. MIPS Processor Design – Pipelined Processor Design #1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System.
CSCE 212 Chapter 6 Enhancing Performance with Pipelining Instructor: Jason D. Bakos.
Real-World Pipelines Idea –Divide process into independent stages –Move objects through stages in sequence –At any given times, multiple objects being.
EECS 370 Discussion smbc-comics.com.
Real-World Pipelines Idea Divide process into independent stages
Instruction-Level Parallelism
CDA3101 Recitation Section 8
Instruction Level Parallelism
William Stallings Computer Organization and Architecture 8th Edition
Lecture: Pipelining Basics
Lecture: Pipelining Basics
Processor Pipelining Yasser Mohammad.
Morgan Kaufmann Publishers The Processor
Team A.W.E.S.O.M.-O 4000 February 27, 2007.
Pipelining review.
Systems I Pipelining II
Lecture 5: Pipelining Basics
CSC 4250 Computer Architectures
Control unit extension for data hazards
Pipelined Implementation : Part I
Overview What are pipeline hazards? Types of hazards
Seoul National University
Real-World Pipelines: Car Washes
Pipelining Hazards.
Presentation transcript:

1 Seoul National University Pipelining Basics

2 Sequential Processing Seoul National University

3 Pipelined Processing Seoul National University

4 Basic Steps of Execution Seoul National University 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)

5 Pipelined Instruction Execution Seoul National University Sequential Execution Pipelined Execution addl %ecx, %eax subl %edx, %ebx andl %edx, %ecx

6 Basic Pipeline Seoul National University Clock number Instruction number Instruction i FDEMW Instruction i + 1 FDEMW Instruction i + 2 FDEMW Instruction i + 3 FDEMW Instruction i + 4 FDEMW

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

8 Structural Hazard Seoul National University FDEMW FDEMW FDEMW FDEMW Clock number Instruction number Load Instruction FDEMW Instruction i + 1 FDEMW Instruction i + 2 FDEMW Instruction i + 3 FDEMW Instruction i + 4 FDEMW

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

10 Data Hazard (RAW hazard) Seoul National University FME FME Time addl %edx, %eax subl %eax, %ecx W WD D

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

12 Freezing The Pipeline Seoul National University ALU result to next instruction Load result to next instruction FME addl %edx, %eax subl %eax, %ecx stall mrmovl 0(%edx), %eax addl %edx, %eax W stallFD D FME W FD D

13 (Internal) Forwarding Seoul National University ALU result to next instruction (Stall X) Load result to next instruction (Stall 1) FME addl %edx, %eax subl %eax, %ecx FME mrmovl 0(%edx), %eax addl %edx, %eax FME stallFME Load interlock D D W W DW D

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

15 Branch Prediction Seoul National University Predict-taken Taken branch instructionFDEMW Branch targetFDEMW Branch target + 1FDEMW Branch target + 2FDEMW Branch target + 3FDEMW Untaken branch instructionFDEMW Branch targetFDEidle Branch target + 1FDidle Branch target + 2Fidle Untaken branch instruction + 1FDEMW ~60% success rate