Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.

Similar presentations


Presentation on theme: "1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure."— Presentation transcript:

1 1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure

2 2 Talk structure Introduction to Boolean Satisfiability Applications of SAT in EDA CNF equations for logic gates and combinational circuits Backtrack search algorithm. Recursive learning. Conclusion

3 3 What is Boolean Satisfiability? Given a boolean expression written using only AND, OR, NOT of variables, determine the true or false variable assignment that will make the entire expression true. For example Let Let F = (a + b) · (a + ¬b) · (¬a + c) · (¬c + b) For a = 1 b = 1 c = 1 the formula is satisfied i.e. F = 1 But if But if F = (a + b) · (a + ¬b) · (¬a + c) · (¬c + ¬a) In this case F is not satisfied for any variable assignments SAT is an NP Complete problem NOTATION: ¬ : NOT operation · : AND operation + : OR operation

4 4 Importance of SAT in EDA Many applications Test pattern generation Test pattern generation Circuit Delay Computation Circuit Delay Computation Logic optimization Logic optimization Functional test vector generation Functional test vector generation Combinational equivalence checking Combinational equivalence checking Delay testing Delay testing Crosstalk noise analysis Crosstalk noise analysis

5 5 Conjunctive normal form (CNF) In the SAT problem, the formula is represented in the CNF form. A formula consists of conjunction of clauses A formula consists of conjunction of clauses A clause is a disjunction of literals A clause is a disjunction of literals A literal is either a variable or its negation A literal is either a variable or its negation (A + B) · (¬B + C) · (A + C)  = (A + B) · (¬B + C) · (A + C) Clause Variable Literal

6 6 CNF equations for logic gates A formula P = Q is logically equivalent to (P => Q) · (Q => P) (P => Q) · (Q => P) The above relation can be expressed as (P + Q) · (Q + P) (¬P + Q) · (¬Q + P) For a gate with a function z = f (a, b, c…) (z => f(a,b,c..)) · (f(a,b,c..) => z) (z => f(a,b,c..)) · (f(a,b,c..) => z) Therefore (· Therefore (¬z + f(a,b,c..)) · (¬f(a,b,c..) + z) Expand the above equation in POS form to obtain the CNF for the gate

7 7 CNF equations for gates (example) a b z z = a · b (z => (a · b)) · ((a · b) => z) (¬z + (a · b)) · (¬(a · b) + z) (¬z + a) · (¬z + b) · (z + ¬a + ¬b) Therefore the CNF formula is  = (a + ¬z) · ( b + ¬z) · (¬a + ¬b + z)

8 8 CNF formula of different gates a b z z a b  = (a + ¬z) · ( b + ¬z) · (¬a + ¬b + z)  = (¬a + z) · (¬b + z) · (a + b + ¬z)  = (a + z) · (¬a + ¬z)  = (a + b + ¬z) · (a + ¬b + z) (¬a + ¬b + ¬z) · (¬a + b + z) z a z a b

9 9 CNF equations for a logic circuit Original circuit DAG for the circuit o Breath first propagation through the DAG. o Take the conjunction of all equations for all the nodes. O = ((f + ¬d) · (f + ¬e) · (f + d + ¬e))· ((¬d + c) · (¬d + b) · (d + ¬c + ¬b)) · ((¬e + a) · (¬e + c) · (e + ¬a + ¬c))· ((c + a) · (c + b) · (¬c + ¬a + ¬b))

10 10  = (a + b) · (¬b + c + d) · (¬b + e) · (¬d + ¬e + f)  Solution of SAT problem: Backtrack search algorithm Backtrack search algorithm for SAT Assume (decisions) c = 0 and f = 0 Assign a = 0 and imply the assignments Conflict ?  = (a + b) · (¬b + c + d) · (¬b + e) · (¬d + ¬e + f)  Conflict  = (a + b) · (¬b + c + d) · (¬b + e) · (¬d + ¬e + f)  Decide() Imply() Backtrack() Decide() Imply() Conflict ? Backtrack() Decide() yes no Any variable left? no yes  is satisfied  is unsatisfied All variables tried both ways ? yes no All variables tried both ways ?

11 11  = (a + b) · (¬b + c + d) · (¬b + e) · (¬d + ¬e + f)  Backtrack search algorithm Backtrack search SAT algorithm Assume (decisions) c = 0 and f = 0 Assign a = 0 and imply the assignments  = (a + b) · (¬b + c + d) · (¬b + e) · (¬d + ¬e + f)  Conflict  = (a + b) · (¬b + c + d) · (¬b + e) · (¬d + ¬e + f)  Decision f = 0 c = 0 b = 1 Imply d = 1 Imply Decision a = 0 Conflict Backtrack a = 1  = (a + b) · (¬b + c + d) · (¬b + e) · (¬d + ¬e + f)  Decision b = 0  = (a + b) · (¬b + c + d) · (¬b + e) · (¬d + ¬e + f) 

12 12 Recursive Learning Search space reduction technique. Study the different ways of satisfying the selected clause. Determine the assignments that are necessary for the satisfiability instance to get satisfied. Form a clause that describes the variable assignment.

13 13 Recursive Learning example Assignments: {z = 1, u = 0} Ψ = (u + x + ¬w) · (x + ¬y) · (w + y + ¬z) Selected clause To satisfy the selected clause either w = 1 or y = 1. Ψ = (u + x + ¬w) · (x + ¬y) · (w + y + ¬z) Case 2: y = 1 Case 1: w = 1 x = 1 for the equation to be satisfied x = 1 for the CNF to be satisfied Thus (z = 1) AND (u = 0) => (x = 1) Therefore the clause (¬z + u + ¬x) represents the learned constraint Ψ = (u + x + ¬w) · (x + ¬y) · (w + y + ¬z) · (¬z + u + ¬x)

14 14 Conclusion Satisfiability is an NP-complete problem Solution of SAT involves the searching the space of all the possible variable assignment. Search space reduction techniques like recursive learning are used to reduce the search space.

15 15 References J.P. Marques-Silva, K. Sakallah, Boolean Satisfiability in Electronic Design Automation, DAC 2000. Review of SAT problem T. Larrabee, “Test Pattern Generation Using Boolean Satisfiability,” IEEE Transactions on Computer-Aided Design, vol. 11, no. 1, pp. 4-15, January 1992.

16 16 Questions


Download ppt "1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure."

Similar presentations


Ads by Google