Pipeline Computer Organization II 1 Pipelining Analogy Pipelined laundry: overlapping execution – Parallelism improves performance Four loads: – Speedup.

Slides:



Advertisements
Similar presentations
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
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
Chapter Six 1.
Instructor: Justin Hsia
Instructor: Senior Lecturer SOE Dan Garcia CS 61C: Great Ideas in Computer Architecture Pipelining Hazards 1.
Pipelined Datapath and Control (Lecture #13) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying Computer.
Pipelining II Andreas Klappenecker CPSC321 Computer Architecture.
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.
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?
Pipelined Processor II CPSC 321 Andreas Klappenecker.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 17 - Pipelined.
Morgan Kaufmann Publishers
CS 61C: Great Ideas in Computer Architecture (Machine Structures) Pipelining Instructors: Krste Asanovic & Vladimir Stojanovic
9.2 Pipelining Suppose we want to perform the combined multiply and add operations with a stream of numbers: A i * B i + C i for i =1,2,3,…,7.
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.
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.
1 COMP541 Multicycle MIPS Montek Singh Apr 4, 2012.
Morgan Kaufmann Publishers
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.
Analogy: Gotta Do Laundry
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.
CDA 3101 Fall 2013 Introduction to Computer Organization Multicycle Datapath 9 October 2013.
CS 61C: Great Ideas in Computer Architecture Pipelining & Hazards 1 Instructors: John Wawrzynek & Vladimir Stojanovic
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.
ECE 15B Computer Organization Spring 2011 Dmitri Strukov Partially adapted from Computer Organization and Design, 4 th edition, Patterson and Hennessy,
COMP541 Multicycle MIPS Montek Singh Mar 25, 2010.
Oct. 18, 2000Machine Organization1 Machine Organization (CS 570) Lecture 4: Pipelining * Jeremy R. Johnson Wed. Oct. 18, 2000 *This lecture was derived.
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.
Pipelining Intro Computer Organization 1 Computer Science Dept Va Tech January 2006 ©2006 McQuain & Ribbens Basic Instruction Timings Making some assumptions.
CS203 – Advanced Computer Architecture Pipelining Review.
Lecture 5. MIPS Processor Design Pipelined MIPS #1 Prof. Taeweon Suh Computer Science & Engineering Korea University COSE222, COMP212 Computer Architecture.
Computer Organization
Pipelining Chapter 6.
Morgan Kaufmann Publishers
Morgan Kaufmann Publishers The Processor
Single Clock Datapath With Control
Pipeline Implementation (4.6)
CSCI206 - Computer Organization & Programming
CDA 3101 Spring 2016 Introduction to Computer Organization
The fetch-execute cycle
Chapter 4 The Processor Part 2
CSCI206 - Computer Organization & Programming
Morgan Kaufmann Publishers Enhancing Performance with Pipelining
Lecturer: Alan Christopher
Figure 8.1 Architecture of a Simple Computer System.
The Processor Lecture 3.4: Pipelining Datapath and Control
Pipelining Chapter 6.
Pipelining: Basic Concepts
Pipelining Chapter 6.
Morgan Kaufmann Publishers The Processor
Pipelining Chapter 6.
Guest Lecturer: Justin Hsia
Pipelining.
Presentation transcript:

Pipeline Computer Organization II 1 Pipelining Analogy Pipelined laundry: overlapping execution – Parallelism improves performance Four loads: – Speedup = 8/3.5 = 2.3 Non-stop: – Speedup = 2n/(0.5n + 1.5) ≈ 4 = number of stages

Pipeline Computer Organization II 2 Basic Idea What if we think of the simple datapath as a linear sequence of stages? Can we operate the stages independently, using an earlier one to begin the next instruction before the previous one has completed? We have 5 stages, which will mean that on any given cycle up to 5 different instructions will be in various points of execution.

Pipeline Computer Organization II 3 MIPS 5-stage Pipeline StageActionsFor IFInstruction fetch from memoryall IDInstruction decode & register readdecode for all EXExecute operation or calculate addressall but j MEMAccess memory operand lw, sw WBWrite result back to register lw, R-type

Pipeline Computer Organization II 4 Timing Assumptions Assume time for stages is – 100ps for register read or write – 200ps for other stages InstrInstr fetchRegister readALU opMemory accessRegister writeTotal time lw200ps100 ps200ps 100 ps800ps sw200ps100 ps200ps 700ps R-format200ps100 ps200ps100 ps600ps beq200ps100 ps200ps500ps QTP: how does j fit in here?

Pipeline Computer Organization II 5 Pipeline Timing Details Each stage is allotted 200ps, and so that is the cycle time. That leads to "gaps" in stages 2 and 5: We stipulate that register writes take place in the first half of a cycle and that register reads take place in the second half of a cycle. Why?

Pipeline Computer Organization II 6 Non-pipelined Performance Single-cycle (T c = 800ps) Total time to execute 3 instructions would be 2400 ps. Total time to execute N instructions would be 800N ps.

Pipeline Computer Organization II 7 Pipelined Performance Pipelined (T c = 200ps) Total time to execute 3 instructions would be 1400 ps. Total time to execute N instructions would be N ps. Speedup would be 2400/1400 or about 1.7. Speedup would be 800N/( N) or about 4 for large N.

Pipeline Computer Organization II 8 Pipeline Speedup If all stages are balanced (i.e., all take the same time): If not balanced, speedup is less Speedup is due to increased throughput – Latency (time for each instruction) does not decrease – In fact… Note: the goal here is to improve overall performance, which is often not the same as optimizing the performance of any particular operation.

Pipeline Computer Organization II 9 Pipelining and ISA Design MIPS ISA designed for pipelining – All instructions are 32-bits n Easier to fetch and decode in one cycle n c.f. x86: 1- to 17-byte instructions – Few and regular instruction formats n Can decode and read registers in one step – Load/store addressing n Can calculate address in 3 rd stage, access memory in 4 th stage – Alignment of memory operands n Memory access takes only one cycle add 4($t0), 12($t1), -8($t2)