Universal logic design algorithm and its application to the synthesis of two-level switching...

30
Universal logic design algorithm and its application to the synthesis of two-level switching circuits H.-J.Mathony IEEE Proceedings 1989

Transcript of Universal logic design algorithm and its application to the synthesis of two-level switching...

Page 1: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Universal logic design algorithm and its application to the synthesis

of two-level switching circuits

H.-J.MathonyIEEE Proceedings 1989

Page 2: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Outline

Thelen’s prime implicant algorithmTwo-level logic minimisation procedures

Complementation Expansion of implicants Detection of essential primes Computation of a mnimal cover Reduction of prime implicants

Conclusions

Page 3: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Thelen’s prime implicant algorithm (1)

Problem definition: Given a conjunctive normal form of F

Convert F into the sum of its all prime implicants

Time-consuming and requires large memory capacity if multiplied out straightforwardly:

• Cannot decide whether an implicant is prime or not until all products are computed

)(......)(...( 2121 nm bbbaaaF

Page 4: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Thelen’s prime implicant algorithm (2)

Thelen’s algorithm based on method of Nelson: All prime implicants of a function f are

obtained when an arbitrary conjunctive form F of f, i.e., a product of sums representation, is expanded into a disjunctive form by multiplying out the disjunctions of F and deleting products that subsumes others.

Page 5: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Thelen’s prime implicant algorithm (3)

Method of Nelson: Drop contra-valid clauses

If an occurrence of a literal is repeated within a clause, drop all occurrences and save one

Drop subsuming clauses

0aa

abcabac

abababc

Page 6: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Thelen’s prime implicant algorithm (4)Depth-first-search multiplication

Search tree for

b c

ae

))()(( gfedcbaF

a b c

d

f f

ae

gad

adf adg adf

Page 7: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Thelen’s prime implicant algorithm (5)

Pruning rules R1: An arc is pruned, if its predecessor node

conjunction contains the complement of the arc-literal (corresponds to R1 of Method of Nelson)

R2: A disjunction is discarded, if it contains a literal which appears also in the predecessor node-conjunction (corresponds to R2 of Method of Nelson)

R3: An arc is pruned, if another non-expanded arc on a higher level still exists which has the same arc-literal (corresponds to R3 of Method of Nelson)

Page 8: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Thelen’s prime implicant algorithm (6)

b c

))()()(( cbdcabacbaF

ba

ab c

a

aac

b

cb

cdbdbacba

Linear space complexity

ba=R1

ab

ab

=R1

dca

R1=a

R4=

dcR1=

b

R1=

cR3=

b c

dba

b c

cba

R2 R2 b cac

R2 b c

cdb

R2

ab

a c dR2

a c dac R2

Page 9: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Thelen’s prime implicant algorithm (7)

R1 and R2 are obviousProof of R3

Theorem: suppose arc j and (on a higher level) arc k have the same arc-literal xp, then all implicants, which result from traversing down arc j, will be adsorbed by the implicants computed by traversing down arc k

Page 10: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Thelen’s prime implicant algorithm (8)

)......()( rpij xxxXW :

disjunction related to the level of arc j)......()( spjk xxxXW

disjunction related to the level of arc k

)()](............[

)()()......(

)()()(

XGXWxxxxxxxx

XGXWxxx

XGXWXWF

jsprjpjij

jspj

jk

since pjp xXWx )(

pj xx Corresponds to arc j and is absorbed by xp => arc j can be pruned

Page 11: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Thelen’s prime implicant algorithm (9)

Further pruning rule developed by the author R4: An arc j is pruned, if another already

expanded arc k with the same arc-literal exists on a higher level i and if Rule R3 was not applied in the subtree of arc k with respect to arc p on level i which leads to arc j

Reduction of the search tree up to 25%

Page 12: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Applications of Thelen’s theorem in two-level logic minimisation procedures

ComplementationExpansion of implicantsDetection of essential primesComputation of a minimal coverReduction of prime implicants

Page 13: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Complementation(1)Complementation:

Disjoint sharp operation Complementing by recursive use of the ‘Shannon

expansion’ and the ‘unate paradigm’Sharp operation:

let A=U, the universe:Disjoint sharp operation: with the resultant cubes mutually disjoint

BABA #

BBUBA #BABA #

A B

Page 14: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Complementation(2)

nxxxcw ...)( 21Cube c

nxxxcwcW ...)()( 21

)()...()()(...)()(

21

21

p

p

cWcWcWFcwcwcwF

F

•Thelen’s procedure is related to the non-disjoint sharp operation, i.e., the straight forward multiplication algorithm is in a one-to-one relation to the sharp product

•Want to avoid the computation of all prime cubes of

Page 15: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Complementation(3)R5: Let be an arbitrary disjunction

of F; if there exists a non-expanded arc with literal on a higher level, then only arc of D must be expanded.

R6: Let be an arbitrary disjunction of F; if there exists an expanded arc k with literal on a higher level, and if neither R3 nor R5 was applied in the sub-tree of arc k with respect to arc p on level i which leads to arc j, then only arc of D must be expanded.

Rule R6 is related to rule R5 in the same way as rule R4 is related to rule R3

)......( kji xxxD

ix ix

)......( kji xxxD

ix

ix

Page 16: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Expansion of implicants(1)

Expand a cube ci of the ON-cover C to a prime cube ci

+ so that as many literals in ci are removed as possible

Method: ON cube ci expanded against the given OFF-cover

• Petzold, ‘An algorithm for the minimisation of Boolean functions’, Techn. Report, 1999 (in German)

• Zander and Wagner, ‘A method for the computation of prime implicants for incompletely specified Boolean functions’, Elektron. Inform. Kybern, 1972 (in German)

Page 17: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Expansion of implicants(2) Boolean function AF(ci) in conjunctive form:

prime implicants in a one-to-one relation to all prime cubes ci

+ which cover cube ci: derived by Zander

An algebraic representation of the blocking matrix B:

else

rcx

rcx

x

xcAF

jiii

jiii

i

ji

q

j

,0

)0()1(,

)1()0(,

))()(1

Page 18: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Expansion of implicants(3)Example:

1413142

1413121321

43214432421

11109

8765

4321

321

))(())()()((

)()()()(

)1,1,1,1(),0,1,1,1(),1,0,1,1()1,1,0,1(),0,1,0,1(),1,0,0,1(),0,0,0,1()0,1,1,0(),0,0,1,0(),1,1,0,0(),0,1,0,0(

:

)1,1,1,0(),0,0,1,0(),1,1,1,0(:

xxxxxxxxxxxxxxxxxxxxxxxxxxxcAF

rrrrrrrrrrr

C

cccC

off

on

Page 19: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Expansion of implicants(4)

Guide: choose a leave that covers the largest number of cubes Thelen’s tree pruned by additional rule R5: an

arc is pruned if it cannot lead to a prime cube which covers more cubes than the best prime cube found so far

Page 20: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Detection of essential primes(1)

Miller, R.: ‘Switching theory’, Vol. I: ‘Combinational circuits’, 1965 Given a prime cube ci; if the consensus of ci

with all other on-cubes cj Con and DC-cubes dk Cdc completely covers ci, then ci is not essential, otherwise ci is essential.

Page 21: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Detection of essential primes(2)

00

10 011

0 00 0

0 00

1

0

p: the prime to be examinedR’: OFF cubes that are distance 1 from pp is essential iff there exists minterm m such thatm is completely surrounded by R’ p

•Bahnsen, ‘Essential prime implicant tester’, IBM Technic. Disclosure Bulletin, 1981

Page 22: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Detection of essential primes(3)method:

for each fixed component j of cube c, compute characteristic product terms against each neighbored off cube, OR these product terms to form disjunctive form EDFj

• characteristic product term of an off cube:

– substitute the fixed values of c with the jth fixed value inverted into the off cube

form conjunctive form ECF of all these disjunctive forms EDFj. ECF describes the essential vertices covered by cube c.

c is essential iff ECF has a solution

Page 23: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Detection of essential primes(4)

4324

3213

4322

3211

421

)1,0,1,(

)1,1,,1(

)1,1,0,(

),1,0,1(

)0,,1,(

xxxr

xxxr

xxxr

xxxr

xxc

Example:

r1, r3 and r4 are distance 1. •substitute (c with x2 inverted), or x2= 0, x4= 0, in r1, r3 and r4 => EDF2 = x1x3. •substitute (c with x4 inverted), or x2= 1, x4= 1, in r1, r3 and r4 => EDF4 =

=>c is essential

42xx

42xx

331 xxx 03142 xxEDFEDFECF

Page 24: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Detection of essential primes(5)

Another Thelen’s expansion tree problem ECF is converted into a disjunctive form by the

use of Thelen’s algorithm expansion terminates when the first leaf node is

arrived or if no arc leads to a leaf node

Page 25: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Computation of a minimal cover(1)

Petrick function Petrick, S.: ‘A direct determination of the

irredundant forms of a Boolean function from the set of prime implicants’. Air Force Cambridge Res. Center, 1956

Page 26: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Computation of a minimal cover(2)

disjunction Dj of PF correspond to vertices of Con

which can be covered alternatively by the prime cubes ci represented by the literals vi which form

the disjunction Dj.

prime implicants of PF are in a one-to-one relation to the irredundant sums of the function f:

the minimal cover Cmin corresponds to the shortest prime implicant of PF

)(......)(...( 2121 nm bbbaaaPF

Page 27: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Computation of a minimal cover(3)

Branch and bound:• rule R3 guarantees that the first implicant which is

found is prime

• The first leaf node always represents an irredundant subcover of Con,

• the number of literals of the first prime implicant is an upper bound for the depth of the resulting search tree

Page 28: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Reduction of prime implicants(1)Given a prime cube ci, the maximal reduced cube

equals the supercube of The function

represents all on-vertices which are only covered by cube ci

ic

)(# dconi CCc

dckionj

k

q

jj

p

jii

CdcCc

dWcWcwcRF

},{\

)()()()(11

nxxxcwcW ...)()( 21

Page 29: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Reduction of prime implicants(2)

Another Thelen’s expansion tree problem: apply R1 to R6 R7: form an intermediate supercube with each

cube of a new leaf and terminate the search if this intermediate supercube equals the cube to be reduced -> ci is not reducible

Page 30: Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.

Conclusion

Thelen’s theorem on finding all primes of a conjunctive form function

Universal solution of two-level minisation procedures by applying Thelen’s theorem

complementation expansion of implicants detection of essential primes computation of a minimal cover reduction of prime implicants