Pipelined Datapath and Control (Lecture #13) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying Computer.

Slides:



Advertisements
Similar presentations
PipelineCSCE430/830 Pipeline: Introduction CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Prof. Yifeng Zhu, U of Maine Fall,
Advertisements

Lecture Objectives: 1)Define pipelining 2)Calculate the speedup achieved by pipelining for a given number of instructions. 3)Define how pipelining improves.
The Pipelined CPU Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University Revised 9/22/2013.
CMPT 334 Computer Organization
Goal: Describe Pipelining
MIPS Pipelined Datapath
Instructor: Senior Lecturer SOE Dan Garcia CS 61C: Great Ideas in Computer Architecture Pipelining Hazards 1.
ECE 445 – Computer Organization
Computer Organization
Mary Jane Irwin ( ) [Adapted from Computer Organization and Design,
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania Computer Organization Pipelined Processor Design 1.
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?
DLX Instruction Format
Computer ArchitectureFall 2007 © October 31, CS-447– Computer Architecture M,W 10-11:20am Lecture 17 Review.
Computer Organization Lecture Set – 06 Chapter 6 Huei-Yung Lin.
Pipelined Datapath and Control (Lecture #15) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying Computer.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 17 - Pipelined.
Morgan Kaufmann Publishers
Lecture 15: Pipelining and Hazards CS 2011 Fall 2014, Dr. Rozier.
Lecture 8: Processors, Introduction EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014,
Lecture 14: Processors CS 2011 Fall 2014, Dr. Rozier.
Pipelined Datapath and Control
Pipeline Computer Organization II 1 Pipelining Analogy Pipelined laundry: overlapping execution – Parallelism improves performance Four loads: – Speedup.
University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell CS352H: Computer Systems Architecture Topic 8: MIPS Pipelined.
Computer Organization CS224 Fall 2012 Lesson 28. Pipelining Analogy  Pipelined laundry: overlapping execution l Parallelism improves performance §4.5.
Morgan Kaufmann Publishers
Chapter 4 CSF 2009 The processor: Pipelining. Performance Issues Longest delay determines clock period – Critical path: load instruction – Instruction.
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.
Analogy: Gotta Do Laundry
CSE 340 Computer Architecture Summer 2014 Basic MIPS Pipelining Review.
CS.305 Computer Architecture Enhancing Performance with Pipelining Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from.
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.
ECE 445 – Computer Organization
CSCI 6307 Foundation of Systems Review: Midterm Exam Xiang Lian The University of Texas – Pan American Edinburg, TX 78539
Sogang University Advanced Computing System Chap 2. Processor Technology Hyuk-Jun Lee, PhD Dept. of Computer Science and Engineering Sogang University.
CSIE30300 Computer Architecture Unit 04: Basic MIPS Pipelining Hsin-Chou Chi [Adapted from material by and
Oct. 18, 2000Machine Organization1 Machine Organization (CS 570) Lecture 4: Pipelining * Jeremy R. Johnson Wed. Oct. 18, 2000 *This lecture was derived.
CMSC 611: Advanced Computer Architecture Pipelining Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
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.
C OMPUTER O RGANIZATION AND D ESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor.
1. Convert the RISCEE 1 Architecture into a pipeline Architecture (like Figure 6.30) (showing the number data and control bits). 2. Build the control line.
Introduction to Computer Organization Pipelining.
Lecture 9. MIPS Processor Design – Pipelined Processor Design #1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System.
CMSC 611: Advanced Computer Architecture Pipelining Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
CS203 – Advanced Computer Architecture Pipelining Review.
Pipelines An overview of pipelining
Morgan Kaufmann Publishers
CMSC 611: Advanced Computer Architecture
Morgan Kaufmann Publishers The Processor
Single Clock Datapath With Control
Pipeline Implementation (4.6)
CDA 3101 Spring 2016 Introduction to Computer Organization
Morgan Kaufmann Publishers The Processor
Morgan Kaufmann Publishers The Processor
Chapter 4 The Processor Part 2
Morgan Kaufmann Publishers Enhancing Performance with Pipelining
Lecturer: Alan Christopher
Serial versus Pipelined Execution
Systems Architecture II
Rocky K. C. Chang 6 November 2017
The Processor Lecture 3.4: Pipelining Datapath and Control
CS203 – Advanced Computer Architecture
Pipelining: Basic Concepts
Morgan Kaufmann Publishers The Processor
MIPS Pipelined Datapath
Pipelining.
Presentation transcript:

Pipelined Datapath and Control (Lecture #13) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying Computer Organization and Design, 4 th Edition, by Patterson and Hennessey, and were used with permission from Morgan Kaufmann Publishers.

Fall 2010ECE Computer Organization2 Material to be covered... Chapter 4: Sections 5 – 9, 13 – 14

Fall 2010ECE Computer Organization3 Performance of the Single-Cycle MIPS

Fall 2010ECE Computer Organization4

Fall 2010ECE Computer Organization5 Example: MIPS Clock Rate Determine the clock rate for the MIPS architecture, assuming the following:  The MIPS is a Single Cycle Machine 1 clock cycle per instruction CPI = 1  Access time for memory units = 200 ps  Operation time for ALU and adders = 100 ps  Access time for register file = 50 ps

Fall 2010ECE Computer Organization6 Example: MIPS Clock Rate Instruction ClassFunctional Units used by the Instruction Class ALU InstructionInst. FetchRegisterALURegister Load WordInst. FetchRegisterALUMemoryRegister Store WordInst. FetchRegisterALUMemory BranchInst. FetchRegisterALU JumpInst. Fetch

Fall 2010ECE Computer Organization7 Example: MIPS Clock Rate Instruction ClassInstr Memory Register read ALU operation Data Memory Register write Total ALU Instruction ps Load Word ps Store Word ps Branch ps Jump ps

Fall 2010ECE Computer Organization8 Example: MIPS Clock Rate The clock cycle time for a machine with a single clock cycle per instruction will be determined by the longest instruction.  In this example, the load word instruction requires 600 ps. The clock rate is then Clock rate = 1 / Clock Cycle Time Clock rate = 1 / 600 ps = 1.67 GHz

Fall 2010ECE Computer Organization9 Performance Issues Longest delay determines clock period  Critical path: load word (lw) instruction  Instruction memory  register file  ALU  data memory  register file Not feasible to vary clock period for different instructions Violates design principle  Making the common case fast Improve performance by pipelining

Fall 2010ECE Computer Organization10 How does pipelining work?

Fall 2010ECE Computer Organization11 Pipelining Analogy Pipelined laundry: overlapping execution  Parallelism improves performance §4.5 An Overview of Pipelining Four loads: Speedup = 8/3.5 = 2.3 Non-stop: Speedup = 2n/0.5n ≈ 4 = number of stages

Fall 2010ECE Computer Organization12 Objective: Keep all stages of the pipeline busy at all times.

Fall 2010ECE Computer Organization13 Pipelining: Improving Performance LatencyMax. Throughput Non-Pipelined2 hours0.5 Pipelined2 hours2 Latency = time from start of one load to the end of same load. Maximum Throughput = # of loads completed per hour. Assuming all stages of pipeline are busy at all times. Length of time for each load does not change.

Fall 2010ECE Computer Organization14 Pipelining: Improving Performance Pipelining improves performance by increasing instruction throughput, rather than decreasing execution time of an individual instruction.

Fall 2010ECE Computer Organization15 The MIPS Pipeline

Fall 2010ECE Computer Organization16 MIPS Pipeline Five stages, one step per stage – IF: Instruction fetch from memory – ID: Instruction decode & register read – EX: Execute operation or calculate address – MEM: Access memory operand – WB: Write result back to register

Fall 2010ECE Computer Organization17 MIPS Pipeline

Fall 2010ECE Computer Organization18 Pipeline Performance Assume time for stages is  100ps for register read or write  200ps for other stages Compare pipelined datapath with single-cycle datapath InstrInstr fetchRegister read ALU opMemory access Register write Total time lw200ps100 ps200ps 100 ps800ps sw200ps100 ps200ps 700ps R-format200ps100 ps200ps100 ps600ps beq200ps100 ps200ps500ps

Fall 2010ECE Computer Organization19 Pipeline Performance Single-cycle (T c = 800ps) Pipelined (T c = 200ps) Why is the clock period 800ps? Why is the clock period 200ps?

Fall 2010ECE Computer Organization20 Pipeline Speedup If all stages are balanced  i.e., all take the same time  Time between instructions pipelined = Time between instructions nonpipelined Number of stages If not balanced, speedup is less Speedup due to increased throughput  Latency (time for each instruction) does not decrease

Fall 2010ECE Computer Organization21 Pipelining and ISA Design MIPS ISA designed for pipelining  All instructions are 32-bits Easier to fetch and decode in one cycle c.f. x86: 1- to 17-byte instructions  Few and regular instruction formats Can decode and read registers in one step  Load/store addressing Can calculate address in 3 rd stage, access memory in 4 th stage  Alignment of memory operands i.e. on word boundaries Memory access takes only one cycle

Fall 2010ECE Computer Organization22 Pipeline Summary Pipelining improves performance by increasing instruction throughput  Executes multiple instructions in parallel  Each instruction has the same latency Subject to hazards  Structure, data, control Instruction set design affects complexity of pipeline implementation The BIG Picture hazards will be discussed in upcoming lectures

Fall 2010ECE Computer Organization23 MIPS Pipelined Datapath §4.6 Pipelined Datapath and Control

Fall 2010ECE Computer Organization24 Pipeline registers Need registers between stages  To hold information produced in previous cycle Why?

Fall 2010ECE Computer Organization25 Pipeline Operation Cycle-by-cycle flow of instructions through the pipelined datapath  “Single-clock-cycle” pipeline diagram Shows pipeline usage in a single cycle Highlight resources used  “Multi-clock-cycle” diagram Graph of operation over time We’ll look at “single-clock-cycle” diagrams for load word and store word.

Fall 2010ECE Computer Organization26 IF for Load, Store, …

Fall 2010ECE Computer Organization27 ID for Load, Store, …

Fall 2010ECE Computer Organization28 EX for Load

Fall 2010ECE Computer Organization29 MEM for Load

Fall 2010ECE Computer Organization30 WB for Load Wrong register number Why?

Fall 2010ECE Computer Organization31 Corrected Datapath for Load

Fall 2010ECE Computer Organization32 EX for Store

Fall 2010ECE Computer Organization33 MEM for Store

Fall 2010ECE Computer Organization34 WB for Store

Fall 2010ECE Computer Organization35 Multi-Cycle Pipeline Diagram Form showing resource usage

Fall 2010ECE Computer Organization36 Multi-Cycle Pipeline Diagram Traditional form

Fall 2010ECE Computer Organization37 Single-Cycle Pipeline Diagram State of pipeline in a given cycle

Fall 2010ECE Computer Organization38 Questions?