State reduction and state assignment lecture 22
Download
1 / 37

ECE 331 – Digital System Design - PowerPoint PPT Presentation


  • 148 Views
  • Uploaded on

State Reduction and State Assignment (Lecture #22). ECE 331 – Digital System Design. 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.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' ECE 331 – Digital System Design' - alden-barrera


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
State reduction and state assignment lecture 22

State Reduction and State Assignment

(Lecture #22)

ECE 331 – Digital System Design

The slides included herein were taken from the materials accompanying

Fundamentals of Logic Design, 6th Edition, by Roth and Kinney,

and were used with permission from Cengage Learning.


Chapter 15 sections 1 9

ECE 331 - Digital System Design

Chapter 15: Sections 1 – 9

Material to be covered …


Sequential circuit design

ECE 331 - Digital Systems Design

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


ECE 331 - Digital System Design

Elimination of Redundant States


Elimination of redundant states

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.


Example sequence detector

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:


Example sequence detector1

ECE 331 - Digital System Design

Example: Sequence Detector

State Table


Example sequence detector2

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.


Example sequence detector3

ECE 331 - Digital System Design

Example: Sequence Detector

Reduced State Table


Example sequence detector4

ECE 331 - Digital System Design

Example: Sequence Detector

Reduced State Graph


Determination of equivalent states

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



Implication chart1

ECE 331 - Digital System Design

Implication Chart

After first pass.


Implication chart2

ECE 331 - Digital System Design

Implication Chart

After second pass.


Implication table method

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.


ECE 331 - Digital System Design

Future site of another example.


ECE 331 - Digital System Design

Derivation of FF Input Equations


Derivation of ff input equations

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.


Example 1 ff input equations

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.


Example 1 ff input equations1

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


Example 1 ff input equations2
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


Example 2 ff input equations

ECE 331 - Digital System Design

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.


Example 2 ff input equations1
Example #2: FF Input Equations

3. Derive the next-state maps from the transition table.

D FF Characteristic Equation:

Q+ = D


Example 2 ff input equations2
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



State assignments

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.


State assignments1

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.


State assignments2

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.



Guidelines for state assignment

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.


Example selecting an assignment

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.


Example selecting an assignment1

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)


Example selecting an assignment2

ECE 331 - Digital System Design

Example: Selecting an Assignment

Resulting Transition Table:


Example selecting an assignment3

ECE 331 - Digital System Design

Example: Selecting an Assignment

Derivation of FF input equations from next-state maps:


One hot state assignment

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.


Example state assignments

ECE 331 - Digital System Design

Example: State Assignments

For a four-state FSM, three possible state assignments are:


ad