210 likes | 314 Views
Incompletely Specified State Tables. B Seq. Network Subsystem. X. Z. Network A. Network C. 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
E N D
Incompletely Specified State Tables B Seq. Network Subsystem X Z Network A Network C 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. ( - is a don’t care output) t0,t1,t2 represent three successive clock cycles,
Incompletely Specified State Tables S0 1/- 0/0 S1 0/1 S2 0/- 1/- S3 Whenever there is a don’t care state or a don’t care output, I can fill it with any value. I can also use row matching to reduce the table.
Incompletely Specified State Tables S0 1/- 0/0 S1 0/1 S2 0/- 1/- S3 Therefore, I should fill it in a way that allows minimization of the state machine.
0/0 Incompletely Specified State Tables S0 1/- 1/- 0/1 S1 0/1 S2 0/- 1/- S3 S0 S2 no longer exists in the row reduced table, so it is replaced with S0
0/0 Incompletely Specified State Tables S0 1/- 1/- 0/1 S1 S0 S3 no longer exists in row reduced table, so it is replaced with S1
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.
Derivation of FF Input Equations Example: Design a sequential network to realize the state table shown. (This state assignment is derived in 15.8) For 7 states we need 3 FF’s, A B C Transition Table based on state assignments S0 = 000 S1 = 110 S2 = 111 …..
Derivation of D-FF Input Equations Next State maps for D FF realization
Derivation of JK-FF Input Equations For a JK-FF with output Q, the characteristic eqn. 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
Derivation of JK-FF Input Equations Alternate Method JK-FF shortcut method
Finding an Optimal State Assignment(15.7) • 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) It seems that we will not be able to enumerate all possible state assignments, generate the next state and output equations, compute the cost and then choose the best one. Therefore we must settle for “good” state assignments.
Sa Sb I0=1 I0=1 Sc Guidelines for State Assignment Good state assignments result when the following set of empirical rules are followed in the selection of the state assignment: Rule 1: States that have the same next state for a given input should be given adjacent assignments. Pred(Sc, I0=1) = {Sa,Sb} Sa and Sbshould be given adjacent assignments.
Sj Sk Si 1 0 Guidelines for State Assignment Rule 2: States that are the next states of the same state should be given adjacent assignments. Suc(Si) = {Sj ,Sk} Sj and Sk should be given adjacent assignments.
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.
Guidelines for State Assignment Example: Derivation of state assignment is illustrated for state table given. (i) (ii) The sets of adjacent states specified by guidelines 1 and 2 are: K-maps (i) and (ii) are obtained by trial and error, attempting to fulfill the adjacency conditions. Conditions from guideline 1 have precedence over 2 Also conditions that are 2x have precedence over 1x The k-map in (i) corresponds to the given state table For this state assignment we need 6 gates, 13 inputs to realize D-FF input eqns. vs. 10 gates, 39 inputs for straight binary assignment.
Guidelines for State Assignment Example (Cont’d): The state assignment obtained using the guidelines simplifies the FF input eqns. Next state map in terms of Si map (is used to obtain the A+, B+, C+ next state maps)
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 0 1 1 0 1 1 0 1 1 0
Guidelines for State Assignment Another 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 arrange the states on k-maps attempting to satisfy as many guideline pairs as possible. We derive D-FF input eqns. for this assignment by first constructing the transition table
Another Example (cont’d): Guidelines for State Assignment 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)