Presentation is loading. Please wait.

Presentation is loading. Please wait.

State Assignment of synchronous FSM based on partitions

Similar presentations


Presentation on theme: "State Assignment of synchronous FSM based on partitions"— Presentation transcript:

1 State Assignment of synchronous FSM based on partitions
Some Training State Assignment of synchronous FSM based on partitions

2 We generate closed partitions
Example 1 x s 1 Z A H B F C G D E To encode machine M we need 3 two-block partitions such that: We generate closed partitions

3 Graph of successor pairs:
Example continued. x s 1 Z A H B F C G D E Graph of successor pairs: A,B F,H C,D E,F A,C G,E G,H B,D

4 Example 1 continued x s 1 Z A H B F C G D E A,D D,H + =2 B,F

5 Example 1 continued Unfortunately: Thus we need one more partition :

6 Example 1 continued t Encoding wrt 1 2 A B C D E F G H 1 1 1

7 Example 1 continued With such encoding two excitation functions Q1’ i Q2’ of this machine will depend on one internal variable, and the third one Q3’ (in the worst case) on three variables, i.e.: Q1’ = f(x,Q1) Q2’ = f(x,Q2) Q3’ = f(x,Q1,Q2,Q3) If you do not trust, please encode, calculate cost functions Q1’, Q2’, Q3’ and check.

8 If I am wrong I will buy beer For everybody

9 Comment Every other encoding will lead to more complex excitation functions. In particular for binary encoding: A B C D E F G H 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Q1’ = f(x,Q1) Q2’ = f(x,Q1,Q2,Q3) Q3’ = f(x,Q1,Q2,Q3)

10 Partition compatible with inputs:
Example 2 x s 1 A D C B E F Partition compatible with inputs: I is closed

11 Example 2 continued Q1’ = f(Q1,Q2) Q2’ = f(Q1,Q2) Q3’ = ???
Encoding wrt I wrt O A B C D E F 1 1 Q2’ = f(Q1,Q2) Q3’ = ??? y = f(x,Q3)

12 Intuitive Encoding Example of a counter with input Enable E S 1 S0 S1
1 S0 S1 S2 S3 S4 S7 counter E clock Q

13 Modulo 8 counter Transition table encoded with binary natural code
1 Q2Q1Q0 S0 S1 000 001 S2 010 S3 011 S4 100 S5 101 S6 110 S7 111 s0 S’ Q2’Q1’Q0’

14 Encoded table E Q2Q1Q0 1 000 001 010 011 100 101 110 111 Q2’Q1’Q0’

15 Excitation function table for D flip-flops
Q2Q1Q0 1 000 001 010 011 100 110 111 101 Q2’Q1’Q0’ D2 D1 D0 D2 = D1 = D0 =

16 Encoded excitation table for T flip-flops
Q2Q1Q0 1 000 001 010 011 100 110 111 101 Q2’Q1’Q0’ T2 T1 T0 T2 = T1 = T0 =

17 Q T EQ E = Diagram of the counter
1 2 Q T EQ E = T Q Clock Enable Discuss this design, how flip flops are selected, how to generalize to any number of bits

18 Is not sufficient for encoding
Example 3 x s 1 A F B E C D Encoding wrt 1 A B C D E F 1 0 0 0 1 1 0 Is not sufficient for encoding

19 Example 3 continued Q1’ = D1 = f(x,Q1) Q2’ = D2 = f(x,Q1,Q2,Q3)
Let us then use closed partition: x s 1 A F B E C D A 0 0 0 B 0 0 1 C 1 0 1 D 1 0 0 E 0 1 0 F 1 1 0 Q1’ = D1 = f(x,Q1) And what with remaining? Unfortunately only one variable we were able to encode according to the closed partition, therefore: We do not have to calculate excitation functions to know that the first one, D1 will… Q2’ = D2 = f(x,Q1,Q2,Q3) Q3’ = D3 = f(x,Q1,Q2,Q3)

20 Example 3… May be there are more closed partitions: x s 1 A F B E C D
1 A F B E C D We will show that besides 1 is 2 Encoding wrt 1 2 A B C D E F 1 0 0 0 1 1 0 This is unique encoding

21 Example 3 cont With this encoding the first excitation function Q1’ of this machine will depend on one internal variable, and the second and third together (Q2’, Q3’) on two internal variables, like this: Q1’ = f(x,Q1) Q2’ = f(x,Q2,Q3) Q3’ = f(x,Q2,Q3) If you do not trust, encode and calculate excitation functions Q1’, Q2’, Q3’ and check. Do this!


Download ppt "State Assignment of synchronous FSM based on partitions"

Similar presentations


Ads by Google