1 Computer Organization & Design Microcode for Control Sec. 5.7 (CDROM) Appendix C (CDROM) / 3055-05 / pdf / lec_3a_notes.pdf.

Slides:



Advertisements
Similar presentations
Another Implementation Style
Advertisements

1  1998 Morgan Kaufmann Publishers Summary:. 2  1998 Morgan Kaufmann Publishers How many cycles will it take to execute this code? lw $t2, 0($t3) lw.
1 Chapter Five The Processor: Datapath and Control.
The Processor: Datapath & Control
Processor Design 5Z032 Processor: Datapath and Control Chapter 5 Henk Corporaal Eindhoven University of Technology 2009.
Chapter 5 The Processor: Datapath and Control Basic MIPS Architecture Homework 2 due October 28 th. Project Designs due October 28 th. Project Reports.
Microprogramming Andreas Klappenecker CPSC321 Computer Architecture.
CS 161Computer Architecture Chapter 5 Lecture 12
Embedded Systems in Silicon TD5102 MIPS design Datapath and Control Henk Corporaal Technical University.
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.
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 ( )
Advanced Computer Architecture 5MD00 / 5Z033 MIPS Design data path and control Henk Corporaal TUEindhoven 2007.
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  1998 Morgan Kaufmann Publishers We're ready to look at an implementation of the MIPS Simplified to contain only: –memory-reference instructions: lw,
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
1 We're ready to look at an implementation of the MIPS Simplified to contain only: –memory-reference instructions: lw, sw –arithmetic-logical instructions:
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.
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
1 For some program running on machine X, Performance X = 1 / Execution time X "X is n times faster than Y" Performance X / Performance Y = n Problem:
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.
EECS 322: Computer Architecture
CPE232 Basic MIPS Architecture1 Computer Organization Multi-cycle Approach Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides
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.
Overview of Control Hardware Development
1  1998 Morgan Kaufmann Publishers Value of control signals is dependent upon: –what instruction is being executed –which step is being performed Use.
Multicycle Implementation
ECE-C355 Computer Structures Winter 2008 The MIPS Datapath Slides have been adapted from Prof. Mary Jane Irwin ( )
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
1  2004 Morgan Kaufmann Publishers No encoding: –1 bit for each datapath operation –faster, requires more memory (logic) –used for Vax 780 — an astonishing.
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.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Design a MIPS Processor (II)
EE204 Computer Architecture
CS161 – Design and Architecture of Computer Systems
Computer Architecture
IT 251 Computer Organization and Architecture
Systems Architecture I
Computer Organization & Design Microcode for Control Sec. 5
Basic MIPS Architecture
CS/COE0447 Computer Organization & Assembly Language
Chapter Five.
Processor: Finite State Machine & Microprogramming
Chapter Five The Processor: Datapath and Control
Appendix D Mapping Control to Hardware
The Multicycle Implementation
CSCI206 - Computer Organization & Programming
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
Processor: Datapath and Control (part 2)
Computer Organization Ellen Walker Hiram College
Chapter Five The Processor: Datapath and Control
The Multicycle Implementation
Systems Architecture I
Processor (II).
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Processor: Multi-Cycle Datapath & Control
Simple Implementation
Basic MIPS Implementation
Multi-Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
Chapter Four The Processor: Datapath and Control
Finite State Machine for Control
Systems Architecture I
Control Unit (single cycle implementation)
Presentation transcript:

1 Computer Organization & Design Microcode for Control Sec. 5.7 (CDROM) Appendix C (CDROM) / / pdf / lec_3a_notes.pdf

2 We're ready to look at an implementation of the MIPS Simplified to contain only: –memory-reference instructions: lw, sw –arithmetic-logical instructions: add, sub, and, or, slt –control flow instructions: beq, j Generic Implementation: –use the program counter (PC) to supply instruction address –get the instruction from memory –read registers –use the instruction to decide exactly what to do All instructions use the ALU after reading the registers Why? memory-reference? arithmetic? control flow? The Processor: Datapath & Control

3 e.g., what should the ALU do with this instruction Example: lw $1, 100($2) op rs rt 16 bit offset ALU control input 000 AND 001OR 010add 110subtract 111set-on-less-than Why is the code for subtract 110 and not 011? Control

4 Must describe hardware to compute 3-bit ALU control input –given instruction type 00 = lw, sw 01 = beq, 11 = arithmetic –function code for arithmetic Describe it using a truth table (can turn into gates): ALUOp computed from instruction type Control

5

6 Value of control signals is dependent upon: –what instruction is being executed –which step is being performed Use the information we’ve accumulated to specify a finite state machine –specify the finite state machine graphically, or –use microprogramming Implementation can be derived from specification Implementing the Control

7 How many state bits will we need? Graphical Specification of FSM 10 states, < 2^4 4 bits

8 Implementation: Finite State Machine for Control Data path Control Logic Instruction Register Opcode Field

9 PLA Implementation If I picked a horizontal or vertical line could you explain it? Op5 Op4 Op3 Op2 Op1 Op0 State3 State2 State1 State0 PCWrite PCWriteCond IorD MemRead MemWrite IRWrite MemtoReg PCSource1 PCSource0 ALUop1 ALUop0 ALUsrce1 ALUsrce0 ALUsrce RegWrite RegDst NextState3 NextState2 NextState1 NextState0

10 PLA Implementation Red color shows lines that are "high" or "1" Op5 = 1 Op4 = 0 Op3 = 0 Op2 = 0 Op1 = 1 Op0 = 0 State3 = 0 State2 = 0 State1 = 0 State0 = 1 PCWrite = 0 PCWriteCond = 0 IorD = 0 MemRead = 0 MemWrite = 0 IRWrite = 0 MemtoReg = 0 PCSource1 = 0 PCSource0 = 0 ALUop1 = 0 ALUop0 = 0 ALUsrce1 =1 ALUsrce0 = 1 ALUsrce = 0 RegWrite = 0 RegDst = 0 NextState3 = 0 NextState2 = 0 NextState1 = 1 NextState0 = 0 State 1 (0001) is followed by state 2 (0010) if Op = , with ALUsrce0 and ALUsrce1 set to "1" (true). Orange dots are AND gates Grey dots are OR gates, 1 or hi-Z "1" Output

11 ROM = "Read Only Memory" –values of memory locations are fixed ahead of time A ROM can be used to implement a truth table –if the address is m-bits, we can address 2 m entries in the ROM. –our outputs are the bits of data that the address points to. m is the "height", and n is the "width" ROM Implementation mn

12 How many inputs are there? 6 bits for opcode, 4 bits for state = 10 address lines (i.e., 2 10 = 1024 different addresses) How many outputs are there? 16 datapath-control outputs, 4 state bits = 20 outputs ROM is 2 10 x 20 = 20K bits (and a rather unusual size) Rather wasteful, since for lots of the entries, the outputs are the same — i.e., opcode is often ignored ROM Implementation

13 Break up the table into two parts — 4 state bits tell you the 16 outputs, 2 4 x 16 bits of ROM — 10 bits tell you the 4 next state bits, 2 10 x 4 bits of ROM — Total: 4.3K bits of ROM PLA is much smaller — can share product terms — only need entries that produce an active output — can take into account don't cares Size is (#inputs  #product-terms) + (#outputs  #product-terms) For this example = (10x17)+(20x17) = 460 PLA cells PLA cells usually about the size of a ROM cell (slightly bigger) ROM vs PLA

14 Complex instructions: the "next state" is often current state + 1 Another Implementation Style Data path PLA or ROM Control Unit Instruction Register Opcode Field State Address Select Logic

15 Details Instruction Register Opcode Field Dispatch ROM 1 Dispatch ROM 2 State AddrCtl Add 1 Address Select Logic

16 Microprogramming What are the “microinstructions” ? Data path Microcode Memory Control Unit Instruction Register Opcode Field Microprogram Counter Address Select Logic

17 A specification methodology –appropriate if hundreds of opcodes, modes, cycles, etc. –signals specified symbolically using microinstructions Will two implementations of the same architecture have the same microcode? What would a microassembler do? Microprogramming

18 Microinstruction format

19 No encoding: –1 bit for each datapath operation –faster, requires more memory (logic) –used for Vax 780 — an astonishing 400K of memory! Lots of encoding: –send the microinstructions through logic to get control signals –uses less memory, slower Historical context of CISC: –Too much logic to put on a single chip with everything else –Use a ROM (or even RAM) to hold the microcode –It’s easy to add new instructions Maximally vs. Minimally Encoded

20 Microcode: Trade-offs Distinction between specification and implementation is sometimes blurred Specification Advantages: –Easy to design and write –Design architecture and microcode in parallel Implementation (off-chip ROM) Advantages –Easy to change since values are in memory –Can emulate other architectures –Can make use of internal registers Implementation Disadvantages, SLOWER now that: –Control is implemented on same chip as processor –ROM is no longer faster than RAM –No need to go back and make changes

21 The Big Picture Initial Representation Sequencing Control Logic Representation Implementation Technique Finite State Diagram Microprogram Explicit Next-State Function Microprogram Counter + Dispatch ROMS Logic Equation Truth Tables Programmable Logic Array Read Only Memory