TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.

Slides:



Advertisements
Similar presentations
Finite State Machine (FSM) Quando a sequencia das ações no seu projeto dependem do estado de um elemento sequüencial, uma máquina de estados finitos (FSM)
Advertisements

ENGIN112 L23: Finite State Machine Design Procedure October 27, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 23 Finite State Machine.
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.
Sequential Circuits Storage elements
VIII - Working with Sequential Logic © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Finite state machine optimization State minimization  fewer.
FSM Revisit Synchronous sequential circuit can be drawn like below  These are called FSMs  Super-important in digital circuit design FSM is composed.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Chapter 3 Digital Logic Structures
Digital Alarm System Experiment 9. Experiment 8: What You May Have Missed Continued use of structural modelingContinued use of structural modeling VHDL.
DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali.
ECE 331 – Digital System Design
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 3 Microcomputer Systems Design (Embedded Systems)
Give qualifications of instructors: DAP
ENEE 408C Lab Capstone Project: Digital System Design Fall 2005 Sequential Circuit Design.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts,
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)
9/15/09 - L22 Sequential Circuit Design Copyright Joanne DeGroat, ECE, OSU1 Sequential Circuit Design Creating a sequential circuit to address a.
Lecture 17 General finite state machine (FSM) design
ECE/CS 352 Digital System Fundamentals© T. Kaminski & C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapter 4 – Part 3 Tom Kaminski & Charles.
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
IKI c-Synthesis of Sequential Logic Bobby Nazief Semester-I The materials on these slides are adopted from: Prof. Daniel Gajski’s transparency.
Sequential Logic in Verilog
ECE 331 – Digital Systems Design Sequential Logic Circuits: FSM Design (Lecture #20)
1 COMP541 State Machines Montek Singh Feb 8, 2012.
State Machines.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Ders 8: FSM Gerçekleme ve.
George Mason University ECE 545 – Introduction to VHDL ECE 545 Lecture 5 Finite State Machines.
EEE2243 Digital System Design Chapter 4: Verilog HDL (Sequential) by Muhazam Mustapha, January 2011.
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
FINITE STATE MACHINES (FSMs)
DLD Lecture 26 Finite State Machine Design Procedure.
Sequential Circuit: Analysis BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
VHDL Discussion Finite State Machines
VHDL Discussion Finite State Machines IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
Registers; State Machines Analysis Section 7-1 Section 5-4.
Introduction to ASIC flow and Verilog HDL
Digital System Design using VHDL
SYEN 3330 Digital SystemsJung H. Kim 1 SYEN 3330 Digital Systems Chapter 6 – Part 4.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Chapter 11: System Design.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Introduction to Sequential Logic Design Finite State-Machine Analysis.
1 Overview of CS 151 Fall Combinational Logic Design –Simplifying a logic function using algebraic method –Truth table and logic function representation.
Finite State Machine. Clock Clock cycle Sequential circuit Digital logic systems can be classified as combinational or sequential. – Combinational circuits.
Interrupt, again! Lin Zhong ELEC424, Fall 2010.
TOPIC : Introduction to Sequential Circuits UNIT 1: Modeling and Simulation Module 4 : Modeling Sequential Circuits.
Govt. Engineering College- Gandhinagar. It is all about……  STATE MACHINE.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
Finite State Machines Mealy machine inputs Outputs next state function
Introduction to Sequential Logic Design
Introduction to Advanced Digital Design (14 Marks)
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Learning Outcome By the end of this chapter, students are expected to refresh their knowledge on sequential logic related to HDL.
FIGURE 5.1 Block diagram of sequential circuit
Digital Design Lecture 9
ECE 301 – Digital Electronics
Simple Processor Control Unit
FINITE STATE MACHINES (FSMs)
Finite State Machines Experiment 4 Introduction
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
SYEN 3330 Digital Systems Chapter 6 – Part 3 SYEN 3330 Digital Systems.
Lecture 20 Logistics Last lecture Today HW6 due Wednesday
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Instructor: Alexander Stoytchev
ECE 352 Digital System Fundamentals
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits

FSM : Introduction A finite state machine (FSM) is a model of behavior composed of a finite number of states, transitions between those states, and actions Any Circuit with Memory is a Finite State Machine Even computers can be viewed as huge FSMs

Designing FSM Defining states : Total states that system can take. Defining transitions between states: Logic behind going from one state to another. Optimization / minimization : Optimizing a FSM means finding the machine with the minimum number of states that performs the same function.

FSM in digital circuits In digital circuits FSM can be made using two types of elements : ◦ Sequential : Any storage element such as Registers which will store the state of System. ◦ Combinational : 1) How the states are changing from one to another. 2) How the output is calculated. FSM are of two types : ◦ Moore FSM ◦ Mealy FSM

Moore FSM Output only depend on the present state. S0 / 0 S1 / 0 S2 / NOTE: S0/0 = State/output Moore FSM for “10” sequence detector In state S2 output = 1, since 10 sequence is detected

Mealy FSM Output Is a Function of a Present State and Inputs Mealy always have less number of state than Moore. S0 S1 0 / 0 1 / 0 0 / 1 reset Mealy FSM for “10” sequence detector

HDL code for Moore FSM IF(reset = ‘1’) Moore_state <= S0; ELSIF (clock = ‘1’ AND clock’event) THEN CASE (Moore_state) S0 : IF (input = ‘1’) Moore_state <= S1; ElseMoore_state <= S0; S1: If (input == 0) Moore_state = S2; ElseMoore_state = S1; S2: If (input = ‘0’) Moore_state <= S0; Else Moore_state <= S1; End Case;

8 example: A simple vending machine Here is how the control is supposed to work. The vending machine delivers a package of gum after it has received 15 cents in coins. The machine has a single coin slot that accepts nickels and dimes, one coin at a time. A mechanical sensor indicates to the control whether a dime or a nickel has been inserted into the coin slot. The controller’s output causes a single package of gum to be released down a chute to the customer. One further specification: We will design our machine so it does not give change. A customer who pays with two dimes is out 5 cents! Vending Machine FSM CLK Reset Coin Sensor Gum Release Mechanism Open Vending Machine block diagram 0C  15C 10C 5C5C States:

9 — The figure below show the Moore and Mealy machine state transition diagrams. 0 cent [0] 5 cent [0] 10 cent [0] 15 cent [1] Moore machine 15 cent 10 cent 5 cent 0 cent Mealy machine Moore and Mealy machine state diagrams for the vending machine FSM Reset / 0 Reset Reset / 0 N / 0 D / 0 N / 0 N+D/1 N+D N D N D D/1 Reset )/0 Reset )/0

Flow Tables FSM can be represented in a tabular form which is known as Flow Table. In a flow table the states are named by letter symbols. Present state X1X2X3X4 S0S1,0S3,0 S0,1 S2S1,0S2,0S3,0S0,0 S3S2,0 S0,0 S4S3,0 S0,1 Input S0,1 = next state, output

Flow Table for Vendor machine Example