22 October 3 classes before 2nd exam! Control 1/16/2019

Slides:



Advertisements
Similar presentations
Regular expressions to fsms \hardware and software techniques Paul Cockshott.
Advertisements

Adding the Jump Instruction
10/13/2005Comp 120 Fall October Questions? Today Control.
1  1998 Morgan Kaufmann Publishers Chapter Five The Processor: Datapath and Control.
L14 – Control & Execution 1 Comp 411 – Fall /04/09 Control & Execution Finite State Machines for Control MIPS Execution.
12/6/2005Comp 120 Fall December 2 classes to go Lego Lab Assistant? Questions? CCR at end of class today.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Levels in Processor Design
Preparation for Midterm Binary Data Storage (integer, char, float pt) and Operations, Logic, Flip Flops, Switch Debouncing, Timing, Synchronous / Asynchronous.
Chapter Five The Processor: Datapath and Control.
Computer ArchitectureFall 2008 © September 17th, 2008 Majd F. Sakr CS-447– Computer Architecture.
L15 – Control & Execution 1 Comp 411 – Spring /25/08 Control & Execution Finite State Machines for Control MIPS Execution.
Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Computing Systems The Processor: Datapath and Control.
1 COMP541 State Machines Montek Singh Feb 8, 2012.
Gary MarsdenSlide 1University of Cape Town Chapter 5 - The Processor  Machine Performance factors –Instruction Count, Clock cycle time, Clock cycles per.
EECS 322: Computer Architecture
CBP 2002ITY 270 Computer Architecture1 Digital Logic This Time … Control Path, Arithmetic Ops 12 a U1 34 b Last Time …
CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!
1 COMP541 Datapaths I Montek Singh Mar 8, Topics  Over next 2/3 classes: datapaths  Basic register operations Book sections 7-2 to 7-6 and 7-8.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
Appendix C Basics of Logic Design. Appendix C — Logic Basic — 2 Logic Design Basics §4.2 Logic Design Conventions Objective: To understand how to build.
Design a MIPS Processor (II)
CS Computer Architecture Week 10: Single Cycle Implementation
Exam-like questions.
Computers’ Basic Organization
CS161 – Design and Architecture of Computer Systems
CS161 – Design and Architecture of Computer Systems
Control & Execution Finite State Machines for Control MIPS Execution.
IT 251 Computer Organization and Architecture
COMP541 Sequential Logic – 2: Finite State Machines
Digital Logic Last Time … This Time … Control Path, Arithmetic Ops a
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
Design of the Control Unit for Single-Cycle Instruction Execution
Chapter Five.
Control & Execution Finite State Machines for Control MIPS Execution.
CS/COE0447 Computer Organization & Assembly Language
Computer Architecture
Single-Cycle CPU DataPath.
Chapter Five The Processor: Datapath and Control
Appendix D Mapping Control to Hardware
Instructor: Alexander Stoytchev
Design of the Control Unit for One-cycle Instruction Execution
CS/COE0447 Computer Organization & Assembly Language
Processor: Datapath and Control (part 2)
MIPS Processor.
Chapter Five The Processor: Datapath and Control
Control Unit Introduction Types Comparison Control Memory
Levels in Processor Design
Composing the Elements
Levels in Processor Design
April 3 Fun with MUXes Implementing arbitrary logical functions
COMS 361 Computer Organization
Recall: ROM example Here are three functions, V2V1V0, implemented with an 8 x 3 ROM. Blue crosses (X) indicate connections between decoder outputs and.
Levels in Processor Design
Processor: Multi-Cycle Datapath & Control
Levels in Processor Design
October 29 Review for 2nd Exam Ask Questions! 4/26/2019
Lecture 6 CdM-8 CPU overview
MIPS processor continued
Levels in Processor Design
CS/COE0447 Computer Organization & Assembly Language
Control Unit (single cycle implementation)
The Processor: Datapath & Control.
Processor: Datapath and Control
CS161 – Design and Architecture of Computer Systems
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

22 October 3 classes before 2nd exam! Control 1/16/2019 Comp 120 Fall 2001

Synchronous Systems Combinational logic data Latch Latch trailing edge Clock leading edge On the leading edge of the clock, the input of a latch is transferred to the output and held. We must be sure the combinational logic has settled before the next leading clock edge. 1/16/2019 Comp 120 Fall 2001

Asynchronous Systems Everything we look at will be synchronous Combinational logic data Latch Latch valid No clock! The data carries a “valid” signal along with it System goes at greatest possible speed. Only “computes” when necessary. Everything we look at will be synchronous 1/16/2019 Comp 120 Fall 2001

Fetching Sequential Instructions 4 P C Read Address Instruction Instruction Memory How about branch? 1/16/2019 Comp 120 Fall 2001

Datapath for R-type Instructions ALU Operation 3 5 Inst Bits 25-21 Read Reg. 1 32 data 1 5 Inst Bits 20-16 Read Reg. 2 5 Inst Bits 15-11 Write Reg. 32 data 2 32 Write Data RegWrite 1/16/2019 Comp 120 Fall 2001

Fun with MUXes Remember the MUX? Select 0 In 3 Select 1 In 2 Out This will route 1 of 4 different 1 bit values to the output. In 0 1/16/2019 Comp 120 Fall 2001

MUX Blocks Select Select 2 1 1 2 In Out Input 3 4 Out 5 6 7 3 1 8 2 In Out Input 3 4 Out 5 6 7 The select signal determines which of the inputs is connected to the output 1/16/2019 Comp 120 Fall 2001

Inside there is a 32 way MUX per bit Read Reg 1 Register 0 32 to1 MUX Register 1 Register 2 Data 1 Register 3 Register 4 Register ... LOT’S OF CONNECTIONS! Register 30 Register 31 And this is just one port! For EACH bit in the 32 bit register 1/16/2019 Comp 120 Fall 2001

Our Register File has 3 ports This is one reason we have only a small number of registers 2 Read Ports What’s another reason? 5 Inst Bits 25-21 Read Reg. 1 32 data 1 5 Inst Bits 20-16 Read Reg. 2 5 Inst Bits 15-11 Write Reg. 32 data 2 32 Write Data REALLY LOTS OF CONNECTIONS! 1 Write Port RegWrite 1/16/2019 Comp 120 Fall 2001

Implementing Logical Functions Suppose we want to map M input bits to N output bits For example, we need to take the OPCODE field from the instruction and determine what OPERATION to send to the ALU. OPCODE bits from instruction Map to ALU op ALU Operation 3 32 32 1/16/2019 Comp 120 Fall 2001

We can get 1 bit out with a MUX Put the INPUT HERE Wire these to HIGH or LOW depending on the value you want OUT for that INPUT Select 2 1 1 2 Input 3 For example, 3 input AND has INPUT7 wired HIGH and all the others wired LOW. 4 Out 5 6 7 1/16/2019 Comp 120 Fall 2001

Or use a ROM Read-Only Memory M-bit Address N-bit Result 1/16/2019 Comp 120 Fall 2001

Or use a PLA Programmable Logic Array OR Array AND Array M-bit Input Product Terms N-bit Output Think of the SUM of PRODUCTS form. The AND Array generates the products of various input bits The OR Array combines the products into various outputs 1/16/2019 Comp 120 Fall 2001

Finite State Machines A set of STATES A set of INPUTS A set of OUTPUTS A function to map the STATE and the INPUT into the next STATE and an OUTPUT Remember “Shoots and Ladders”? 1/16/2019 Comp 120 Fall 2001

Traffic Light Controller G E/W R N/S Y E/W R N/S R E/W G N/S R E/W Y N/S 1/16/2019 Comp 120 Fall 2001

Implementing a FSM Outputs Inputs Function State Clock 1/16/2019 Comp 120 Fall 2001

Recognizing Numbers Recognize the regular expression for floating point numbers [ \t]* [-+]?[0-9]*(. [0-9]*)? (e[-+]?[0–9]+)? Examples: +123.456e23 .456 1.5e-10 -123 “a” matches itself “[abc]” matches one of a, b, or c “[a-z]” matches one of a, b, c, d, ..., x, y, or z “0*” matches zero or more 0’s (“”, “0”, “00”, “0000”) “Z?” matches zero or 1 Z’s 1/16/2019 Comp 120 Fall 2001

FSM Diagram ‘ ’ start ‘.’ done ‘+’ ‘-’ ‘ ’ ‘0’ – ‘9’ sign ‘0’ – ‘9’ whole ‘ ’ ‘.’ ‘.’ ‘0’ – ‘9’ frac ‘e’ ‘0’ – ‘9’ exp ‘e’ 1/16/2019 Comp 120 Fall 2001

FSM Table IN : STATE  NEW STATE ‘ ’ : start  start ‘0’ | ‘1’ | ... | ‘9’ : start  whole ‘+’ | ‘-’ : start  sign ‘.’ : start  frac ‘0’ | ‘1’ | ... | ‘9’ : sign  whole ‘.’ : sign  frac ‘0’ | ‘1’ | ... | ‘9’ : whole  whole ‘.’ : whole  frac ‘ ’ : whole  done ‘e’ : whole  exp ‘e’ : frac  exp ‘0’ | ‘1’ | ... | ‘9’ : frac  frac ‘ ’ : frac  done ‘0’ | ‘1’ | ... | ‘9’ : exp  exp ‘ ’ : exp  done STATE ASSIGNMENTS start = 0 = 000 sign = 1 = 001 whole = 2 = 010 frac = 3 = 011 exp = 4 = 100 done = 5 = 101 error = 6 = 110 1/16/2019 Comp 120 Fall 2001

FSM Implementation error char in ROM or PLA ok state Our PLA has: 8 char in ok state 3 3 Our PLA has: 11 inputs 5 outputs 1/16/2019 Comp 120 Fall 2001

FSM Take Home With JUST a register and some logic, we can implement complicated sequential functions like recognizing a FP number. This is useful in its own right for compilers, input routines, etc. The reason we’re looking at it here is to see how designers implement the complicated sequences of events required to implement instructions Think of the OP-CODE as playing the role of the input character in the recognizer. The character AND the state determine the next state (and action). 1/16/2019 Comp 120 Fall 2001