Symmetry Detection for Large Boolean Functions Using Circuit Representation, Simulation and Satisfia - PowerPoint PPT Presentation

1 / 75
About This Presentation
Title:

Symmetry Detection for Large Boolean Functions Using Circuit Representation, Simulation and Satisfia

Description:

Symmetry Detection for Large Boolean Functions Using Circuit Representation, ... Negated PIs. Other ISs. Candidate Symmetry. Kept Symmetry. Final Symmetry. s3. b ... – PowerPoint PPT presentation

Number of Views:93
Avg rating:3.0/5.0
Slides: 76
Provided by: jin154
Category:

less

Transcript and Presenter's Notes

Title: Symmetry Detection for Large Boolean Functions Using Circuit Representation, Simulation and Satisfia


1
Symmetry Detection for Large Boolean Functions
Using Circuit Representation, Simulation and
Satisfiability
  • Jin S. Zhang, Portland State University
  • Alan Mishchenko, UC Berkeley
  • Robert Brayton, UC Berkeley
  • Malgorzata Chrzanowska-Jeske, Portland State
    University

Supported by Maseeh Fellowship from PSU, NSF
grant CCR-9988402 and CCR 0312676, SRC contract
1361.001, and by the California Micro program
with our industrial sponsors, Altera, Intel,
Magma, and Synplicity.
2
Outline
  • Motivations
  • Background
  • Our approach to symmetry computation
  • Structural analysis
  • Simulation
  • Transitivity analysis
  • SAT
  • Experimental results
  • Conclusions

3
Outline
  • Motivations
  • Background
  • Our approach to symmetry computation
  • Structural analysis
  • Simulation
  • Transitivity analysis
  • SAT
  • Experimental results
  • Conclusions

4
Importance of Classical Symmetries
  • Widely used in logic synthesis and verification
  • BDD minimization
  • Decomposition
  • Boolean matching
  • Constructive logic synthesis
  • Placement routing
  • Formal verification

5
Prior Work on Symmetry Computation
  • BDD-based methods Möller ICCAD93, Panda ICCAD94,
    Tsai TCAD96, Mishchenko TCAD03
  • BDD construction takes majority of run time
  • Cannot be applied to large designs
  • Incomplete circuit-based methods performing
    structural analysis Wang, ICCD03
  • Detect classical and higher-order symmetry
  • Complete circuit-based method using simulation
    and ATPG Pomeranz, TCAD94
  • Does not rely on recent improvements in SAT

6
Our Contributions
  • Compute all classical two-variable symmetries for
    large Boolean functions

7
Outline
  • Motivations
  • Background
  • Our approach to symmetry computation
  • Structural analysis
  • Simulation
  • Transitivity analysis
  • SAT
  • Experimental results
  • Conclusions

8
Definitions
  • Completely specified Boolean function
  • F (x1, ,xn) where x1, xn, F range over 0, 1.
  • Support of F all the variables that F depends
    on.
  • Cofactors
  • Cofactors w.r.t. variables xi and xj
  • F00 F xi ? 0, xj ? 0,
  • F01, F10, F11 are defined similarly.

9
Representations of Boolean Functions
  • Binary Decision Diagram (BDD)
  • And-Inverter Graph (AIG)

10
Classical Symmetries
For a pair of variables
F (,x, y,) F (,y, x,)
F 01 ? F 10 0
Non-skew non-equivalent
11
Classical Symmetries
For a pair of variables
F (,x, y,) F (,y, x,)
F 01 ? F 10 0
Non-skew non-equivalent
12
Transitivity of Symmetry
Variables a, b, c
a
b
c
Form larger symmetry group
13
Simulation
  • Computes the values of the internal signals and
    POs from the value of the PIs
  • Random / Guided
  • Control of simulation rounds
  • Static / Dynamic


14
Boolean Satisfiability (SAT)
  • Proves that a given Boolean formula has a
    satisfying assignment
  • F (xy)(y ?z ?), satisfying assignments x
    1, y 0
  • SAT vs. BDDs
  • SAT involves search, heuristics can improve
    performance
  • BDDs preprocess the search space
  • By building canonical form of Boolean functions
  • Hard or impossible for large functions


15
Outline
  • Motivations
  • Background
  • Our approach to symmetry computation
  • Structural analysis
  • Simulation
  • Transitivity analysis
  • SAT
  • Experimental results
  • Conclusions

16
Overview of the Algorithm
Derive network AIG
Call SAT for a remaining pair
17
Outline
  • Motivations
  • Background
  • Our approach to symmetry computation
  • Structural analysis
  • Simulation
  • Transitivity analysis
  • SAT
  • Experimental results
  • Conclusions

18
Structural Analysis Detect Symmetric Variable
Pairs
  • Convert AIGs to Implication Supergates (ISs)
  • Introduced in Chang DAC00
  • Compute local symmetries for each Implication
    Supergates
  • Propagate global symmetries from primary inputs
    to primary outputs

19
AIG ? Implication Supergates
  • Expand the AND gate until a PI or complemented
    edge is reached

20
AIG ? Implication Supergates
  • Expand the AND gate until a PI or complemented
    edge is reached

21
AIG ? Implication Supergates
  • Expand the AND gate until a PI or complemented
    edge is reached

22
AIG ? Implication Supergates
  • Expand the AND gate until a PI or complemented
    edge is reached

AIG
e
a
d
b
c
Represents 2-input AND gate
23
AIG ? Implication Supergates
  • Expand the AND gate until a PI or complemented
    edge is reached

AIG
e
a
d
b
c
Represents 2-input AND gate
24
AIG ? Implication Supergates
  • Expand the AND gate until a PI or complemented
    edge is reached

AIG
e
a
d
b
c
Represents 2-input AND gate
25
AIG ? Implication Supergates
  • Expand the AND gate until a PI or complemented
    edge is reached

AIG
e
a
d
b
c
Represents 2-input AND gate
26
AIG ? Implication Supergates
  • Expand the AND gate until a PI or complemented
    edge is reached

AIG
e
a
d
b
c
Represents 2-input AND gate
27
AIG ? Implication Supergates
  • Expand the AND gate until a PI or complemented
    edge is reached

AIG
e
a
d
b
c
Represents 2-input AND gate
28
AIG ? Implication Supergates
  • Expand the AND gate until a PI or complemented
    edge is reached

Implication supergate
AIG
s1
e
a
b
c
e
s2
a
d
b
c
Represents 2-input AND gate
Represents multi-input AND gate
29
AIG ? Implication Supergates
  • Expand the AND gate until a PI or complemented
    edge is reached

Implication supergate
AIG
s1
e
a
b
c
e
s2
d
a
d
b
c
Represents 2-input AND gate
Represents multi-input AND gate
30
AIG ? Implication Supergates
  • Expand the AND gate until a PI or complemented
    edge is reached
  • Recover lost structural symmetry in AIG

Implication supergate
AIG
s1
e
a
b
c
e
s2
d
s3
a
d
b
c
b
c
Represents 2-input AND gate
Represents multi-input AND gate
31
Structural Symmetry Detection
IS
  • Divide the fanins of each IS into three
    categories
  • - Positive PIs
  • - Negated PIs
  • - Other ISs

s1
e
a
b
c
s2
d
s3
b
c
32
Structural Symmetry Detection
IS
2. Identify initial candidate symmetric pairs
for each IS - Pair up variables in positive and
negative PIs separately
s1
e
a
b
c
s2
d
s3
b
c
33
Structural Symmetry Detection
IS
3. Keep a symmetric pair if the variables -
not in the support of other IS or - symmetric
for each fanin in other IS
s1
e
a
b
c
s2
d
s3
b
c
34
Structural Symmetry Detection
IS
4. Propagate the symmetric pairs to its parent
IS if - the symmetry holds for at least one
fanin of the other IS, and - the variables are
not in the support for other fanins
s1
e
a
b
c
s2
d
s3
b
c
35
Summary Structural Analysis
  • Detect symmetry in one sweep over the circuit
  • Discover most easy structural symmetries
  • Simpler, faster and more scalable than Wang
    ICCD03
  • We only compute classical symmetries

36
Outline
  • Motivations
  • Background
  • Our approach to symmetry computation
  • Structural analysis
  • Simulation
  • Transitivity analysis
  • SAT
  • Experimental results
  • Conclusions

37
Simulation Detect Non-symmetric Variable Pairs
  • Random guided simulation
  • Performance random simulation until saturation
  • Guided simulation uses SAT counter examples and
    their distance-1 patterns
  • E.g. Distance-1 patterns of 011 are 111,
    001, 010

38
Why Distance-1 Patterns?
  • For a realistic and sparse function
  • Realistic appear in practical circuit
  • Sparse many 0s and fewer 1s or vice versa

39
Why Distance-1 Patterns?
  • For a realistic and sparse function
  • Random simulation often fails

40
Why Distance-1 Patterns?
  • For a realistic and sparse function
  • Random simulation often fails
  • SAT counterexamples reach unlikely values

41
Why Distance-1 Patterns?
  • For a realistic and sparse function
  • Random simulation often fails
  • SAT counterexamples reach unlikely values
  • Distance-1 patterns represent its neighborhood,
    contain other unlikely values

42
SimulationDetect Non-symmetric Variable Pairs
  • Random guided simulation
  • Bit-Parallel computation
  • Simulating one AIG node involves bit-wise
    operations
  • Simulate 32 or 64 bits simultaneously


1010
43
SimulationDetect Non-symmetric Variable Pairs
  • Random guided simulation
  • Bit-Parallel computation
  • One vector targets all variable pairs
    simultaneously


44
Simulation Example
F(a, b, c, d) ab d (ac bc)
(3) Flip the bits on the diagonal
0011 1111 1001
1010
ab
cd
00
01
11
10
00
0
0
0
1
01
0
0
1
1
(4) Simulate the above patterns
11
0
0
1
1
10
0
0
0
1
  • Suppose the vector P is 1011.

(2) Create the bit matrix a b c d
1 0 1 1 1 0 1 1 1 0
1 1 1 0 1 1
45
Simulation Example
F(a, b, c, d) ab d (ac bc)
(3) Flip the bits on the diagonal
0011 1111 1001
1010
0
ab
cd
00
01
11
10
00
0
0
0
1
01
0
0
1
1
(4) Simulate the above patterns
11
0
0
1
1
10
0
0
0
1
  • Suppose the vector P is 1011.

(2) Create the bit matrix a b c d
1 0 1 1 1 0 1 1 1 0
1 1 1 0 1 1
46
Simulation Example
F(a, b, c, d) ab d (ac bc)
(3) Flip the bits on the diagonal
0011 1111 1001
1010
0
ab
1
cd
00
01
11
10
00
0
0
0
1
01
0
0
1
1
(4) Simulate the above patterns
11
0
0
1
1
10
0
0
0
1
  • Suppose the vector P is 1011.

(2) Create the bit matrix a b c d
1 0 1 1 1 0 1 1 1 0
1 1 1 0 1 1
47
Simulation Example
F(a, b, c, d) ab d (ac bc)
(3) Flip the bits on the diagonal
0011 1111 1001
1010
0
ab
1
cd
00
01
11
10
1
00
0
0
0
1
01
0
0
1
1
(4) Simulate the above patterns
11
0
0
1
1
10
0
0
0
1
  • Suppose the vector P is 1011.

(2) Create the bit matrix a b c d
1 0 1 1 1 0 1 1 1 0
1 1 1 0 1 1
48
Simulation Example
F(a, b, c, d) ab d (ac bc)
(3) Flip the bits on the diagonal
0011 1111 1001
1010
0
ab
1
cd
00
01
11
10
1
00
0
0
0
1
0
01
0
0
1
1
(4) Simulate the above patterns R 0110
11
0
0
1
1
10
0
0
0
1
  • Suppose the vector P is 1011.

(2) Create the bit matrix a b c d
1 0 1 1 1 0 1 1 1 0
1 1 1 0 1 1
49
Simulation Example
F(a, b, c, d) ab d (ac bc)
(3) Flip the bits on the diagonal
0011 1111 1001
1010
0
ab
1
cd
00
01
11
10
1
00
0
0
0
1
0
01
0
0
1
1
(4) Simulate the above patterns R 0110
11
0
0
1
1
10
0
0
0
1
(5) Check variable pairs with the same polarity
in P a, c, a, d, c, d
  • Suppose the vector P is 1011.

(2) Create the bit matrix a b c d
1 0 1 1 1 0 1 1 1 0
1 1 1 0 1 1
50
Simulation Example
F(a, b, c, d) ab d (ac bc)
(3) Flip the bits on the diagonal
0011 1111 1001
1010
0
ab
1
cd
00
01
11
10
1
00
0
0
0
1
0
01
0
0
1
1
(4) Simulate the above patterns R 0110
11
0
0
1
1
10
0
0
0
1
(5) Check variable pairs with the same polarity
in P a, c, a, d, c, d
  • Suppose the vector P is 1011.

(2) Create the bit matrix a b c d
1 0 1 1 1 0 1 1 1 0
1 1 1 0 1 1
(6) non-symmetric pairs a, c, c, d
51
Summary Simulation
  • Employ both random and guided simulation
  • More effective than earlier approaches
  • Random simulation detects easy non-symmetric
    pairs
  • Guided simulation detects hard-to-find
    non-symmetric pairs
  • Target all variable pairs simultaneously and use
    bit-parallel computation
  • More efficient than earlier approaches

52
Outline
  • Motivations
  • Background
  • Our approach to symmetry computation
  • Structural analysis
  • Simulation
  • Transitivity analysis
  • SAT
  • Experimental results
  • Conclusions

53
Transitivity AnalysisDetect Symmetry/Non-symmetr
y
  • Infer new symmetric/non-symmetric status based on
    existing symmetry information
  • Bit-wise operations on the rows and columns of
    the bit-matrix representing symmetry information

54
Transitivity Analysis Rule 1
  • Infer new symmetric pairs

x1, x2 variables A, B sets of variables
55
Transitivity Analysis Rule 2
  • Infer new non-symmetric pairs

x1, x2 variables A, B sets of variables
56
Transitivity Analysis Rule 3
  • Infer new non-symmetric pairs

x1, x2 variables A, B sets of variables
57
Summary Transitivity Analysis
  • Performed each time a symmetry/non-symmetry
    status is obtained
  • Infer additional symmetric and non-symmetric
    pairs

58
Outline
  • Motivations
  • Background
  • Our approach to symmetry computation
  • Structural analysis
  • Simulation
  • Transitivity analysis
  • SAT
  • Experimental results
  • Conclusions

59
Boolean Satisfiability (SAT)Detect
Symmetry/Non-symmetry
  • Check if F01 F10
  • Equivalent, variables are symmetric
  • Not equivalent, not symmetric, return
    counter-examples
  • The combinational equivalence checker (CEC) is
    based on Improvements to combinational
    equivalence checking
  • Mishchenko, IWLS06/ICCAD06
  • Significant performance improvement over other
    SAT solvers

60
Reducing SAT Calls
  • SAT is expensive, even with improvements

Structural Analysis
Random Guide Simulation
61
Summary SAT
  • The underlying CEC is very efficient
  • Many techniques used to reduce the number of
    needed SAT calls

62
Outline
  • Motivations
  • Background
  • Our approach to symmetry computation
  • Structural analysis
  • Simulation
  • SAT
  • Transitivity analysis
  • Experimental results
  • Conclusions

63
Experiments Setup
  • Implemented in ABC A system for sequential
    synthesis and verification
  • Brayton, Mishchenko, et al.
  • Ran on a Pentium 4 computer
  • 1.6Ghz CPU, 1Gb Ram

64
Goals for Experiments
  • Analyze the effectiveness of different techniques
  • Demonstrate the benefit of simulation and SAT
    integration
  • Illustrate the performance improvement

65
Exp 1 Contribution of Different Techniques
66
Exp 1 Contribution of Different Techniques
  • Of all symmetric variable pairs in MCNC suite
  • Structural analysis 70
  • Transitivity analysis 21
  • SAT 9
  • Of all non-symmetric variable pairs in MCNC suite
  • Simulation Transitivity analysis 99.7
  • SAT 0.3

67
Exp 2 Effectiveness of tight integration
Call SAT for a remaining pair
Derive network AIG
Perform guided Simulation
Y
Our Algorithm
68
Exp 2 Effectiveness of tight integration
Call SAT for a remaining pair
Derive network AIG
All variable pairs processed?
N
Vanilla flow
69
Experimental Results Effectiveness of SIM/SAT
integration
70
Experimental Results Effectiveness of SIM/SAT
integration
71
Exp 3 Performance Comparison Proposed vs. BDDs
  • Out of 24 large benchmarks
  • BDDs could not be constructed for 5 benchmarks
  • Proposed method was faster than BDDs Mishchenko,
    TCAD03 in 10 benchmarks
  • 3.6x faster
  • Proposed method was slower in 9 benchmarks
  • 1.6x slower

72
Outline
  • Motivations
  • Background
  • Our approach to symmetry computation
  • Structural analysis
  • Simulation
  • Transitivity analysis
  • SAT
  • Experimental results
  • Conclusions

73
Conclusions
  • Enabled complete symmetry computation onlarge
    designs
  • Structural analysis and simulation were keyto
    its performance
  • Simulation and SAT integration improved
    performance an order of magnitude
  • Lay the foundation for computing other functional
    properties using similar approach
  • Linear cofactor relationships
  • Higher-order symmetries

74
Future Work
  • Extend the current hybrid approach to other
    functional properties
  • Detect functional properties of sequential
    circuits
  • Develop efficient methods for NPN-equivalence
    checking of large Boolean functions without BDDs

75
Thank you!
Write a Comment
User Comments (0)
About PowerShow.com