ECE 331 – Digital System Design State Reduction and State Assignment (Lecture #22) The slides included herein were taken from the materials accompanying.

Slides:



Advertisements
Similar presentations
L8 – Reduction of State Tables. Reduction of states  Given a state table reduce the number of states.  Eliminate redundant states  Ref: text Unit 15.
Advertisements

State-machine structure (Mealy)
State Machine Design Procedure
ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
1 EE365 Sequential-circuit analysis. 2 Clocked synchronous seq. circuits A.k.a. “state machines” Use edge-triggered flip-flops All flip-flops are triggered.
Digital Logic Design Lecture 27.
Nonlinear & Neural Networks LAB. CHAPTER 19 State Machine Design with SM charts 19.1 State Machine Charts 19.2 Derivation of SM Charts 19.3 Realization.
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 Flip-Flops and Registers (Lecture #18) The slides included herein were taken from the materials accompanying Fundamentals.
Sequential Circuit Design
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
ECE 331 – Digital System Design
Sequential Circuit Design. 2 State Optimization Equivalent States:  Two states are equivalent if, for each member of the set of inputs,  they give exactly.
ECE C03 Lecture 111 Lecture 11 Finite State Machine Optimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE C03 Lecture 131 Lecture 13 Finite State Machine Optimization Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
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.
Sequential Circuit Design
Spring 2002EECS150 - Lec15-seq2 Page 1 EECS150 - Digital Design Lecture 15 - Sequential Circuits II (Finite State Machines revisited) March 14, 2002 John.
Synchronous circuit design and analysis. Synchronous circuit design To implement a synchronous circuit corresponding to a given specification Revision.
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
ECE 301 – Digital Electronics
ECE 331 – Digital System Design Counters (Lecture #19) The slides included herein were taken from the materials accompanying Fundamentals of Logic Design,
ECE 331 – Digital System Design Karnaugh Maps and Determining a Minimal Cover (Lecture #7) The slides included herein were taken from the materials accompanying.
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.
CSCI 3301 Transparency No. 9-1 Chapter #9: Finite State Machine Optimization Contemporary Logic Design.
IKI c-Synthesis of Sequential Logic Bobby Nazief Semester-I The materials on these slides are adopted from: Prof. Daniel Gajski’s transparency.
Digital Computer Design Fundamental
ECE 331 – Digital Systems Design Sequential Logic Circuits: FSM Design (Lecture #20)
Chapter 5 - Part Sequential Circuit Design Design Procedure  Specification  Formulation - Obtain a state diagram or state table  State Assignment.
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 =
Digital Design Lecture 10 Sequential Design. State Reduction Equivalent Circuits –Identical input sequence –Identical output sequence Equivalent States.
Unit 14 Derivation of State Graphs
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
Introduction to Sequential Logic Design Finite State-Machine Design.
1 Lecture #12 EGR 277 – Digital Logic Synchronous Logic Circuits versus Combinational Logic Circuits A) Combinational Logic Circuits Recall that there.
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits Previously, we described the basic building blocks of sequential circuits,
ECE 331 – Digital System Design Circuit Design and Analysis (Lecture #9A) The slides included herein were taken from the materials accompanying Fundamentals.
Introduction to State Machine
General model of a sequential network.
ECE 301 – Digital Electronics
ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
Digital Circuits State Reduction and Assignment State Reduction reductions on the number of flip-flops and the number of gates a reduction in the.
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.
CEC 220 Digital Circuit Design Mealy and Moore State Machines Friday, March 27 CEC 220 Digital Circuit Design Slide 1 of 16.
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
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.
1 Clocked synchronous seq. circuits A.k.a. “state machines” Use edge-triggered flip-flops All flip-flops are triggered from the same master clock signal,
1 Lecture #15 EGR 277 – Digital Logic Reading Assignment: Chapter 5 in Digital Design, 3 rd Edition by Mano Example: (Problem 5-17 from Digital Design,
Week #7 Sequential Circuits (Part B)
SLIDES FOR CHAPTER 15 REDUCTION OF STATE TABLES STATE ASSIGNMENT
Analysis of Clocked Sequential Circuit
ECE 301 – Digital Electronics
FINITE STATE MACHINES (FSMs)
State Reduction and State Assignment
Lecture 14 Reduction of State Tables
CHAPTER 15 REDUCTION OF STATE TABLES STATE ASSIGNMENT
DESIGN OF SEQUENTIAL CIRCUITS
L11 – Midterm Review.
ECE 352 Digital System Fundamentals
Chapter5: Synchronous Sequential Logic – Part 3
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

ECE 331 – Digital System Design State Reduction and State Assignment (Lecture #22) The slides included herein were taken from the materials accompanying Fundamentals of Logic Design, 6 th Edition, by Roth and Kinney, and were used with permission from Cengage Learning.

Fall 2010ECE Digital System Design2 Material to be covered … Chapter 15: Sections 1 – 9

ECE Digital Systems Design3 Sequential Circuit Design Understand specifications Draw state graph (to describe state machine behavior) Construct state table (from state graph) Perform state minimization (if necessary) Encode states (aka. state assignment) Create state-assigned table Select type of Flip-Flop to use Determine Flip-Flop input equations and FSM output equation(s) Draw logic diagram

Fall 2010ECE Digital System Design4 Elimination of Redundant States

Fall 2010ECE Digital System Design5 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 2010ECE Digital System Design6 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 2010ECE Digital System Design7 Example: Sequence Detector State Table

Fall 2010ECE Digital System Design8 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 2010ECE Digital System Design9 Example: Sequence Detector Reduced State Table

Fall 2010ECE Digital System Design10 Example: Sequence Detector Reduced State Graph

Fall 2010ECE Digital System Design11 Equivalent States Theorem 15.1: Two states p and q of a sequential circuit are equivalent iff for every single input X, the outputs are the same and the next states are equivalent, that is, where (p, X) is the output given the present state p and input X, and (p, X) is the next state given the present state p and input X. Note that the next states do not have to be equal, just equivalent.

Fall 2010ECE Digital System Design12 Determination of Equivalent States a ≡ b iff d ≡ f andc ≡ h a ≡ d iff a ≡ d andc ≡ e

Fall 2010ECE Digital System Design13 Implication Chart

Fall 2010ECE Digital System Design14 Implication Chart After first pass.

Fall 2010ECE Digital System Design15 Implication Chart After second pass.

Fall 2010ECE Digital System Design16 Determination of Equivalent States d is replaced with a e is replaced with c d and e are removed

Fall 2010ECE Digital System Design17 Implication Table Method The implication table method of determining state equivalence can be summarized as follows: 1. Construct a chart which contains a square for each pair of states. 2. Compare each pair of rows in the state table. If the outputs associated with states i and j are different, place an X in square i-j to indicate that i j. If the outputs are the same, place the implied pairs in square i-j. (If the next states of i and j are m and n for some input x, then m-n is an implied pair.) If the outputs and next states are the same (or if i-j only implies itself), place a check (√) in square i-j to indicate that i ≡ j.

Fall 2010ECE Digital System Design18 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 2010ECE Digital System Design19 Future site of another example.

Fall 2010ECE Digital System Design20 Derivation of FF Input Equations

Fall 2010ECE Digital System Design21 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: 1.Assign flip-flop state values to correspond to the states in the reduced table. 2.Construct a transition table which gives the next states of the flip-flops as a function of the present states and inputs. 3.Derive the next-state maps from the transition table. 4.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 2010ECE Digital System Design22 Example #1: FF Input Equations 1.Assign flip-flop state values to correspond to the states in the reduced table. 2.Construct a transition table which gives the next states of the flip-flops as a function of the present states and inputs.

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

Fall 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 QQ+JK 000x 011x 10x1 11x0

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

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

Fall 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 QQ+SR 000x x0

Fall 2010ECE Digital System Design28 State Assignment

Fall 2010ECE Digital System Design29 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 2010ECE Digital System Design30 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 2010ECE Digital System Design31 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 2010ECE Digital System Design32 State Assignments

Fall 2010ECE Digital System Design33 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: 1.States which have the same next state for a given input should be given adjacent assignments. 2.States which are the next states of the same state should be given adjacent assignments. 3.States which have the same output for a given input should be given adjacent assignments.

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

Fall 2010ECE Digital System Design35 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 2010ECE Digital System Design36 Example: Selecting an Assignment Resulting Transition Table:

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

Fall 2010ECE Digital System Design38 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 2010ECE Digital System Design39 Example: State Assignments For a four-state FSM, three possible state assignments are: StateBinaryGray-codeOne-hot S0S S1S S2S S3S # of FF224

Fall 2010ECE Digital System Design40 Questions?