DAT105: Computer Architecture Study Period 2, 2009 Exercise 3 Chapter 2: Instruction-Level Parallelism and Its Exploitation
|
|
- Cory Hodges
- 5 years ago
- Views:
Transcription
1 Study Period 2, 2009 Exercise 3 Chapter 2: Instruction-Level Parallelism and Its Exploitation Mafijul Islam Department of Computer Science and Engineering November 19, 2009
2 Study Period 2, 2009 Goals: To understand basic pipeline scheduling and loop unrolling the impact of control dependency on performance register renaming and dynamic scheduling Case Studies/Assignments: Assignment 2 of the Exam on Assignments 2, 3 of the Exam on Assignment 3 of the Exam on Assignment 3 of the Exam on
3 Exam : Assignment 2 Assume: MIPS processor with a 5-stage pipeline (presented in Appendix A of the textbook) All memory accesses complete in a single cycle There is one branch delay slot Multiply operations are fully pipelined like all other arithmetic instructions, but the result is not available until the end of the Memory access stage for(int i=0; i<n; i=i+1) { x[i] = x[i]*x[i]; } The x array is of long integers (8 bytes). n always is greater than zero Register R1 contains the start address of the array (x[0]) and you are allowed to change the value of R1 The address of x[n] is available in register R2 LOOP: LD R4, 0(R1) DMUL R5, R4, R4 SD R5, 0(R1) DADDI R1, R1, 8 BNE R1, R2, LOOP NOP
4 Exam : Assignment 2(A) How many cycles does this code take to execute per loop of the original program? Specify all types of dependencies and unresolved hazards in this code LOOP: LD R4, 0(R1) DMUL R5, R4, R4 SD R5, 0(R1) DADDI R1, R1, 8 BNE R1, R2, LOOP NOP # RAW dependency R4
5 Exam : Assignment 2(A) How many cycles does this code take to execute per loop of the original program? Specify all types of dependencies and unresolved hazards in this code LOOP: LD R4, 0(R1) DMUL R5, R4, R4 SD R5, 0(R1) DADDI R1, R1, 8 BNE R1, R2, LOOP NOP # RAW dependency R4 # RAW dependency R5
6 Exam : Assignment 2(A) How many cycles does this code take to execute per loop of the original program? Specify all types of dependencies and unresolved hazards in this code LOOP: LD R4, 0(R1) DMUL R5, R4, R4 SD R5, 0(R1) DADDI R1, R1, 8 BNE R1, R2, LOOP NOP # RAW dependency R4 # RAW dependency R5 # RAW dependency R1 one iteration takes 9 cycles data hazards cause one stall cycle each
7 Exam : Assignment 2(B) Modify the code to require as few clock cycles as possible How many clock cycles does it take now? LOOP: LD R4, 0(R1) DMUL R5, R4, R4 SD R5, 0(R1) DADDI R1, R1, 8 BNE R1, R2, LOOP NOP LOOP: LD R4, 0(R1) DADDI R1, R1, 8 DMUL R5, R4, R4 SD R5, 0(R1) BNE R1, R2, LOOP NOP
8 Exam : Assignment 2(B) Modify the code to require as few clock cycles as possible How many clock cycles does it take now? LOOP: LD R4, 0(R1) DADDI R1, R1, 8 DMUL R5, R4, R4 SD R5, 0(R1) BNE R1, R2, LOOP NOP LOOP: LD R4, 0(R1) DADDI R1, R1, 8 DMUL R5, R4, R4 BNE R1, R2, LOOP SD R5, 0(R1) LOOP: complete elimination of the stall cycles one iteration now takes 5 cycles LD R4, 0(R1) DADDI R1, R1, 8 DMUL R5, R4, R4 BNE R1, R2, LOOP SD R5, -8(R1)
9 Exam : Assignment 2(C) Try to modify the code further (n always is an even number) How many clock cycles does it take now? Specify any remaining hazard LOOP: LD R4, 0(R1) DADDI R1, R1, 8 DMUL R5, R4, R4 BNE R1, R2, LOOP SD R5, -8(R1) unroll the loop once make each iteration do the work of two previous iterations merge the two DADDIs rearrange further to avoid stall cycles
10 Exam : Assignment 2(C) Try to modify the code further (n always is an even number) How many clock cycles does it take now? Specify any remaining hazard LOOP: LOOP: LD R4, 0(R1) LD R4, 0(R1) DADDI R1, R1, 8 DADDI R1, R1, 16 DMUL R5, R4, R4 DMUL R5, R4, R4 BNE R1, R2, LOOP LD R4, -8(R1) SD R5, -8(R1) SD R5, -16(R1) complete elimination of stall cycles the instructions corresponding to the old loop body now takes 4 cycles one new iteration takes 8 cycles DMUL R5, R4, R4 BNE R1, R2, LOOP SD R5, -8(R1)
11 Exam : Assignment 3 Assume that a floating-point load, division, and multiplication takes 10, 50, and 40 cycles, respectively LF F1, 0(R1) DIVF F4,F2, F1 MULT F2, F1, F0 Compute the execution time of the above sequence under the following assumptions on a processor that can issue : one instruction per cycle and that has no register renaming capability three instructions per cycle and that has no register renaming capability three instructions per cycle and that has register renaming capability Disclaimer: If you feel that more assumptions have to be made, feel free to do so. If they are needed and reasonable, they will be accepted without any deduction on the score
12 Exam : Assignment 3(i) Compute execution time on a processor that can issue one instruction per cycle and that has no register renaming capability Identify the dependences True data dependence Name dependence LF F1, 0(R1) # 10 cycles DIVF F4,F2, F1 # 50 cycles MULT F2, F1, F0 # 40 cycles LF F1, 0(R1) # 10 cycles DIVF F4,F2, F1 # 50 cycles MULT F2, F1, F0 # 40 cycles Execution Time = cycles = 100 cycles
13 Exam : Assignment 3(ii) Compute execution time on a processor that can issue three instructions per cycle and that has no register renaming capability Identify the dependences True data dependence Name dependence LF F1, 0(R1) # 10 cycles DIVF F4,F2, F1 # 50 cycles MULT F2, F1, F0 # 40 cycles LF F1, 0(R1) # 10 cycles DIVF F4,F2, F1 # 50 cycles MULT F2, F1, F0 # 40 cycles Execution Time = cycles = 100 cycles
14 Exam : Assignment 3(iii) Compute execution time on a processor that can issue three instructions per cycle and that has register renaming capability Identify the dependences True data dependence Name dependence LF F1, 0(R1) # 10 cycles DIVF F4,F2, F1 # 50 cycles MULT F2, F1, F0 # 40 cycles Apply register renaming: LF F1, 0(R1) # 10 cycles DIVF F4,F2, F1 # 50 cycles MULT S, F1, F0 # 40 cycles Cycle Issued Instruction 1 LF F1, 0(R1) 11 DIVF F4,F2, F1 11 MULT S, F1, F0 Execution Time = 10 + MAX(50, 40) cycles = 60 cycles
15 Exam : Assignment 2(A) Evaluating the impact of branch predictions on performance: Given: every fifth instruction is a conditional branch all conditional branches can be predicted with 100% accuracy, except for the branch less than category that can be predicted with only 50% accuracy CPI=1 for all instructions including the branches that are correctly predicted misprediction penalty is 10 cycles What is the CPI for the integer applications?
16 Exam : Assignment 2(A) Evaluating the impact of branch predictions on performance: Instruction mix: conditional branches: 20% less than : 35% of conditional branches (20%) for integers applications Relative occurrences of mispredicted less than branches = 0.20 * 0.35 *0.5 = Misprediction penalty: 10 cycles CPI : 1 for 80% of the instructions, 1 for the correctly predicted branches correctly predicted branches + other insts mispredicted branches CPI overall = 1 * ( ) + 10 * = 1.315
17 Exam : Assignment 3(A) The following MIPS program operates on an array with 64-bit elements. The register R1 points to the beginning of the array from the beginning. The register R2 points to the end. The array always contains 1000 elements. ANDI R3, R3, 0 LOOP: LD R4, 0(R1) DMUL R5, R4, R4 DADD R5, R3, R5 SD R5, 0(R1) DADDI R3, R4, 0 DADDI R1, R1, 8 BNE R1, R2, LOOP How 2-bit branch prediction scheme works for the given code?
18 Exam : Assignment 3(A) How 2-bit branch prediction scheme works for the given code? For our example program we would have one entry corresponding to the BNE instruction in the end of the program. The prediction would evolve as follows if we assume we start in state 00 : Execution of BNE State before execution Prediction State after execution
19 Exam : Assignment 3(A) How 2-bit branch prediction scheme works for the given code? The prediction evolves as follows if we assume we start in state 00 : Execution of BNE State before execution Prediction State after execution First 00 Not taken (wrong) 01 (taken)
20 Exam : Assignment 3(A) How 2-bit branch prediction scheme works for the given code? The prediction evolves as follows if we assume we start in state 00 : Execution of BNE State before execution Prediction First 00 Not taken (wrong) 01 (taken) State after execution Second 01 Not taken (wrong) 11 (taken)
21 Exam : Assignment 3(A) How 2-bit branch prediction scheme works for the given code? The prediction evolves as follows if we assume we start in state 00 : Execution of BNE State before execution Prediction First 00 Not taken (wrong) 01 (taken) Second 01 Not taken (wrong) 11 (taken) State after execution 3rd, 4 th,,999th 11 Taken (correct) 11 (taken)
22 Exam : Assignment 3(A) How 2-bit branch prediction scheme works for the given code? The prediction evolves as follows if we assume we start in state 00 : Execution of BNE State before execution Prediction First 00 Not taken (wrong) 01 (taken) Second 01 Not taken (wrong) 11 (taken) 3rd, 4 th,,999th 11 Taken (correct) 11 (taken) State after execution 1000th 11 Taken (wrong) 10 (Not taken)
23 Exam : Assignment 3 Dynamic scheduling: Tomasulo s Algorithm SUB F0, F1,F2 (8 cycles) DIV F3,F0,F4 (10 cycles) ADD F4, F5,F6 (6 cycles) 3(A): Show all data and name dependences in the code 3(B): Establish when the second addition instruction can start its execution Assume that there are two addition functional units and a division functional unit a single instruction is issued every cycle
24 Exam : Assignment 3(A) Show all data and name dependences in the code SUB F0, F1,F2 (8 cycles) DIV F3, F0,F4 (10 cycles) ADD F4, F5,F6 (6 cycles) SUB F0, F1,F2 (8 cycles) DIV F3, F0,F4 (10 cycles) ADD F4, F5,F6 (6 cycles) True data dependence Name dependence
25 Exam : Assignment 3(B) Establish when the second addition instruction can start its execution: Clock Cycle: 0 SUB F0, F1, F2 DIV F3, F0, F4 ADD F4, F5, F6 Reservation stations Name Busy Op Vj Vk Qj Qk A Add1 Add2 Div Field Qi Instruction NO NO NO F0 F1 Issue Instruction status Register status F2 F3 Execute F4 Write Result F5 F6
26 Exam : Assignment 3(B) Establish when the second addition instruction can start its execution: Clock Cycle: 1 Instruction SUB F0, F1, F2 DIV F3, F0, F4 ADD F4, F5, F6 Issue No No Instruction status Execute Reservation stations Write Result Name Busy Op Vj Vk Qj Qk A Add1 SUB Regs[F1] Regs[F2] Add2 Div No No Register status Field F0 F1 F2 F3 F4 F5 F6 Qi Add1
27 Exam : Assignment 3(B) Establish when the second addition instruction can start its execution: Clock Cycle: 2 Instruction SUB F0, F1, F2 DIV F3, F0, F4 ADD F4, F5, F6 Issue No Instruction status Execute Reservation stations Write Result Name Busy Op Vj Vk Qj Qk A Add1 SUB Regs[F1] Regs[F2] Add2 No Div DIV Regs[F4] Add1 Register status Field F0 F1 F2 F3 F4 F5 F6 Qi Add1 Div
28 Exam : Assignment 3(B) Establish when the second addition instruction can start its execution: Clock Cycle: 3 Instruction SUB F0, F1, F2 DIV F3, F0, F4 ADD F4, F5, F6 Issue Instruction status Execute Reservation stations Write Result Name Busy Op Vj Vk Qj Qk A Add1 SUB Regs[F1] Regs[F2] Add2 ADD Regs[F5] Regs[F6] Div DIV Regs[F4] Add1 Register status Field F0 F1 F2 F3 F4 F5 F6 Qi Add1 Div Add2
29 Exam : Assignment 3(B) Establish when the second addition instruction can start its execution: Clock Cycle: 4 Instruction SUB F0, F1, F2 DIV F3, F0, F4 ADD F4, F5, F6 Issue Instruction status Execute Reservation stations Write Result Name Busy Op Vj Vk Qj Qk A Add1 SUB Regs[F1] Regs[F2] Add2 ADD Regs[F5] Regs[F6] Div DIV Regs[F4] Add1 Register status Field F0 F1 F2 F3 F4 F5 F6 Qi Add1 Div Add2
30 Exam : Assignment 3(B) Establish when the second addition instruction can start its execution: Clock Cycle: 10 Instruction SUB F0, F1, F2 DIV F3, F0, F4 ADD F4, F5, F6 Issue Instruction status Execute Reservation stations Write Result Name Busy Op Vj Vk Qj Qk A Add1 No SUB Regs[F1] Regs[F2] Add2 No ADD Regs[F5] Regs[F6] Div DIV Regs[F4] Add1 Register status Field F0 F1 F2 F3 F4 F5 F6 Qi Add1 Div Add2
31 Exam : Assignment 3(B) Establish when the second addition instruction can start its execution: Clock Cycle: 11 Instruction SUB F0, F1, F2 DIV F3, F0, F4 ADD F4, F5, F6 Issue Instruction status Execute Reservation stations Write Result Name Busy Op Vj Vk Qj Qk A Add1 No SUB Regs[F1] Regs[F2] Add2 No ADD Regs[F5] Regs[F6] Div DIV Regs[F4] Add1 Register status Field F0 F1 F2 F3 F4 F5 F6 Qi - Div -
32 Exam : Assignment 3(B) Establish when the second addition instruction can start its execution: Clock Cycle: 21 Instruction SUB F0, F1, F2 DIV F3, F0, F4 ADD F4, F5, F6 Issue Instruction status Execute Reservation stations Write Result Name Busy Op Vj Vk Qj Qk A Add1 No SUB Regs[F1] Regs[F2] Add2 No ADD Regs[F5] Regs[F6] Div No DIV Regs[F4] Add1 Register status Field F0 F1 F2 F3 F4 F5 F6 Qi - Div -
Website for Students VTU NOTES QUESTION PAPERS NEWS RESULTS
Advanced Computer Architecture- 06CS81 Hardware Based Speculation Tomasulu algorithm and Reorder Buffer Tomasulu idea: 1. Have reservation stations where register renaming is possible 2. Results are directly
More informationThe basic structure of a MIPS floating-point unit
Tomasulo s scheme The algorithm based on the idea of reservation station The reservation station fetches and buffers an operand as soon as it is available, eliminating the need to get the operand from
More informationReduction of Data Hazards Stalls with Dynamic Scheduling So far we have dealt with data hazards in instruction pipelines by:
Reduction of Data Hazards Stalls with Dynamic Scheduling So far we have dealt with data hazards in instruction pipelines by: Result forwarding (register bypassing) to reduce or eliminate stalls needed
More informationILP concepts (2.1) Basic compiler techniques (2.2) Reducing branch costs with prediction (2.3) Dynamic scheduling (2.4 and 2.5)
Instruction-Level Parallelism and its Exploitation: PART 1 ILP concepts (2.1) Basic compiler techniques (2.2) Reducing branch costs with prediction (2.3) Dynamic scheduling (2.4 and 2.5) Project and Case
More informationHardware-based Speculation
Hardware-based Speculation M. Sonza Reorda Politecnico di Torino Dipartimento di Automatica e Informatica 1 Introduction Hardware-based speculation is a technique for reducing the effects of control dependences
More informationInstruction Level Parallelism
Instruction Level Parallelism The potential overlap among instruction execution is called Instruction Level Parallelism (ILP) since instructions can be executed in parallel. There are mainly two approaches
More informationInstruction-Level Parallelism and Its Exploitation
Chapter 2 Instruction-Level Parallelism and Its Exploitation 1 Overview Instruction level parallelism Dynamic Scheduling Techniques es Scoreboarding Tomasulo s s Algorithm Reducing Branch Cost with Dynamic
More informationStatic vs. Dynamic Scheduling
Static vs. Dynamic Scheduling Dynamic Scheduling Fast Requires complex hardware More power consumption May result in a slower clock Static Scheduling Done in S/W (compiler) Maybe not as fast Simpler processor
More informationLoad1 no Load2 no Add1 Y Sub Reg[F2] Reg[F6] Add2 Y Add Reg[F2] Add1 Add3 no Mult1 Y Mul Reg[F2] Reg[F4] Mult2 Y Div Reg[F6] Mult1
Instruction Issue Execute Write result L.D F6, 34(R2) L.D F2, 45(R3) MUL.D F0, F2, F4 SUB.D F8, F2, F6 DIV.D F10, F0, F6 ADD.D F6, F8, F2 Name Busy Op Vj Vk Qj Qk A Load1 no Load2 no Add1 Y Sub Reg[F2]
More informationEECC551 Exam Review 4 questions out of 6 questions
EECC551 Exam Review 4 questions out of 6 questions (Must answer first 2 questions and 2 from remaining 4) Instruction Dependencies and graphs In-order Floating Point/Multicycle Pipelining (quiz 2) Improving
More informationComputer Architecture Homework Set # 3 COVER SHEET Please turn in with your own solution
CSCE 6 (Fall 07) Computer Architecture Homework Set # COVER SHEET Please turn in with your own solution Eun Jung Kim Write your answers on the sheets provided. Submit with the COVER SHEET. If you need
More informationCOSC 6385 Computer Architecture - Instruction Level Parallelism (II)
COSC 6385 Computer Architecture - Instruction Level Parallelism (II) Edgar Gabriel Spring 2016 Data fields for reservation stations Op: operation to perform on source operands S1 and S2 Q j, Q k : reservation
More informationGood luck and have fun!
Midterm Exam October 13, 2014 Name: Problem 1 2 3 4 total Points Exam rules: Time: 90 minutes. Individual test: No team work! Open book, open notes. No electronic devices, except an unprogrammed calculator.
More informationAdapted from David Patterson s slides on graduate computer architecture
Mei Yang Adapted from David Patterson s slides on graduate computer architecture Introduction Basic Compiler Techniques for Exposing ILP Advanced Branch Prediction Dynamic Scheduling Hardware-Based Speculation
More informationDYNAMIC SPECULATIVE EXECUTION
DYNAMIC SPECULATIVE EXECUTION Slides by: Pedro Tomás Additional reading: Computer Architecture: A Quantitative Approach, 5th edition, Chapter 3, John L. Hennessy and David A. Patterson, Morgan Kaufmann,
More informationCOSC4201 Instruction Level Parallelism Dynamic Scheduling
COSC4201 Instruction Level Parallelism Dynamic Scheduling Prof. Mokhtar Aboelaze Parts of these slides are taken from Notes by Prof. David Patterson (UCB) Outline Data dependence and hazards Exposing parallelism
More informationCPE 631 Lecture 10: Instruction Level Parallelism and Its Dynamic Exploitation
Lecture 10: Instruction Level Parallelism and Its Dynamic Exploitation Aleksandar Milenković, milenka@ece.uah.edu Electrical and Computer Engineering University of Alabama in Huntsville Outline Tomasulo
More informationAdvanced Computer Architecture CMSC 611 Homework 3. Due in class Oct 17 th, 2012
Advanced Computer Architecture CMSC 611 Homework 3 Due in class Oct 17 th, 2012 (Show your work to receive partial credit) 1) For the following code snippet list the data dependencies and rewrite the code
More informationChapter 3 Instruction-Level Parallelism and its Exploitation (Part 1)
Chapter 3 Instruction-Level Parallelism and its Exploitation (Part 1) ILP vs. Parallel Computers Dynamic Scheduling (Section 3.4, 3.5) Dynamic Branch Prediction (Section 3.3) Hardware Speculation and Precise
More informationCPE 631 Lecture 11: Instruction Level Parallelism and Its Dynamic Exploitation
Lecture 11: Instruction Level Parallelism and Its Dynamic Exploitation Aleksandar Milenkovic, milenka@ece.uah.edu Electrical and Computer Engineering University of Alabama in Huntsville Outline Instruction
More informationInstruction Level Parallelism (ILP)
Instruction Level Parallelism (ILP) Pipelining supports a limited sense of ILP e.g. overlapped instructions, out of order completion and issue, bypass logic, etc. Remember Pipeline CPI = Ideal Pipeline
More informationHardware-based speculation (2.6) Multiple-issue plus static scheduling = VLIW (2.7) Multiple-issue, dynamic scheduling, and speculation (2.
Instruction-Level Parallelism and its Exploitation: PART 2 Hardware-based speculation (2.6) Multiple-issue plus static scheduling = VLIW (2.7) Multiple-issue, dynamic scheduling, and speculation (2.8)
More informationScoreboard information (3 tables) Four stages of scoreboard control
Scoreboard information (3 tables) Instruction : issued, read operands and started execution (dispatched), completed execution or wrote result, Functional unit (assuming non-pipelined units) busy/not busy
More informationMetodologie di Progettazione Hardware-Software
Metodologie di Progettazione Hardware-Software Advanced Pipelining and Instruction-Level Paralelism Metodologie di Progettazione Hardware/Software LS Ing. Informatica 1 ILP Instruction-level Parallelism
More informationELEC 5200/6200 Computer Architecture and Design Fall 2016 Lecture 9: Instruction Level Parallelism
ELEC 5200/6200 Computer Architecture and Design Fall 2016 Lecture 9: Instruction Level Parallelism Ujjwal Guin, Assistant Professor Department of Electrical and Computer Engineering Auburn University,
More informationCPE 631 Lecture 10: Instruction Level Parallelism and Its Dynamic Exploitation
Lecture 10: Instruction Level Parallelism and Its Dynamic Exploitation Aleksandar Milenkovic, milenka@ece.uah.edu Electrical and Computer Engineering University of Alabama in Huntsville Outline Instruction
More informationLatencies of FP operations used in chapter 4.
Instruction-Level Parallelism (ILP) ILP: refers to the overlap execution of instructions. Pipelined CPI = Ideal pipeline CPI + structural stalls + RAW stalls + WAR stalls + WAW stalls + Control stalls.
More informationChapter 3: Instruction Level Parallelism (ILP) and its exploitation. Types of dependences
Chapter 3: Instruction Level Parallelism (ILP) and its exploitation Pipeline CPI = Ideal pipeline CPI + stalls due to hazards invisible to programmer (unlike process level parallelism) ILP: overlap execution
More informationPipelining and Exploiting Instruction-Level Parallelism (ILP)
Pipelining and Exploiting Instruction-Level Parallelism (ILP) Pipelining and Instruction-Level Parallelism (ILP). Definition of basic instruction block Increasing Instruction-Level Parallelism (ILP) &
More informationProcessor: Superscalars Dynamic Scheduling
Processor: Superscalars Dynamic Scheduling Z. Jerry Shi Assistant Professor of Computer Science and Engineering University of Connecticut * Slides adapted from Blumrich&Gschwind/ELE475 03, Peh/ELE475 (Princeton),
More informationHardware-based Speculation
Hardware-based Speculation Hardware-based Speculation To exploit instruction-level parallelism, maintaining control dependences becomes an increasing burden. For a processor executing multiple instructions
More informationDynamic Scheduling. Better than static scheduling Scoreboarding: Tomasulo algorithm:
LECTURE - 13 Dynamic Scheduling Better than static scheduling Scoreboarding: Used by the CDC 6600 Useful only within basic block WAW and WAR stalls Tomasulo algorithm: Used in IBM 360/91 for the FP unit
More informationPage 1. Recall from Pipelining Review. Lecture 16: Instruction Level Parallelism and Dynamic Execution #1: Ideas to Reduce Stalls
CS252 Graduate Computer Architecture Recall from Pipelining Review Lecture 16: Instruction Level Parallelism and Dynamic Execution #1: March 16, 2001 Prof. David A. Patterson Computer Science 252 Spring
More informationCISC 662 Graduate Computer Architecture. Lecture 10 - ILP 3
CISC 662 Graduate Computer Architecture Lecture 10 - ILP 3 Michela Taufer http://www.cis.udel.edu/~taufer/teaching/cis662f07 Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer
More informationInstruction Frequency CPI. Load-store 55% 5. Arithmetic 30% 4. Branch 15% 4
PROBLEM 1: An application running on a 1GHz pipelined processor has the following instruction mix: Instruction Frequency CPI Load-store 55% 5 Arithmetic 30% 4 Branch 15% 4 a) Determine the overall CPI
More informationPage # CISC 662 Graduate Computer Architecture. Lecture 8 - ILP 1. Pipeline CPI. Pipeline CPI (I) Michela Taufer
CISC 662 Graduate Computer Architecture Lecture 8 - ILP 1 Michela Taufer http://www.cis.udel.edu/~taufer/teaching/cis662f07 Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,
More informationCourse on Advanced Computer Architectures
Surname (Cognome) Name (Nome) POLIMI ID Number Signature (Firma) SOLUTION Politecnico di Milano, July 9, 2018 Course on Advanced Computer Architectures Prof. D. Sciuto, Prof. C. Silvano EX1 EX2 EX3 Q1
More informationCMSC 411 Practice Exam 1 w/answers. 1. CPU performance Suppose we have the following instruction mix and clock cycles per instruction.
CMSC 4 Practice Exam w/answers General instructions. Be complete, yet concise. You may leave arithmetic expressions in any form that a calculator could evaluate.. CPU performance Suppose we have the following
More informationILP: Instruction Level Parallelism
ILP: Instruction Level Parallelism Tassadaq Hussain Riphah International University Barcelona Supercomputing Center Universitat Politècnica de Catalunya Introduction Introduction Pipelining become universal
More informationCS433 Homework 2 (Chapter 3)
CS433 Homework 2 (Chapter 3) Assigned on 9/19/2017 Due in class on 10/5/2017 Instructions: 1. Please write your name and NetID clearly on the first page. 2. Refer to the course fact sheet for policies
More informationRecall from Pipelining Review. Lecture 16: Instruction Level Parallelism and Dynamic Execution #1: Ideas to Reduce Stalls
CS252 Graduate Computer Architecture Recall from Pipelining Review Lecture 16: Instruction Level Parallelism and Dynamic Execution #1: March 16, 2001 Prof. David A. Patterson Computer Science 252 Spring
More informationComputer Architecture A Quantitative Approach, Fifth Edition. Chapter 3. Instruction-Level Parallelism and Its Exploitation
Computer Architecture A Quantitative Approach, Fifth Edition Chapter 3 Instruction-Level Parallelism and Its Exploitation Introduction Pipelining become universal technique in 1985 Overlaps execution of
More informationCS433 Midterm. Prof Josep Torrellas. October 19, Time: 1 hour + 15 minutes
CS433 Midterm Prof Josep Torrellas October 19, 2017 Time: 1 hour + 15 minutes Name: Instructions: 1. This is a closed-book, closed-notes examination. 2. The Exam has 4 Questions. Please budget your time.
More informationCISC 662 Graduate Computer Architecture Lecture 11 - Hardware Speculation Branch Predictions
CISC 662 Graduate Computer Architecture Lecture 11 - Hardware Speculation Branch Predictions Michela Taufer http://www.cis.udel.edu/~taufer/teaching/cis6627 Powerpoint Lecture Notes from John Hennessy
More informationCSE 490/590 Computer Architecture Homework 2
CSE 490/590 Computer Architecture Homework 2 1. Suppose that you have the following out-of-order datapath with 1-cycle ALU, 2-cycle Mem, 3-cycle Fadd, 5-cycle Fmul, no branch prediction, and in-order fetch
More informationCopyright 2012, Elsevier Inc. All rights reserved.
Computer Architecture A Quantitative Approach, Fifth Edition Chapter 3 Instruction-Level Parallelism and Its Exploitation 1 Branch Prediction Basic 2-bit predictor: For each branch: Predict taken or not
More informationCS252 Graduate Computer Architecture Lecture 6. Recall: Software Pipelining Example
CS252 Graduate Computer Architecture Lecture 6 Tomasulo, Implicit Register Renaming, Loop-Level Parallelism Extraction Explicit Register Renaming John Kubiatowicz Electrical Engineering and Computer Sciences
More informationCS433 Homework 2 (Chapter 3)
CS Homework 2 (Chapter ) Assigned on 9/19/2017 Due in class on 10/5/2017 Instructions: 1. Please write your name and NetID clearly on the first page. 2. Refer to the course fact sheet for policies on collaboration..
More informationPage 1. Recall from Pipelining Review. Lecture 15: Instruction Level Parallelism and Dynamic Execution
CS252 Graduate Computer Architecture Recall from Pipelining Review Lecture 15: Instruction Level Parallelism and Dynamic Execution March 11, 2002 Prof. David E. Culler Computer Science 252 Spring 2002
More informationInstruction Level Parallelism. Appendix C and Chapter 3, HP5e
Instruction Level Parallelism Appendix C and Chapter 3, HP5e Outline Pipelining, Hazards Branch prediction Static and Dynamic Scheduling Speculation Compiler techniques, VLIW Limits of ILP. Implementation
More informationPage 1. CISC 662 Graduate Computer Architecture. Lecture 8 - ILP 1. Pipeline CPI. Pipeline CPI (I) Pipeline CPI (II) Michela Taufer
CISC 662 Graduate Computer Architecture Lecture 8 - ILP 1 Michela Taufer Pipeline CPI http://www.cis.udel.edu/~taufer/teaching/cis662f07 Powerpoint Lecture Notes from John Hennessy and David Patterson
More informationEITF20: Computer Architecture Part3.2.1: Pipeline - 3
EITF20: Computer Architecture Part3.2.1: Pipeline - 3 Liang Liu liang.liu@eit.lth.se 1 Outline Reiteration Dynamic scheduling - Tomasulo Superscalar, VLIW Speculation ILP limitations What we have done
More informationExploiting ILP with SW Approaches. Aleksandar Milenković, Electrical and Computer Engineering University of Alabama in Huntsville
Lecture : Exploiting ILP with SW Approaches Aleksandar Milenković, milenka@ece.uah.edu Electrical and Computer Engineering University of Alabama in Huntsville Outline Basic Pipeline Scheduling and Loop
More informationFour Steps of Speculative Tomasulo cycle 0
HW support for More ILP Hardware Speculative Execution Speculation: allow an instruction to issue that is dependent on branch, without any consequences (including exceptions) if branch is predicted incorrectly
More informationSuperscalar Architectures: Part 2
Superscalar Architectures: Part 2 Dynamic (Out-of-Order) Scheduling Lecture 3.2 August 23 rd, 2017 Jae W. Lee (jaewlee@snu.ac.kr) Computer Science and Engineering Seoul NaMonal University Download this
More informationCPE 631 Lecture 09: Instruction Level Parallelism and Its Dynamic Exploitation
Lecture 09: Instruction Level Parallelism and Its Dynamic Exploitation Aleksandar Milenkovic, milenka@ece.uah.edu Electrical and Computer Engineering University of Alabama in Huntsville Outline Instruction
More informationCS2100 Computer Organisation Tutorial #10: Pipelining Answers to Selected Questions
CS2100 Computer Organisation Tutorial #10: Pipelining Answers to Selected Questions Tutorial Questions 2. [AY2014/5 Semester 2 Exam] Refer to the following MIPS program: # register $s0 contains a 32-bit
More informationCS / ECE 6810 Midterm Exam - Oct 21st 2008
Name and ID: CS / ECE 6810 Midterm Exam - Oct 21st 2008 Notes: This is an open notes and open book exam. If necessary, make reasonable assumptions and clearly state them. The only clarifications you may
More informationHardware-Based Speculation
Hardware-Based Speculation Execute instructions along predicted execution paths but only commit the results if prediction was correct Instruction commit: allowing an instruction to update the register
More informationComputer Architecture Practical 1 Pipelining
Computer Architecture Issued: Monday 28 January 2008 Due: Friday 15 February 2008 at 4.30pm (at the ITO) This is the first of two practicals for the Computer Architecture module of CS3. Together the practicals
More informationMulti-cycle Instructions in the Pipeline (Floating Point)
Lecture 6 Multi-cycle Instructions in the Pipeline (Floating Point) Introduction to instruction level parallelism Recap: Support of multi-cycle instructions in a pipeline (App A.5) Recap: Superpipelining
More information5008: Computer Architecture
5008: Computer Architecture Chapter 2 Instruction-Level Parallelism and Its Exploitation CA Lecture05 - ILP (cwliu@twins.ee.nctu.edu.tw) 05-1 Review from Last Lecture Instruction Level Parallelism Leverage
More informationWhat is ILP? Instruction Level Parallelism. Where do we find ILP? How do we expose ILP?
What is ILP? Instruction Level Parallelism or Declaration of Independence The characteristic of a program that certain instructions are, and can potentially be. Any mechanism that creates, identifies,
More informationGraduate Computer Architecture. Chapter 3. Instruction Level Parallelism and Its Dynamic Exploitation
Graduate Computer Architecture Chapter 3 Instruction Level Parallelism and Its Dynamic Exploitation 1 Overview Instruction level parallelism Dynamic Scheduling Techniques Scoreboarding (Appendix A.8) Tomasulo
More informationHardware-Based Speculation
Hardware-Based Speculation Execute instructions along predicted execution paths but only commit the results if prediction was correct Instruction commit: allowing an instruction to update the register
More informationDynamic Instruction Level Parallelism (ILP)
Dynamic Instruction Level Parallelism (ILP) Introduction to ILP Data and name dependences and hazards CPU dynamic scheduling Branch prediction Hardware speculation Multiple issue Theoretical limits of
More informationUpdated Exercises by Diana Franklin
C-82 Appendix C Pipelining: Basic and Intermediate Concepts Updated Exercises by Diana Franklin C.1 [15/15/15/15/25/10/15] Use the following code fragment: Loop: LD R1,0(R2) ;load R1 from address
More informationFloating Point/Multicycle Pipelining in DLX
Floating Point/Multicycle Pipelining in DLX Completion of DLX EX stage floating point arithmetic operations in one or two cycles is impractical since it requires: A much longer CPU clock cycle, and/or
More information吳俊興高雄大學資訊工程學系. October Example to eleminate WAR and WAW by register renaming. Tomasulo Algorithm. A Dynamic Algorithm: Tomasulo s Algorithm
EEF011 Computer Architecture 計算機結構 吳俊興高雄大學資訊工程學系 October 2004 Example to eleminate WAR and WAW by register renaming Original DIV.D ADD.D S.D SUB.D MUL.D F0, F2, F4 F6, F0, F8 F6, 0(R1) F8, F10, F14 F6,
More informationChapter 4 The Processor 1. Chapter 4D. The Processor
Chapter 4 The Processor 1 Chapter 4D The Processor Chapter 4 The Processor 2 Instruction-Level Parallelism (ILP) Pipelining: executing multiple instructions in parallel To increase ILP Deeper pipeline
More informationReview: Evaluating Branch Alternatives. Lecture 3: Introduction to Advanced Pipelining. Review: Evaluating Branch Prediction
Review: Evaluating Branch Alternatives Lecture 3: Introduction to Advanced Pipelining Two part solution: Determine branch taken or not sooner, AND Compute taken branch address earlier Pipeline speedup
More informationLecture 4: Introduction to Advanced Pipelining
Lecture 4: Introduction to Advanced Pipelining Prepared by: Professor David A. Patterson Computer Science 252, Fall 1996 Edited and presented by : Prof. Kurt Keutzer Computer Science 252, Spring 2000 KK
More informationInstruction Level Parallelism. ILP, Loop level Parallelism Dependences, Hazards Speculation, Branch prediction
Instruction Level Parallelism ILP, Loop level Parallelism Dependences, Hazards Speculation, Branch prediction Basic Block A straight line code sequence with no branches in except to the entry and no branches
More informationInstruction Level Parallelism. Taken from
Instruction Level Parallelism Taken from http://www.cs.utsa.edu/~dj/cs3853/lecture5.ppt Outline ILP Compiler techniques to increase ILP Loop Unrolling Static Branch Prediction Dynamic Branch Prediction
More informationCS425 Computer Systems Architecture
CS425 Computer Systems Architecture Fall 2018 Static Instruction Scheduling 1 Techniques to reduce stalls CPI = Ideal CPI + Structural stalls per instruction + RAW stalls per instruction + WAR stalls per
More informationCS 614 COMPUTER ARCHITECTURE II FALL 2005
CS 614 COMPUTER ARCHITECTURE II FALL 2005 DUE : November 9, 2005 HOMEWORK III READ : - Portions of Chapters 5, 6, 7, 8, 9 and 14 of the Sima book and - Portions of Chapters 3, 4, Appendix A and Appendix
More informationCS433 Homework 3 (Chapter 3)
CS433 Homework 3 (Chapter 3) Assigned on 10/3/2017 Due in class on 10/17/2017 Instructions: 1. Please write your name and NetID clearly on the first page. 2. Refer to the course fact sheet for policies
More informationOutline Review: Basic Pipeline Scheduling and Loop Unrolling Multiple Issue: Superscalar, VLIW. CPE 631 Session 19 Exploiting ILP with SW Approaches
Session xploiting ILP with SW Approaches lectrical and Computer ngineering University of Alabama in Huntsville Outline Review: Basic Pipeline Scheduling and Loop Unrolling Multiple Issue: Superscalar,
More informationMulticycle ALU Operations 2/28/2011. Diversified Pipelines The Path Toward Superscalar Processors. Limitations of Our Simple 5 stage Pipeline
//11 Limitations of Our Simple stage Pipeline Diversified Pipelines The Path Toward Superscalar Processors HPCA, Spring 11 Assumes single cycle EX stage for all instructions This is not feasible for Complex
More informationCOSC 6385 Computer Architecture - Pipelining (II)
COSC 6385 Computer Architecture - Pipelining (II) Edgar Gabriel Spring 2018 Performance evaluation of pipelines (I) General Speedup Formula: Time Speedup Time IC IC ClockCycle ClockClycle CPI CPI For a
More informationLecture 8 Dynamic Branch Prediction, Superscalar and VLIW. Computer Architectures S
Lecture 8 Dynamic Branch Prediction, Superscalar and VLIW Computer Architectures 521480S Dynamic Branch Prediction Performance = ƒ(accuracy, cost of misprediction) Branch History Table (BHT) is simplest
More informationECSE 425 Lecture 11: Loop Unrolling
ECSE 425 Lecture 11: Loop Unrolling H&P Chapter 2 Vu, Meyer Textbook figures 2007 Elsevier Science Last Time ILP is small within basic blocks Dependence and Hazards Change code, but preserve program correctness
More informationCS433 Midterm. Prof Josep Torrellas. October 16, Time: 1 hour + 15 minutes
CS433 Midterm Prof Josep Torrellas October 16, 2014 Time: 1 hour + 15 minutes Name: Alias: Instructions: 1. This is a closed-book, closed-notes examination. 2. The Exam has 4 Questions. Please budget your
More informationPipeline issues. Pipeline hazard: RaW. Pipeline hazard: RaW. Calcolatori Elettronici e Sistemi Operativi. Hazards. Data hazard.
Calcolatori Elettronici e Sistemi Operativi Pipeline issues Hazards Pipeline issues Data hazard Control hazard Structural hazard Pipeline hazard: RaW Pipeline hazard: RaW 5 6 7 8 9 5 6 7 8 9 : add R,R,R
More informationUniversity of Southern California Department of Electrical Engineering EE557 Fall 2001 Instructor: Michel Dubois Homework #3.
University of Southern California Department of Electrical Engineering EE557 Fall 2001 Instructor: Michel Dubois Homework #3. SOLUTIONS Problem 1 (20pts). There are seven dependences in the C loop presented
More informationCompiler Optimizations. Lecture 7 Overview of Superscalar Techniques. Memory Allocation by Compilers. Compiler Structure. Register allocation
Lecture 7 Overview of Superscalar Techniques CprE 581 Computer Systems Architecture, Fall 2013 Reading: Textbook, Ch. 3 Complexity-Effective Superscalar Processors, PhD Thesis by Subbarao Palacharla, Ch.1
More informationCS 2410 Mid term (fall 2015) Indicate which of the following statements is true and which is false.
CS 2410 Mid term (fall 2015) Name: Question 1 (10 points) Indicate which of the following statements is true and which is false. (1) SMT architectures reduces the thread context switch time by saving in
More informationCS 614 COMPUTER ARCHITECTURE II FALL 2004
CS 64 COMPUTER ARCHITECTURE II FALL 004 DUE : October, 005 HOMEWORK II READ : - Portions of Chapters 5, 7, 8 and 9 of the Sima book and - Portions of Chapter 3, 4 and Appendix A of the Hennessy book ASSIGNMENT:
More informationESE 545 Computer Architecture Instruction-Level Parallelism (ILP) and Static & Dynamic Instruction Scheduling Instruction level parallelism
Computer Architecture ESE 545 Computer Architecture Instruction-Level Parallelism (ILP) and Static & Dynamic Instruction Scheduling 1 Outline ILP Compiler techniques to increase ILP Loop Unrolling Static
More informationComputer Architectures. Chapter 4. Tien-Fu Chen. National Chung Cheng Univ.
Computer Architectures Chapter 4 Tien-Fu Chen National Chung Cheng Univ. chap4-0 Advance Pipelining! Static Scheduling Have compiler to minimize the effect of structural, data, and control dependence "
More informationCS252 Graduate Computer Architecture Midterm 1 Solutions
CS252 Graduate Computer Architecture Midterm 1 Solutions Part A: Branch Prediction (22 Points) Consider a fetch pipeline based on the UltraSparc-III processor (as seen in Lecture 5). In this part, we evaluate
More informationDYNAMIC INSTRUCTION SCHEDULING WITH SCOREBOARD
DYNAMIC INSTRUCTION SCHEDULING WITH SCOREBOARD Slides by: Pedro Tomás Additional reading: Computer Architecture: A Quantitative Approach, 5th edition, Chapter 3, John L. Hennessy and David A. Patterson,
More informationINSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing
UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 09
More informationReview: Compiler techniques for parallelism Loop unrolling Ÿ Multiple iterations of loop in software:
CS152 Computer Architecture and Engineering Lecture 17 Dynamic Scheduling: Tomasulo March 20, 2001 John Kubiatowicz (http.cs.berkeley.edu/~kubitron) lecture slides: http://www-inst.eecs.berkeley.edu/~cs152/
More informationFunctional Units. Registers. The Big Picture: Where are We Now? The Five Classic Components of a Computer Processor Input Control Memory
The Big Picture: Where are We Now? CS152 Computer Architecture and Engineering Lecture 18 The Five Classic Components of a Computer Processor Input Control Dynamic Scheduling (Cont), Speculation, and ILP
More informationINSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing
UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 06
More informationECE 505 Computer Architecture
ECE 505 Computer Architecture Pipelining 2 Berk Sunar and Thomas Eisenbarth Review 5 stages of RISC IF ID EX MEM WB Ideal speedup of pipelining = Pipeline depth (N) Practically Implementation problems
More information5008: Computer Architecture HW#2
5008: Computer Architecture HW#2 1. We will now support for register-memory ALU operations to the classic five-stage RISC pipeline. To offset this increase in complexity, all memory addressing will be
More informationLecture 9: Case Study MIPS R4000 and Introduction to Advanced Pipelining Professor Randy H. Katz Computer Science 252 Spring 1996
Lecture 9: Case Study MIPS R4000 and Introduction to Advanced Pipelining Professor Randy H. Katz Computer Science 252 Spring 1996 RHK.SP96 1 Review: Evaluating Branch Alternatives Two part solution: Determine
More informationMidterm I March 21 st, 2007 CS252 Graduate Computer Architecture
University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2007 John Kubiatowicz Midterm I March 21 st, 2007 CS252 Graduate Computer Architecture Your Name: SID Number:
More information