1 / 23

Computation Engines: BDDs and SAT (part 2)

Computation Engines: BDDs and SAT (part 2). 290N: The Unknown Component Problem Lecture 8. Outline. Characteristic function Representation of MV relations, automata, and FSMs Case study: Equivalence checking Combinational and sequential BDDs vs SAT Combining the two

arion
Download Presentation

Computation Engines: BDDs and SAT (part 2)

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. Computation Engines: BDDs and SAT(part 2) 290N: The Unknown Component Problem Lecture 8

  2. Outline • Characteristic function • Representation of MV relations, automata, and FSMs • Case study: Equivalence checking • Combinational and sequential • BDDs vs SAT • Combining the two • Other representations • Truth table • Sums-of-products (SOPs) • Historical perspective

  3. Characteristic Function • Definition • Manipulation of sets • MV relations as sets of I/O combinations • Examples • representing an FSM • representing an automaton

  4. Characteristic Function • Boolean function F: {0,1}n {0,1} represents a set SF of minterms x  {0,1}n, such that F(x)=1 • Conversely, elements of any set S can be encoded using minterms x  {0,1}nand represented by a Boolean function, which takes value 1 in these minterms, and 0 otherwise. • This Boolean function is called characteristic function of the set S. s: {0,1}n {0,1}, such that s(x) = 1 iff x represents some element s  S. • the codes should be disjoint for all elements of S • the size of Boolean space of x cannot be smaller than n=log2|S|

  5. Set Manipulation • Operations on sets are reduced to Boolean operations on the characteristic functions: • Empty set: = 0 • Union of sets:S  T= S+ T • Intersection of sets:S  T= S& T • Set different:S - T= S& T’ • Containment of sets: (ST)= 1

  6. Multi-Valued Relations is an MV relation, where are finite sets of values. The variables are multi-valued variables which can take on any value in is a multi-output MV relation if R is binary and the are treated as outputs. This relation is between a vector of inputs and a vector of outputs:

  7. 1 1 2 0 0 2 2 0 0 2 0 2 1 3 1 Normal Simulation (NS) POs • PI/PO relation contains • 3 1 1 / 2 1 0 node with a non-deterministic relation {0,2} 0 2 fanins

  8. Relations as Sets of I/O Combinations • As sets, relations can be represented and manipulated using their characteristic functions • One way of encoding the I/O combinations belonging to a relation, is to encode each variable and then to combine the individual variable codes into a single code of a combination • For example, in the previous example, assuming all the variables to be 4-valued and natural binary encoding: Combinations: 3 1 1 / 2 1 0 3 1 1 / 0 1 2 Codes: 11 01 01 / 10 01 00 11 01 01 / 00 01 10

  9. Relations Representing an FSM • FSM is { I, O, S, S0, , } • Transition relation is T(i, s, s’) : I  S  S {0,1} T(i, s, s’) = 1 iff state s’ is reached in one transition from state s under input i • Output relation is F(i, s, o): I  S  O {0,1} F(i, s, o) = 1 iff output o is produced in state s under input i • Total transition/output relation of the FSM is TF(i, s, s’, o): I  S  S  O  {0,1} TF(i, s, s’, o) = 1 iff state s’ and output o can be produced in state s under input i

  10. 10 x y 00 11 DFF 0 1 01 Example of an FSM .i 2 .o 0 .s 2 .p 4 .ilb x y .ob .accepting 0 1 .names x y cs ns 00 0 0 10 0 1 01 1 0 11 1 1 .e

  11. Relation Representing an Automaton • Automaton is { I, S, S0, , Q} • Transition relation is T(i, s, s’) : I  S  S {0,1} T(i, s, s’) = 1 iff state s’ is reached in one transition from state s under input i • Output relation (acceptance function) is F(s): S  {0,1} F(s) = 1 iff state s is accepting

  12. Ins CS code NS code 0 A 00 B 10 0,1 A 00 A 00 0 B 10 B 10 1 B 10 A 00 0 C 01 B 10 1 C 01 A 00 Example of an Automaton C 1 0 0 B A 1 0 0,1

  13. Example (continued) Transition relation T(I,a1,a2,b1,b2) = i'a1‘a2‘b1b2‘+ a1‘a2'b1'b2' + i'a1a2'b1b2' + ia1a2'b1'b2' + i'a1a2'b1b2' + ia1a2'b1'b2' i a1 b1 a2 b2 0 1

  14. Case Study: Equivalence Checking • Combinational • Sequential • Equivalence checking as search • BDDs vs SAT • Combination of the two

  15. a C1 O1 b c O a C2 b c O2 Combinational Equivalence Checking • Given two combinational circuits, C1 and C2 • Construct the Miter circuit • The output of the Miter circuit is 1 iff the two circuits are different • Prove that the output of the Miter circuit is always 0

  16. a M1 O1 b c O a M2 b c O2 Sequential Equivalence Checking • Given two sequential circuits, C1 and C2 • Construct the product circuit (FSM) • The output of the product is 1 iff the two are different • Find the reachable states of the product circuit (FSM) • If there exist a state with the output 1, they are not equivalent

  17. Verification as Search • Verification problem is reduced to a search problem • find an assignment of input variables (or a sequence of such assignments), which leads to a 1 at the output • If we finished exploring the search space and cannot find such an assignment, the circuits are equivalent

  18. BDD package Builds the canonical representation of all branches up to a point Tends to run out of memory SAT solver Explores one branch at a time Tends to run out of time BDDs vs SAT for Search • Both exhaustively explore the search space

  19. Search Problem

  20. Different Ways of Exploring Search Space BDD approach SAT approach    

  21. Combining BDDs and SAT • Build the BDDs for the nodes until the size reaches a limit • Use SAT to prove equivalence of pairs of cut-points using a timeout • Iterate the above two steps, while increasing the size limit and the timeout until the problem is solved • BDDs and SAT attack the problem using their comlementary strengths in a balanced manner   A. Kuehlmann, V. Paruthi, F. Krohm, M. K. Ganai, “Robust Boolean reasoning for equivalence checking and functional property verification”, IEEE Trans. CAD, Vol. 21, No. 12, Dec. 2002, pp. 1377-1394.

  22. Other Representations • Truth table • Implemented using bit strings • Convenient for functions up to 5 variables • Useful for functions up to 8 variables • Sums-of-products • Cubes are represented in positional notation • Implemented using bit strings • The main data structure to represent SOPs in Espresso and SIS • Common features • Are explicit in nature • Exploit bit parallelism of modern computers • Have been traditionally used in many applications

  23. Use of Functional RepresentationsHistorical Perspective Problem Size +CNF Truth table +BDD +SOP 1950-1970 1980 1990 2000 Time Period

More Related