lecture #23 - state reduction and flip-flop input...

41
ECE 331 – Digital System Design State Reduction and Derivation Flip-Flop Input Equations (Lecture #23) 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.

Upload: vuongdang

Post on 10-Jun-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

ECE 331 – Digital System Design

State Reductionand

Derivation Flip-Flop Input Equations

(Lecture #23)

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.

Page 2: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 2

Sequential Circuit Design1. Understand specifications

2. Draw state graph (to describe state machine behavior)

3. Construct state table (from state graph)

4. Perform state reduction (if necessary)

5. Assign a binary value to each state (state assignment)

6. Create state transition table

7. Select type of Flip-Flop to use

8. Derive Flip-Flop input equations and FSM output equation(s)

9. Draw circuit diagram

Page 3: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 3

State Reduction

Page 4: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 4

Equivalent States

● Two states, p and q, of a sequential logic circuit, are equivalent iff for every input X,

– the outputs are equal

– the next states are equivalent.

● λ(p, X) = λ(q, X)

– Specifies the output given the present state and the input

● δ(p, X) == δ(q, X)

– Specifies the next state given the present state and the input

● Note: the next states do not need to be equal, just equivalent.

Page 5: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 5

Determination of Equivalent States

a ≡ b iff

d ≡ f and c ≡ h

a ≡ d iff

a ≡ d and c ≡ e

Page 6: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 6

Example: Design a sequence detector.

FSM Design: Mealy

serial bit stream (input)

output (serial bit stream)

The circuit (again) is of the form:

Page 7: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 7

Example: Sequence Detector (Mealy)

The sequential circuit has one input (X) and one output (Z).

It 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.

A typical input and output sequence is:

X = 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0

Z = 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0

(time: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)

Page 8: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 8

Example: Sequence Detector (Mealy)

State Table

Page 9: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 9

Example: Sequence Detector (Mealy)

Eliminating Redundant States

Page 10: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 10

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.

Page 11: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 11

Example: Sequence Detector (Mealy)

Reduced State Table

Page 12: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 12

Example: Sequence Detector

Reduced State Graph

Page 13: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 13

State Reduction using an Implication Chart

Page 14: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 14

State Reduction using an I.C.

1.Construct an Implication Chart which contains a square for each pair of states (i, j).

2.Compare each pair of rows in the State Table.

– If outputs for states i and j are different, put an X in the corresponding square of the I.C.

– If outputs for states i and j are the same, indicate the implied pairs in the corresponding square of the I.C.

– If outputs and next states for states i and j are the same, put a check in the corresponding square of the I.C.

Page 15: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 15

State Reduction using an I.C.

3.If square i-j contains the implied pair m-n, and square m-n contains an X, then i<>j, and an X must be placed in the corresponding square of the I.C.

4.If 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.

Page 16: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 16

Example: State Reduction using an I.C.

Page 17: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 17

Example: State Reduction using an I.C.

Page 18: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 18

Example: State Reduction using an I.C.

Page 19: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 19

Example: State Reduction using an I.C.

After first pass.

Page 20: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 20

Example: State Reduction using an I.C.

After second pass.

Page 21: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 21

Example: State Reduction using an I.C.

d = = ae = = c

d and e are removed from the State Table

Page 22: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 22

Future site of another example.

Page 23: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 23

Derivation of Flip-Flop Input Equations

Page 24: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 24

Derivation of FF Input Equations

1. Assign a binary value to each state in the reduced state table (state assignment).

2. Construct the state transition table.

Include in the state transition table, columns for the Flip-Flop inputs.

3. Construct the K-maps for the Flip-Flop inputs.

4. Derive the minimized FF input equations.

Page 25: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 25

Derivation of FF Input Equations

Example #1:

Derive the Flip-Flop input equations for the following sequential logic circuit.

Assume that D Flip-Flops are used in the design.

Excitation Equation: D = Q+

Page 26: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 26

Example #1: FF Input Equations

State Table

Page 27: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 27

Example #1: FF Input Equations

1. Assign a binary value to each state.2. Construct the state transition table.

A+B+C+ DADBDC Z

ABC X = 0 X = 1 X = 0 X = 1 X = 0 X = 1

000

001

010

011

100

101

110

111

Page 28: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 28

Example #1: FF Input Equations

3. Construct K-maps for Flip-Flop inputs.4. Derive the minimized FF input equation.

DA = DB =

Page 29: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 29

Example #1: FF Input Equations

DC =

3. Construct K-maps for Flip-Flop inputs.4. Derive the minimized FF input equation.

Page 30: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 30

Derivation of FF Input Equations

Example #2:

Derive the Flip-Flop input equations for the following sequential logic circuit.

Assume that JK Flip-Flops are used in the design.

Excitation Table:

Q Q+ J K

0 0 0 x

0 1 1 x

1 0 x 1

1 1 x 0

Page 31: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 31

Example #2: FF Input Equations

State Table

Page 32: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

ECE 331 - Digital System Design 32

Example #2: FF Input Equations

1. Assign a binary value to each state.2. Construct the state transition table.

A+B+C+ JAKA JBKB JCKC

ABC X = 0 X = 1 X = 0 X = 1 X = 0 X = 1 X = 0 X = 1

000

001

010

011

100

101

110

111

Page 33: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 33

Example #2: FF Input Equations

3. Construct K-maps for Flip-Flop inputs.4. Derive the minimized FF input equation.

JA = KA =

Page 34: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 34

Example #2: FF Input Equations

3. Construct K-maps for Flip-Flop inputs.4. Derive the minimized FF input equation.

JB = KB =

Page 35: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 35

Example #2: FF Input Equations

3. Construct K-maps for Flip-Flop inputs.4. Derive the minimized FF input equation.

JC = KC =

Page 36: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 36

Derivation of FF Input Equations

Example #3:

Derive the Flip-Flop input equations for the following sequential logic circuit.

Assume that SR Flip-Flops are used in the design.

Excitation Table:

Q Q+ S R

0 0 0 x

0 1 1 0

1 0 0 1

1 1 x 0

Page 37: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 37

Example #3: FF Input Equations

State Table

Page 38: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 38

Example #3: FF Input Equations

1. Assign a binary value to each state.2. Construct the state transition table.

A+B+ SARA SBSB

AB X=00 X=01 X=11 X=10 X=00 X=01 X=11 X=10 X=00 X=01 X=11 X=10

00

01

11

10

Page 39: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 39

Example #3: FF Input Equations

3. Construct K-maps for Flip-Flop inputs.4. Derive the minimized FF input equation.

SA = RA =

Page 40: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 40

Example #3: FF Input Equations

3. Construct K-maps for Flip-Flop inputs.4. Derive the minimized FF input equation.

SB = RB =

Page 41: Lecture #23 - State Reduction and Flip-Flop Input Equationsece.gmu.edu/~clorie/Spring11/ECE-331/Lectures/Lecture_23.pdf · Derivation Flip-Flop Input Equations (Lecture #23) ... 2

Spring 2011 ECE 331 - Digital System Design 41

Questions?