Pipelining: Basic Concepts

Slides:



Advertisements
Similar presentations
Lecture 4: CPU Performance
Advertisements

Pipeline Exceptions & ControlCSCE430/830 Pipelining in MIPS MIPS architecture was designed to be pipelined –Simple instruction format (makes IF, ID easy)
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.
S. Barua – CPSC 440 CHAPTER 6 ENHANCING PERFORMANCE WITH PIPELINING This chapter presents pipelining.
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?
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.
Chapter 4 CSF 2009 The processor: Pipelining. Performance Issues Longest delay determines clock period – Critical path: load instruction – Instruction.
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.
Chapter 4 The Processor CprE 381 Computer Organization and Assembly Level Programming, Fall 2012 Revised from original slides provided by MKP.
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.
Exam-like questions.
Pipeline Timing Issues
CS2100 Computer Organization
CDA3101 Recitation Section 8
Pipelining Chapter 6.
CSCI206 - Computer Organization & Programming
Morgan Kaufmann Publishers
Performance of Single-cycle Design
ELEN 468 Advanced Logic Design
Basic Pipeline Datapath
Pipelining.
Single Clock Datapath With Control
Pipeline Implementation (4.6)
CDA 3101 Spring 2016 Introduction to Computer Organization
Pipelining.
Pipelining: Advanced ILP
Morgan Kaufmann Publishers The Processor
Chapter 4 The Processor Part 2
Pipelining review.
Pipelining Chapter 6.
The processor: Pipelining and Branching
Morgan Kaufmann Publishers Enhancing Performance with Pipelining
Lecturer: Alan Christopher
Computer Architecture
Serial versus Pipelined Execution
Pipelining in more detail
CSCI206 - Computer Organization & Programming
CSC 4250 Computer Architectures
Computer Architecture
CSCI206 - Computer Organization & Programming
Data Hazards Data Hazard
Pipelining Chapter 6.
Single Cycle vs. Multiple Cycle
Systems Architecture I
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
CS203 – Advanced Computer Architecture
Reducing pipeline hazards – three techniques
Pipelining Chapter 6.
Data Path Diagrams.
Morgan Kaufmann Publishers The Processor
Introduction to Computer Organization and Architecture
Pipelining Chapter 6.
Systems Architecture II
Guest Lecturer: Justin Hsia
MIPS Pipelined Datapath
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,
Presentation transcript:

Pipelining: Basic Concepts

1.1 Basic Concepts Consider a task that can be divided into k subtasks The k subtasks are executed on k different stages Each subtask requires one time unit The total execution time of the task is k time units Pipelining is to overlap the execution The k stages work in parallel on k different tasks Tasks enter/leave pipeline at the rate of one task per time unit

1.2 Synchronous Pipeline Uses clocked registers between stages Upon arrival of a clock edge … All registers hold the results of previous stages simultaneously The pipeline stages are combinational logic circuits It is desirable to have balanced stages Approximately equal delay in all stages Clock period is determined by the maximum stage delay

1.3 Pipeline Performance  

Pipeline Performance (continue) The University of Adelaide, School of Computer Science 6 April 2019 Pipeline Performance (continue) Introduction Compare Single-Cycle, Multi-Cycle, Versus Pipelined Performance: Example: Single-Cycle, Multi-Cycle, Versus Pipelined performance Consider a 5-stage instruction execution pipeline. The operation time are: 200 ps for Memory 200 ps for ALU 150 ps for Register (read and write) Compare Single-Cycle, Multi-Cycle, Versus Pipelined performance assuming: 20% load, 10% store, 40% ALU ,and 30% branch. Instruction class Instruction fetch Register read ALU operation Data access Register write Total time Load word (lw) 200 ps 150 ps 900 ps Store word (sw) 750 ps R-format 700 ps Branch (beq) 550 ps Chapter 2 — Instructions: Language of the Computer

(continue)  

(continue)  

More Examples 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.  

More Examples 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)