sequential system synthesis -- incompletely specified machines

39
Sequential System Synthesis Sequential System Synthesis -- Incompletely Specified Machines -- Incompletely Specified Machines

Upload: beau-randall

Post on 03-Jan-2016

38 views

Category:

Documents


0 download

DESCRIPTION

Sequential System Synthesis -- Incompletely Specified Machines. Outline. Incompletely Specified Machine (ISM) State Minimization for ISM Brute Force Method Compatible, Maximal, Prime, Class Set Algorithm for ISM State Minimization Find all pairs of compatible states - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Sequential System Synthesis -- Incompletely Specified Machines

Sequential System SynthesisSequential System Synthesis-- Incompletely Specified Machines-- Incompletely Specified Machines

Page 2: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 2

OutlineOutline

Incompletely Specified Machine (ISM)Incompletely Specified Machine (ISM) State Minimization for ISMState Minimization for ISM

Brute Force MethodBrute Force Method Compatible, Maximal, Prime, Class SetCompatible, Maximal, Prime, Class Set Algorithm for ISM State MinimizationAlgorithm for ISM State Minimization

• Find all pairs of compatible statesFind all pairs of compatible states• Find the maximal compatiblesFind the maximal compatibles• Find the prime compatiblesFind the prime compatibles• Set up the covering problemSet up the covering problem• Solve the binate covering problemSolve the binate covering problem

The Binate Covering ProblemThe Binate Covering Problem

Page 3: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 3

FSM with Incomplete SpecificationFSM with Incomplete Specification

An FSM <An FSM <I,S,I,S,,S,S00,O,,O,> is > is incompletely specifiedincompletely specified if if

and/or and/or are incompletely specified functions. are incompletely specified functions. (I.e., they are not defined on some combinations (I.e., they are not defined on some combinations of inputs and present states.) Otherwise, it is of inputs and present states.) Otherwise, it is completely specified. completely specified. In STG, this means there exist nodes with less than |I| In STG, this means there exist nodes with less than |I|

outgoing edges or edges carrying don’t care as output;outgoing edges or edges carrying don’t care as output; In flow table, this means there exist incompletely In flow table, this means there exist incompletely

defined entries;defined entries; In cube table, this means there exist incompletely In cube table, this means there exist incompletely

defined rows.defined rows.

Page 4: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 4

I = {x,y}I = {x,y} S = {A,B,C,D}S = {A,B,C,D} SS00= {A}= {A}

(A,x) = A, (A,x) = A, (A,y) = B, (A,y) = B,

(B,x) = A, (B,x) = A, (B,y) = C, (B,y) = C,

(C,y) = D(C,y) = D O = {0,1}O = {0,1} (A,x) = 0, (A,x) = 0, (A,y) = 1, (A,y) = 1,

(B,x) = 0, (B,x) = 0,

(C,y) = 1(C,y) = 1

Examples: Examples: ISMISM

AA

CCBB

x/0

y/1x/0

y/-y/1

DD

-,--,-

D,1D,1-,--,-CC

C,-C,-A,0A,0BB

B,1B,1A,0A,0AA

yyxx

-,--,-DD

Page 5: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 5

State Minimization for ISMState Minimization for ISM

Goal: For a given incompletely specified Goal: For a given incompletely specified machine machine MM, find a machine , find a machine M’M’ such that: such that: on any input sequence, on any input sequence, M’M’ produces the produces the

same outputs as same outputs as MM, , whenever whenever MM is is specifiedspecified..

there does there does notnot exist a machine exist a machine M’’M’’ with with fewerfewer states than states than M’M’ which has the which has the same property.same property.

Page 6: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 6

Idea: Idea: Build a CSM (completely Build a CSM (completely

specified machines) for every specified machines) for every possible combination of the possible combination of the don’t cares;don’t cares;

Minimize the resulting CSMs;Minimize the resulting CSMs; Choose the one with the Choose the one with the

smallest number of states. smallest number of states. Example: Example: In this In this

example, it means state minimization for example, it means state minimization for two CSMs obtained from two CSMs obtained from MM, by setting , by setting the don’t care to 0 and 1 (i.e. all possible the don’t care to 0 and 1 (i.e. all possible alphabets).alphabets).

Brute Force MethodBrute Force Method

B,0B,0C,1C,1

C,0C,0B,-B,-

B,0B,0C,0C,0

CC

BB

AA

yyxx

B,0B,0C,1C,1

C,0C,0B,B,00

B,0B,0C,0C,0

CC

BB

AA

yyxx

B,0B,0C,1C,1

C,0C,0B,B,11

B,0B,0C,0C,0

CC

BB

AA

yyxx

Page 7: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 7

A and C, B and C are not equivalent;A and C, B and C are not equivalent; A and B are not equivalent;A and B are not equivalent; So this CSM cannot be reduced, I.e., it is So this CSM cannot be reduced, I.e., it is

already minimized.already minimized.

Brute Force MethodBrute Force Method

B,0B,0C,1C,1

C,0C,0B,B,00

B,0B,0C,0C,0

CC

BB

AA

yyxx

B,0B,0C,1C,1

C,0C,0B,B,11

B,0B,0C,0C,0

CC

BB

AA

yyxx A and B, A and C are not equivalent;A and B, A and C are not equivalent; B and C are equivalent;B and C are equivalent; So this CSM can be reduced to a machine So this CSM can be reduced to a machine

with only two states.with only two states.

Conclusion: The ISM can be reduced to a 2-state machine.Conclusion: The ISM can be reduced to a 2-state machine. Question: Can this always be done?Question: Can this always be done?

Page 8: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 8

A and C, B and C are not equivalent;A and C, B and C are not equivalent; A and B are not equivalent;A and B are not equivalent; So this CSM cannot be reduced.So this CSM cannot be reduced.

Brute Force MethodBrute Force Method

B,0B,0A,1A,1

A,0A,0B,B,00

B,0B,0C,0C,0

CC

BB

AA

yyxx

B,0B,0A,1A,1

A,0A,0B,B,11

B,0B,0C,0C,0

CC

BB

AA

yyxx

A and B, A and C are not equivalent;A and B, A and C are not equivalent; B and C are not equivalent;B and C are not equivalent; So this CSM cannot be reduced.So this CSM cannot be reduced.

Conclusion: The ISM cannot be reduced.Conclusion: The ISM cannot be reduced. Question: Is this correct?Question: Is this correct?

B,0B,0A,1A,1

AA,0,0B,B,--

B,0B,0C,0C,0

CC

BB

AA

yyxx

Apply the brute force method to this ISM: Apply the brute force method to this ISM:

Page 9: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 9

Brute Force Method FailsBrute Force Method Fails

One can verify that on any input sequence, the CSM produces One can verify that on any input sequence, the CSM produces the same outputs as the ISM, the same outputs as the ISM, whenever it is specifiedwhenever it is specified..

One way to see this is that the ISM is defined to be 1 iff the One way to see this is that the ISM is defined to be 1 iff the machine receives ‘xx’ at the starting state A, which is also true machine receives ‘xx’ at the starting state A, which is also true for the CSM.for the CSM.

Notice that on certain input sequences, e.g. ‘yx’, the ISM is not Notice that on certain input sequences, e.g. ‘yx’, the ISM is not specified, but this does not prevent us from reducing the ISM to specified, but this does not prevent us from reducing the ISM to this CSM.this CSM.

B,0B,0A,1A,1

A,0A,0B,B,--

B,0B,0C,0C,0

CC

BB

AA

yyxx

Apply the brute force method to this ISM: Apply the brute force method to this ISM:

Consider this CSM: Consider this CSM: S,0S,0S,1S,1

S,0S,0T,0T,0

TT

SS

yyxx

Page 10: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 10

Compatible StatesCompatible States

Two states are Two states are compatiblecompatible if they have the same if they have the same output valuesoutput values wherever they are both specified, wherever they are both specified, and all pairs of and all pairs of successorssuccessors are compatible are compatible whenever they are specified.whenever they are specified.

Example:Example: A and C are not compatible.A and C are not compatible. A and B, B and C are compatible.A and B, B and C are compatible.

For A and B to be compatible, we need B and C to be For A and B to be compatible, we need B and C to be compatible, we call {(B,C)} the compatible, we call {(B,C)} the class setclass set of (A,B). of (A,B).

We can merge two states if theyWe can merge two states if theyare compatible. are compatible.

B,0B,0A,1A,1

A,0A,0B,B,--

B,0B,0C,0C,0

CC

BB

AA

yyxx

S,0S,0S,1S,1

S,0S,0T,0T,0

TT

SS

yyxx

Page 11: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 11

Any Shortcuts: Any Shortcuts: ISM State MinimizationISM State Minimization

Can we simply modify the partition-refinement Can we simply modify the partition-refinement procedure for CSM by replacing equivalent procedure for CSM by replacing equivalent states with compatible states? states with compatible states? No.No. Compatibility is not transitive, therefore it is not an Compatibility is not transitive, therefore it is not an

equivalent relation, and thus it does not give partitions.equivalent relation, and thus it does not give partitions. Can we first find all the compatibles, and then Can we first find all the compatibles, and then

look for a minimum number of compatibles, such look for a minimum number of compatibles, such that every original state is in at least one that every original state is in at least one compatible? (unate covering problem)compatible? (unate covering problem) No.No. One compatible may require other compatibles, One compatible may require other compatibles,

therefore choosing a given compatible may imply that therefore choosing a given compatible may imply that some other compatibles some other compatibles must must be chosen too.be chosen too.

Page 12: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 12

Maximal and Prime CompatiblesMaximal and Prime Compatibles

A set of states is A set of states is compatiblecompatible iff all pairs in the set iff all pairs in the set are compatible. are compatible.

A set of A set of compatible compatible states is states is maximalmaximal if it cannot if it cannot be strictly contained in any compatible sets.be strictly contained in any compatible sets.

A set of A set of compatible compatible states is states is primeprime if it cannot be if it cannot be contained in another compatible whose contained in another compatible whose class setclass set is contained in this compatible’s class set. is contained in this compatible’s class set. (C is (C is prime means that there does not exist C’prime means that there does not exist C’C and C and ’’))..

Theorem. There exists an optimal solution that Theorem. There exists an optimal solution that consists of prime compatibles.consists of prime compatibles.

Page 13: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 13

ISM State Minimization AlgorithmISM State Minimization Algorithm

Find all pairs of compatible states;Find all pairs of compatible states; Find the maximal compatibles;Find the maximal compatibles; Find the prime compatibles;Find the prime compatibles; Set up the covering problem;Set up the covering problem; Solve the binate covering problem.Solve the binate covering problem.

Page 14: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 14

Find All Compatible PairsFind All Compatible Pairs

1.1. For i=1,…,|S|-1For i=1,…,|S|-1

2.2. { for j = i+1, …, |S|{ for j = i+1, …, |S|

3.3. { if states i and j { if states i and j have conflict outputshave conflict outputs or or incompatible incompatible successorssuccessors

4.4. { mark ‘{ mark ‘xx’ in entry (i,j); ’ in entry (i,j); /* i and j are incompatible*//* i and j are incompatible*/

5.5. update the compatibility table; }update the compatibility table; }

6.6. else if some successor pairs are else if some successor pairs are different but not yet different but not yet known as incompatiblesknown as incompatibles

7.7. enter such enter such pairspairs in entry (i,j); in entry (i,j); /*questionable pairs*//*questionable pairs*/

8.8. else else /*no conflicts on outputs and successors*//*no conflicts on outputs and successors*/

9.9. mark ‘mark ‘~~’ in entry (i,j); }}’ in entry (i,j); }}

Page 15: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 15

Example: Example: Find All Compatible PairsFind All Compatible Pairs

A,1A,1E,-E,-B,-B,-B,0B,0D,1D,1E,0E,0A,1A,1HH

F,0F,0G,0G,0-,--,-E,1E,1-,--,-C,1C,1-,--,-GG

-,--,-G,0G,0F,1F,1H,1H,1-,1-,1C,-C,-B,0B,0FF

A,1A,1E,-E,-B,-B,--,--,-A,-A,-E,-E,-B,-B,-EE

A,-A,--,--,-B,0B,0B,-B,--,--,-E,-E,--,--,-DD

G,0G,0-,--,--,--,--,--,-A,1A,1D,1D,1B,0B,0CC

-,--,-A,1A,1A,-A,--,--,-A,-A,-D,1D,1B,0B,0BB

-,--,-A,-A,-B,0B,0E,1E,1D,0D,0-,--,-A,0A,0AA

77665544332211

GGFFEEDDCCBBAA

HH

GG

FF

EE

DD

CC

BB

Page 16: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 16

Example: Example: Find All Compatible PairsFind All Compatible Pairs

A,1A,1E,-E,-B,-B,-B,0B,0D,1D,1E,0E,0A,1A,1HH

F,0F,0G,0G,0-,--,-E,1E,1-,--,-C,1C,1-,--,-GG

-,--,-G,0G,0F,1F,1H,1H,1-,1-,1C,-C,-B,0B,0FF

A,1A,1E,-E,-B,-B,--,--,-A,-A,-E,-E,-B,-B,-EE

A,-A,--,--,-B,0B,0B,-B,--,--,-E,-E,--,--,-DD

G,0G,0-,--,--,--,--,--,-A,1A,1D,1D,1B,0B,0CC

-,--,-A,1A,1A,-A,--,--,-A,-A,-D,1D,1B,0B,0BB

-,--,-A,-A,-B,0B,0E,1E,1D,0D,0-,--,-A,0A,0AA

77665544332211

GGFFEEDDCCBBAA

XXXX(A,B)(A,D)(A,B)(A,D)~~XXXXXXHH

(E,H)(E,H)XXXX(C,D)(F,G)(C,D)(F,G)XX~~GG

XXXX(C,D)(C,D)XXXXFF

~~

XX

(A,B)(A,E) (A,B)(A,E) (D,E)(D,E)

(A,B) (A,B) (A,D)(A,D)

EE

(A,G)(D,E)(A,G)(D,E)(A,B)(D,E)(A,B)(D,E)(B,E)(B,E)DD

~~XXCC

(A,D)(A,D)BB

Page 17: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 17

Find the Maximal CompatiblesFind the Maximal Compatibles

A set of states is A set of states is compatiblecompatible iff all pairs in the set iff all pairs in the set are compatible; it is are compatible; it is maximalmaximal if it cannot be if it cannot be strictly contained in any compatible sets.strictly contained in any compatible sets.

1.1. Define Boolean formula Define Boolean formula F F = 1;= 1;

2.2. For each incompatible pair (i,j)For each incompatible pair (i,j)

3.3. F = FF = F (x (xii’+x’+xjj’); ’); /* i and j cannot be in the same set*//* i and j cannot be in the same set*/

4.4. Rewrite Rewrite FF to SOP form; to SOP form; /*a complete sum*//*a complete sum*/

5.5. Every term of the this SOP is a maximal Every term of the this SOP is a maximal compatible set (consists of states that do not compatible set (consists of states that do not appear in the term);appear in the term);

Page 18: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 18

GGFFEEDDCCBBAA

XXXX(A,B)(A,D)(A,B)(A,D)~~XXXXXXHH

(E,H)(E,H)XXXX(C,D)(F,G)(C,D)(F,G)XX~~GG

XXXX(C,D)(C,D)XXXXFF

~~

XX

(A,B)(A,E) (A,B)(A,E) (D,E)(D,E)

(A,B) (A,B) (A,D)(A,D)

EE

(A,G)(D,E)(A,G)(D,E)(A,B)(D,E)(A,B)(D,E)(B,E)(B,E)DD

~~XXCC

(A,D)(A,D)BB

Example: Example: Find the Maximal CompatiblesFind the Maximal Compatibles

B,0B,0A,1A,1

C,0C,0B,B,--

B,0B,0C,0C,0

CC

BB

AA

yyxx

B (B,C)B (B,C)C XC X (A,B)(A,B) AA B B

A’+C’ A’+C’ (B,C), (A,B) (B,C), (A,B)

(a’+c’)(a’+f’)(a’+h’)(b’+f’)(b’+g’)(b’+h’)(c’+e’)(a’+c’)(a’+f’)(a’+h’)(b’+f’)(b’+g’)(b’+h’)(c’+e’)

(c’+h’)(d’+f’)(d’+g’)(e’+f’)(e’+g’)(f’+h’)(g’+h’) (c’+h’)(d’+f’)(d’+g’)(e’+f’)(e’+g’)(f’+h’)(g’+h’) = c’f’g’h’+a’e’f’g’h’+b’c’d’e’f’h’ = c’f’g’h’+a’e’f’g’h’+b’c’d’e’f’h’ +a’b’c’f’g’+a’b’d’e’h’ +a’b’c’f’g’+a’b’d’e’h’

(A,B,D,E),(B,C,D),(A,B,D,E),(B,C,D),(A,G),(A,G),

(D,E,H),(C,F,G)(D,E,H),(C,F,G)

Page 19: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 19

Find the Prime CompatiblesFind the Prime Compatibles

Maximal compatibles are prime. Maximal compatibles are prime. (C is prime means (C is prime means that there does not exist C’that there does not exist C’C and C and ’’)). .

If a prime compatible has empty class set, all its If a prime compatible has empty class set, all its subsets cannot be prime.subsets cannot be prime.

If a prime compatible has non-empty class set, If a prime compatible has non-empty class set, we should check its subsets we should check its subsets (by definition)(by definition)..

Process according to the size of the prime.Process according to the size of the prime. Stop when all the single state sets have been Stop when all the single state sets have been

checked.checked.

Page 20: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 20

Find the Prime CompatiblesFind the Prime Compatibles

GGFFEEDDCCBBAA

XXXX(A,B)(A,D)(A,B)(A,D)~~XXXXXXHH

(E,H)(E,H)XXXX(C,D)(F,G)(C,D)(F,G)XX~~GG

XXXX(C,D)(C,D)XXXXFF

~~

XX(A,B)(A,E) (A,B)(A,E) (D,E)(D,E)

(A,B) (A,B) (A,D)(A,D)

EE

(A,G)(D,E)(A,G)(D,E)(A,B)(D,E)(A,B)(D,E)(B,E)(B,E)DD

~~XXCC

(A,D)(A,D)BB Maximal Compatibles and their class sets: Maximal Compatibles and their class sets:

(A,B,D,E): (A,B,D,E): emptyempty

(B,C,D):(B,C,D): {(A,B),(D,E),{(A,B),(D,E),(A,G)} (A,G)}

(A,G):(A,G): emptyempty

(D,E,H):(D,E,H): {(A,B),(A,D)}{(A,B),(A,D)}

(C,F,G):(C,F,G): {(C,D),(E,H)}{(C,D),(E,H)}1.1. Maximal compatible:Maximal compatible: (A,B,D,E) (A,B,D,E) 2.2. Maximal compatible: Maximal compatible: (B,C,D), (D,E,H), (C,F,G)(B,C,D), (D,E,H), (C,F,G)3.3. Subsets of (B,C,D): Subsets of (B,C,D): (B,C), (C,D) (B,C), (C,D) 4.4. Subsets of (D,E,H): Subsets of (D,E,H): (D,H)(D,H)5.5. Subsets of (C,F,G): Subsets of (C,F,G): (C,F),(C,G),(F,G)(C,F),(C,G),(F,G)6.6. Maximal compatible: Maximal compatible: (A,G)(A,G)7.7. Subsets of compatibles with 2 states:Subsets of compatibles with 2 states: (F) (F) ((A,B,D,EA,B,D,E),),

(A,(A,GG),(B,),(B,CC), (D,), (D,HH) all have empty class sets.) all have empty class sets.

Page 21: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 21

ISM State Minimization AlgorithmISM State Minimization Algorithm

Find all pairs of compatible states;Find all pairs of compatible states; Find the maximal compatibles;Find the maximal compatibles; Find the prime compatibles;Find the prime compatibles; Set up the covering problem;Set up the covering problem; Solve the binate covering problem.Solve the binate covering problem.

Page 22: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 22

The Covering ProblemThe Covering Problem

Now we have found Now we have found allall the prime compatibles, the prime compatibles, our goal is to collect our goal is to collect somesome prime compatibles prime compatibles such that such that Every state is contained in at least one compatible Every state is contained in at least one compatible

((covering constraintcovering constraint); ); Is this always possible?Is this always possible? All the class sets of the selected compatibles are All the class sets of the selected compatibles are

contained in some compatibles (contained in some compatibles (closure constraintclosure constraint).).

A set of compatibles satisfying these two A set of compatibles satisfying these two constraints is called a constraints is called a covercover, we want to find a , we want to find a cover with the cover with the minimal number of compatiblesminimal number of compatibles..

Page 23: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 23

Covering Problem as SAT Covering Problem as SAT

The The Boolean satisfiability (SAT)Boolean satisfiability (SAT) problem seeks to problem seeks to determine whether there exists a 0/1 assignment determine whether there exists a 0/1 assignment to the Boolean variables such that a given to the Boolean variables such that a given Boolean formula is true.Boolean formula is true. Example: Example:

• (x+y)(y’+z)z’ is satisfiable (x=1,y=0,z=0)(x+y)(y’+z)z’ is satisfiable (x=1,y=0,z=0)• x’(x+y’)(y+z’)(x+z) is unsatisfiable.x’(x+y’)(y+z’)(x+z) is unsatisfiable.

Covering problem as SATCovering problem as SAT Prime compatible Prime compatible a Boolean variable x a Boolean variable x

• x=1 x=1 the compatible is selected in the cover the compatible is selected in the cover• x=0 x=0 the compatible is not selected in the cover the compatible is not selected in the cover

Covering/closure constraints Covering/closure constraints clauses clauses

Page 24: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 24

Covering ConstraintsCovering Constraints

Covering constraint: every state has to be Covering constraint: every state has to be covered.covered. If a state If a state SS is contained in the following prime is contained in the following prime

compatibles: compatibles: xx11,x,x22,…,x,…,xkk, then at least one of these has , then at least one of these has

to be selected. (Otherwise, S will be left uncovered.)to be selected. (Otherwise, S will be left uncovered.) If xIf xii is selected in the cover, we have x is selected in the cover, we have xii=1.=1.

Therefore, all we need to do is to satisfy the Therefore, all we need to do is to satisfy the clause clause xx11+x+x22+…+x+…+xkk..

For each state, construct a clause as above.For each state, construct a clause as above.

Page 25: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 25

Closure ConstraintsClosure Constraints

Closure constraint: if one compatible is select (x=1), then Closure constraint: if one compatible is select (x=1), then all its class set must be covered.all its class set must be covered. For a compatible pair For a compatible pair (S(S11,S,S22)), if state , if state SS11 is contained in the following is contained in the following

prime compatibles: prime compatibles: xx1111,x,x1212,…,x,…,x1m1m, and state , and state SS22 in in xx2121,x,x2222,…,x,…,x2n2n, let , let {x{x11,x,x22,,

…,x…,xkk}={x}={x1111,x,x1212,…,x,…,x1m1m}}{x{x2121,x,x2222,…,x,…,x2n2n}}, then the pair , then the pair (S(S11,S,S22)) can be covered can be covered

by any of the followings by any of the followings xx11,x,x22,…,x,…,xkk..

If x is selected in the cover (x=1), for each pair If x is selected in the cover (x=1), for each pair (S(S11,S,S22)) in x’s class set, in x’s class set,

one of the follows must be selected: one of the follows must be selected: xx11,x,x22,…,x,…,xkk.. I.e., I.e., xx11+x+x22+…+x+…+xkk must be must be

true.true. If x is not selected, we don’t care its class setIf x is not selected, we don’t care its class set

Therefore, all we need to do is to satisfy the Therefore, all we need to do is to satisfy the clause clause x’+xx’+x11+x+x22+…+x+…+xkk for each of the pairs in x’s class set. for each of the pairs in x’s class set. (why?)(why?)

For each compatible, construct a clause as above for For each compatible, construct a clause as above for each compatible pair in its class set. each compatible pair in its class set.

Page 26: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 26

Example: Example: Setting Up the Covering ProblemSetting Up the Covering ProblemPrime Compatibles and their class sets: Prime Compatibles and their class sets:

xx11: : (A,B,D,E): (A,B,D,E): emptyempty x x77: (D,H):: (D,H): emptyempty

xx22: (B,C,D):: (B,C,D): {(A,B),(A,G),(D,E)} {(A,B),(A,G),(D,E)} x x88: (C,F):: (C,F): {(C,D)}{(C,D)}

xx33: (D,E,H):: (D,E,H): {(A,B),(A,D)}{(A,B),(A,D)} x x99: (C,G):: (C,G): {(C,D),{(C,D),

(F,G)}(F,G)}

xx44: (C,F,G):: (C,F,G): {(C,D),(E,H)} {(C,D),(E,H)} x x1010:(A,G)::(A,G): emptyempty

xx55: (B,C):: (B,C): empty empty x x1111: (F,G):: (F,G): {(E,H)}{(E,H)}

xx66: (C,D):: (C,D): {(A,G),(D,E)} {(A,G),(D,E)} x x1212: (F):: (F):emptyemptyCovering constraints: Covering constraints:

A:A: xx11 + x + x1010 E: xE: x11 + x + x33

B:B: xx11 + x + x22 + x + x55 F: xF: x44 + x + x88 + x + x1111 + x + x1212

C:C:xx22 + x + x44 + x + x55 + x + x66 + x + x88 + x + x99 G: xG: x44 + x + x99 + x + x1010 + x + x1111

D:D:xx11 + x + x22 + x + x33 + x + x66 + x + x77 H: xH: x33 + x + x77

Page 27: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 27

Prime Compatibles and their class sets: Prime Compatibles and their class sets:

xx11: : (A,B,D,E): (A,B,D,E): emptyempty x x77: (D,H):: (D,H): emptyempty

xx22: (B,C,D):: (B,C,D): {(A,B),(A,G),(D,E)} {(A,B),(A,G),(D,E)} x x88: (C,F):: (C,F): {(C,D)}{(C,D)}

xx33: (D,E,H):: (D,E,H): {(A,B),(A,D)}{(A,B),(A,D)} x x99: (C,G):: (C,G): {(C,D),{(C,D),

(F,G)}(F,G)}

xx44: (C,F,G):: (C,F,G): {(C,D),(E,H)} {(C,D),(E,H)} x x1010:(A,G)::(A,G): emptyempty

xx55: (B,C):: (B,C): empty empty x x1111: (F,G):: (F,G): {(E,H)}{(E,H)}

xx66: (C,D):: (C,D): {(A,G),(D,E)} {(A,G),(D,E)} x x1212: (F):: (F):emptyempty

Example: Example: Setting Up the Covering ProblemSetting Up the Covering Problem

Closure constraints: Closure constraints:

xx22: (x: (x22’ + x’ + x11)(x)(x22’ + x’ + x1010)(x)(x22’ + x’ + x1 1 + x+ x33))

xx33: (x: (x33’ + x’ + x11)(x)(x33’ + x’ + x11) ) xx88: (x: (x88’ + x’ + x22 + x + x66))

xx44: (x: (x44’ + x’ + x2 2 + x+ x66)(x)(x44’ + x’ + x33)) xx99: (x: (x99’ + x’ + x22 + x + x66)(x)(x99’ + x’ + x44))

xx66: (x: (x66’ + x’ + x1010)(x)(x66’ + x’ + x1 1 + x+ x33) ) xx1111: (x: (x1111’ + x’ + x33))

Page 28: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 28

Example: Example: Setting Up the Covering ProblemSetting Up the Covering Problem

SAT instance:SAT instance:

(x(x11+x+x1010)(x)(x11+x+x22+x+x55)(x)(x22+x+x44+x+x55+x+x66+x+x88+x+x99)(x)(x11+x+x22+x+x33+x+x66+x+x77)(x)(x11+x+x33)(x)(x44+x+x88+x+x1111+ + xx1212)(x)(x44+x+x99+x+x1010+x+x1111)(x)(x33+x+x77) )

(x(x22’+x’+x11)(x)(x22’+x’+x1010)(x)(x22’+x’+x11+x+x33)) (x (x33’+x’+x11) ) (x(x44’+x’+x22+x+x66)(x)(x44’+x’+x33)) (x (x66’+x’+x1010)(x)(x66’+x’+x11+x+x33) ) (x(x88’+x’+x22+x+x66) ) (x(x99’+x’+x22+x+x66)(x)(x99’+x’+x44) ) (x(x1111’+x’+x33))

Covering constraints: Covering constraints:

A:A: xx11 + x + x1010 E: xE: x11 + x + x33

B:B: xx11 + x + x22 + x + x55 F: xF: x44 + x + x88 + x + x1111 + x + x1212

C:C:xx22 + x + x44 + x + x55 + x + x66 + x + x88 + x + x99 G: xG: x44 + x + x99 + x + x1010 + x + x1111

D:D:xx11 + x + x22 + x + x33 + x + x66 + x + x77 H: xH: x33 + x + x77 Closure constraints: Closure constraints:

xx22: (x: (x22’ + x’ + x11)(x)(x22’ + x’ + x1010)(x)(x22’ + x’ + x1 1 + x+ x33))

xx33: (x: (x33’ + x’ + x11)(x)(x33’ + x’ + x11) ) xx88: (x: (x88’ + x’ + x22 + x + x66))

xx44: (x: (x44’ + x’ + x2 2 + x+ x66)(x)(x44’ + x’ + x33)) xx99: (x: (x99’ + x’ + x22 + x + x66)(x)(x99’ + x’ + x44))

xx66: (x: (x66’ + x’ + x1010)(x)(x66’ + x’ + x1 1 + x+ x33) ) xx1111: (x: (x1111’ + x’ + x33))

Page 29: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 29

SAT instance:SAT instance:

((xx11+x+x1010)()(xx11+x+x22+x+x55)(x)(x22+x+x44++xx55+x+x66+x+x88+x+x99)()(xx11+x+x22+x+x33+x+x66+x+x77)()(xx11+x+x33)(x)(x44+x+x88++xx1111+ + xx1212)(x)(x44+x+x99+x+x1010++xx1111)()(xx33+x+x77) )

(x(x22’+’+xx11)(x)(x22’+x’+x1010)(x)(x22’+’+xx11+x+x33)) (x (x33’+’+xx11) ) (x(x44’+x’+x22+x+x66)(x)(x44’+’+xx33)) (x (x66’+x’+x1010)(x)(x66’+’+xx11+x+x33) ) (x(x88’+x’+x22+x+x66) ) (x(x99’+x’+x22+x+x66)(x)(x99’+x’+x44) ) (x(x1111’+’+xx33))

Example: Example: Setting Up the Covering ProblemSetting Up the Covering Problem

Selection:Selection: {(A,B,D,E), (D,E,H), (B,C), (F,G)}{(A,B,D,E), (D,E,H), (B,C), (F,G)}

Prime Compatibles and their class sets: Prime Compatibles and their class sets:

xx11: : (A,B,D,E): (A,B,D,E): emptyempty x x77: (D,H):: (D,H): emptyempty

xx22: (B,C,D):: (B,C,D): {(A,B),(A,G),(D,E)} {(A,B),(A,G),(D,E)} x x88: (C,F):: (C,F): {(C,D)}{(C,D)}

xx33: (D,E,H):: (D,E,H): {(A,B),(A,D)}{(A,B),(A,D)} x x99: (C,G):: (C,G): {(C,D),{(C,D),

(F,G)}(F,G)}

xx44: (C,F,G):: (C,F,G): {(C,D),(E,H)} {(C,D),(E,H)} x x1010:(A,G)::(A,G): emptyempty

xx55: (B,C):: (B,C): empty empty x x1111: (F,G):: (F,G): {(E,H)}{(E,H)}

xx66: (C,D):: (C,D): {(A,G),(D,E)} {(A,G),(D,E)} x x1212: (F):: (F):emptyempty

SAT instance:SAT instance:

(x(x11+x+x1010)(x)(x11+x+x22+x+x55)(x)(x22+x+x44+x+x55+x+x66+x+x88+x+x99)(x)(x11+x+x22+x+x33+x+x66+x+x77)(x)(x11+x+x33)(x)(x44+x+x88+x+x1111+ + xx1212)(x)(x44+x+x99+x+x1010+x+x1111)(x)(x33+x+x77) )

(x(x22’+x’+x11)(x)(x22’+x’+x1010)(x)(x22’+x’+x11+x+x33)) (x (x33’+x’+x11) ) (x(x44’+x’+x22+x+x66)(x)(x44’+x’+x33)) (x (x66’+x’+x1010)(x)(x66’+x’+x11+x+x33) ) (x(x88’+x’+x22+x+x66) ) (x(x99’+x’+x22+x+x66)(x)(x99’+x’+x44) ) (x(x1111’+x’+x33))

Solution:Solution: x x11=x=x33=x=x55= x= x1111= 1, all others set to 0.= 1, all others set to 0.

Page 30: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 30

Representing the Reduced ISMRepresenting the Reduced ISM

In the reduced ISM:In the reduced ISM: There is a state for There is a state for

each compatible;each compatible; Next state will be a Next state will be a

compatible that compatible that contains all the contains all the original next states original next states (if there are more (if there are more than one, randomly than one, randomly pick one);pick one);

Output remains the Output remains the same.same.

A,1A,1E,-E,-B,-B,-B,0B,0D,1D,1E,0E,0A,1A,1HH

F,0F,0G,0G,0-,--,-E,1E,1-,--,-C,1C,1-,--,-GG

-,--,-G,0G,0F,1F,1H,1H,1-,1-,1C,-C,-B,0B,0FF

A,1A,1E,-E,-B,-B,--,--,-A,-A,-E,-E,-B,-B,-EE

A,-A,--,--,-B,0B,0B,-B,--,--,-E,-E,--,--,-DD

G,0G,0-,--,--,--,--,--,-A,1A,1D,1D,1B,0B,0CC

-,--,-A,1A,1A,-A,--,--,-A,-A,-D,1D,1B,0B,0BB

-,--,-A,-A,-B,0B,0E,1E,1D,0D,0-,--,-A,0A,0AA

77665544332211

(F,G)(F,G) Z Z

Z,0Z,0W,1W,1W,-W,--,--,-W,1W,1W,1W,1Y,0Y,0(B,C)(B,C) Y Y

(D,E,H)(D,E,H) X X

?,1?,1W,0W,0(A,B,D,E) (A,B,D,E) WW

77665544332211

Page 31: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 31

Unate and BinateUnate and Binate

A function A function f(xf(x11,,•••x•••xii•••x•••xnn) ) is is positive unatepositive unate in in xxii if its if its

cofactorcofactor

Negative unateNegative unate is defined in a similar way. If a function is is defined in a similar way. If a function is neither positive unate nor negative unate in a variable, it neither positive unate nor negative unate in a variable, it is called is called binatebinate in this variable. in this variable.

A function is A function is positive/negative unatepositive/negative unate if it is so for all if it is so for all variables, otherwise it is called variables, otherwise it is called binatebinate..

Example: Example: f(x,y,z) = xy + xz’ + yz’f(x,y,z) = xy + xz’ + yz’ ff is positive unate in x: is positive unate in x: ffxx=y+z’+yz’=y+z’+yz’, , ffx’x’=yz’=yz’

ff is positive unate in y: is positive unate in y: ffyy=x+xz’+z’=x+xz’+z’, , ffy’y’=xz’=xz’

ff is negative unate in z: is negative unate in z: ffzz=xy=xy, , ffz’z’=xy+x+y=xy+x+y

f f is a binate functionis a binate function

' includes ii xx ff

Recall:Recall:

Page 32: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 32

Binate Covering Problem in Matrix FormBinate Covering Problem in Matrix Form

F = (xF = (x11+x+x33)(x)(x22+x+x44+x+x66)(x)(x33’+x’+x44+x+x55)(x)(x66’)(x’)(x11’+x’+x66’)(x’)(x33+x+x44’+x’+x55))

-101--

0----0

0-----

-110--

1 -1- 1-

- - - 1 - 1

654321 xxxxxxFor each clause (row fFor each clause (row fii) and ) and

each variable (column Feach variable (column Fjj):):

ffijij = 1: normal form = 1: normal form

ffijij = 0: complement form = 0: complement form

ffijij = -: does not appear = -: does not appear

The Binate Cover Problem: Find a minimum cost subset S The Binate Cover Problem: Find a minimum cost subset S of columns, such that for each row fof columns, such that for each row fii::

Either Either j s.t. fj s.t. fijij = 1 and F = 1 and Fjj S;S;

Or Or j s.t. fj s.t. fijij = 0 and F = 0 and Fjj SS

Page 33: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 33

Unate Covering Problem (UCP)Unate Covering Problem (UCP) Let Let MMmmxxnn be a Boolean matrix, the UCP is to find be a Boolean matrix, the UCP is to find

a minimum number of columns to cover a minimum number of columns to cover MM in the in the sense that any row with a 1-entry has at least sense that any row with a 1-entry has at least one of its 1-entries covered by these columns.one of its 1-entries covered by these columns.

1111wx’y’z

1111wxy’z

11w’x’yz’

1111wx’yz’

1111wxyz’

1111wxyz

1111w’x’y’z’

11w’x’y’z

1111wx’y’z’

x’z’x’z’x’y’x’y’wy’zwy’zwyz’wyz’wxzwxzwxywxy

Solutions to UCP: {x’y’, x’z’,wxy, wxz},

{x’y’, x’z’,wxy, wy’z},

{x’y’, x’z’,wxz, wyz’}.

Recall:Recall:

Page 34: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 34

Reduction TechniquesReduction Techniques

1.1. Check for Check for essential columnsessential columns, remove them (they must , remove them (they must be in the selection) and all the rows that have a 1 in be in the selection) and all the rows that have a 1 in such columns;such columns;

2.2. Check for Check for row dominancerow dominance and remove all dominating and remove all dominating rows;rows;

3.3. Check for Check for column dominancecolumn dominance and remove all dominated and remove all dominated columns;columns;

4.4. Repeat 1, 2, 3 if there is any removal occurs.Repeat 1, 2, 3 if there is any removal occurs.

What is left?What is left? If no rows/columns left, we find an optimal solution;If no rows/columns left, we find an optimal solution; Otherwise, this UCP instance is called Otherwise, this UCP instance is called cycliccyclic..

Recall:Recall:

Page 35: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 35

Essential Row in BCPEssential Row in BCP

F = (xF = (x11+x+x33)(x)(x22+x+x44+x+x66)(x)(x33’+x’+x44+x+x55)(x)(x66’)(x’)(x11’+x’+x66’)(x’)(x33+x+x44’+x’+x55))

For F to be true, the term xFor F to be true, the term x66’ must be true, or ’ must be true, or

equivalently, xequivalently, x66=0. =0.

In the matrix form, this is a row of -----0, to cover In the matrix form, this is a row of -----0, to cover this row, from definition, we cannot select the this row, from definition, we cannot select the column corresponding to xcolumn corresponding to x66..

An An essential rowessential row of F is a row where only one of F is a row where only one entry fentry fijij is not -. It corresponds to a single literal is not -. It corresponds to a single literal

clause in the SAT instance.clause in the SAT instance.

Page 36: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 36

Essential Row in BCPEssential Row in BCP

Action on essential row:Action on essential row: If fIf fijij=1, select F=1, select Fjj; remove all rows f; remove all rows fkk if f if fkjkj=1;=1;

If fIf fijij=0, unselect F=0, unselect Fjj; remove all rows f; remove all rows fkk if f if fkjkj=0;=0;

Remove column FRemove column Fj;j;

F = (xF = (x11+x+x33)(x)(x22+x+x44+x+x66)(x)(x33’+x’+x44+x+x55)(x)(x66’)(x’)(x11’+x’+x66’)(x’)(x33+x+x44’+x’+x55)) xx66=0;=0;

xx22+x+x44+x+x66: x: x22+x+x44

xx11’+x’+x66’: deleted’: deleted

-101--

0----0

0-----

-110--

1 -1- 1-

- - - 1 - 1

654321 xxxxxx

Page 37: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 37

Row Dominance in BCPRow Dominance in BCP

F = (xF = (x11’+x’+x22+x+x33’) (x’) (x22+x+x33’)(x’)(x11+x+x44)(x)(x11+x+x22’+x’+x33+x+x44’)’)

For F to be true, all clauses must be true. For F to be true, all clauses must be true. WheneverWhenever xx22+x+x33’ is true, x’ is true, x11’+x’+x22+x+x33’ is also true. We say the latter ’ is also true. We say the latter

dominates the former.dominates the former.

A A rowrow f fii dominatedominates another s another row f row fjj if if

ffii is satisfied whenever is satisfied whenever f fjj is is

satisfied, I.e. fsatisfied, I.e. fjjffii..

In matrix form,In matrix form, this means that this means that ffikik=f=fjkjk for all k that f for all k that fjkjk-. -.

Remove dominating rows.Remove dominating rows.

0101

11

01

0104321 xxxx

Page 38: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 38

Column Dominance in BCPColumn Dominance in BCP

ColumnColumn F Fjj dominatedominates column Fs column Fkk if for each row f if for each row f ii, ,

one of the following occurs:one of the following occurs: ffijij=1;=1;

ffijij= - and f= - and fik ik 1;1;

ffijij= f= fikik= 0.= 0.

If FIf Fkk is selected, we can always is selected, we can always

replace it by Freplace it by Fjj. This does not . This does not

increase the number of columns. increase the number of columns. Action: remove dominated columns; remove Action: remove dominated columns; remove

rows that have 0 at dominated columns.rows that have 0 at dominated columns.

0101

11

01

0104321 xxxx

Page 39: Sequential System Synthesis -- Incompletely Specified Machines

ENEE 644 39

Example:Example: Last row is essentialLast row is essential

xx66=1=1;;

Remove row 4 and 6;Remove row 4 and 6;

Column 1 can be dominated by Column 1 can be dominated by column 2column 2 Remove column 1, Remove column 1, xx11=0=0;;

Column 4 is dominated by 5Column 4 is dominated by 5 Remove column 4, Remove column 4, xx44=0=0;;

Remove rows 1 and 2;Remove rows 1 and 2;

Column 5 dominates 2 and 3Column 5 dominates 2 and 3 Remove columns 2 and 3, Remove columns 2 and 3, xx22=x=x33=0=0;;

Select column 5, Select column 5, xx55=1=1..

1-----

-1--1-

1-1-1-

-111--

- 00- --

- - 0 0 - -

654321 xxxxxx

11

111

00

005432 xxxx