20
1 mptions: Network A can only generate sequences X=100 and X = 110. Network B produces output Z=1 when it receives X=110 and output Z=0 for X=100 ) Network C ignores values of Z at other times, so that we don’t care what Z is during the first two inputs the sequence. Incompletely Specified State Tables Network A B Seq. Network Subsystem Network C X Z ( - is a don’t care output) t 0 , t 1 , t 2 represent three successive clock cycles,

1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

  • View
    223

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

1

Assumptions:(i) Network A can only generate sequences X=100 and X = 110.(ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for X=100(iii) Network C ignores values of Z at other times, so that we don’t care what Z is during the first two inputs of the sequence.

Incompletely Specified State Tables

Network AB

Seq. Network Subsystem

Network CX Z

( - is a don’t care output)

t0, t1, t2 represent three successive clock cycles,

Page 2: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

2

Input Output X=100 Z=--0 X=110 Z=--1

Incompletely Specified State Tables

S0

S1

1/-S3

S2 0/-

1/-

0/0

0/1

Next State Z Present State X=0 X=1 X=0 X=1 S0 - S1 - - S1 S2 S3 - - S2 S0 - 0 - S3 S0 - 1 -

Whenever there is a don’tcare state or a don’t careoutput, I can fill it with anyvalue. I can also use rowmatching to reduce the table.

Page 3: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

3

Next State Z Present State X=0 X=1 X=0 X=1 S0 S0 S1 0 - S1 S2 S3 - - S2 S0 S1 0 - S3 S0 - 1 -

Input Output X=100 Z=--0 X=110 Z=--1

Incompletely Specified State Tables

S0

S1

1/-S3

S2 0/-

1/-

0/0

0/1

Therefore, I should fill it ina way that allowsminimization of the statemachine.

Page 4: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

4

Input Output X=100 Z=--0 X=110 Z=--1

Incompletely Specified State Tables

S0

S1

1/-S3

S2 0/-

1/-

0/1

0/1

0/0

1/-

Next State Z Present State X=0 X=1 X=0 X=1 S0 S0 S1 0 - S1 S2 S3 1 - S2 S0 S1 0 - S3 S0 S3 1 -

S0

S2 no longer exists inthe row reduced table,so it is replaced with S0

Page 5: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

5

Input Output X=100 Z=--0 X=110 Z=--1

Incompletely Specified State Tables

Next State Z Present State X=0 X=1 X=0 X=1 S0 S0 S1 0 - S1 S2 S3 1 - S2 S0 S1 0 - S3 S0 S3 1 -

S0

S1

1/-

0/1

0/0

1/-

Next State Z Present State X=0 X=1 X=0 X=1 S0 S0 S1 0 - S1 S0 S1 1 -

S0

S3 no longer exists in row reduced table,so it is replaced with S1

Page 6: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

6

Derivation of FF Input Equations

1. Assign FF state values to correspond to states in the reduced table.2. Construct a transition table which gives the next states of the FF’s as a function of the present states and inputs.3. Derive next state maps from the transition table.4. Find FF input maps from the next state maps and find the input equations form the maps.

Page 7: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

7

Derivation of FF Input Equations

Example:Design a sequentialnetwork to realizethe state table shown.(This state assignmentis derived in 15.8)

For 7 states we need3 FF’s, A B C

Transition Table based on state assignments

S0 = 000 S1 = 110 S2 = 111 …..

Page 8: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

8

Derivation of D-FF Input Equations

Next Statemaps forD FFrealization

Page 9: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

9

Derivation of JK-FF Input Equations

For a JK-FF with output Q, the characteristiceqn. is Q+ = JQ’ + K’Q

From the next state map;A+ = X’ = X’(A’+A) = X’A’+X’A = JAA’ + KA’A => JA= X’, KA = X

B+ = X’C’+A’C+A’B = (X’C’+A’C)(B’+B) + A’B = (X’C’+A’C)B’ + (X’C’+A’C)B + A’B = (X’C’+A’C)B’ + (X’C’+A’C+A’)B = (X’C’+A’C)B’ + (X’C’+A’)B = JBB’ + KB’B

=> JB= X’C’+A’C,

KB = (X’C’+A’)’ = [(A’+c’)(A’+X’)]’ = AC+XA

C+ = A+XB’ = (A+XB’)(C’+C) = (A+XB’)C’ + (A+XB’)C = JCC’ + KC’C

=> JC = A+XB’

KC = (A+XB’)’ = [(X+A)(A+B’)]’ = X’A’ + A’B

Page 10: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

10

Derivation of JK-FF Input Equations

Alternate MethodJK-FFshortcut method

Page 11: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

11

• Why does choice of state assignment matter?– BIG effect on complexity of excitation and output

equations AND thus on the amount of logic.

• How to find the best state assignment?– The only known way is to try ALL assignments

and determine the resulting equations.

• N = 2: (2^2)! = 4! = 24 assignments

• N = 3: (2^3)! = 8! = ~ 40,000 assignments

• N = 4: (2^4)! = 16! = ~ 20,000,000,000,000

assignments for 4 state bits!

THIS IS NOT PRACTICAL!

Use heuristic guidelines for pretty good assignments.

• There is no effective way to guarantee a “best” assignment.

- the heuristic methods sometimes perform poorly!

Finding an Optimal State Assignment(15.7)

Page 12: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

12

Finding an Optimal State Assignment(15.7)

It seems that we will not be able to enumerate all possible state assignments, generate the next state and output equations, compute thecost and then choose the best one.

Therefore we must settle for “good” stateassignments.

Page 13: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

13

Rule 1: States that have the same next state for a given input

should be given adjacent assignments.

Sa and Sb should be given adjacent assignments.

Sc

Sa Sb

I0=1I0=1

Pred(Sc, I0=1) = {Sa , Sb}

Guidelines for State Assignment

Good state assignments result when the following set of empirical rules are followed in the selection of the state assignment:

Page 14: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

14

Guidelines for State Assignment

Rule 2: States that are the next states of the same state

should be given adjacent assignments.

Si

Sj Sk

01

Suc(Si) = {Sj , Sk}

Sj and Sk should be given adjacent assignments.

Page 15: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

15

Guidelines for State Assignment

Rule 3: States that have the same output for a given input should be given adjacent assignments.

Guideline: The cost of the circuit will not be affected by the choice of which state receives the state “0” (according to McCluskey). Therefore to simplify reset generating circuits, the state “0” should always be assigned to the reset state.

Page 16: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

16

Guidelines for State AssignmentExample: Derivation of state assignment isillustrated for state table given.

The sets of adjacent states specified by guidelines1 and 2 are:

(i) (ii)

K-maps (i) and (ii) are obtained by trial and error,attempting to fulfill the adjacency conditions.Conditions from guideline 1 have precedence over 2Also conditions that are 2x have precedence over 1xThe k-map in (i) corresponds to the given state tableFor this state assignment we need 6 gates, 13 inputsto realize D-FF input eqns. vs. 10 gates, 39 inputsfor straight binary assignment.

Page 17: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

17

Guidelines for State Assignment

Example (Cont’d): The state assignment obtained using the guidelinessimplifies the FF input eqns.

Next state map in terms of Si map

(is used to obtain the A+, B+, C+ next state maps)

Page 18: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

18

Guidelines for State Assignment

Example (Cont’d):

Next state map in terms of Si map

(is used to obtain the A+, B+, C+

next state maps)

1

1

1

1

11

1

1

1

0

0

0

0

Page 19: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

19

Guidelines for State AssignmentAnother Example:

1. (b,d) (c,f) (b,e)2. (a,c) 2x (d,f) (b,d) (b,f) (c,e)3. (a,c) (b,d) (e,f)

We derive D-FFinput eqns. forthis assignment byfirst constructingthe transition table

We arrange thestates on k-mapsattempting tosatisfy as many guideline pairs aspossible.

Page 20: 1 Assumptions: (i) Network A can only generate sequences X=100 and X = 110. (ii) Network B produces output Z=1 when it receives X=110 and output Z=0 for

20

Guidelines for State AssignmentAnother Example (cont’d): 1. (b,d) (c,f) (b,e)

2. (a,c) 2x (d,f) (b,d) (b,f) (c,e)3. (a,c) (b,d) (e,f)