Finite State Machines This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this.

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

Finite State Machines (FSMs)
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
1 Combinational Logic Design&Analysis. 2 Introduction We have learned all the prerequisite material: – Truth tables and Boolean expressions describe functions.
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
التصميم المنطقي Second Course
Circuits require memory to store intermediate data
Chapter 3 Digital Logic Structures
Finite state machines.
Sequential Circuit Design
Sequential Logic Design Process A sequential circuit that controls Boolean outputs and a specific time- ordered behavior is called a controller. StepDescription.
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.
Sequential Circuit Design
Contemporary Logic Design FSM Optimization © R.H. Katz Transparency No Chapter #9: Finite State Machine 9.4 Choosing Flip-Flops 9.5 Machine Partitioning.
Combinational Logic1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
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)
Ppt-toolkit.com. Map – United States of America Individual states can be colored for highlight – click the state you would like to color and use the shape.
FSM How Finite State Machine is used to design a circuit.
Grammars This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this license, visit.
Elevator Controller We’re hired to design a digital elevator controller for a four-floor building st try: Design a counter that counts up.
Finite State Automata: A Brief Introduction CSE 260 / CMPSC 360 Doug Hogan Penn State University.
Introduction to Sequential Logic Design Finite State-Machine Design.
Introduction to State Machine
Regular Expressions This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this.
FINITE STATE MACHINES (FSMs)
Ppt-toolkit.com.
Turing Machines and the Halting Problem This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To.
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.
1 ENGG 1203 Tutorial Combinational Logic (II) and Sequential Logic (I) 8 Feb Learning Objectives  Apply Karnaugh map for logic simplification  Design.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Boolean Functions x 2 x 3 x f mapping truth table.
1 ENGG 1015 Tutorial Three Examples of Finite State Machines Supplementary notes Learning Objectives  Learn about Design of Finite State Machines Ack.:

CEC 220 Digital Circuit Design Sequence Detector Design Wednesday, April 01 CEC 220 Digital Circuit Design Slide 1 of 11.
CISSP Common Body of Knowledge Review by Alfred Ouyang is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
A sequential logic circuit (a.k.a. state machine) consists of both combinational logic circuit(s) and memory devices (flip flops). The combinational circuits.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
CISSP Common Body of Knowledge Review by Alfred Ouyang is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
State Machine Design State Machine Design Digital Electronics
1 Lecture 24 Transistors A look ahead Course summary.
Copyright Crash Course Laura Rivera EDTC
4–1. BSCS 5 th Semester Introduction Logic diagram: a graphical representation of a circuit –Each type of gate is represented by a specific graphical.
Lecture 1 Gunjeet kaur Dronacharya group of institutions.
Introduction to Automata Theory Theory of Computation Lecture 3 Tasneem Ghnaimat.
Activity 1 5 minutes Grab a whiteboard and pen, come to the front and work out the Truth Table for the following circuit: R A B C Q.
Basics of Logic gates - Part 1
Digital Logic.
Ppt-toolkit.com.
Lecture 4. Sequential Logic #2
1.3 Finite State Machines.
ANALYSIS OF SEQUENTIAL CIRCUITS
© Copyright 2004, Gaetano Borriello and Randy H. Katz
FINITE STATE MACHINES (FSMs)
CSE 370 – Winter Sequential Logic-2 - 1
HDL Hardware Description Language
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Logic Gates.
Chapter 4 Gates and Circuits.
CSE 370 – Winter Sequential Logic-2 - 1
ECE 352 Digital System Fundamentals
FINITE STATE MACHINES.
Motivation Combinational logic functions can be represented, and defined, by truth tables. Sequential logic function cannot, because their behavior depends.
Lecture 20 Logistics Last lecture Today HW6 due Wednesday
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 18 Logistics Last lecture Today HW5 due today (with extra 10%)
Presentation transcript:

Finite State Machines This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this license, visit sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

Outline and Objectives Outline Motivation Example: Door Controller Formal Definition Example/Activity: Vending Machine Learning Objectives Describe finite state machine (FSM). Give an example of a task or action that can be modelled by a FSM. Convert a simple FSM to an implementation in sequential logic.

Motivation Observation: When we act, we look at our current situation (take into account our current “state” and environment/inputs) respond (“act”) and enter a new situation This same behavior can be modelled by simple “machines”.

Example: Door Controller Consider a controller that opens an automatic door… We would like to regulate when the door should open and close… Back Sensor Front Sensor open close front back both back neither front State Diagram

Example: Door Controller Now we need to convert this diagram into something we can implement with a circuit… encode the states in Boolean variables represent the sensors as Boolean variables s=1 s=0 f=1 or b=1 (f=1 and b=1), or (b=1 and f=0), or (f=0 and b=0) f=0 and b=0 f=1 and b=0 front back both back neither front

Example: Door Controller Create a truth table taking three inputs (f, b, and s) and one output (s + ) fbss + (f,b,s)

Example: Door Controller We will use a Kmap to simply the formula for s + s + (f, b, s) = s b + f b fb/s fbss + (f,b,s)

Example: Door Controller s + (f, b, s) = s b + f b Note how the output (next state) depends on the current state. This means we will need what type of logic to implement the controller?

Example: Door Controller

Formal Definition A FSM can be fully specified by o Finite set of states S o A start state q 0 ε S o A set of accept states F o A finite set of valid inputs X (i.e., domain of input) o A transition function, f, that maps current state and input to the next state (Sipser, 35)

Example: Vending Machine We need to construct a simple machine that will determine if a combination of nickels and dimes should dispense a gumball. We should dispense the gumball when we’ve received 15¢ (i.e., accept when we have the $$). (Katz, 389)

Example: Vending Machine We create a state diagram to see how we could arrive at an accept state. 0¢5¢10¢ 15¢ N N N,D D D

Example: Vending Machine o S = {0¢, 5¢, 10¢, 15¢} o q 0 = 0¢ o F = {15¢} o X = {N, D} Curr. StateCoin Rcvd.Next State 0¢N5¢ 0¢D10¢ 5¢N10¢ 5¢D15¢ 10¢N15¢ 10¢D15¢ f(X,S) Formalizing a FSM

Example: Vending Machine Activity: Convert this FSM to a circuit. First: Determine an encoding for the states and create Boolean expressions for the transition function Then: Convert the Boolean expression to a logic diagram and implement in HDL.

References  Sipser M: Introduction to the theory of computation. 2nd ed. Boston: Thomson Course Technology;  Katz RH: Contemporary logic design. Redwood City, Calif: Benjamin/Cummings; 1994.