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,

Slides:



Advertisements
Similar presentations
1 ECE369 ECE369 Pipelining. 2 ECE369 “toupper” :converts any lowercase characters (with ASCII codes between 97 and 122) in the null-terminated argument.
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.
Pipeline Exceptions & ControlCSCE430/830 Pipelining in MIPS MIPS architecture was designed to be pipelined –Simple instruction format (makes IF, ID easy)
CMSC 611: Advanced Computer Architecture Pipelining Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
1 Questions For the following code sequence ADD R1, R2, R3 SHL R3, R4, R5 SUB R1, R6, R3 SUB R5, R3, R1 (a)How many potential data hazards are there? (b)
Pipelining and Control Hazards Oct
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
CIS 314 Fall 2005 MIPS Datapath (Single Cycle and Multi-Cycle)
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
1 A few words about the quiz Closed book, but you may bring in a page of handwritten notes. –You need to know what the “core” MIPS instructions do. –I.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Pipeline Hazards See: P&H Chapter 4.7.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania Computer Organization Pipelined Processor Design 1.
Chapter Six Enhancing Performance with Pipelining
Pipelining Andreas Klappenecker CPSC321 Computer Architecture.
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?
CSCE 212 Quiz 9a – 4/1/11 For the following questions, assume the clock cycle times given above and the following set of instructions: lw $5, -16($5) sw.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 17 - Pipelined.
Memory/Storage Architecture Lab Computer Architecture Pipelining Basics.
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.
Chapter 4 The Processor. Chapter 4 — The Processor — 2 Introduction We will examine two MIPS implementations A simplified version A more realistic pipelined.
1 Designing a Pipelined Processor In this Chapter, we will study 1. Pipelined datapath 2. Pipelined control 3. Data Hazards 4. Forwarding 5. Branch Hazards.
LECTURE 7 Pipelining. DATAPATH AND CONTROL We started with the single-cycle implementation, in which a single instruction is executed over a single cycle.
CSE431 L06 Basic MIPS Pipelining.1Irwin, PSU, 2005 MIPS Pipeline Datapath Modifications  What do we need to add/modify in our MIPS datapath? l State registers.
Introduction to Computer Organization Pipelining.
PROCESSOR PIPELINING YASSER MOHAMMAD. SINGLE DATAPATH DESIGN.
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.
Simulator Outline of MIPS Simulator project  Write a simulator for the MIPS five-stage pipeline that does the following: Implements a subset of.
Exam-like questions.
Computer Organization CS224
CS2100 Computer Organization
CDA3101 Recitation Section 8
Pipelining Chapter 6.
CSCI206 - Computer Organization & Programming
Basic Pipeline Datapath
Test 2 review Lectures 5-10.
Single Clock Datapath With Control
Pipeline Implementation (4.6)
CDA 3101 Spring 2016 Introduction to Computer Organization
Test 2 review Lectures 5-10.
Data Hazards and Stalls
CS 5513 Computer Architecture Pipelining Examples
Pipelining review.
Pipelining Chapter 6.
The processor: Pipelining and Branching
Computer Organization CS224
Computer Architecture
Pipelined Datapath The MIPS Example 2018/11/29
Pipelining in more detail
CSCI206 - Computer Organization & Programming
Computer Architecture
CSCI206 - Computer Organization & Programming
Data Hazards Data Hazard
The Processor Lecture 3.6: Control Hazards
Single Cycle vs. Multiple Cycle
Daxia Ge Friday February 9th, 2007
Pipelining: Basic Concepts
CS 286 Computer Architecture & Organization
Reducing pipeline hazards – three techniques
Pipelining (II).
Pipelining Chapter 6.
Appendix C Practice Problem Set 1
Morgan Kaufmann Publishers The Processor
Pipelining Chapter 6.
Guest Lecturer: Justin Hsia
CS 3853 Computer Architecture Pipelining Examples
Presentation transcript:

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, $t3, $t4 Using the following diagram for the MIPS pipeline, draw the pipeline execution diagram and show the forwarding paths needed to execute the above code while incorporating any stalls or forwarding to resolve the dependencies.  

Problem ??: (?? marks) Given the following code sequence: LW $t2, 0($t1) Label1: BEQ $t2, $t0, Label2 # Not Taken once, then Taken LW $t3, 0($t2) BEQ $t3, $t0, Label1 # Taken ADD $t1, $t3, $t1 Label2: SW $t1, 0(St2) Assume that this sequence is executed on a pipelined processor with a 5-stage MIPS pipeline using forwarding and a predict-taken branch prediction method. Draw the pipeline execution diagram for this sequence, assuming that branch instructions are resolved in the EX stage. How many clock cycles are needed to execute this sequence?   1 2 3 4 5 6 7 8 9 10 11 12 13 14 LW $t2, 0($t1) IF ID EX MEM WB BEQ $t2,$t0, Label2(NT) **** LW $t3, 0($t2) BEQ $t3, $t0, Label1(T) BEQ $t2, $t0, Label2(T) SW $t1, 0(St2)

Problem ??: (?? marks) Given the following code sequence: LW $t2, 0($t1) Label1: BEQ $t2, $t0, Label2 # Not Taken once, then Taken LW $t3, 0($t2) BEQ $t3, $t0, Label1 # Taken ADD $t1, $t3, $t1 Label2: SW $t1, 0(St2) Assume that this sequence is executed on a pipelined processor with a 5-stage MIPS pipeline using forwarding and a predict-taken branch prediction method. Draw the pipeline execution diagram for this sequence, assuming that branch instructions are resolved in the EX stage. How many clock cycles are needed to execute this sequence?   1 2 3 4 5 6 7 8 9 10 11 12 13 14 LW $t2, 0($t1) IF ID EX MEM WB BEQ $t2,$t0, Label2(NT) LW $t3, 0($t2) BEQ $t3, $t0, Label1(T) BEQ $t2, $t0, Label2(T) SW $t1, 0(St2)

Problem ??: (?? marks) Given the following code sequence: LW $t2, 0($t1) Label1: BEQ $t2, $t0, Label2 # Not Taken once, then Taken LW $t3, 0($t2) BEQ $t3, $t0, Label1 # Taken ADD $t1, $t3, $t1 Label2: SW $t1, 0(St2) Assume that this sequence is executed on a pipelined processor with a 5-stage MIPS pipeline using forwarding and a predict-taken branch prediction method. Draw the pipeline execution diagram for this sequence, assuming that branch instructions are resolved in the EX stage. How many clock cycles are needed to execute this sequence?   1 2 3 4 5 6 7 8 9 10 11 12 13 14 LW $t2, 0($t1) IF ID EX MEM WB BEQ $t2,$t0, Label2(NT) LW $t3, 0($t2) BEQ $t3, $t0, Label1(T) BEQ $t2, $t0, Label2(T) SW $t1, 0(St2)