Sources Gang Quan Univ. of Notre Dame Finite State Machines.

Slides:



Advertisements
Similar presentations
VHDL 5 FINITE STATE MACHINES (FSM) Some pictures are obtained from FPGA Express VHDL Reference Manual, it is accessible from the machines in the lab at.
Advertisements

Introduction to Sequential Circuits
Some Slides from: U.C. Berkeley, U.C. Berkeley, Alan Mishchenko, Alan Mishchenko, Mike Miller, Mike Miller, Gaetano Borriello Gaetano Borriello Introduction.
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.
1 State Assignment Using Partition Pairs 2  This method allows for finding high quality solutions but is slow and complicated  Only computer approach.
Digital Logic Design Lecture 27.
Introduction to Data Flow Graphs and their Scheduling Sources: Gang Quan.
Digital Alarm System Experiment 9. Experiment 8: What You May Have Missed Continued use of structural modelingContinued use of structural modeling VHDL.
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
ECE 331 – Digital System Design Introduction to and Analysis of Sequential Logic Circuits (Lecture #20) The slides included herein were taken from the.
ECE 331 – Digital System Design State Reduction and State Assignment (Lecture #22) The slides included herein were taken from the materials accompanying.
ECE 331 – Digital System Design
ECE C03 Lecture 111 Lecture 11 Finite State Machine Optimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
FSMs 1 Sequential logic implementation  Sequential circuits  primitive sequential elements  combinational logic  Models for representing sequential.
Esterel Overview Roberto Passerone ee249 discussion section.
ECE C03 Lecture 131 Lecture 13 Finite State Machine Optimization Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
Finite State Machine Minimization Advanced Methods based on triangular table and binate covering.
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.
Contemporary Logic Design FSM Optimization © R.H. Katz Transparency No Chapter #9: Finite State Machine 9.4 Choosing Flip-Flops 9.5 Machine Partitioning.
ENEE 408C Lab Capstone Project: Digital System Design Fall 2005 Sequential Circuit Design.
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.
CSCI 3301 Transparency No. 9-1 Chapter #9: Finite State Machine Optimization Contemporary Logic Design.
Introduction to Data Flow Graphs and their Scheduling Sources: Gang Quan.
Lecture 17 General finite state machine (FSM) design
CSE 311: Foundations of Computing Fall 2014 Lecture 23: State Minimization, NFAs.
IKI c-Synthesis of Sequential Logic Bobby Nazief Semester-I The materials on these slides are adopted from: Prof. Daniel Gajski’s transparency.
Chapter 5 - Part Sequential Circuit Design Design Procedure  Specification  Formulation - Obtain a state diagram or state table  State Assignment.
1 COMP541 State Machines Montek Singh Feb 8, 2012.
State Machines.
Sequential Logic Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer Organization and.
Introduction to Sequential Logic Design Finite State-Machine Design.
Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers.
Announcements Assignment 8 posted –Due Friday Dec 2 nd. A bit longer than others. Project progress? Dates –Thursday 12/1 review lecture –Tuesday 12/6 project.
Finite State Machines CT101 – Computing Systems. FSM Overview Finite State Machine is a tool to model the desired behavior of a sequential system. The.
Module : FSM Topic : types of FSM. Two types of FSM The instant of transition from the present to the next can be completely controlled by a clock; additionally,
Introduction to State Machine
MA/CSSE 474 Theory of Computation Decision Problems DFSMs.
Review of Digital Logic Design Concepts OR: What I Need to Know from Digital Logic Design (EEL3705)
Sources Gang Quan Univ. of Notre Dame Finite State Machines.
FINITE STATE MACHINES (FSMs)
1 Finite State Machines (FSMs) Now that we understand sequential circuits, we can use them to build: Synchronous (Clocked) Finite State Machines Finite.
Digital Circuits State Reduction and Assignment State Reduction reductions on the number of flip-flops and the number of gates a reduction in the.
Analysis and Synthesis of Synchronous Sequential Circuits A “synchronizing” pulse/edge signal (clock) controls the operation of the memory portion of the.
Registers; State Machines Analysis Section 7-1 Section 5-4.
Sequential Design Motivation Sequential processing often more tractable than parallel Example Sequential processing sometimes only method that works Example.
CEC 220 Digital Circuit Design Mealy and Moore State Machines Friday, March 27 CEC 220 Digital Circuit Design Slide 1 of 16.
Modeling Computation: Finite State Machines without Output
1 COMP541 Finite State Machines - 1 Montek Singh Sep 22, 2014.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Govt. Engineering College- Gandhinagar. It is all about……  STATE MACHINE.
MA/CSSE 474 Theory of Computation Decision Problems, Continued DFSMs.
1 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
Finite State Machines Mealy machine inputs Outputs next state function
Capabilities, Minimization, and Transformation of Sequential Machines

Sequential logic design principles
IAY 0600 Digital Systems Design
FINITE STATE MACHINES (FSMs)
CSE 370 – Winter Sequential Logic-2 - 1
Regular Expression Manipulation FSM Model
IAS 0600 Digital Systems Design
CSE 370 – Winter Sequential Logic-2 - 1
CS M51A/EE M16 Winter’05 Section 1 Logic Design of Digital Systems Lecture 11 February 23 W’05 Yutao He 4532B Boelter Hall
ECE 352 Digital System Fundamentals
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

Sources Gang Quan Univ. of Notre Dame Finite State Machines

Review Data Flow Graph – data dependency Control/Data Flow Graph – control dependency How about a reactive system?

Finite State Machine What ? If the driver turns on the key, and does not fasten the seat belt within 5 seconds then an alarm beeps for 5 seconds, or until the driver fastens the seat belt, or until the driver turns off the key

Key_on/Start timer Key_off /Stop timer Timer>5 Timer>10, or belt_on, or key_off /Stop timer Wait Alarm On Alarm Off Alarm Off An FSM

An FSM (Cont’d) States Alarm off, Alarm on, Wait Initial State Alarm off Inputs Turn on/off the key, fasten the seat belt, timer reads Outputs Start/stop the timer Start transitions Alarm off + Turn on the key  Wait Output Alarm off + Turn on the key  start the timer

Finite State Machine FSM = ( S, I, O, s 0,, ) – S = {s 0,s 1,…,s k } – I = {i 1,i 2,…,i m } – O = {o 1,o 2,…,o n } – : S x I  S (Transition function) – : S x I  O (Output function) Given an input sequence, an output sequence is produced which is depended on s 0,,and.

Representation States Alarm off (s 0 ), Alarm on (s 1 ), Wait (s 2 ) Initial State Alarm off (s 0 ) Inputs Turn on/off the key (i 0 /i 1 ), fasten the seat belt (i 2 ), timer > 5 (i 3 ), time > 10 (i 4 ) Outputs Start/stop the timer (o 0 /o 1 ) Given

Transition Graph i 0 /o 0 i 1 /o 1 i2i2 (i 1 +i 2 +i 4 )/o 1 S1S1 S2S2 Alarm Off S0S0

Transition Function s1 = s0 * i0 s0=s1*i1 s2=s1 * i3 s0=s2*(i1+i2+i4) Output Function O 0 = s 0 * i 0 O 1 =s 1 *i 1 O 1 =s 2 *(i 1 +i 2 +i 4 )

Transition Table S0S0 S1S1 S2S2 i0i0 S1S1 XX i1i1 XS0S0 S0S0 i2i2 XS2S2 S0S0 i3i3 XXX i4i4 XXS0S0 S0S0 S1S1 S2S2 i0i0 o0o0 -- i1i1 -o1o1 o1o1 i2i2 --o1o1 i3i3 --- i4i4 --o1o1 StateOutput X: don’t care

Mealy Machine and Moore Machine Mealy Machine – The output is a function of both the current state and the input Moore Machine – The output is only a function of the current state

Transition Graph For Moore Machine Key_on Key_off Timer>5 Timer>10, or belt_on, or key_off Wait Alarm /Start Alarm Init/stop timer stop alarm Timer /Start Timer Timer<=5

Mealy/Moore Machine An FSM can be realized either by Mealy or Moore machine Mealy machine may use less flip-flops and output signals are immediately after the transition Moore machine may use more flip-flops and output signals valid except during the transition

Nondeterministic FSM Deterministic FSM – Given a state and input, there is exactly one next state Nondeterministic FSM (NFSM) – Given a state and input, there maybe more than one next state, or a state can transform from one state to anther without any input, or for some given input there no next state at all For any NFSM, there is always one equivalent FSM

Nondeterministic FSM For unknown/unspecified behavior Less states, more compact Useful for Optimization Verification Can be refined For any NFSM, there is always one equivalent DFSM

NFSM and FSM i 0 /o 0 i 1 /o 1 i2i2 (i 1 +i 2 +i 4 ) /o 1 S1S1 S2S2 S0S0 i 0 /o 0 i 1 /o 1 i2i2 S1S1 S2S2 S0S0 i 2 /o 1 i 4 /o 1 i0/i0/ i3/i3/ i1/i1/ i2/i2/ i3/i3/ i4/i4/ i0/i0/ i2/i2/ i4/i4/

Equivalence iff Two FSMs are equivalent iff for any given input sequence, identical output sequences are produced

Equivalence 1/1 S1S1 S2S2 S0S0 S3S3 0/0 1/1 0/0 1/1 S1S1 S0S0 0/01/1 0/0

Minimization What – Given an FSM, find the equivalent FSM with a minimum number of states Two states s1 and s2 in an FSM are equivalent iff each input sequence beginning from s1 yields an output sequence identical to that obtained by starting from s2 How

Minimization(Moore Machine) For each pair of the states (si,sj) If si and sj have different output Mark si and si as not equivalent End for Do for each unmarked pair for each input, si and sj are transferred to states which are not equivalent Mark si and sj as not equivalent end for until no mark is possible Unmarked pairs are equivalent

Minimization S 0 /0 S 2 /1 S 3 /1 S 1 / (s0, s1) (s0,s2) (s0,s3) (s1,s2) (s1,s3) (s2,s3)

Minimization S 0 /0 S 2 /1 S 3 / ,1 0 (s0, s1) (s0,s2) (s0,s3) (s1,s2) (s1,s3) (s2,s3)

Review for Exams (1)Review for Exams (1) 1.Finite State Machine Types –Mealy –Moore –Rabin-Scott 2.Timing of Machine Synchronous Asynchronous Globally Asynchronous Locally Synchronous Memory in Logic 3.Determinism Deterministic Non-deterministic Probabilistic Entangled (only in quantum) 4.What is attached to Machine –Reactive Subsumption Architecture –Stack Machine –Turing Machine –Hybrid Machine

Review for Exams (2)Review for Exams (2) 1.What is minimization of a Finite State Machine? 2.Show example of state minimization 3.Show example of output minimization 4.Show example of input minimization 5.What is state assignment of FSM? Remember that I do not require full procedures for minimization, verification, partitioning, decomposition or state assignment. I require only understanding of these concepts.