Finite State Machine. Clock Clock cycle Sequential circuit Digital logic systems can be classified as combinational or sequential. – Combinational circuits.

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 Machine Continued
Introduction to Sequential Circuits
Lecture 13: Sequential Circuits
Sequential Circuits Storage elements
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Give qualifications of instructors: DAP
Circuits require memory to store intermediate data
Lecture 22: Sequential Circuits Today’s topic –Clocks and sequential circuits –Finite state machines 1.
FSMs 1 Computer Organization I September 2009 © McQuain, Feng & Ribbens Motivation Combinational logic functions can be represented, and defined,
Our First Real System.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
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
Sequential Logic Design Process A sequential circuit that controls Boolean outputs and a specific time- ordered behavior is called a controller. StepDescription.
Modern VLSI Design 2e: Chapter 5 Copyright  1998 Prentice Hall PTR Topics n Sequential machine implementation: –clocking. n Sequential machine design.
ECE C03 Lecture 101 Lecture 10 Finite State Machine Design Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Fall 2007 L15: Combinational Circuits Lecture 15: Combinational Circuits Complete logic functions Some combinational logic functions –Half adders –Adders.
Give qualifications of instructors: DAP
Overview Finite State Machines - Sequential circuits with inputs and outputs State Diagrams - An abstraction tool to visualize and analyze sequential circuits.
State Machines Used to Design Sequential Circuits.
1 Lecture 14: FSM and Basic CPU Design Today’s topics:  Finite state machines  Single-cycle CPU Reminder: midterm on Tue 10/24  will cover Chapters.
Overview Finite State Machines
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)
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
Lecture 8: Sequential Networks and Finite State Machines CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer.
11/10/ :53:59 AMweek12-3.ppt1 Intelligent Traffic Controller We want to use a finite state machine to control the traffic lights at an intersection.
EE434 ASIC & Digital Systems
Chapter 10 State Machine Design. 2 State Machine Definitions State Machine: A synchronous sequential circuit consisting of a sequential logic section.
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
DLD Lecture 26 Finite State Machine Design Procedure.
Modern VLSI Design 4e: Chapter 5 Copyright  2008 Wayne Wolf Topics n Sequential machine implementation: –clocking. n Sequential machine design.
ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
VHDL Discussion Finite State Machines
1 EE121 John Wakerly Lecture #12 PLD-based state machine structures WITH statements Finite-memory state-machine design PLD-based state-machine design.
VHDL Discussion Finite State Machines IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
Digital System Design using VHDL

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.
Introduction to Sequential Logic Design Finite State-Machine Analysis.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
Computer Architecture Lecture 5 Sequential Circuits Ralph Grishman September 2015 NYU.
Govt. Engineering College- Gandhinagar. It is all about……  STATE MACHINE.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
Exp#7 Finite State Machine Design in Verilog COE203 Digital Logic Laboratory Dr. Ahmad Almulhem KFUPM Spring 2009.
Appendix B The Basics of Logic Design
1 Lecture 13: Sequential Circuits, FSM Today’s topics:  Sequential circuits  Finite state machines  Single-cycle CPU Reminder: midterm on Tue 10/20.
Finite State Machines Mealy machine inputs Outputs next state function
Lecture 4. Sequential Logic #2
Introduction to Sequential Logic Design
Motivation Combinational logic functions can be represented, and defined, by truth tables. Sequential logic function cannot, because their behavior depends.
Appendix B The Basics of Logic Design
Lecture 13: Sequential Circuits, FSM
CSE 140L Discussion Finite State Machines.
Lecture 13: Sequential Circuits, FSM
Introduction to Sequential Circuits
Analysis of Synchronous Sequential Circuits
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Sequential logic implementation
Combinational Circuits
SYEN 3330 Digital Systems Chapter 6 – Part 3 SYEN 3330 Digital Systems.
Motivation Combinational logic functions can be represented, and defined, by truth tables. Sequential logic function cannot, because their behavior depends.
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
EGR 2131 Unit 12 Synchronous Sequential Circuits
Finite State Machine Continued
Lecture 4: Finite State Machines
Presentation transcript:

Finite State Machine

Clock

Clock cycle

Sequential circuit Digital logic systems can be classified as combinational or sequential. – Combinational circuits can be completely described by the truth table. – Sequential systems contain state stored in memory elements internal to the system. Their behavior depends both on the set of inputs supplied and on the contents of the internal memory, or state of the system. Thus, a sequential system cannot be described with a truth table. Instead, a sequential system is described as a finite-state machine (or often just state machine).

11/10/ :52:10 AMweek12-3.ppt5 Finite State Machines A finite state machine has a set of states and two functions called the next-state function and the output function – The set of states correspond to all the possible combinations of the internal storage If there are n bits of storage, there are 2 n possible states – The next state function is a combinational logic function that given the inputs and the current state, determines the next state of the system

11/10/ :52:34 AMweek12-3.ppt6 Finite State Machines The output function produces a set of outputs from the current state and the inputs – There are two types of finite state machines – In a Moore machine, the output only depends on the current state – While in a Mealy machine, the output depends both the current state and the current input – We are only going to deal with the Moore machine. – These two types are equivalent in capabilities

11/10/ :55:37 AMweek12-3.ppt7 Finite State Machine Using a State Register

11/10/ :55:38 AMweek12-3.ppt8 Implementing an FSM D Q Current state Implement transition functions (using a ROM or combinational circuits) InputsOutputs Next state

11/10/ :53:06 AMweek12-3.ppt9 Finite State Machines A Finite State Machine consists of: K states: S = {s 1, s 2, …,s k }, s 1 is initial state N inputs: I = {i 1, i 2, …,i n } M outputs: O = {o 1, o 2, …,o m } Next-state function T(S, I) mapping each current state and input to next state Output Function P(S) specifies output

11/10/ :53:59 AMweek12-3.ppt10 Intelligent Traffic Controller We want to use a finite state machine to control the traffic lights at an intersection of a north-south route and an east- west route – We consider only the green and red lights – We want the lights to change no faster than 30 seconds in each direction So we use a Hz clock

11/10/ :54:14 AMweek12-3.ppt11 Intelligent Traffic Controller There are two output signals – NSlite: When the signal is asserted, the light on the north-south route is green; otherwise, it should be red – EWlite: When the signal is asserted, the light on the east-west route is green; otherwise, it should be red

11/10/ :54:22 AMweek12-3.ppt12 Intelligent Traffic Controller There are two inputs – NScar: Indicates that there is at least one car that is over the detectors placed in the roadbed in the north-south road – EWcar: Indicates that there is at least one car that is over the detectors placed in the roadbed in the east-west road

11/10/ :54:32 AMweek12-3.ppt13 Intelligent Traffic Controller The traffic lights should only change from one direction to the other only if there is a car waiting in the other direction – Otherwise, the light should continue to show green in the same direction

11/10/ :54:40 AMweek12-3.ppt14 Intelligent Traffic Controller Here we need two states – NSgreen: The traffic light is green in the north- south direction – EWgreen: The traffic light is green in the east-west direction

11/10/ :55:01 AMweek12-3.ppt15 Graphical Representation

11/10/ :54:47 AMweek12-3.ppt16 Next State Function and Output Function

11/10/ :55:05 AMweek12-3.ppt17 State Assignment We need to assign state numbers to the states – In this case, we can assign NSgreen to state 0 and EWgreen to state 1 – Therefore we only need 1 bit in the state register

11/10/ :55:12 AMweek12-3.ppt18 Combinational Logic for Next State Function

11/15/2007 2:38:31 PMweek12-5.ppt19 Implementing Intelligent Traffic Controller