Docsity

State Minimization - Digital System Design - Lecture Slides, Slides of Digital Systems Design

Partial preview of the text

Download State Minimization - Digital System Design - Lecture Slides and more Slides Digital Systems Design in PDF only on Docsity!

State Minimization

 Two Equivalent FSMs

 A sensor example: detect and don’t repeat

 Two equivalent ways to design the FSM – one has

fewer states than the other

 Distinguishing States (2)

 Let d(q,x) be the state the follows state q on input x

 Example: d(A,1) = B, and d(A,0) = A

 Rule 2 : two states A

and A

are distinguishable if

 d(A

1

,1) and d(A

2

,1) are distinguishable, or

 d(A

1

,0) and d(A

2

,0) are distinguishable

A/
S=
B/
S=
S=
C/
S=
S=
S=
D/
S=
S=

B 

C 

D 

A B C

 Testing States A and C

 d(A,0)=A and d(C,0)=D

 We know nothing about A and D at this point

 d(A,1)=B and d(C,1)=C

 B and C are known to be distinguishable  so are A

and C

 Place a mark in the corresponding table cell

A/
S=
B/
S=
S=
C/
S=
S=
S=
D/
S=
S=

B 

C  

D 

A B C

 Testing States C and D

 d(C,0)=D and d(D,0)=A

 Looks promising since D and A are the same ….

 d(C,1)=C and d(D,1)=B

 B and C are known to be distinguishable  so are C

and D

 Place a mark in the corresponding table cell

A/
S=
B/
S=
S=
C/
S=
S=
S=
D/
S=
S=

B 

C  

D  

A B C

 Resulting FSM

 Testing State A

 d(A,0)=B and d(B,0)=D  distinguishable!

 d(A,0)=B and d(E,0)=B, and

 d(A,1)=D and d(E,1)=C  don’t know yet …

B 

C  

D  

E  

F   

A B C D E

(A,E)

x=

A/1 B/

x=

D/0 F/

x=

x=

x=

x=

C/

x=0 x=

x=

E/

x=

x=

x=

 Testing State B

 d(B,0)=D and d(E,0)=B  distinguishable!

B 

C  

D  

E   

F   

A B C D E

(A,E)

x=

A/1 B/

x=

D/0 F/

x=

x=

x=

x=

C/

x=0 x=

x=

E/

x=

x=

x=

 Testing State C (2)

 d(C,0)=D and d(F,0)=C, and

 d(C,1)=A and d(F,1)=D  distinguishable!

B 

C  

D  

E   

F    

A B C D E

(C,D)^ (A,E)

x=

A/1 B/

x=

D/0 F/

x=

x=

x=

x=

C/

x=0 x=

x=

E/

x=

x=

x=

 Testing State D

 d(D,0)=D and d(F,0)=C, and

 d(D,1)=E and d(F,1)=D  distinguishable!

B 

C  

D  

E   

F     

A B C D E

(C,D)^ (A,E)

x=

A/1 B/

x=

D/0 F/

x=

x=

x=

x=

C/

x=0 x=

x=

E/

x=

x=

x=

 Resulting Minimal FSM

 The Effect of the Outputs  Consider the two FSMs:

 The only difference is in the output of states C

This FSM cannot be

 - 00/  How can you automate the reduction in states? 
  • Sense= - 10/ - Sense= - Sense= - 11/ - Sense= - Sense= - Sense= - 01/ - Sense=
  • Sense= - 00/ - Sense= - 10/ - Sense= - Sense= - 11/ - Sense=0 Sense= - Sense= - A/  States A and D are equivalent
    • S= - B/ - S= - S= - C/ - S= - S= - S= - D/ - S=
  • S= - S= - A/ - S= - B/ - S= - S= - C/ - S= - S=
    • A/1 B/ - x=
      • D/0 F/
  • x=1 x= - x= - x= - x= - x=0, - x= and E
    • A/1 B/ - x=
      • D/0 F/
  • x= - x= - x= - x= - C/ - x=0 x= - x= - E/ - x= - x= - x= - x= - A/1 B/ - x= - D/0 F/ - x= - x= - x= - x= - C/ - x=0 x= - x= - E/ - x= - x= - x=

 Final State Reduction Table

A B
G
F
C
E
D

B 

C 

D   

E  

F    

G     

A B C D E F

(B,C)

(B,E), (C,E)

(D,G)

 Minimal FSM

 A  F

 B  C  E

 D  G

A B
G
F
C
E
D
A
B
D