1 / 16

Boolean Satisfiability in Electronic Design Automation (EDA )

Boolean Satisfiability in Electronic Design Automation (EDA ). By Kunal P. Ganeshpure. 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.

valterra
Télécharger la présentation

Boolean Satisfiability in Electronic Design Automation (EDA )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  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. 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 • 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 • 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. Importance of SAT in EDA • Many applications • Test pattern generation • Circuit Delay Computation • Logic optimization • Functional test vector generation • Combinational equivalence checking • Delay testing • Crosstalk noise analysis

  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 clause is a disjunction of literals • A literal is either a variable or its negation Literal  =(A + B) · (¬B + C) · (A + C) Variable Clause

  6. CNF equations for logic gates • A formula P = Q is logically equivalent to (P => Q) · (Q => P) • The above relation can be expressed as (¬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) 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. CNF equations for gates (example) a z b 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. a a z z b b a z a z b CNF formula of different gates  = (¬a + z) · (¬b + z) · (a + b + ¬z)  = (a + ¬z) · ( b + ¬z) · (¬a + ¬b + z) • = (a + b + ¬z) · (a + ¬b + z) • (¬a + ¬b + ¬z) · (¬a + b + z)  = (a + z) · (¬a + ¬z)

  9. CNF equations for a logic circuit DAG for the circuit Original circuit • Breath first propagation • through the DAG. • 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. Conflict Solution of SAT problem:Backtrack search algorithm • Backtrack search algorithm for SAT  = (a + b) · (¬b + c + d) · (¬b + e) · (¬d + ¬e +f)  = (a + b) · (¬b + c + d) · (¬b + e) · (¬d + ¬e +f)  = (a+ b) · (¬b+ c + d) · (¬b+ e) · (¬d+ ¬e +f)  = (a+ b) · (¬b + c + d) · (¬b + e) · (¬d + ¬e +f)  = (a+ b) · (¬b + c + d) · (¬b + e) · (¬d + ¬e +f)  = (a+ b) · (¬b + c + d) · (¬b + e) · (¬d + ¬e +f) Assume (decisions) c = 0 and f = 0 Assign a = 0 and imply the assignments Decide() Decide() Decide() yes no Any variable left? All variables tried both ways ? All variables tried both ways ?  is unsatisfied  is satisfied no Imply() yes Imply() Conflict ? Conflict ? yes no Backtrack() Backtrack()

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

  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. Recursive Learning example Ψ = (u + x + ¬w) · (x + ¬y) · (w + y + ¬z) Ψ = (u+ x + ¬w) · (x + ¬y) · (w + y +¬z) Selected clause Assignments: {z = 1, u = 0} To satisfy the selected clause either w = 1 or y = 1. Case 1: w = 1 x = 1 for the equation to be satisfied Ψ = (u+ x +¬w) · (x + ¬y) · (w+ y +¬z) Ψ = (u+x+¬w) · (x+¬y) · (w+ y +¬z) Case 2: y = 1 x = 1 for the CNF to be satisfied Ψ = (u +x+ ¬w) · (x+¬y) · (w + y+¬z) Ψ = (u + x + ¬w) · (x +¬y) · (w + y+ ¬z) 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. 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. 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. Questions

More Related