EE204 L12-Single Cycle DP PerformanceHina Anwar Khan 20111 EE204 Computer Architecture Single Cycle Data path Performance.

Slides:



Advertisements
Similar presentations
Adding the Jump Instruction
Advertisements

1 Chapter Five The Processor: Datapath and Control.
CS-447– Computer Architecture Lecture 12 Multiple Cycle Datapath
The Processor: Datapath & Control
The Processor Data Path & Control Chapter 5 Part 2 - Multi-Clock Cycle Design N. Guydosh 2/29/04.
Chapter 5 The Processor: Datapath and Control Basic MIPS Architecture Homework 2 due October 28 th. Project Designs due October 28 th. Project Reports.
CSE378 Multicycle impl,.1 Drawbacks of single cycle implementation All instructions take the same time although –some instructions are longer than others;
1 5.5 A Multicycle Implementation A single memory unit is used for both instructions and data. There is a single ALU, rather than an ALU and two adders.
1 COMP541 Sequencing – III (Sequencing a Computer) Montek Singh April 9, 2007.
Fall 2007 MIPS Datapath (Single Cycle and Multi-Cycle)
Lec 17 Nov 2 Chapter 4 – CPU design data path design control logic design single-cycle CPU performance limitations of single cycle CPU multi-cycle CPU.
Computer ArchitectureFall 2007 © October 3rd, 2007 Majd F. Sakr CS-447– Computer Architecture.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
Computer Structure - Datapath and Control Goal: Design a Datapath  We will design the datapath of a processor that includes a subset of the MIPS instruction.
1 Chapter 5: Datapath and Control (Part 3) CS 447 Jason Bakos.
Lecture 16: Basic CPU Design
Shift Instructions (1/4)
331 W10.1Spring :332:331 Computer Architecture and Assembly Language Spring 2005 Week 10 Building a Multi-Cycle Datapath [Adapted from Dave Patterson’s.
1 The Processor: Datapath and Control We will design a microprocessor that includes a subset of the MIPS instruction set: –Memory access: load/store word.
Datapath and Control Andreas Klappenecker CPSC321 Computer Architecture.
CSE431 L05 Basic MIPS Architecture.1Irwin, PSU, 2005 CSE 431 Computer Architecture Fall 2005 Lecture 05: Basic MIPS Architecture Review Mary Jane Irwin.
Lecture 24: CPU Design Today’s topic –Multi-Cycle ALU –Introduction to Pipelining 1.
1. 2 Multicycle Datapath  As an added bonus, we can eliminate some of the extra hardware from the single-cycle datapath. —We will restrict ourselves.
Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Chapter 4 Sections 4.1 – 4.4 Appendix D.1 and D.2 Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
Computing Systems The Processor: Datapath and Control.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Chapter 4 CSF 2009 The processor: Building the datapath.
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
Datapath and Control: MultiCycle Implementation. Performance of Single Cycle Machines °Assume following operation times: Memory units : 200 ps ALU and.
1 COMP541 Multicycle MIPS Montek Singh Apr 4, 2012.
COMP541 Multicycle MIPS Montek Singh Apr 8, 2015.
CPE232 Basic MIPS Architecture1 Computer Organization Multi-cycle Approach Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides
1 CS/COE0447 Computer Organization & Assembly Language Multi-Cycle Execution.
ECE 445 – Computer Organization
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /19/2013 Lecture 17: The Processor - Overview Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
CDA 3101 Fall 2013 Introduction to Computer Organization
CDA 3101 Fall 2013 Introduction to Computer Organization Multicycle Datapath 9 October 2013.
Gary MarsdenSlide 1University of Cape Town Stages.
1 A single-cycle MIPS processor  An instruction set architecture is an interface that defines the hardware operations which are available to software.
1 Processor: Datapath and Control Single cycle processor –Datapath and Control Multicycle processor –Datapath and Control Microprogramming –Vertical and.
COMP541 Multicycle MIPS Montek Singh Mar 25, 2010.
IT 251 Computer Organization and Architecture Multi Cycle CPU Datapath Chia-Chi Teng.
CPU Overview Computer Organization II 1 February 2009 © McQuain & Ribbens Introduction CPU performance factors – Instruction count n Determined.
LECTURE 6 Multi-Cycle Datapath and Control. SINGLE-CYCLE IMPLEMENTATION As we’ve seen, single-cycle implementation, although easy to implement, could.
ECE-C355 Computer Structures Winter 2008 The MIPS Datapath Slides have been adapted from Prof. Mary Jane Irwin ( )
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
Elements of Datapath for the fetch and increment The first element we need: a memory unit to store the instructions of a program and supply instructions.
1  1998 Morgan Kaufmann Publishers Simple Implementation Include the functional units we need for each instruction Why do we need this stuff?
COM181 Computer Hardware Lecture 6: The MIPs CPU.
Adapted from Computer Organization and Design, Patterson & Hennessy, UCB ECE232: Hardware Organization and Design Part 10: Control Design
MIPS Processor.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
1 The final datapath. 2 Control  The control unit is responsible for setting all the control signals so that each instruction is executed properly. —The.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Multi-Cycle Datapath and Control
IT 251 Computer Organization and Architecture
Multiple Cycle Implementation of MIPS-Lite CPU
A Multiple Clock Cycle Instruction Implementation
Vishwani D. Agrawal James J. Danaher Professor
Systems Architecture I
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Processor: Multi-Cycle Datapath & Control
Chapter Four The Processor: Datapath and Control
5.5 A Multicycle Implementation
The Processor: Datapath & Control.
Processor: Datapath and Control
CS161 – Design and Architecture of Computer Systems
Presentation transcript:

EE204 L12-Single Cycle DP PerformanceHina Anwar Khan EE204 Computer Architecture Single Cycle Data path Performance

Hina Anwar Khan Spring EE204 L12-Single Cycle DP Performance Performance of Single-Cycle Machines Let's assume that the operation time for the following units is: Memory - 2 nanoseconds (ns), ALU and adders - 2 ns, Register file - 1 ns. We will assume that MUXs, control, sign-extension, PC accesses, and wires have no delays. Which implementation is faster? 1. Every instruction operates in 1 clock cycle of fixed length. 2. Every instruction operates in a varying length clock cycle. Lets look at the time needed by each instruction: Inst. Fetch Reg. Rd ALU op Memory Reg. Wr Total R-Type ns Load ns Store ns Branch ns Jump 2 2ns

Hina Anwar Khan Spring EE204 L12-Single Cycle DP Performance Fixed vs. Variable Cycle Length Lets Assume a program has the following instruction mix: 24% loads, 12% stores, 44% R-type, 18% branches, 2% jumps. For the fixed cycle length the cycle time is 8 ns, long enough for the longest instruction (load). Thus each instruction takes 8 ns to execute. For the variable cycle time the average CPU clock cycle is: 8*24% + 7*12% + 6*44% + 5*18% + 2*2% = 6.3 ns It is obvious that the variable clock implementation is faster but it is extremely hard to implement. Variable clock implementation is 8/6.3 = 1.27 times faster When adding instructions such as multiply and divide which can take tens of cycles this scheme is too slow.

Hina Anwar Khan Spring EE204 L12-Single Cycle DP Performance Observations on the Single Cycle Design The single-cycle datapath is straightforward, but...  It has to use 3 separate ALU’s  It has separate Instruction and Data memories  Cycle time is determined by worst-case path A multi-cycle datapath might be better  We can reuse some of the hardware  We can combine the memories  Cycle time is still constant, but instructions may take differing numbers of cycles

Hina Anwar Khan Spring EE204 L12-Single Cycle DP Performance Multi-Cycle Implementation  Each step in execution = 1 clock  Each Instruction of different clock cycles  Functional unit can be used more than once per instruction as long as it is used on different clock cycles  Reduce and Share Hardware units

Hina Anwar Khan Spring EE204 L12-Single Cycle DP Performance Multicycle Datapath Single Instruction & Data Memory Single ALU Registers

Hina Anwar Khan Spring EE204 L12-Single Cycle DP Performance Multicycle Execution Instruction Register(IR)  Holds instruction until end of execution Memory Data Register(MDR) A Register B Register ALUOut Register

Hina Anwar Khan Spring EE204 L12-Single Cycle DP Performance Multicycle Datapath Inst/Data Memory InstructionAddress Data Address Register Block ALU Arithmetic/ branch Instruction lw/sw Instruction PC = PC +4 Branch target address

Hina Anwar Khan Spring EE204 L12-Single Cycle DP Performance Multicycle Datapath

Hina Anwar Khan Spring EE204 L12-Single Cycle DP Performance MultiCycle Datapath & Control Signals

Hina Anwar Khan Spring EE204 L12-Single Cycle DP Performance One Single ALU One single ALU is used to perform all of the necessary functions:  An arithmetic operation on two register operands  Add a register to a sign-extended constant, for computing memory addresses in lw/sw instructions  Compute PC+4 to increment the PC  Add a sign-extended, shifted offset to (PC+4) for branches

Hina Anwar Khan Spring EE204 L12-Single Cycle DP Performance Implications of Shared Functional Units Need to add multiplexors or expand existing multiplexors  e.g. Memory unit now contains both instructions (address in PC) and data (address in ALUOut)  e.g. ALU now must accommodate all inputs from previous ALU and adders.

Hina Anwar Khan Spring EE204 L12-Single Cycle DP Performance Two extra multiplexers To enable all the actions listed for the ALU, two extra multiplexers are needed  A 2-to-1 mux, ALUsrcA, selects whether the first ALU input is the PC or a register  A 4-to-1 mux, ALUSrcB, selects the 2nd input from among the register file a constant 4 a sign-extended constant, and a sign-extended and shifted constant

Hina Anwar Khan Spring EE204 L12-Single Cycle DP Performance One single memory One single memory is used in both the instruction fetch and data access stages. The address for this memory may come from:  the PC register, when fetching an instruction  the ALU output, when doing a lw/sw instruction and need the effective memory address. => add a 2-to-1 mux, IorD, to select whether the memory is being accessed for instructions or for data.