1 Chapter 2 Introduction To Finite State Machines Presented By: Cecilia Parng Class: C.S. 147 Prof: Sin-Min Lee.

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

FSM Design & Implementation
Lecture 8 Sequential Logic Prof. Sin-Min Lee Department of Computer Science.
State-machine structure (Mealy)
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Sequential Logic Design
Circuits require memory to store intermediate data
Lecture 22: Sequential Circuits Today’s topic –Clocks and sequential circuits –Finite state machines 1.
Finite Automata with Output
CS 151 Digital Systems Design Lecture 21 Analyzing Sequential Circuits.
1 Lecture 23 More Sequential Circuits Analysis. 2 Analysis of Combinational Vs. Sequential Circuits °Combinational : Boolean Equations Truth Table Output.
More FSM Design CT 101 – Computing Systems. String Checker - Specification Inputs a string of bits, one per clock cycle When the previous three bits form.
Nonlinear & Neural Networks LAB. CHAPTER 13 Analysis of Clocked Sequential Circuit 13.1 A Sequential Parity Checker 13.2 Analysis by Signal Tracing 13.3.
Finite state machines.
Sequential Circuit Design
ECE C03 Lecture 101 Lecture 10 Finite State Machine Design Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
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.
Contemporary Logic Design FSM Optimization © R.H. Katz Transparency No Chapter #9: Finite State Machine 9.4 Choosing Flip-Flops 9.5 Machine Partitioning.
Overview Finite State Machines
1 Synchronous Sequential Circuit Design. 2 Sequential circuit design In sequential circuit design, we turn some description into a working circuit – We.
Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Chapter 5 Register Transfer Languages.
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
1 Synchronous Sequential Circuit Analysis. 2 Synchronous Sequential Circuit State Memory – A set of n edge-triggered flip-flops that store the current.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic CMOS logic elements Combinational logic elements and design.
Lecture 17 General finite state machine (FSM) design
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
Clocked Synchronous State Machine Design
SEQUENTIAL CIRCUITS Introduction
Boolean Algebra and Digital Logic
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.
Circuit, State Diagram, State Table
State Machines.
EE434 ASIC & Digital Systems
ECE2030 Introduction to Computer Engineering Lecture 16: Finite State Machines Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering.
Sequential Logic Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer Organization and.
Moore machine and Mealy machine (P.274)
Lecture 18 More Moore/Mealy machines.
1 Lecture #12 EGR 277 – Digital Logic Synchronous Logic Circuits versus Combinational Logic Circuits A) Combinational Logic Circuits Recall that there.
ECE 3130 – Digital Electronics and Design Lab 6 State Machines Fall 2012 Allan Guan.
Counting Coins. The Basics Quarter 25 cents Dime 10 cents.
Finite State Machines CT101 – Computing Systems. FSM Overview Finite State Machine is a tool to model the desired behavior of a sequential system. The.
Introduction to State Machine
9/15/09 - L21 Sequential Circuit Analaysis Copyright Joanne DeGroat, ECE, OSU1 Sequential Circuit Analysis.
FINITE STATE MACHINES (FSMs)
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.
ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
State Table Problem #1 An electronic lock is controlled by a keypad, which has three buttons labeled A, B, and R. The keypad is restricted such that, at.
1 ENGG 1203 Tutorial Combinational Logic (II) and Sequential Logic (I) 8 Feb Learning Objectives  Apply Karnaugh map for logic simplification  Design.
Finite State Machines CS147 : Presentation by Mabel Thong (9/25/07)
Lecture 8 Theory of AUTOMATA
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
1 State Reduction Goal: reduce the number of states while keeping the external input-output requirements unchanged. State reduction example: a: input 0.

© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
COMBINATIONAL AND SEQUENTIAL CIRCUITS Guided By: Prof. P. B. Swadas Prepared By: BIRLA VISHVAKARMA MAHAVDYALAYA.
Chapter 3 Boolean Algebra and Digital Logic T103: Computer architecture, logic and information processing.
Govt. Engineering College- Gandhinagar. It is all about……  STATE MACHINE.
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
1 Lecture #15 EGR 277 – Digital Logic Reading Assignment: Chapter 5 in Digital Design, 3 rd Edition by Mano Example: (Problem 5-17 from Digital Design,

FSM Design & Implementation
Dime.
Synchronous Sequential Circuit Design
Electronics II Physics 3620 / 6620
CSE 370 – Winter Sequential Logic-2 - 1
Finite Automata with Output
Presentation transcript:

1 Chapter 2 Introduction To Finite State Machines Presented By: Cecilia Parng Class: C.S. 147 Prof: Sin-Min Lee

2 Topics To Cover 2.1State Diagrams And State Tables 2.2Mealy And Moore Machines 2.3Designing State Diagrams

3 State Table Present state Inputs Next StateOutputs A state table is similar to the truth table present state all inputs next state all outputs.

4 Important Rule for State Table Complete state table must include each possible combination of present states and input values, and no such combination may match more than one row of the table

5 State Diagrams A state diagram: Each state is represented by a circled vertex Each row of the state table is shown as directed arc J’ Y

6 Important Rule for State Diagram State diagram has same situation as state table. Their conditions should be mutually exclusive, no input values should meet the condition of more than one arc.

7 The Alarm Clock Present state AlarmWeekdayNext state Turn off alarm OnXAwake in bed YesAsleep Awake in bedOffYes Awake and up No Awake in bed Off No AsleepNo

8 State Diagram for The Alarm Clock (a) Awake in bedAsleep Alarm’ Alarm Awake and up 1 (Always) Alarm Alarm’ /\ Weekday’ Alarm’ /\ Weekday Turn off Alarm = Yes ( a )

9 The alarm clock problem with inaction states Present stateAlarmWeekdayNext stateTurn off alarm AsleepOffX Asleep No Asleep On Awake in bed Yes Awake in bed On X Awake in bed yes Awake in bed OffYesAwake and upNo Awake in bedOffNoAsleep No Awake and upX X No X

10 State Diagram for The Alarm Clock State Diagram for The Alarm Clock (b) ( b ) AsleepAwake in bed Awake and up Alarm’ / 0 Alarm / 1 Alarm’ /\ Weekday’ / 0 1 (Always) / 0 Alarm’ /\ Weekday / 0 Alarm / 1 1 = yes turn off alarm (output) 0 – no turn off alarm (output)

11 State Tables for The JK Flip-Flop ( a ) Present State Y Z Z Z Z Y Y Y JK Next StateQ Y Y Z Z Z Y Z Y

12 Condition in Terms of J and K Z J K J’K’ Q=0 Q=1 Y

13 Mealy and Moore Machines A finite state machine can represent outputs in one of two ways Moore Machines Mealy Machines

14 Moore Machines Associates its outputs with the states. Output values depend only on the state and not on the transitions. It requires less hardware to produce the output values It is well suited for representing the control units of microprocessors and cpu.

15 State Diagram for The Alarm Clock (a) Awake in bedAsleep Alarm’ Alarm Awake and up 1 (Always) Alarm Alarm’ /\ Weekday’ Alarm’ /\ Weekday Turn off Alarm = Yes Moore Machine

16 Mealy Machines Associates outputs with the transitions. It depends on both its state and its input values

17 State Diagram for The Alarm Clock State Diagram for The Alarm Clock (b) Mealy Machine AsleepAwake in bed Awake and up Alarm’ / 0 Alarm / 1 Alarm’ /\ Weekday’ / 0 1 (Always) / 0 Alarm’ /\ Weekday / 0 Alarm / 1

18 Designing State Diagrams Counter String Checker Toll Booth

19 Modulo 6 Counter A modulo 6 counter is a 3-bit counter that counts through the sequence … … Unlike a regular 3-bit counter 110(6) and 111(7) do not count

20 State Table for The Modulo 6 Counter Present StateNext StateCV 2 V 1 V 0 U S0S0 S0S0 S1S1 S1S1 S2S2 S2S2 S3S3 S3S3 S4S4 S4S4 S5S5 S5S S0S0 S1S1 S1S1 S2S2 S2S2 S3S3 S3S3 S4S4 S4S4 S5S5 S5S5 S0S

21 State Diagram for The Modulo 6 Counter (Mealy) S0S0 S5S5 S1S1 S4S4 S2S2 S3S3 0 / / / / / / / / / / / / 1000 ( a ) Mealy

22 State Diagram for The Modulo 6 Counter (Moore) S5S5 S0S0 S1S1 S4S4 S2S2 S3S3 U’ C=1 V =000 U C=0 V=0010 U C=0 V=010 U C=0 V=011 U C=0 V=100 U C=0 V=101 ( b ) Moore

23 String Checker A String Checker inputs a string of bits, one bits per clock cycle. It checks bits 1,2, and 2, then 2,3,and 4 and so forever

24 State Table For String Checker Present State S 0 S1 S 2 S 3 S 4 S 5 S 6 S LNext State S0S1S2S3S4S5S6S7S0S1S2S3S4S5S6S7S0S1S2S3S4S5S6S7S0S1S2S3S4S5S6S7 M

25 State Diagrams for the String Checker ( Mealy) S3S3 S7S7 S0S0 S1S1 S4S4 S6S6 S5S5 S2S2 0/0 1/0 0/0 1/0 0/1 1/0 Mealy

26 State Diagrams for the String Checker (Moore) S7S7 S0S0 S6S6 S5S5 S4S4 S3S3 S2S2 S1S1 M=1 I’ M=0 I’ M=0 I I I I I’ I I I I M=0 Moore

27 Toll Booth Controller A toll booth controller has two external sensors. Indicates a car is at the toll booth Indicates a coin has been deposited in the toll booth’s collection basket and its value

28 States for the toll booth controller StateCondition S NOCAR S 0 S 5 S 10 S 15 S 20 S 25 S 30 S paid S cheat No car in toll booth Car in toll booth, 0 cents paid Car in toll booth, 5 cents paid Car in toll booth, 10 cents paid Car in toll booth, 15 cents paid Car in toll booth, 20 cents paid Car in toll booth, 25 cents paid Car in toll booth, 30 cents paid Car in toll booth, full toll paid Car left toll booth without paying full toll R G A RRed light GGreen light AAlarm C = 1Car enters the toll booth C = 0No car arrives I 1 I 0 = 00no coin has been deposited I 1 I 0 = 01nickel has been deposited I 1 I 0 = 10dime has been deposited I 1 I 0 = 11quarter has been deposited

29 ***** The End

30 Happy Holidays