1 / 20

Reachability Analysis

Reachability Analysis. EECS 290A Sequential Logic Synthesis and Verification. Outline. Reachability analysis Image computation Input splitting Output splitting Quantification scheduling Linear (IWLS-95) Non-linear (ICCAD-01) Implementation using SAT. Reachability Pseudo-Code.

overton
Download Presentation

Reachability Analysis

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. Reachability Analysis EECS 290A Sequential Logic Synthesis and Verification

  2. Outline • Reachability analysis • Image computation • Input splitting • Output splitting • Quantification scheduling • Linear (IWLS-95) • Non-linear (ICCAD-01) • Implementation using SAT

  3. Reachability Pseudo-Code Reachability( Transition Relation TR, Initial State I ) { ReachedStates = I; iterate the following computation: { ReachedStatesNew = Image( TR, ReachedStates ); if (ReachedStatesNew  ReachedStates ) stop; ReachedStates = ReachedStates + ReachedStatesNew; } return ReachedStates; }

  4. Image Computation Output space • Given a mapping of one Boolean space (input space) into another Boolean space (output space) • For a set of minterms (care set) in the input space • The image is the set of related minterms from the output space Input space Image Care set

  5. Example Input space abc 000 y Output space x Care set 001 xy 010 00 Image 011 01 a b c 100 10 101 11 110 111

  6. Image Computation • Implements formula:Image(Y) = x [R(X,Y) & C(X)] • Implicit methods by far outperform explicit ones • Successfully computing images with more than 2^100 minterms in the input/output spaces • Operations & and are basic Boolean manipulations are implemented using BDDs • To avoid large intermediate results (during and after the product computation), operation AND-EXIST is used, which performs product and quantification in one pass over the BDD

  7. Partitioned Transition Relation • When the relation is a monolithic one (represented as a single object), these techniques do not work • Sometimes the relation can be decomposed using disjoint-support decomposition, etc. • Some techniques work for a partitioned representation • This representation is natural when the system is represented on the structural level • In this case, the transition relation is given in the form of the set of partitions: T(x,cs,ns) = i Ti(x,cs,nsi) Latches ns cs x

  8. Input Splitting Input space • Select an input variable • Cofactor partition w.r.t. this variable • Compute the images for the cofactors • Union the resulting images abc 000 Output space Care set 001 xy 010 00 Image 011 01 x = a + b y = bc 100 10 a=1 a=0 101 11 x = b y = bc x = 1 y = bc 110 111

  9. Reducing Image Computation to Range Computation • Operator “constrain” () is an image restrictor • It allows us to reduce image computation to range computation: Im(y) = Image( R(x,y), C(x) ) = Image( R(x,y)C(x) ) bdd constrain( bdd R, bdd C ) { if ( C = 0 ) return 0; if ( C = 1 or R = const ) return R; (C0,C1) = Cofactors( C, x ); (R0,R1) = Cofactors( R, x ); if ( C0 = 0 ) return constrain( R1, C1 ); if ( C1 = 0 ) return constrain( R0, C0 ); R0 = constrain( R0, C0 ); R1 = constrain( R1, C1 ); return ITE( x, R1, R0 ); }

  10. Output Splitting • Constrain each function Yi(x) w.r.t the care set C(x) • Recursively compute the image as follows: • Select an output variable yi • Constrain each remaining function using the function yi=Yi(x) • Use the direct polarity • Use the complemented polarity • Find the images of the two resulting sets of functions, Im1(y) and Im2(y) • Combine the images using the ITE operator and the variable yi. Im(y) = ITE(yi, Im1(y), Im2(y)) • Trivial cases: • When function Yj(x) is constant 0 (1), the image is yj’ (yj) • When there is only one non-constant function left, the image is constant 1 (it does not depend on the y variables) • When functions in the set Y can be split into two parts with disjoint support, the image is the product of the two images • When only two functions are left and, for example, Yj1(x) = Yj2(x)’, then, the image is yj1  yj2

  11. Input vs. Output Splitting • These two methods are “symmetric” • Their efficiency depends on the cardinality of the input/output spaces • Typically output splitting is more efficient because the output space is typically smaller than the input space • As a result, the (potentially exponential) tree depth is bounded by a smaller number Variable 1 Variable 2 Variable 3

  12. Quantification Scheduling • Existential quantification and product commute if a variable to be quantified belongs to only one component in the product x [F(x,y) & G(x,y)]  [x F(x,y)] & [x G(x,y)] x [F(y) & G(x,y)] = F(y) & [x G(x,y)] • Scheduling is performed by ordering the partitions, so that the variables are quantified as early as possible Image(Y) = x,i [A(x) & T1(x,i,y) & T2(x,i,y) & … & Tk(x,i,y)] = = xk,ik [ Tk(x,i,y) & & xk-1,ik-1 [Tk(x,i,y) & … & x1,i1 [T1(x,i,y) & x0,i0 A(x)] … ] ]

  13. IWLS 95 Image Computation Method • BDD variable ordering techniques • Use of clustering • Ordering of the clusters

  14. BDD Variable Ordering • Given a set of partitions yj(i,x), find the permutation  of partitions such that it minimizes the sum • Order supports of yj(i,x) individually and then insert the yj variables as follows:

  15. Partition Clustering • Group partitions based on their support using the overall limit on the BDD size of a partition • Partitions with close support should be grouped together • This facilitates quantification scheduling • Both many small partitions and few large partitions are bad; the best result is somewhere in between • Heuristically, it was found that the partition size of 1000-5000 BDD nodes works well in practice

  16. Ordering Clusters • Start with two sets of clusters, P and Q • P is already ordered; Q is still to be ordered • Order the clusters by first including those clusters that maximize the weight: W = 2 * Vci/Wci + Wci/Xci + Yci/Zci + mci/Mci, where Vci is the number of vars to be quantified by adding ci Wci is the number of cs and i vars in the support ci Xci is the number of cs and i vars that are not yet quantified Yci is the number of ns vars that will be added by ci Zci is the number of ns vars that are not yet in the product mci is the max BDD level of a var to be quantified in ci Mci is the max BDD level of a var to be quantified in Q

  17. Non-Linear Quantification Scheduling (ICCAD91) • Instead of creating the linear order, create a tree order • Use a sample care set to dynamically schedule quantifications • Algorithm takes V (variables) and F (partitions) • Quantify away variables that appear in one partition only • Iterate as long as the set of variables V is not empty • Select a variable with the lowest cost • Cost of is the sum of BDD sizes of functions, to which this var belongs • Select two smallest partitions with this variable in their support • Conjoin these partitions and update the costs • Dynamically build the tree as the quantification proceeds • Use this tree to compute images with other care sets

  18. Example of Non-Linear Scheduling • Three-bit counter • y1 = x1’ • y2 = x1  x2 • y3 = x1x2 x3 • Care set S = x1’ • Partitions • F1(y1,x1) = y1 = x1’ • F2(y2,x1,x2) = y2 = x1  x2 • F3(y3,x1,x2,x3) = y3 = x1x2 x3 • F4(x1) = x1’ • Variables to quantify • x1,x2,x3 x1 & & x2 & x3 F1 F3 F2 F4

  19. Summary • These methods work for the partitioned transition relation • Natural when the FSM (automaton) is represented by a circuit • Different approaches to computing the image • Input splitting • Output splitting • Quantification scheduling • Hybrid methods • Use partition clustering in addition to quantification scheduling (Berkeley, IWLS 95) • Use non-linear quantification scheduling (CMU, ICCAD 01) • Partitioning (OR-decomposition) of the transition relation • “To split, or to conjoin” (mix the quantification scheduling and input/output splitting) (Somenzi, DAC 2000) • “The compositional far side of image computation” (Somenzi, ICCAD 2003) • Tricks and speed-ups • Disjoint decomposition • Caching of intermediate results, etc

  20. Using SAT for Image Computation • Represent transition relation as a CNF • Iterate through the satisfying assignments • It is good if the solver can iterate through cubes rather than minterms of the solution space • Otherwise, it is only applicable to small output spaces (<10 vars) • When the problem becomes UNSAT, the collected solutions represent the image • The care set is a set of additional constraints • Hybrid approaches use SAT and BDDs • To represent the care set (FMCAD-00) • To finish searching subspaces whose size is small (FMCAD-00) • To represent parts of the CNF (DAC-03)

More Related