300 likes | 370 Views
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 algorithm Two-level logic minimisation procedures Complementation Expansion of implicants
E N D
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 algorithm • Two-level logic minimisation procedures • Complementation • Expansion of implicants • Detection of essential primes • Computation of a mnimal cover • Reduction of prime implicants • Conclusions
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
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.
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
Thelen’s prime implicant algorithm (4) • Depth-first-search multiplication • Search tree for b c b c d e ad ae f g f adf adg adf
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)
c b a a a =R1 =R1 a d a a d a d d R1= R2 R4= R2 R1= c c c c c R2 R2 R2 R2 R3= R1= Thelen’s prime implicant algorithm (6) b c Linear space complexity
Thelen’s prime implicant algorithm (7) • R1 and R2 are obvious • Proof 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
Thelen’s prime implicant algorithm (8) : disjunction related to the level of arc j disjunction related to the level of arc k since Corresponds to arc j and is absorbed by xp => arc j can be pruned
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%
Applications of Thelen’s theorem in two-level logic minimisation procedures • Complementation • Expansion of implicants • Detection of essential primes • Computation of a minimal cover • Reduction of prime implicants
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 A B
Complementation(2) • 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 Cube c
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
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)
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:
Expansion of implicants(3) • Example:
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
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 cjCon and DC-cubes dkCdc completely covers ci, then ci is not essential, otherwise ci is essential.
Detection of essential primes(2) • Bahnsen, ‘Essential prime implicant tester’, IBM Technic. Disclosure Bulletin, 1981 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 p: the prime to be examined R’: OFF cubes that are distance 1 from p p is essential iff there exists minterm m such that m is completely surrounded by R’
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 iffECF has a solution
Detection of essential primes(4) • 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
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
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
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
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
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
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
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