10/13/2005Comp 120 Fall 20051 13 October Questions? Today Control.

Slides:



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

CS/COE1541: Introduction to Computer Architecture Datapath and Control Review Sangyeun Cho Computer Science Department University of Pittsburgh.
Adding the Jump Instruction
331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
Computer ArchitectureFall 2007 © October 1st, 2007 Majd F. Sakr CS-447– Computer Architecture.
Overview Finite State Machines - Sequential circuits with inputs and outputs State Diagrams - An abstraction tool to visualize and analyze sequential circuits.
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.
Levels in Processor Design
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.
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.
Chapter Five The Processor: Datapath and Control.
Lecture 16: Basic CPU Design
Computer ArchitectureFall 2008 © September 17th, 2008 Majd F. Sakr CS-447– Computer Architecture.
CS 161, Spring 2006 Test 2 Answers. Q1(a) +10 = in 2’s complement. And in sign-extended -12 = in 2’s comp And.
L15 – Control & Execution 1 Comp 411 – Spring /25/08 Control & Execution Finite State Machines for Control MIPS Execution.
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
The Multicycle Processor CPSC 321 Andreas Klappenecker.
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.
EECS 370 Discussion 1 xkcd.com. EECS 370 Discussion Topics Today: – Floating Point – Finite State Machines – Combinational Logic – Sequential Logic 2.
1 COMP541 State Machines Montek Singh Feb 8, 2012.
Computer Organization and Design Memories and State Machines Montek Singh Mon, April 13, 2011 Lecture 14.
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
CPE232 Basic MIPS Architecture1 Computer Organization Multi-cycle Approach Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides
1/8/ Data Path Design & Control Copyright Joanne DeGroat, ECE, OSU1 Processor Data Paths - ALU and Registers Incorporating the ALU into a.
TEAM FRONT END ECEN 4243 Digital Computer Design.
CBP 2002ITY 270 Computer Architecture1 Digital Logic This Time … Control Path, Arithmetic Ops 12 a U1 34 b Last Time …
1  2004 Morgan Kaufmann Publishers Chapter Five.
CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Transistor: Building.
1 COMP541 Finite State Machines - 1 Montek Singh Sep 22, 2014.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
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.
Elements of Datapath for the fetch and increment The first element we need: a memory unit to store the instructions of a program and supply instructions.
MIPS processor continued
COM181 Computer Hardware Lecture 6: The MIPs CPU.
MIPS Processor.
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 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
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.
CS161 – Design and Architecture of Computer Systems
Control & Execution Finite State Machines for Control MIPS Execution.
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
Control & Execution Finite State Machines for Control MIPS Execution.
CS/COE0447 Computer Organization & Assembly Language
Single-Cycle CPU DataPath.
CS/COE0447 Computer Organization & Assembly Language
Chapter Five The Processor: Datapath and Control
Levels in Processor Design
Levels in Processor Design
22 October 3 classes before 2nd exam! Control 1/16/2019
April 3 Fun with MUXes Implementing arbitrary logical functions
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
Levels in Processor Design
October 29 Review for 2nd Exam Ask Questions! 4/26/2019
Levels in Processor Design
CS/COE0447 Computer Organization & Assembly Language
Control Unit (single cycle implementation)
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

10/13/2005Comp 120 Fall October Questions? Today Control

10/13/2005Comp 120 Fall Synchronous Systems Latch Combinational logic Latch leading edge trailing 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. Clock data

10/13/2005Comp 120 Fall Asynchronous Systems Latch Combinational logic Latch data 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

10/13/2005Comp 120 Fall Fetching Sequential Instructions PCPC 4 Read Address Instruction Memory How about branch?

10/13/2005Comp 120 Fall Datapath for R-type Instructions Read Reg Read Reg. 2 Write Reg. Write Data data 1 data 2 3 ALU Operation Inst Bits Inst Bits Inst Bits RegWrite 32

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

10/13/2005Comp 120 Fall MUX Blocks Out 210 Select Input 8 3 Select InOut The select signal determines which of the inputs is connected to the output

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

10/13/2005Comp 120 Fall Our Register File has 3 ports Read Reg Read Reg. 2 Write Reg. Write Data data 1 data 2 Inst Bits Inst Bits Inst Bits RegWrite 32 2 Read Ports 1 Write Port REALLY LOTS OF CONNECTIONS! This is one reason we have only a small number of registers What’s another reason?

10/13/2005Comp 120 Fall 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. 3 ALU Operation 32 Map to ALU op OPCODE bits from instruction

10/13/2005Comp 120 Fall We can get 1 bit out with a MUX Out 210 Select Input Put the INPUT HERE Wire these to HIGH or LOW depending on the value you want OUT for that INPUT For example, 3 input AND has INPUT7 wired HIGH and all the others wired LOW.

10/13/2005Comp 120 Fall Or use a ROM Read-Only Memory M-bit Address N-bit Result

10/13/2005Comp 120 Fall Or use a PLA AND Array M-bit Input OR Array N-bit Output Product Terms 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 Programmable Logic Array

10/13/2005Comp 120 Fall 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”?

10/13/2005Comp 120 Fall 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

10/13/2005Comp 120 Fall Implementing a FSM State Function Inputs Outputs Clock

10/13/2005Comp 120 Fall Recognizing Numbers Recognize the regular expression for floating point numbers [ \t]* [-+]?[0-9]*(. [0-9]*)? (e[-+]?[0–9]+)? Examples: e e “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

10/13/2005Comp 120 Fall FSM Diagram start ‘ ’ sign ‘+’ ‘-’ whole ‘0’ – ‘9’ frac ‘.’ ‘0’ – ‘9’ exp ‘e’ ‘0’ – ‘9’ done ‘ ’

10/13/2005Comp 120 Fall 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

10/13/2005Comp 120 Fall FSM Implementation ROM or PLA state 3 8 char in error ok 3 Our PLA has: 11 inputs 5 outputs

10/13/2005Comp 120 Fall 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).

10/13/2005Comp 120 Fall Highlights The fair starts tomorrow!