340 likes | 486 Views
ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems. BDD-based Bi-decomposition BDS system. Outline. Review of current decomposition methods Algebraic Boolean Theory of BDD decomposition [C. Yang 1999] Bi-decomposition F = D Q Boolean AND/OR Decomposition
E N D
ECE 697B (667)Spring 2006Synthesis and Verificationof Digital Systems BDD-based Bi-decomposition BDS system
Outline • Review of current decomposition methods • Algebraic • Boolean • Theory of BDD decomposition [C. Yang 1999] • Bi-decompositionF = D Q • Boolean AND/OR Decomposition • Boolean XOR Decomposition • MUX Decomposition • Logic optimization based on BDD decomposition ECE 667 - Synthesis & Verification - Lecture 14
Functional Decomposition – previous work • Ashenhurst [1959], Curtis [1962] • Tabular method based on cut: bound/free variables • BDD implementation: • Lai et al. [1993, 1996], Chang et al. [1996] • Stanion et al. [1995] • Roth, Karp [1962] • Similar to Ashenhurst, but using cubes, covers • Also used by SIS • Factorization based • SIS, algebraic factorization using cube notation • Bertacco et al. [1997], BDD-based recursive bidecomp. ECE 667 - Synthesis & Verification - Lecture 14
Drawbacks of Traditional Synthesis Methods • Weak Boolean factorization capability. • Difficult to identify XOR and MUX decomposition. • Separate platforms for Boolean operations and factorization. • Our goal: use a common platform to carry out both Boolean operations and factorization: BDD’s ECE 667 - Synthesis & Verification - Lecture 14
What is wrong with Algebraic Division? • Divisor and quotient are orthogonal!! • Better factored form might be: (q1+ q2+ …+qn) (d1+d2+…+dm) • gi and dj may share same or opposite literals • Example: SOP form: F = abg + acg + adf + aef + afg + bd + ce + be + cd. (23 lits) Algebraic:F = (b + c)(d + e + ag) + (d + e +g)af. (11 lits) Boolean:F = (af + b + c)(ag + d + e).(8 lits) ECE 667 - Synthesis & Verification - Lecture 14
F a + b c + d a b c a 1-dominator c * b d d 0 0 0 1 1 1 First work, Karplus [1988]: 1-dominator • Definition: 1-dominator is a node that belongs to every path from root to terminal 1. • 1-dominator defines algebraic conjunctive(AND) decomposition: F = (a+b)(c+d). ECE 667 - Synthesis & Verification - Lecture 14
F a b c d 1 1 1 a b c a 0-dominator c b d d 0 0 0 Karplus: 0-dominator • Definition: 0-dominator is a node that belongs to every path from root to terminal 0. • 0-dominator defines algebraic disjunctive(OR) decomposition: F = ab + cd. ECE 667 - Synthesis & Verification - Lecture 14
Bi-decomposition based on Dominators • We can generalize the concept of algebraic decomposition and dominators to: • Generalized dominators • Boolean bi-decompositions (AND, OR, XOR) • Bi-decomposition: F = D Q • First, let’s review fundamental theorems for Boolean division and factoring. ECE 667 - Synthesis & Verification - Lecture 14
Boolean Division Definitions • Gis aBoolean divisorofFif there existHandRsuch that F = G H + R, and G H 0. • Gis said to be afactorofFif, in addition, R=0, that is: F = G H. whereHis thequotient, Ris theremainder. Note: HandRmay not be unique. ECE 667 - Synthesis & Verification - Lecture 14
G F Boolean Factor - Theorem Theorem: Boolean functionGis aBoolean factorof Boolean functionFiffF G , (i.e.FG’= 0, orG’ F’). • Proof: • : Gis a Boolean factor ofF. Then Hs.t.F = GH; • Hence,F G(as well asF H). • : F G F = GF = G(F + R) = GH. • (HereRis any functionR G’.) • Notes: • - Given F and G, H is not unique. • - To get a small H is the same as getting a small F + R. Since RG = 0, this is the same as minimizing (simplifying) f with DC = G’. ECE 667 - Synthesis & Verification - Lecture 14
F G Boolean Division - Theorem Theorem: G is aBoolean divisorofFif and only ifF G 0. Proof: : F = GH + R, GH 0 FG = GH + GR. Since GH 0, FG 0. : Assume that FG 0. F = FG + FG’ = G(F + K) + FG’. (Here K G’.) Then F = GH + R, with H = F + K, R = FG’. Since GH = FG 0, then GH 0. Note: f has many divisors. We are looking for a g such that f = gh + r, where g, h, r are simple functions. (simplify f with DC = g’) ECE 667 - Synthesis & Verification - Lecture 14
Boolean Space D Q F F F Boolean Division Goal : for a given F, find D and Q such that F = Q · D. F = e + bd, D = e + d, Q = e + b ECE 667 - Synthesis & Verification - Lecture 14
Q D F Conjunctive (AND) Decomposition • Conjunctive (AND) decomposition: F = D Q. • Theorem: Boolean function F has conjunctive decomposition iff F D. For a given choice of D, the quotient Q must satisfy: F Q F + D’. • For a given pair (F,D), this provides a recipe for Q . ECE 667 - Synthesis & Verification - Lecture 14
D Q F F F Boolean Division AND decomposition Given function F and divisor D F, find Q such that: F Q F + D’. Boolean Space D’ Q = e + b F + D’ F = e + bd, D = e + d, ECE 667 - Synthesis & Verification - Lecture 14
F = e + bd D = e + b, D e e e e e b b b b 1 d d d Q Q = e + d 0 0 0 0 0 1 1 1 1 1 eb Q 00 01 11 10 d DC 1 1 DC 0 1 DC 1 1 1 AND Decomposition (F = D Q): Example • Recall: given (F,D), quotient Q must satisfy: F Q F + D’. ECE 667 - Synthesis & Verification - Lecture 14
F H G Disjunctive (OR) Decomposition • Disjunctive (OR) decomposition: F = G + H. • Theorem: Boolean function F has disjunctive decomposition iff F G. For a given choice of G, the term H must satisfy: F’ H’ F’ + G. Dual to conjunctive decomposition. • For a given (F,G), this provides a recipe for H . ECE 667 - Synthesis & Verification - Lecture 14
Boolean AND/OR Bi-decompositions • Conjunctive (AND) decomposition If D F, F = F D = Q D. • Disjunctive (OR) decomposition If G F, F = F + G = H + G. • D, G = generalized dominators ECE 667 - Synthesis & Verification - Lecture 14
F a D f a b b f c c b b g c c d e 0 0 1 1 0 0 Boolean divisor Generalized Dominator D F = D Q ECE 667 - Synthesis & Verification - Lecture 14
F a G f a b b f c c b b g c c d e 0 0 0 1 0 0 Boolean “subtractor” Generalized Dominator G F = G + H ECE 667 - Synthesis & Verification - Lecture 14
D = af + b + c Q F D D a a a a f f reduce b b b f f c c c b b b b 0 0 1 0 c c c c g Q d a Q = ag + d + e e minimize g g 1 0 0 d d e e 1 0 1 0 DC DC Boolean Division Based on Generalized Dominator 1 ECE 667 - Synthesis & Verification - Lecture 14
F a + b c + d a b c a c 1-dominator * b d d 0 0 0 1 1 1 Special Case: 1-dominator F = (a+b)(c+d) ECE 667 - Synthesis & Verification - Lecture 14
F a b c d 1 1 1 a b c a 0-dominator c b d d 0 0 0 Special Case: 0-dominators F = ab + cd ECE 667 - Synthesis & Verification - Lecture 14
h’f’ hf F F + h h h h = 0 0 f f f f’ f’ Algebraic XOR Decomposition = complement edge = 1-edge edge = 0-edge edge ECE 667 - Synthesis & Verification - Lecture 14
F a c+d a+b x-dominator b c a c b d d 1 1 1 Algebraic XOR Decomposition: x-dominators ECE 667 - Synthesis & Verification - Lecture 14
H F a a G Generalized x-dominator b b c c c c d d d 1 1 1 Boolean XOR Decomposition: Generalized x-dominators GivenFandG, there existsH : F = G H; H = F G. ECE 667 - Synthesis & Verification - Lecture 14
1 1 F F 0 0 F F v v h h g g g g f f f f MUX Decomposition • Simple MUX decomposition • Complex MUX • decomposition ECE 667 - Synthesis & Verification - Lecture 14
F F h h 0 1 0 1 g g f f F F a a b c d c b d 0 1 0 1 Functional MUX Decomposition - example ECE 667 - Synthesis & Verification - Lecture 14
Construct Global BDDs Variable Reorder Decompose BDD Construct Factoring Trees Factoring Tree Processing Technology Mapping Synthesis Flow Boolean Network ECE 667 - Synthesis & Verification - Lecture 14
Factoring Tree Processing: ECE 667 - Synthesis & Verification - Lecture 14
A Complete Synthesis Example ECE 667 - Synthesis & Verification - Lecture 14
A Complete Synthesis Example (Decompose function g) ECE 667 - Synthesis & Verification - Lecture 14
A Complete Synthesis Example (Decompose function h) ECE 667 - Synthesis & Verification - Lecture 14
A Complete Synthesis Example (Sharing Extraction) ECE 667 - Synthesis & Verification - Lecture 14
Conclusions • BDD-based bi-decomposition is a good alternative to traditional, algebraic logic optimization • Produces Boolean decomposition • Several types: AND, OR, XOR, MUX • BDD decomposition-based logic optimization is fast. • Stand-alone BDD decomposition scheme is not amenable to large circuits • Global BDD too large • Must partition into network of BDDs (local BDDs) ECE 667 - Synthesis & Verification - Lecture 14