Basic MIPS Implementation

Slides:



Advertisements
Similar presentations
CIS 314 Fall 2005 MIPS Datapath (Single Cycle and Multi-Cycle)
Advertisements

CS-447– Computer Architecture Lecture 12 Multiple Cycle Datapath
Processor II CPSC 321 Andreas Klappenecker. Midterm 1 Tuesday, October 5 Thursday, October 7 Advantage: less material Disadvantage: less preparation time.
Fall 2007 MIPS Datapath (Single Cycle and Multi-Cycle)
1 Chapter Five. 2 We're ready to look at an implementation of the MIPS Simplified to contain only: –memory-reference instructions: lw, sw –arithmetic-logical.
331 Lec 14.1Fall 2002 Review: Abstract Implementation View  Split memory (Harvard) model - single cycle operation  Simplified to contain only the instructions:
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.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Shift Instructions (1/4)
The Datapath Andreas Klappenecker CPSC321 Computer Architecture.
1  1998 Morgan Kaufmann Publishers We're ready to look at an implementation of the MIPS Simplified to contain only: –memory-reference instructions: lw,
Datapath and Control Andreas Klappenecker CPSC321 Computer Architecture.
1 We're ready to look at an implementation of the MIPS Simplified to contain only: –memory-reference instructions: lw, sw –arithmetic-logical instructions:
S. Barua – CPSC 440 CHAPTER 5 THE PROCESSOR: DATAPATH AND CONTROL Goals – Understand how the various.
Computing Systems The Processor: Datapath and Control.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Processor: Datapath and Control
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
Chapter 5 Processor Design. Spring 2005 ELEC 5200/6200 From Patterson/Hennessey Slides We're ready to look at an implementation of the MIPS Simplified.
1 Computer Organization & Design Microcode for Control Sec. 5.7 (CDROM) Appendix C (CDROM) / / pdf / lec_3a_notes.pdf.
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
1  2004 Morgan Kaufmann Publishers Chapter Five.
1  1998 Morgan Kaufmann Publishers Simple Implementation Include the functional units we need for each instruction Why do we need this stuff?
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
1. 2 MIPS Hardware Implementation Full die photograph of the MIPS R2000 RISC Microprocessor. The 1986 MIPS R2000 with five pipeline stages and 450,000.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3 In-Class Exercises.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Design a MIPS Processor (II)
ECE/CS 552: Single Cycle Control Path
EE204 Computer Architecture
Single Cycle CPU - Control
CS161 – Design and Architecture of Computer Systems
CS161 – Design and Architecture of Computer Systems
Chapter 5 The Processor: Datapath and Control
Morgan Kaufmann Publishers
Introduction CPU performance factors
/ Computer Architecture and Design
Computer Organization & Design Microcode for Control Sec. 5
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
Chapter Five.
CSCE 212 Chapter 5 The Processor: Datapath and Control
Single-Cycle CPU DataPath.
Chapter Five The Processor: Datapath and Control
CSCI206 - Computer Organization & Programming
Datapath & Control MIPS
Chapter Five The Processor: Datapath and Control
Topic 5: Processor Architecture Implementation Methodology
Rocky K. C. Chang 6 November 2017
Composing the Elements
Composing the Elements
The Processor Lecture 3.2: Building a Datapath with Control
Topic 5: Processor Architecture
Multicycle Approach We will be reusing functional units
Systems Architecture I
Processor (II).
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Lecture 14: Single Cycle MIPS Processor
Processor: Multi-Cycle Datapath & Control
Simple Implementation
COMP541 Datapaths I Montek Singh Mar 18, 2010.
CS/COE0447 Computer Organization & Assembly Language
Review Fig 4.15 page 320 / Fig page 322
Chapter Four The Processor: Datapath and Control
Data Path Diagrams.
The Processor: Datapath & Control.
COMS 361 Computer Organization
Processor: Datapath and Control
Presentation transcript:

Basic MIPS Implementation Here's an updated view of the basic architecture needed to implement a subset of the MIPS environment: We've seen how most of the necessary components can be implemented. The control logic is needed to manage execution of instructions remains. Computer Science Dept Va Tech January 2006 ©2006 McQuain WD

Control Selecting the operations to perform (ALU, read/write, etc.) Controlling the flow of data (multiplexor inputs) Information comes from the 32 bits of the instruction: add $8, $17, $18 100000 00000 01001 10010 10001 000000 funct shamt rd rt rs op ALU's operation based on instruction type and function code Computer Science Dept Va Tech January 2006 ©2006 McQuain WD

Control E.g., what should the ALU do with this instruction: lw $1, 100($2) 100011 00010 00001 0000000001100100 op rs rt offset ALU control input 0000 AND 0001 OR 0010 add 0110 subtract 0111 set-on-less-than 1100 NOR Why is the code for subtract 0110 and not 0011? Computer Science Dept Va Tech January 2006 ©2006 McQuain WD

Computing Instruction Type Instruction Opcode Type ------------------------------- LW 100011 00 I SW 101011 00 I BEQ 000100 01 J ADD 000000 00 R SUB 000000 00 R AND 000000 00 R OR 000000 00 R SLT 000000 00 R Computer Science Dept Va Tech January 2006 ©2006 McQuain WD

Simplifying: Don't Cares Instruction Opcode Minimize Type ----------------------------------------------- LW 100011 1XX0XX 00 I SW 101011 1XX0XX 00 I BEQ 000100 0XX1XX 01 J ADD 000000 0XX0XX 00 R SUB 000000 0XX0XX 00 R AND 000000 0XX0XX 00 R OR 000000 0XX0XX 00 R SLT 000000 0XX0XX 00 R Computer Science Dept Va Tech January 2006 ©2006 McQuain WD

Computing ALU Settings Supported Instruction ALUop Funct ALU Control Settings ---------------------------------------------- LW 00 0010 SW 00 0010 BEQ 01 0110 ADD 10 100000 0010 SUB 10 100010 0110 AND 10 100100 0000 OR 10 100101 0001 SLT 10 101010 0111 Computer Science Dept Va Tech January 2006 ©2006 McQuain WD

Don't Care Conditions Supported Instruction ALUop Funct ALU Control Settings ---------------------------------------------- LW 00 XXXXXX 0010 SW 00 XXXXXX 0010 BEQ X1 XXXXXX 0110 ADD 1X XX0000 0010 SUB 1X XX0010 0110 AND 1X XX0100 0000 OR 1X XX0101 0001 SLT 1X XX1010 0111 Computer Science Dept Va Tech January 2006 ©2006 McQuain WD

Control Must describe hardware to compute 4-bit ALU control input given instruction type 00 = lw, sw 01 = beq, 10 = arithmetic function code for arithmetic Describe it using a truth table (can turn into gates): ALUOp computed from instruction type Computer Science Dept Va Tech January 2006 ©2006 McQuain WD

Datapath Details Computer Science Dept Va Tech January 2006 ©2006 McQuain WD

Datapath Control Line Logic Computer Science Dept Va Tech January 2006 ©2006 McQuain WD

Control Simple combinational logic (truth tables) Computer Science Dept Va Tech January 2006 ©2006 McQuain WD

Breaking down an instruction ISA definition of arithmetic: Reg[Memory[PC][15:11]] <= Reg[Memory[PC][25:21]] op Reg[Memory[PC][20:16]] Could break down to: IR <= Memory[PC] A <= Reg[IR[25:21]] B <= Reg[IR[20:16]] ALUOut <= A op B Reg[IR[20:16]] <= ALUOut We forgot an important part of the definition of arithmetic! PC <= PC + 4 Computer Science Dept Va Tech January 2006 ©2006 McQuain WD