1 Pipelining(2) CDA 3101 Discussion Section 09. 2 Question 1 Identify all of the data dependencies and necessary forwarding in the following code. No.

Slides:



Advertisements
Similar presentations
Lecture 4: CPU Performance
Advertisements

Morgan Kaufmann Publishers The Processor
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.
Pipeline Summary Try to put everything together for pipelines Before going onto caches. Peer Instruction Lecture Materials for Computer Architecture by.
CMSC 611: Advanced Computer Architecture Pipelining Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
Lec ECE 463/521, Profs. Conte, Rotenberg and Gehringer, Dept. of ECE, NC State University Static Scheduling Techniques m Local scheduling (within.
Pipelining and Control Hazards Oct
Pipeline Optimization
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
Pipelining 6.1, 6.2. Performance Measurements Cycle Time: Time __________________ Latency: Time to finish a _____________, start to finish Throughput:
Pipeline Control Hazards and Instruction Variations Hakim Weatherspoon CS 3410, Spring 2011 Computer Science Cornell University See P&H Appendix 4.8 &
CIS429/529 Winter 2007 Pipelining II- 1 Additional pipelining topics Why pipelining is so hard: exception handling ILP techniques: loop unrolling.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 19 - Pipelined.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
1 Chapter Six - 2nd Half Pipelined Processor Forwarding, Hazards, Branching EE3055 Web:
1 Stalling  The easiest solution is to stall the pipeline  We could delay the AND instruction by introducing a one-cycle delay into the pipeline, sometimes.
Goal: Reduce the Penalty of Control Hazards
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania Computer Organization Pipelined Processor Design 3.
 The actual result $1 - $3 is computed in clock cycle 3, before it’s needed in cycles 4 and 5  We forward that value to later instructions, to prevent.
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
COMP381 by M. Hamdi 1 (Recap) Control Hazards. COMP381 by M. Hamdi 2 Control (Branch) Hazard A: beqz r2, label B: label: P: Problem: The outcome.
Pipelined Datapath and Control (Lecture #15) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying Computer.
-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.
Computer Architecture Project Team A Sergio Rico, Ertong Zhang, Vlad Chiriacescu, ZhongYin Zhang.
Abstraction Question General purpose processors have an abstraction layer fixed at the ISA and have little control over the compilers or code run on the.
Memory/Storage Architecture Lab Computer Architecture Pipelining Basics.
Computer Science Education
Automobile Manufacturing 1. Build frame. 60 min. 2. Add engine. 50 min. 3. Build body. 80 min. 4. Paint. 40 min. 5. Finish.45 min. 275 min. Latency: Time.
Comp Sci pipelining 1 Ch. 13 Pipelining. Comp Sci pipelining 2 Pipelining.
Chapter 4 The Processor. Chapter 4 — The Processor — 2 Introduction We will examine two MIPS implementations A simplified version A more realistic pipelined.
5/13/99 Ashish Sabharwal1 Pipelining and Hazards n Hazards occur because –Don’t have enough resources (ALU’s, memory,…) Structural Hazard –Need a value.
Branch Hazards and Static Branch Prediction Techniques
CS2100 Computer Organisation
University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell CS352H: Computer Systems Architecture Topic 9: MIPS Pipeline.
CSCE 430: Computer Architecture Final Project Group E: Matt Horn Dongpu Jin Nick Briganti Sean Hicks.
Instructor: Senior Lecturer SOE Dan Garcia CS 61C: Great Ideas in Computer Architecture Pipelining Hazards 1.
LECTURE 7 Pipelining. DATAPATH AND CONTROL We started with the single-cycle implementation, in which a single instruction is executed over a single cycle.
CMPE 421 Parallel Computer Architecture Part 3: Hardware Solution: Control Hazard and Prediction.
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.
1 Pipelining CDA 3101 Discussion Section Question 1 – 6.1 Suppose that time for an ALU operation can be shortened by 25% in the following figure.
ECE/CS 552: Pipeline Hazards © Prof. Mikko Lipasti Lecture notes based in part on slides created by Mark Hill, David Wood, Guri Sohi, John Shen and Jim.
Pipelining: Implementation CPSC 252 Computer Organization Ellen Walker, Hiram College.
BRANCH PREDICTION FOR THE OR1200 PIPELINE Alec Roelke.
Lecture 5. MIPS Processor Design Pipelined MIPS #1 Prof. Taeweon Suh Computer Science & Engineering Korea University COSE222, COMP212 Computer Architecture.
Computer Architecture & Operations I
CS2100 Computer Organization
Pipelining Chapter 6.
Computer Architecture & Operations I
MIPS instructions.
Test 2 review Lectures 5-10.
Chapter 4 The Processor Part 4
ECS 154B Computer Architecture II Spring 2009
Test 2 review Lectures 5-10.
The University of Adelaide, School of Computer Science
Pipelining review.
Pipelining Chapter 6.
Pipelined Processor Design
Pipelining in more detail
CSCI206 - Computer Organization & Programming
Computer Architecture
Data Hazards Data Hazard
/ Computer Architecture and Design
Pipelining: Basic Concepts
Pipelining (II).
Review.
Pipelining Chapter 6.
Consider the following code segment for a loop: int a = 3, b = 4;
Problem ??: (?? marks) Consider executing the following code on the MIPS pipelined datapath: add $t5, $t6, $t8 add $t9, $t5, $t4 lw $t3, 100($t9) sub $t2,
ELEC / Computer Architecture and Design Spring 2015 Pipeline Control and Performance (Chapter 6) Vishwani D. Agrawal James J. Danaher.
Presentation transcript:

1 Pipelining(2) CDA 3101 Discussion Section 09

2 Question 1 Identify all of the data dependencies and necessary forwarding in the following code. No branch prediction, No Delayed Slot. addi $t1,$0,0 addi $t2,$0,100 LOOP:lw $t4, 200($t2) add $t1, $t1, $t4 addi $t2, $t2, -4 bne $t2, $0,LOOP

3 Question 1 InstructionCC1CC2CC3CC4CC5CC6CC7CC8CC9CC 10 addi $t1,$0,0 IFIDEXMEMWB addi $t2,$0,100 IFIDEXMEMWB lw $t4, 200($t2) IFIDEXMEMWB add $t1, $t1, $t4 IFIDEXMEMWB addi $t2, $t2, -4 IFIDEXMEMWB bne $t2, $0,LOOP IFID

4 Question 1(cont) InstructionCC8CC9CC 10 CC 11 CC 12 CC 13 CC 14 CC 15 CC 16 CC 17 bne $t2, $0,LOOP IFID lw $t4, 200($t2) IFIDEXMEMWB add $t1, $t1, $t4 IFIDEXMEMWB addi $t2, $t2, -4 IFIDEXMEMWB bne $t2, $0,LOOP IFID

5 Question 1(cont) InstructionCC 15 CC 16 CC 17 CC 18 CC 19 CC 20 CC 21 CC 22 CC 23 CC 24 bne $t2, $0,LOOP IFID lw $t4, 200($t2) IFIDEXMEMWB add $t1, $t1, $t4 IFIDEXMEMWB addi $t2, $t2, -4 IFIDEXMEMWB bne $t2, $0,LOOP IFID

6 Question 2 Rewrite the following code with delay slot: addi $t1,$0,0 addi $t2,$0,100 LOOP:lw $t4, 200($t2) add $t1, $t1, $t4 addi $t2, $t2, -4 bne $t2, $0,LOOP

7 Question 2 Rewrite the following code with delay slot: addi $t1,$0,0 addi $t2,$0,100 LOOP:lw $t4, 200($t2) addi $t2, $t2, -4 bne $t2, $0,LOOP Delay Slot: add $t1, $t1, $t4

8 Question 2 InstructionCC 1 CC 2 CC 3 CC 4 CC 5 CC 6 CC 7 CC 8 CC 9 CC 10 CC 11 CC 12 addi $t1,$0,0 IFIDEXME M WB addi $t2,$0,10 0 IFIDEXME M WB lw $t4, 200($t2) IFIDEXME M WB addi $t2, $t2, -4 IFIDEXME M WB bne $t2, $0,LOOP IFID add $t1, $t1, $t4 IFIDEXME M WB lw $t4, 200($t2) IFIDEXME M WB

Question 3 Assume we have 10 branch outcomes as{T T T NT T T T NT NT T}, simulate the sequence on: 1-Bit predictor: (assume the original state is predict_bit =0) 2-Bit predictor: (assume the original state is predict_bit =01(weakly not taken) 9

1-Bit predictor 10 OutcomePredict bit(before ) PredictionPrediction bit (after) T0NTWrong1 T1TRight1 T1T 1 NT1TWrong0 T0NTWrong1 T1TRight1 T1T 1 NT1TWrong0 NT0 Right0 T0NTWrong1

2-Bit predictor 11 OutcomePredict bit(before ) PredictionPrediction bit (after) T01NTWrong11 T TRight11 T TRight11 NT11TWrong10 T TRight11 T TRight11 T TRight11 NT11TWrong10 NT10TWrong00 T NTWrong01