State Reduction and State Assignment

Slides:



Advertisements
Similar presentations
©2004 Brooks/Cole FIGURES FOR CHAPTER 15 REDUCTION OF STATE TABLES STATE ASSIGNMENT Click the mouse to move to the next page. Use the ESC key to exit this.
Advertisements

L8 – Reduction of State Tables. Reduction of states  Given a state table reduce the number of states.  Eliminate redundant states  Ref: text Unit 15.
STATE DIAGRAM AND STATE TABLES
State-machine structure (Mealy)
State Machine Design Procedure
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
COE 202: Digital Logic Design Sequential Circuits Part 3
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Digital Logic Design Lecture 27.
Nonlinear & Neural Networks LAB. CHAPTER 13 Analysis of Clocked Sequential Circuit 13.1 A Sequential Parity Checker 13.2 Analysis by Signal Tracing 13.3.
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.
Sequential Circuits and Finite State Machines Prof. Sin-Min Lee
1 State Reduction: Row Matching Example 1, Section 14.3 is reworked, setting up enough states to remember the first three bits of every possible input.
Synchronous circuit design and analysis. Synchronous circuit design To implement a synchronous circuit corresponding to a given specification Revision.
ECE 331 – Digital System Design Sequential Circuit Design (Lecture #23) The slides included herein were taken from the materials accompanying Fundamentals.
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.
IKI c-Synthesis of Sequential Logic Bobby Nazief Semester-I The materials on these slides are adopted from: Prof. Daniel Gajski’s transparency.
L5 – Sequential Circuit Design
Synchronous Circuit Design (Class 10.1 – 10/30/2012) CSE 2441 – Introduction to Digital Logic Fall 2012 Instructor – Bill Carroll, Professor of CSE.
Unit 14 Derivation of State Graphs
L10 – State Machine Design Topics. States Machine Design  Other topics on state machine design Equivalent sequential machines Incompletely specified.
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
1 Lecture #12 EGR 277 – Digital Logic Synchronous Logic Circuits versus Combinational Logic Circuits A) Combinational Logic Circuits Recall that there.
CPEN Digital System Design Chapter 5 - Sequential Circuits Sequential Circuit Design C. Gerousis © Logic and Computer Design Fundamentals, 4 rd Ed.,
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits Previously, we described the basic building blocks of sequential circuits,
Introduction to State Machine
DESIGN OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
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)
CHAPTER 16 SEQUENTIAL CIRCUIT DESIGN
Synchronous Sequential Logic
Week #7 Sequential Circuits (Part B)
SLIDES FOR CHAPTER 15 REDUCTION OF STATE TABLES STATE ASSIGNMENT
L5 – Sequential Circuit Design
ANALYSIS OF SEQUENTIAL CIRCUITS
Sequential logic design principles
Adapted by Dr. Adel Ammar
Analysis of Clocked Sequential Circuit
FIGURE 5.1 Block diagram of sequential circuit
Asynchronous Inputs of a Flip-Flop
ECE 301 – Digital Electronics
T Flip-Flop A T (toggle) flip-flop is a complementing flip-flop and can be obtained from a JK flip-flop when the two inputs are tied together. When T.
FINITE STATE MACHINES (FSMs)
332:437 Lecture 12 Finite State Machine Design
CENG 241 Digital Design 1 Lecture 11
Lecture 14 Reduction of State Tables
Sequential circuit design
INTRODUCTION TO LOGIC DESIGN Chapter 5 Synchronous Sequential Logic
L10 – additional State Machine examples
Sequential circuit design
CHAPTER 15 REDUCTION OF STATE TABLES STATE ASSIGNMENT
DESIGN OF SEQUENTIAL CIRCUITS
L11 – Midterm Review.
Analysis with JK flip-flops
SYEN 3330 Digital Systems Chapter 6 – Part 3 SYEN 3330 Digital Systems.
ECE 352 Digital System Fundamentals
Instructor: Alexander Stoytchev
ECE 352 Digital System Fundamentals
Chapter5: Synchronous Sequential Logic – Part 3
CSE 370 – Winter Sequential Logic-2 - 1
COE 202: Digital Logic Design Sequential Circuits Part 3
Chapter 9 -- Simplification of Sequential Circuits
Presentation transcript:

State Reduction and State Assignment

Elimination of Redundant States Fall 2010 ECE 331 - Digital System Design

Elimination of Redundant States In Unit 14, we were careful to avoid introducing unnecessary states when setting up a state graph or table. We will now approach the problem of deriving the state graph somewhat differently. When first setting up the state table, we will not be overly concerned with inclusion of extra states, and when the table is complete, we will eliminate any redundant states. We will rework Example 1 in Section 14.3 using excess states, and then eliminate the excess states. Fall 2010 ECE 331 - Digital System Design

Example: Sequence Detector A sequential circuit has one input (X) and one output (Z). The circuit examines groups of four consecutive inputs and produces an output Z = 1 if the input sequence 0101 or 1001 occurs. The circuit resets after every four inputs. Find a Mealy state graph. A typical input and output sequence is: Fall 2010 ECE 331 - Digital System Design

Example: Sequence Detector State Table Fall 2010 ECE 331 - Digital System Design

Example: Sequence Detector Since states H and I have the same next states and the same outputs, there is no way of telling states H and I apart. We can replace I with H. Fall 2010 ECE 331 - Digital System Design

Example: Sequence Detector Reduced State Table Fall 2010 ECE 331 - Digital System Design

Example: Sequence Detector Reduced State Graph Fall 2010 ECE 331 - Digital System Design

Determination of Equivalent States a ≡ b iff d ≡ f and c ≡ h a ≡ d iff a ≡ d and c ≡ e Fall 2010 ECE 331 - Digital System Design

ECE 331 - Digital System Design Implication Chart Fall 2010 ECE 331 - Digital System Design

ECE 331 - Digital System Design Implication Chart After first pass. Fall 2010 ECE 331 - Digital System Design

ECE 331 - Digital System Design Implication Chart After second pass. Fall 2010 ECE 331 - Digital System Design

Implication Table Method 3. Go through the table square-by-square. If square i-j contains the implied pair m-n, and square m-n contains an X, then i j, and an X should be placed in square i-j. 4. If any X’s were added in step 3, repeat step 3 until no more X’s are added. 5. For each square i-j which does not contain an X, i ≡ j. Fall 2010 ECE 331 - Digital System Design

Future site of another example. Fall 2010 ECE 331 - Digital System Design

Derivation of FF Input Equations Fall 2010 ECE 331 - Digital System Design

Derivation of FF Input Equations After the number of states in a state table has been reduced, the following procedure can be used to derive the flip-flop input equations: Assign flip-flop state values to correspond to the states in the reduced table. Construct a transition table which gives the next states of the flip-flops as a function of the present states and inputs. Derive the next-state maps from the transition table. Find flip-flop input maps from the next-state maps using the techniques developed in Unit 12 and find the flip-flop input equations from the maps. Fall 2010 ECE 331 - Digital System Design

Example #1: FF Input Equations Assign flip-flop state values to correspond to the states in the reduced table. Construct a transition table which gives the next states of the flip-flops as a function of the present states and inputs. Fall 2010 ECE 331 - Digital System Design

Example #1: FF Input Equations 3. Derive the next-state maps from the transition table. D FF Characteristic Equation: Q+ = D Fall 2010 ECE 331 - Digital System Design

Example #1: FF Input Equations 4. Derive the flip-flop input maps from the next-state maps; determine the flip-flop input equations from the FF input maps. JK Excitation Table Q Q+ J K x 1 Fall 2010

Example #2: FF Input Equations Assign flip-flop state values to correspond to the states in the reduced table. Construct a transition table which gives the next states of the flip-flops as a function of the present states and inputs. Fall 2010 ECE 331 - Digital System Design

Example #2: FF Input Equations 3. Derive the next-state maps from the transition table. D FF Characteristic Equation: Q+ = D Fall 2010

Example #2: FF Input Equations 4. Derive the flip-flop input maps from the next-state maps; determine the flip-flop input equations from the FF input maps. SR Excitation Table Q Q+ S R x 1 Fall 2010

ECE 331 - Digital System Design State Assignment Fall 2010 ECE 331 - Digital System Design

ECE 331 - Digital System Design State Assignments After the number of states in a state table has been reduced, the next step in realizing the transition table (aka. state- assigned table) is to assign flip-flop states (i.e. binary values) to correspond to the states in the state table. The cost of the logic required to realize a sequential circuit is strongly dependent on the way this state assignment is made. Fall 2010 ECE 331 - Digital System Design

ECE 331 - Digital System Design State Assignments Given a sequential circuit with three states and two flip-flops (A and B), there are 4 × 3 × 2 = 24 possible state assignments for the three states. Fall 2010 ECE 331 - Digital System Design

ECE 331 - Digital System Design State Assignments When realizing a three-state sequential circuit with symmetrical flip-flops (i.e. JK or SR), it is only necessary to try three different states to be assured of a minimum cost realization. Similarly, only three different assignments must be tried for four states. Fall 2010 ECE 331 - Digital System Design

ECE 331 - Digital System Design State Assignments Fall 2010 ECE 331 - Digital System Design

Guidelines for State Assignment Trying all nonequivalent state assignments is not practical in most cases. The following guidelines are useful in making assignments which will place 1’s (or 0's) together in the next-state maps: States which have the same next state for a given input should be given adjacent assignments. States which are the next states of the same state should be given adjacent assignments. States which have the same output for a given input should be given adjacent assignments. Fall 2010 ECE 331 - Digital System Design

Example: Selecting an Assignment States which have the same next state for a given input should be given adjacent assignments. States which are the next states of the same state should be given adjacent assignments. States which have the same output for a given input should be given adjacent assignments. Fall 2010 ECE 331 - Digital System Design

Example: Selecting an Assignment Based on the State Assignment Guidelines: 1. (b, d) (c, f) (b, e) 2. (a, c) (d, f) (b, d) (b, f) (c, e) 3. (a, c) (b, d) (e, f) Fall 2010 ECE 331 - Digital System Design

Example: Selecting an Assignment Resulting Transition Table: Fall 2010 ECE 331 - Digital System Design

Example: Selecting an Assignment Derivation of FF input equations from next-state maps: Fall 2010 ECE 331 - Digital System Design

One-Hot State Assignment Sometimes reducing the number of flip-flops used is not as important as reducing the logic feeding into the flip-flops. Using a one-hot state assignment may help accomplish this. The one-hot assignment uses one flip-flop for each state, so a state machine with N states requires N flip-flops. Exactly one of the flip-flops is set to one in each state. Fall 2010 ECE 331 - Digital System Design

Example: State Assignments For a four-state FSM, three possible state assignments are: State Binary Gray-code One-hot S0 00 0001 S1 01 0010 S2 10 11 0100 S3 1000 # of FF 2 4 Fall 2010 ECE 331 - Digital System Design

ECE 331 - Digital System Design Questions? Fall 2010 ECE 331 - Digital System Design