Spring 2002EECS150 - Lec0-intro Page 1 EECS150 - Digital Design Lecture 9 - Finite State Machines 1 February 19, 2002 John Wawrzynek.

Slides:



Advertisements
Similar presentations
ENGIN112 L23: Finite State Machine Design Procedure October 27, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 23 Finite State Machine.
Advertisements

Chapter #8: Finite State Machine Design 8
Introduction to Sequential Circuits
General Sequential Design
Finite State Machines (FSMs)
State-machine structure (Mealy)
VIII - Working with Sequential Logic © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Finite state machine optimization State minimization  fewer.
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Give qualifications of instructors: DAP
COE 202: Digital Logic Design Sequential Circuits Part 3
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Multiplexors Sequential Circuits and Finite State Machines Prof. Sin-Min Lee Department of Computer Science.
Circuits require memory to store intermediate data
Sequential Circuit Analysis & Design Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh.
Chapter 3 Digital Logic Structures
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
Sequential Circuit Design
ECE 331 – Digital System Design
ECE C03 Lecture 111 Lecture 11 Finite State Machine Optimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE C03 Lecture 101 Lecture 10 Finite State Machine Design Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE C03 Lecture 131 Lecture 13 Finite State Machine Optimization Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
Sequential Circuits and Finite State Machines Prof. Sin-Min Lee
Asynchronous FSMs and Verilog. PLD registered output.
Give qualifications of instructors: DAP
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design Finite State.
Spring 2002EECS150 - Lec15-seq2 Page 1 EECS150 - Digital Design Lecture 15 - Sequential Circuits II (Finite State Machines revisited) March 14, 2002 John.
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
ENGIN112 L25: State Reduction and Assignment October 31, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 25 State Reduction and Assignment.
SEQUENTIAL CIRCUITS Introduction
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 Design a clock synchronous sequential circuit with two inputs A, B and a single.
1 COMP541 State Machines Montek Singh Feb 8, 2012.
Elevator Controller We’re hired to design a digital elevator controller for a four-floor building st try: Design a counter that counts up.
Unit 14 Derivation of State Graphs
Lecture 18 More Moore/Mealy machines.
Introduction to Sequential Logic Design Finite State-Machine Design.
CPEN Digital System Design Chapter 5 - Sequential Circuits Sequential Circuit Design C. Gerousis © Logic and Computer Design Fundamentals, 4 rd Ed.,
1 CSE370, Lecture 19 Lecture 19 u Logistics n Lab 8 this week to be done in pairs íFind a partner before your lab period íOtherwise you will have to wait.
Introduction to State Machine
Review of Digital Logic Design Concepts OR: What I Need to Know from Digital Logic Design (EEL3705)
© BYU 16 FSM Page 1 ECEn 224 Finite State Machines.
DLD Lecture 26 Finite State Machine Design Procedure.
1 Finite State Machines (FSMs) Now that we understand sequential circuits, we can use them to build: Synchronous (Clocked) Finite State Machines Finite.
DESIGN OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
1 ENGG 1015 Tutorial Three Examples of Finite State Machines Supplementary notes Learning Objectives  Learn about Design of Finite State Machines Ack.:

1 COMP541 Finite State Machines - 1 Montek Singh Sep 22, 2014.
1 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
1 Lecture 3: Modeling Sequential Logic in Verilog HDL.
Chapter #6: Sequential Logic Design
© Copyright 2004, Gaetano Borriello and Randy H. Katz
COMP541 Sequential Logic – 2: Finite State Machines
ECE 301 – Digital Electronics
FINITE STATE MACHINES (FSMs)
CSE 140L Discussion Finite State Machines.
David Culler Electrical Engineering and Computer Sciences
CSE 370 – Winter Sequential Logic-2 - 1
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
D Flip-Flop Schematic Block Symbol Truth Table D Q Clk Q Clk D Q(t+1)
DESIGN OF SEQUENTIAL CIRCUITS
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 18 Logistics Last lecture Today HW5 due today (with extra 10%)
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
ECE 352 Digital System Fundamentals
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
ECE 352 Digital System Fundamentals
Announcements Assignment 7 due now or tommorrow Assignment 8 posted
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

Spring 2002EECS150 - Lec0-intro Page 1 EECS150 - Digital Design Lecture 9 - Finite State Machines 1 February 19, 2002 John Wawrzynek

Spring 2002EECS150 - Lec0-intro Page 2 Parity Checker Example A string of bits has “even parity” if the number of 1’s in the string is even. Design a circuit that accepts a bit-serial stream of bits and outputs a 0 if the parity thus far is even and outputs a 1 if odd: Can you guess a circuit that performs this function?

Spring 2002EECS150 - Lec0-intro Page 3 Formal Design Process “State Transition Diagram” –circuit is in one of two states. –transition on each cycle with each new input over exactly one arc (edge). –Output depends on which state the circuit is in.

Spring 2002EECS150 - Lec0-intro Page 4 Formal Design Process State Transition Table: Invent a code to represent states: Let 0 = EVEN state, 1 = ODD state present next state OUT IN state EVEN 0 0 EVEN EVEN 0 1 ODD ODD 1 0 ODD ODD 1 1 EVEN present state (ps) OUT IN next state (ns) Derive logic equations from table (how?): OUT = PS NS = PS xor IN

Spring 2002EECS150 - Lec0-intro Page 5 Formal Design Process Circuit Diagram: –xor gate for ns calculation –DFF to hold present state –no logic needed for output Logic equations from table: OUT = PS NS = PS xor IN ns ps Review of Design Steps: 1. Circuit functional specification 2. State Transition Diagram 3. Symbolic State Transition Table 4. Encoded State Transition Table 5. Derive Logic Equations 6. Circuit Diagram FFs for state CL for NS and OUT

Spring 2002EECS150 - Lec0-intro Page 6 Finite State Machines (FSMs) Type of sequential circuit: –output depends on present and past inputs effect of past inputs is represented by the current state Behavior is represented by State Transition Diagram: –traverse one edge per cycle.

Spring 2002EECS150 - Lec0-intro Page 7 FSM Implementation FFs form state register number of FFs at most log2(number of states) CL implements calculates next state and output

Spring 2002EECS150 - Lec0-intro Page 8 Combination Lock Example Used to allow entry to a locked room: 2-bit serial combination. Example 01,11: 1. Set switches to 01, press ENTER 2. Set switches to 11, press ENTER 3. OPEN is asserted (OPEN=1). If wrong code, ERROR is asserted (after second combo word entry). Press Reset at anytime to try again.

Spring 2002EECS150 - Lec0-intro Page 9 Announcements Exam Friday –5-8pm, lectures 1-8, closed book/notes Review Session Tonight –8pm, Woz Lounge, Soda Hall Interesting Seminar Tomorrow –"The Sight & Sound of Information - Defining the Future Beyond the PC" Brian Halla, CEO, National Semiconductor Corporation

Spring 2002EECS150 - Lec0-intro Page 10 Combinational Lock STD

Spring 2002EECS150 - Lec0-intro Page 11 Symbolic State Transition Table RESET ENTER COM1 COM2 Preset State Next State OPEN ERROR 00**STARTSTART00 010*STARTBAD *STARTOK100 00**OK1OK100 01*0OK1BAD200 01*1OK1OK200 0***OK2OK210 00**BAD1BAD100 01**BAD1BAD200 0***BAD2BAD201 1****START00 Decoder logic for checking combination (01,11):

Spring 2002EECS150 - Lec0-intro Page 12 Encoded ST Table Assign states: START=000, OK1=001, OK2=011 BAD1=100, BAD2=101 Omit reset. Assume that primitive flip- flops has reset input. Rows not shown have don’t cares in output. Correspond to invalid PS values. NS2NS1NS0

Spring 2002EECS150 - Lec0-intro Page 13 FSM Implementation Notes General FSM form: All examples so far generate output based only on the present state: Commonly name Moore Machine

Spring 2002EECS150 - Lec0-intro Page 14 State Encoding In general: # of possible state = 2 # of FFs However, often more than log 2 (# of states) FFs are used, to simplify logic at the cost of more FFs. Extreme example is one-hot state encoding. One-hot encoding of states. One FF per state. Simple design procedure. Circuit matches state transition diagram. Can be costly for FSMs with large number of states

Spring 2002EECS150 - Lec0-intro Page 15 One-hot encoded FSM Even Parity Checker Circuit: In General: FFs must be initialized for correct operation (only one 1)

Spring 2002EECS150 - Lec0-intro Page 16 One-hot encoded combination lock