Drawbacks of single cycle implementation

Slides:



Advertisements
Similar presentations
The Fetch – Execute Cycle
Advertisements

Central Processing Unit
Adding the Jump Instruction
Multicycle Datapath & Control Andreas Klappenecker CPSC321 Computer Architecture.
1  1998 Morgan Kaufmann Publishers We will be reusing functional units –ALU used to compute address and to increment PC –Memory used for instruction and.
CS-447– Computer Architecture Lecture 12 Multiple Cycle Datapath
L14 – Control & Execution 1 Comp 411 – Fall /04/09 Control & Execution Finite State Machines for Control MIPS Execution.
The Processor Data Path & Control Chapter 5 Part 2 - Multi-Clock Cycle Design N. Guydosh 2/29/04.
VHDL Development for ELEC7770 VLSI Project Chris Erickson Graduate Student Department of Electrical and Computer Engineering Auburn University, Auburn,
CSE378 Multicycle impl,.1 Drawbacks of single cycle implementation All instructions take the same time although –some instructions are longer than others;
10/26/2004Comp 120 Fall October Only 11 to go! Questions? Today Exam Review and Instruction Execution.
Levels in Processor Design
Fall 2007 MIPS Datapath (Single Cycle and Multi-Cycle)
10/18/2005Comp 120 Fall October Questions? Instruction Execution.
L15 – Control & Execution 1 Comp 411 – Spring /25/08 Control & Execution Finite State Machines for Control MIPS Execution.
331 W10.1Spring :332:331 Computer Architecture and Assembly Language Spring 2005 Week 10 Building a Multi-Cycle Datapath [Adapted from Dave Patterson’s.
CPU Architecture Why not single cycle? Why not single cycle? Hardware complexity Hardware complexity Why not pipelined? Why not pipelined? Time constraints.
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
1  1998 Morgan Kaufmann Publishers CH5 Datapath review.
The Multicycle Processor CPSC 321 Andreas Klappenecker.
CSE378 Pipelining1 Pipelining Basic concept of assembly line –Split a job A into n sequential subjobs (A 1,A 2,…,A n ) with each A i taking approximately.
EECS 322: Computer Architecture
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.
CDA 3101 Fall 2013 Introduction to Computer Organization Multicycle Datapath 9 October 2013.
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
Multicycle datapath.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3 In-Class Exercises.
Multi-Cycle Datapath and Control
CS161 – Design and Architecture of Computer Systems
Control & Execution Finite State Machines for Control MIPS Execution.
Introduction CPU performance factors
Systems Architecture I
Five Execution Steps Instruction Fetch
MIPS Instructions.
CS/COE0447 Computer Organization & Assembly Language
Multiple Cycle Implementation of MIPS-Lite CPU
Control & Execution Finite State Machines for Control MIPS Execution.
CS/COE0447 Computer Organization & Assembly Language
CSCE 212 Chapter 5 The Processor: Datapath and Control
Chapter Five The Processor: Datapath and Control
Multicycle Approach Break up the instructions into steps
The Multicycle Implementation
CS/COE0447 Computer Organization & Assembly Language
Topic 6 LC-3.
Chapter Five The Processor: Datapath and Control
Drawbacks of single cycle implementation
Pipelining Basic concept of assembly line
The Multicycle Implementation
Systems Architecture I
Multicycle Approach We will be reusing functional units
October 24 Programming problems? Read Section 6.1 for November 5
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Processor: Multi-Cycle Datapath & Control
Control Unit (single cycle implementation)
Multicycle Design.
CS/COE0447 Computer Organization & Assembly Language
Multi-Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
Chapter Four The Processor: Datapath and Control
Pipeline Control unit (highly abstracted)
Control Unit for Multiple Cycle Implementation
5.5 A Multicycle Implementation
Drawbacks of single cycle implementation
Systems Architecture I
Control Unit for Multiple Cycle Implementation
FloorPlan for Multicycle MIPS
Control Unit (single cycle implementation)
CS161 – Design and Architecture of Computer Systems
Presentation transcript:

Drawbacks of single cycle implementation All instructions take the same time although some instructions are longer than others; e.g. load is longer than add since it has to access data memory in addition to all the other steps that add does thus the “cycle” has to be for the “longest path” Some combinational units must be replicated since used in the same cycle e.g., ALU for computing branch address and ALU for computing branch outcome but this is no big deal 5/2/2019 CSE378 Multicycle impl,.

Alternative to single cycle Have a shorter cycle and instructions execute in multiple (shorter) cycles The (shorter) cycle time determined by the longest delay in individual functional units (e.g., memory or ALU etc.) Possibility to streamline some resources since they will be used at different cycles Since there is need to keep information “between cycles”, we’ll need to add some stable storage (registers) not visible at the ISA level Not all instructions will require the same number of cycles 5/2/2019 CSE378 Multicycle impl,.

Multiple cycle implementation Follows the decomposition of the steps for the execution of instructions Cycle 1. Instruction fetch and increment PC Cycle 2. Instruction decode and read source registers and branch address computation Cycle 3. ALU execution or memory address calculation or set PC if branch successful Cycle 4. Memory access (load/store) or write register (arith/log) Cycle 5 Write register (load) Note that branch takes 3 cycles, load takes 5 cycles, all others take 4 cycles 5/2/2019 CSE378 Multicycle impl,.

Instruction fetch Because fields in the instruction are needed at different cycles, the instruction has to be kept in stable storage, namely an Instruction Register (IR) The register transfer level actions during this step IR  Memory[PC] PC  PC + 4 Resources required Memory (but no need to distinguish between instruction and data memories) ALU to increment PC IR 5/2/2019 CSE378 Multicycle impl,.

Instruction decode and read source registers Instruction decode: send opcode to control unit and…(see later) Perform “optimistic” computations that are not harmful Read rs and rt and store them in non-ISA visible registers A and B that will be used as input to ALU A  REG[IR[25:21]] (read rs) B  REG[IR[20:16]] (read rt) Compute the branch address just in case we had a branch! ALUout  PC +(sign-ext(IR[15:0]) *4 (again a non-ISA visible register) New resources A, B, ALUout 5/2/2019 CSE378 Multicycle impl,.

ALU execution If instruction is R-type If instruction is Immediate ALUout A op. B If instruction is Immediate ALUout A op. sign-extend(IR[15:0]) If instruction is Load/Store ALUout  A + sign-extend(IR[15:0]) If instruction is branch If (A=B) then PC  ALUout (note this is the ALUout computed in the previous cycle) No new resources 5/2/2019 CSE378 Multicycle impl,.

Memory access or ALU completion If Load MDR  Memory[ALUout] (MDR is the Memory Data Register non-ISA visible register) If Store Memory[ALUout]  B If arith Reg[IR[15:11]]  ALUout New resources MDR 5/2/2019 CSE378 Multicycle impl,.

Load completion Write result register Reg[IR[20:16]]  ALUout 5/2/2019 CSE378 Multicycle impl,.

Streamlining of resources (cf. Figure 5.31) No distinction between instruction and data memory Only one ALU But a few more muxes and registers (IR, MDR etc.) 5/2/2019 CSE378 Multicycle impl,.