DLD Lecture 26 Finite State Machine Design Procedure.

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

Chapter #8: Finite State Machine Design 8
Finite State Machines (FSMs)
State-machine structure (Mealy)
State Machine Design Procedure
Analysis of Clocked Sequential Circuits
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Give qualifications of instructors: DAP
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Circuits require memory to store intermediate data
Sequential Circuit Analysis & Design Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh.
CS 151 Digital Systems Design Lecture 21 Analyzing Sequential Circuits.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
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.
Sequential Circuit Design
ECE C03 Lecture 121 Lecture 12 Finite State Machine Design Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
Spring 2002EECS150 - Lec15-seq2 Page 1 EECS150 - Digital Design Lecture 15 - Sequential Circuits II (Finite State Machines revisited) March 14, 2002 John.
1 Synchronous Sequential Circuit Design. 2 Sequential circuit design In sequential circuit design, we turn some description into a working circuit – We.
VII - Finite State Machines © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Finite State Machines Sequential circuits  primitive sequential elements.
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.
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.
SEQUENTIAL CIRCUITS Introduction
ECE 368: CAD-Based Logic Design Lecture Notes # 5
1 COMP541 State Machines Montek Singh Feb 8, 2012.
ECE C03 Lecture 101 Lecture 10 Finite State Machine Design Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Elevator Controller We’re hired to design a digital elevator controller for a four-floor building st try: Design a counter that counts up.
1 EECS 465: Digital Systems Lecture Notes # 8 Sequential Circuit (Finite-State Machine) Design SHANTANU DUTT Department of Electrical and Computer Engineering.
Chapter #8: Finite State Machine Design
VII - Finite State Machines © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Finite State Machines (FSM) Sequential circuits  primitive sequential.
Hussein Bin Sama && Tareq Alawneh
Lecture 18 More Moore/Mealy machines.
Introduction to Sequential Logic Design Finite State-Machine Design.
1 CSE370, Lecture 19 Lecture 19 u Logistics n Lab 8 this week to be done in pairs íFind a partner before your lab period íOtherwise you will have to wait.
1 CSE370, Lecture 15 Lecture 15 u Logistics n HW5 due this Friday n HW6 out today, due Friday Feb 20 n I will be away Friday, so no office hour n Bruce.
Introduction to State Machine
CSIE.NCTU, DL-6-1 Basic Design Approach of FSM Six Step Process 1. Understand the statement of the Specification 2. Obtain an abstract specification of.
Digital Logic Design.
1 Finite State Machines (FSMs) Now that we understand sequential circuits, we can use them to build: Synchronous (Clocked) Finite State Machines Finite.
1 State Reduction Goal: reduce the number of states while keeping the external input-output requirements unchanged. State reduction example: a: input 0.

ENG241 Digital Design Week #7 Sequential Circuits (Part B)
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Chapter #6: Sequential Logic Design
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Adapted by Dr. Adel Ammar
COMP541 Sequential Logic – 2: Finite State Machines
Asynchronous Inputs of a Flip-Flop
ECE 301 – Digital Electronics
FINITE STATE MACHINES (FSMs)
Sequential Networks and Finite State Machines
ECE 368: CAD-Based Logic Design Lecture Notes # 5
CSE 370 – Winter Sequential Logic-2 - 1
Introduction to Sequential Circuits
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Finite State Machines (FSMs)
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 20 Logistics Last lecture Today HW6 due Wednesday
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
Announcements Assignment 7 due now or tommorrow Assignment 8 posted
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

DLD Lecture 26 Finite State Machine Design Procedure

Overview °Design of systems that input flip flops and combinational logic °Specifications start with a word description °Create a state table to indicate next states °Convert next states and outputs to output and flip flop input equations Reduce logic expressions using truth tables °Draw resulting circuits.

Concept of the State Machine Computer Hardware = Datapath + Control Registers Combinational Functional Units (e.g., ALU) Busses FSM generating sequences of control signals Instructs datapath what to do next Qualifiers Control Datapath State Control Signal Outputs Qualifiers and Inputs

Combinational Logic Storage Elements Outputs State OutputsState Inputs Inputs °Divide circuit into combinational logic and state °Localize feedback loops and make it easy to break cycles °Implementation of storage elements leads to various forms of sequential logic Concept of the State Machine

Designing Finite State Machines °Specify the problem with words °(e.g. Design a circuit that detects three consecutive 1 inputs) °Assign binary values to states °Develop a state table °Use K-maps to simplify expressions °Flip flop input equations and output equations °Create appropriate logic diagram °Should include combinational logic and flip flops

Example: Detect 3 Consecutive 1 inputs °State S 0 : zero 1s detected °State S 1 : one 1 detected °State S 2 : two 1s detected °State S 3 : three 1s detected 0 °Note that each state has 2 output arrows °Two bits needed to encode state

State Table for Sequence Detector °Sequence of outputs, inputs, and flip flop states enumerated in state table °Present state indicates current value of flip flops °Next state indicates state after next rising clock edge °Output is output value on current clock edge Present State Next State A B x A B y Output Input °S 0 = 00 °S 1 = 01 °S 2 = 10 °S 3 = 11

Finding Expressions for Next State and Output Value °Create K-map directly from state table (3 columns = 3 K-maps) °Minimize K-maps to find SOP representations °Separate circuit for each next state and output value

Circuit for Consecutive 1s Detector °Note location of state flip flops °Output value (y) is function of state °This is a Moore machine.

Concept of the State Machine Example: Odd Parity Checker Assert output whenever input bit stream has odd # of 1's State Diagram Symbolic State Transition Table Encoded State Transition Table °Note: Present state and output are the same value ° Moore machine

Concept of the State Machine Example: Odd Parity Checker Next State/Output Functions NS = PS xor PI; OUT = PS D FF Implementation Timing Behavior: Input NS PS PI

Concept of the State Machine Example: Odd Parity Checker Next State/Output Functions NS = PS xor PI; OUT = PS D FF Implementation Timing Behavior: Input NS PS PI

Mealy and Moore Machines Solution 1: (Mealy) 0/0 Even Odd 1/1 1/0 0/1 0 Even Reset [0] Odd [1] Output Input Output Input Transition Arc Output is dependent only on current state O/P is dependent on current state and input in Mealy Solution 2: (Moore) Mealy Machine: Output is associated with the state transition - Appears before the state transition is completed (by the next clock pulse). Moore Machine: Output is associated with the state -Appears after the state transition takes place.

Vending Machine FSM Step 1. Specify the problem  Deliver package of gum after 15 cents deposited  Single coin slot for dimes, nickels  No change  Design the FSM using combinational logic and flip flops

Vending Machine FSM State Diagram Reuse states whenever possible Reuse states whenever possible Symbolic State Table

Vending Machine FSM State Encoding How many flip-flops are needed?

Vending Machine FSM Determine F/F implementation

D Q Q R Q R Q0Q0 N N Q0Q0 Q1Q1 N Q1Q1 D D0D0 D1D1 Q1Q1 OPEN D CLK Vending machine FSM implementation based on D flip-flops(Moore). Q1Q1 Q0Q0 Reset Minimized Implementation

Count Sequence Design Procedure Complex Count Sequence Step 1: Derive the State Transition Diagram Count sequence: 000, 010, 011, 101, 110

More Complex Count Sequence Design Procedure

Complex Count Sequence Design Procedure

Complex Count Sequence Design Procedure

Complex Count Sequence

Design Procedure Complex Count Sequence