Single Cycle vs. Multiple Cycle

Slides:



Advertisements
Similar presentations
CMPE 421 Advanced Parallel Computer Architecture Pipeline datapath and Control.
Advertisements

PipelineCSCE430/830 Pipeline: Introduction CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Prof. Yifeng Zhu, U of Maine Fall,
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
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
Pipelining I (1) Fall 2005 Lecture 18: Pipelining I.
Pipelined Datapath and Control (Lecture #13) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying Computer.
CS-447– Computer Architecture Lecture 12 Multiple Cycle Datapath
Mary Jane Irwin ( ) [Adapted from Computer Organization and Design,
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
1 Recap (Pipelining). 2 What is Pipelining? A way of speeding up execution of tasks Key idea : overlap execution of multiple taks.
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?
Computer ArchitectureFall 2007 © October 22nd, 2007 Majd F. Sakr CS-447– Computer Architecture.
Computer ArchitectureFall 2007 © October 31, CS-447– Computer Architecture M,W 10-11:20am Lecture 17 Review.
Computer ArchitectureFall 2008 © October 6th, 2008 Majd F. Sakr CS-447– Computer Architecture.
CMPE 421 Advanced Computer Architecture Supplementary material for Pipelining PART1.
Chapter 2 Summary Classification of architectures Features that are relatively independent of instruction sets “Different” Processors –DSP and media processors.
B 0000 Pipelining ENGR xD52 Eric VanWyk Fall
Morgan Kaufmann Publishers
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.
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.
Computer Organization CS224 Chapter 4 Part b The Processor Spring 2010 With thanks to M.J. Irwin, T. Fountain, D. Patterson, and J. Hennessy for some lecture.
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.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
CECS 440 Pipelining.1(c) 2014 – R. W. Allison [slides adapted from D. Patterson slides with additional credits to M.J. Irwin]
CSIE30300 Computer Architecture Unit 04: Basic MIPS Pipelining Hsin-Chou Chi [Adapted from material by and
Pipelining Example Laundry Example: Three Stages
Pipelining CS365 Lecture 9. D. Barbara Pipeline CS465 2 Outline  Today’s topic  Pipelining is an implementation technique in which multiple instructions.
EE524/CptS561 Jose G. Delgado-Frias 1 Processor Basic steps to process an instruction IFID/OFEXMEMWB Instruction Fetch Instruction Decode / Operand Fetch.
11 Pipelining Kosarev Nikolay MIPT Oct, Pipelining Implementation technique whereby multiple instructions are overlapped in execution Each pipeline.
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.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Lecture 18: Pipelining I.
Computer Organization
Exceptions Another form of control hazard Could be caused by…
Pipelines An overview of pipelining
Morgan Kaufmann Publishers
Performance of Single-cycle Design
Basic Pipeline Datapath
Pipelining.
Single Clock Datapath With Control
Pipeline Implementation (4.6)
ECE232: Hardware Organization and Design
CDA 3101 Spring 2016 Introduction to Computer Organization
ECE232: Hardware Organization and Design
Pipelining.
Chapter 4 The Processor Part 2
A pipeline diagram Clock cycle lw $t0, 4($sp) IF ID
Lecturer: Alan Christopher
Pipelined Datapath The MIPS Example 2018/11/29
Serial versus Pipelined Execution
CSCI206 - Computer Organization & Programming
Computer Architecture
The Processor Lecture 3.4: Pipelining Datapath and Control
Designing a Pipelined CPU
Pipelining: Basic Concepts
Pipelining.
Pipelining Appendix A and Chapter 3.
Morgan Kaufmann Publishers The Processor
Guest Lecturer: Justin Hsia
A relevant question Assuming you’ve got: One washer (takes 30 minutes)
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,
Pipelining.
Pipelined datapath and control
Need to stall for one cycle.
Presentation transcript:

Single Cycle vs. Multiple Cycle Clk Single Cycle Implementation: lw sw Waste Cycle 1 Cycle 2 Multiple Cycle Implementation: Clk Cycle 1 IF ID EX MEM WB Cycle 2 Cycle 3 Cycle 4 Cycle 5 Cycle 6 Cycle 7 Cycle 8 Cycle 9 Cycle 10 lw sw R-type

General Definitions Latency: time to completely execute a certain task E.g., time to read a sector from disk is disk access time or disk latency Throughput: amount of work that can be done over a period of time

A Pipelined MIPS Processor Start the next instruction before the current one has completed improves throughput instruction latency is not reduced clock cycle (pipeline stage time) limited by slowest stage for some instructions, some stages are wasted cycles Cycle 1 Cycle 2 Cycle 3 Cycle 4 Cycle 5 Cycle 6 Cycle 7 Cycle 8 lw IF ID EX MEM WB sw IF ID EX MEM WB R-type IF ID EX MEM WB

Single Cycle vs. Multiple Cycle vs. Pipelined Clk Single Cycle Implementation: lw sw Waste Cycle 1 Cycle 2 Multiple Cycle Implementation: Clk Cycle 1 IF ID EX MEM WB Cycle 2 Cycle 3 Cycle 4 Cycle 5 Cycle 6 Cycle 7 Cycle 8 Cycle 9 Cycle 10 lw sw R-type lw IF ID EX MEM WB Pipeline Implementation: sw R-type

Theoretical Performance An ideal pipeline divides a task into k independent sequential subtasks Each subtask requires 1 time unit to complete The task itself requires k time units to complete For n iterations of task, the execution times: With no pipelining: nk time units With pipelining: k + (n-1) time units Speedup of a k-stage pipeline is S = nk / [k+(n-1)] ==> k (for large n)

Simplified MIPS Pipelined Datapath Why are we duplicating some functional units? Can you foresee any problems with these right-to-left flows?

Pipeline registers Need registers between stages To hold information produced in previous cycle

IF

ID

EX for Load

MEM for Load

WB for Load There is a BUG here Wrong register number

Corrected Datapath for Load