210 likes | 333 Views
Some Training. State Assignment of synchronous FSM based on partitions. To encode machine M we need 3 two-block partitions such that:. Example 1. We generate closed partitions. G,H. C,D. G,E. A,C. A,B. F,H. E,F. B,D. Example continued . Gra ph of successor pairs :.
E N D
Some Training State Assignment of synchronous FSM based on partitions
To encode machine M we need 3 two-block partitions such that: Example 1 We generate closed partitions
G,H C,D G,E A,C A,B F,H E,F B,D Example continued. Graph of successor pairs:
Example 1 continued A,D D,H + =2 B,F
Example 1 continued Unfortunately: Thus we need one more partition :
Example 1 continued t Encoding wrt1 2
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 functionsQ1’, Q2’, Q3’ and check.
If I am wrong I will buy beer For everybody
Comment Every other encoding will lead to more complex excitation functions. In particular for binary encoding: Q1’ = f(x,Q1) Q2’ = f(x,Q1,Q2,Q3) Q3’ = f(x,Q1,Q2,Q3)
Example 2 Partition compatible with inputs: Iis closed
Example 2 continued Q1’ = f(Q1,Q2) wrtO Encoding wrtI Q2’ = f(Q1,Q2) Q3’ = ??? y = f(x,Q3)
E counter clock Q Intuitive Encoding Example of a counter with input Enable
Modulo 8 counter Transition table encoded with binary natural code Transition Table
Excitation function tablefor D flip-flops D2 = D1 = D0 =
Encoded excitation tablefor T flip-flops T2 = T1 = T0 =
Enable Q Q Q T T T Clock Q Q Q = T E 0 = T EQ 1 0 = = T EQ Q T Q 2 0 1 1 1 Diagram of the counter Discuss this design, how flip flops are selected, how to generalize to any number of bits
Example 3 Encoding wrt1 Is not sufficient for encoding
And what with remaining? We do not have to calculate excitation functions to know that the first one, D1will… Example 3 continued Let us then use closed partition: Q1’ = D1 = f(x,Q1) Unfortunately only one variable we were able to encode according to the closed partition, therefore: Q2’ = D2 = f(x,Q1,Q2,Q3) Q3’ = D3 = f(x,Q1,Q2,Q3)
Example 3… May be there are more closed partitions: We will show that besides 1 is 2 Encoding wrt1 2 This is unique encoding
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!