Systems Architecture I

Slides:



Advertisements
Similar presentations
1 Datapath and Control (Multicycle datapath) CDA 3101 Discussion Section 11.
Advertisements

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.
Microprocessor Design Multi-cycle Datapath Nia S. Bradley Vijay.
1 Chapter Five The Processor: Datapath and Control.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 14 - Multi-Cycle.
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.
Week 11Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 11: Microprogramming [Adapted from Dave Patterson’s UCB CS152.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 TopicI: Building a Multicycle Data Path and a Control Path for a Microprocessor.
©UCB CS 161Computer Architecture Chapter 5 Lecture 11 Instructor: L.N. Bhuyan Adapted from notes by Dave Patterson (http.cs.berkeley.edu/~patterson)
Preparation for Midterm Binary Data Storage (integer, char, float pt) and Operations, Logic, Flip Flops, Switch Debouncing, Timing, Synchronous / Asynchronous.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Multi-Cycle Processor.
331 W10.1Spring :332:331 Computer Architecture and Assembly Language Spring 2005 Week 10 Building a Multi-Cycle Datapath [Adapted from Dave Patterson’s.
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
CSE431 L05 Basic MIPS Architecture.1Irwin, PSU, 2005 CSE 431 Computer Architecture Fall 2005 Lecture 05: Basic MIPS Architecture Review Mary Jane Irwin.
Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
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.
Multicycle Implementation
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.
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
RegDst 1: RegFile destination No. for the WR Reg. comes from rd field. 0: RegFile destination No. for the WR Reg. comes from rt field.
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.
Design a MIPS Processor (II)
Multi-Cycle Datapath and Control
Chapter 5: A Multi-Cycle CPU.
CS161 – Design and Architecture of Computer Systems
IT 251 Computer Organization and Architecture
/ Computer Architecture and Design
Multi-Cycle CPU.
Extensions to the Multicycle CPU
Single Cycle Processor
D.4 Finite State Diagram for the Multi-cycle processor
Multi-Cycle CPU.
Multiple Cycle Implementation of MIPS-Lite CPU
Processor: Finite State Machine & Microprogramming
Chapter Five The Processor: Datapath and Control
Systems Architecture I (CS ) Lecture 16: Exceptions
The Multicycle Implementation
CSCI206 - Computer Organization & Programming
Vishwani D. Agrawal James J. Danaher Professor
Computer Organization Ellen Walker Hiram College
A Multiple Clock Cycle Instruction Implementation
Systems Architecture II
Chapter Five The Processor: Datapath and Control
Drawbacks of single cycle implementation
CSE 331 Computer Organization and Design Fall 2007 Week 12
The Multicycle Implementation
Systems Architecture I
Vishwani D. Agrawal James J. Danaher Professor
Systems Architecture I
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Processor: Multi-Cycle Datapath & Control
Lecture 17: Multi Cycle MIPS Processor
Multi-Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
Chapter Four The Processor: Datapath and Control
Systems Architecture I (CS ) Lecture 17: Exceptions
Control Unit for Multiple Cycle Implementation
5.5 A Multicycle Implementation
Processor Design Datapath and Design.
Systems Architecture I
Control Unit for Multiple Cycle Implementation
FloorPlan for Multicycle MIPS
Alternative datapath (book): Multiple Cycle Datapath
CS161 – Design and Architecture of Computer Systems
Presentation transcript:

Systems Architecture I September 4, 1997 Systems Architecture I (CS 281-001) Lecture 15: A Multicycle Implementation of MIPS* Jeremy R. Johnson Mon. Nov. 22, 1999 *This lecture was derived from material in the text (sec. 5.4-5.5). All figures from Computer Organization and Design: The Hardware/Software Approach, Second Edition, by David Patterson and John Hennessy, are copyrighted material (COPYRIGHT 1998 MORGAN KAUFMANN PUBLISHERS, INC. ALL RIGHTS RESERVED). Nov. 22, 1999 Systems Architecture I

Systems Architecture I September 4, 1997 Introduction Objective: To re-implement the MIPS instruction set using a multicycle implementation. The benefits are shared hardware and that instructions can take a different number of cycles (reduced computing time). How: break instructions into steps, each step taking a clock cycle. What’s New: control depends on step Need to store temporary values in internal registers Topics Steps in multicycle implementation Control using finite state machine Control using microprogramming Nov. 22, 1999 Systems Architecture I

Systems Architecture I Multicycle Approach Break up the instructions into steps, each step takes a cycle balance the amount of work to be done restrict each cycle to use only one major functional unit Functional units: memory, register file, and ALU At the end of a cycle Use internal registers to store results between steps Nov. 22, 1999 Systems Architecture I

Systems Architecture I Execution Steps Instruction fetch IR = Memory[PC]; PC = PC + 4; Instruction decode and register fetch A = Reg[IR[25-21]]; B = Reg[IR[20-16]]; ALUOut = PC + (sign-extend (IR[15-0]) << 2); Nov. 22, 1999 Systems Architecture I

Systems Architecture I Execution Steps Execution, memory address computation, or branch completion Memory reference ALUOut = A + sign-extend (IR[15-0]); Arithmetic-logical instruction (R-type) ALUOut = A op B; Branch if (A == B) PC = ALUOut; Jump PC = PC [31-28] || (IR[25-0]<<2) Nov. 22, 1999 Systems Architecture I

Systems Architecture I Execution Steps Memory access or R-type instruction completion memory reference MDR = Memory [ALUOut]; or Memory [ALUOut] = B; R-type completion Reg [IR[15-11]] = ALUOut; Memory read completion Reg [IR[20-16]] = MDR; Nov. 22, 1999 Systems Architecture I

Systems Architecture I Summary 3 - 5 clock cycles Uses “optimistic” actions Nov. 22, 1999 Systems Architecture I

Systems Architecture I CPI in a Multicycle CPU Using the previous multicycle implementation determine the average cycles per instruction (from gcc) 22% loads 11% stores 49% R-format 16% branches 2% jumps CPI = 0.22  5 + 0.11  4 + 0.49  4 + 0.16  3 + 0.02  3 = 4.04 Nov. 22, 1999 Systems Architecture I

Systems Architecture I Control Signals 1-bit control signals RegDst RegWrite ALUSrcA MemRead MemtoReg IorD IRWrite PCWrite PCWriteCond 2-bit control signals ALUOp 00 (add) 01 (sub) 10 (funct field) ALUSrcB 00 (B register) 01 (constant 4) 10 (lower 16 bits from IR) 11 (lower 16 bits from IR shifted left 2 bits) PCSource 00 (output of ALU = PC+4) 01 (ALUOut = branch addr) 10 (jump target) Nov. 22, 1999 Systems Architecture I

Systems Architecture I Complete Datapath Nov. 22, 1999 Systems Architecture I

Systems Architecture I Finite State Machine Set of states Next function determined by input and current state Output determined by current state and possibly input Moore machine (output determined only by current state) Nov. 22, 1999 Systems Architecture I

Systems Architecture I Control Using FSM Nov. 22, 1999 Systems Architecture I

Systems Architecture I Implementation of FSM Nov. 22, 1999 Systems Architecture I

Control using Microprogramming Represent asserted values on control lines symbollically (microinstructions) Fields: Label, ALU control, SRC1, SRC2, Register control, Memory, PCWrite control, Sequencing specifies non-overlapping set of control signals Placed in ROM or PLA (provides address for microinstructions) Sequencing mechanism next microinstruction branch to microinstruction (FETCH) for next MIPS instruction choose next microinstruction based on control unit input (dispatch). Implemented using a table of addresses (dispatch table). Nov. 22, 1999 Systems Architecture I

Microinstruction Fields Nov. 22, 1999 Systems Architecture I

Systems Architecture I Microprogram Nov. 22, 1999 Systems Architecture I

Systems Architecture I Implementation Nov. 22, 1999 Systems Architecture I