Upload
vala
View
32
Download
0
Embed Size (px)
DESCRIPTION
Equivalence Checking Problems. Graph equivalence connectivity analysis (little or no functional analysis) Combinational functional equivalence pin boundary around each combinational block is identical in the two designs and the correspondence is known - PowerPoint PPT Presentation
Citation preview
1
Equivalence Checking Problems
Graph equivalence connectivity analysis (little or no functional analysis)
Combinational functional equivalence pin boundary around each combinational block is identical
in the two designs and the correspondence is known
Latch correspondence exists but is unknown tool needs to find a correspondence
Sequential equivalence with initial states requires traversal of implicit FSM
Sequential equivalence with no initial state notion of equivalence is not uniform
2
Combinational Verification Algorithms
BDDs with decomposition points (Berman/Trevillyan ‘86)
ATPG (Automatic Test Pattern Generation) with decomposition points (Brand ‘93)
Recursive Learning (Kunz ‘93) etc...
3
Binary Decision Diagrams (Akers’78, Bryant’86)
Ordered decision tree for f = ab + cd
0 0 0 1 0 0 0 1 0 0 0 1 1 1 1 1
d d d d d d d d
c c c c
0 1
0 1 0 1
0 1 0 1 0 1 0 1
b b
a
4
Subgraph reduction
Reduced Ordered Binary Decision Diagram (BDD) form:
0 1
d
c
01
0 1
0 1
b
a
0
1
Key idea: combine equivalent subcases
5
BDD properties Same order of variables on all paths Reduced w.r.t. isomorphism Variable ordering crucial for BDD size Advantages:
canonical trivial equivalence check
Disadvantages: may be exponential in circuit size
(especially multipliers)
ac
b
f
f = ac + abc
ab
f
a
c
b
01
00
01
1
1
c
6
Verification by monolithic BDDs
Single monolithic BDD for each output pair BDD size may depend on variable ordering; some
designs may have no efficient ordering
=?
7
Verification by decomposed BDDs
How to generate good decomposition point pairs? False negatives
=?
=?
=? =?
8
The false negative problem
Efficient false negative resolution is the key to equivalence checking on large combinational cones
Say f1 = f2
If g1 is not equal to g2, then (f1 || g1) may or may not be equal to (f2 || g2)
g2
g1f1
f2
f1 || g1
f2 || g2
9
False negative example
Is [f = (d1 = d2)] equal to 1?
f = d1 d2 + d1 d2 = b c + a g + b g + a b g
Substitute value of g into f:
f = b c + a (a b) + b (a b) + a b (a b) = 1
ab
c
d1
ba
c
d2
g = a b
d1 = bcg + (b + c) g d2 = b + cg + a c
10
False negative resolution
Is f(x1, x2, ..., xm, y1, y2, ... yk) = 1 ?
where yi = gi(x1, x2, ..., xm, yi+1, ... yk)
BDDs for f(x1, x2, ..., xm, y1, y2, ... yk)
for each i, [yi = gi(x1, …, xm, yi+1, …, yk)]
If f = 1 (false negative), decomposition points are equal, create a new decomposition point
If f = 0 (real negative), we have a witness to prove that it is a real negative
11
Decomposition point selection
Tradeoff: more decomposition points cause more false negative
resolutions fewer decomposition points cause larger sub-problems
Important to select more meaningful decomposition point candidates: Separate primary input variables Belong to the corresponding pairs of primary input cones
12
Candidates for decomposition points
From design methodology: pairs of nets with same or related names
Through simulation: First set by simulation of random/user-supplied vectors Later simulations of witnesses of counterexamples for
false negative resolution
13
Refining decomposition pairs by simulation
a
d
b
x
c
e
a
d
bc
e
f
gh
i
x
q
p
sr
pf x
qg
ris
xh
14
Refining decomposition pairs by simulation
a
d
b
x
c
e
a
d
bc
e
f
gh
i
x
q
p
sr
01
0
1
1
1
1
1
0
0
pf x
qg
ris
xh
15
Refining decomposition pairs by simulation
a
d
b
x
c
e
a
d
bc
e
f
gh
i
x
q
p
sr
01
0
1
1
1
1
1 1
1
00
0
0
0
00
00
0
pf x
qg
ris
xh
16
Refining decomposition pairs by simulation
a
d
b
x
c
e
a
d
bc
e
f
gh
i
x
q
p
sr
01
0
1
1
1
1
1 1
1
00
0
0
0
00
00
0
pf x
qg
ris
xh
17
Refining decomposition pairs by simulation
a
d
b
x
c
e
a
d
bc
e
f
gh
i
x
q
p
sr
10
1
0
0
0
0
0
1
1
pf x
qg
ris
xh
18
Refining decomposition pairs by simulation
a
d
b
x
c
e
a
d
bc
e
f
gh
i
x
q
p
sr
10
1
0
0
0
0
0
1
1
11
1
1 1
1
0
0
0
1
pf x
qg
ris
xh
19
Refining decomposition pairs by simulation
a
d
b
x
c
e
a
d
bc
e
f
gh
i
x
q
p
sr
10
1
0
0
0
0
0
1
1
11
1
1 1
1
0
0
0
1
pf x
qg
ris
xh
20
Refining decomposition pairs by simulation
a
d
b
x
c
e
a
d
bc
e
f
gh
i
x
q
p
sr
11
0
1
1
1
1
1
1
0
1
11
1
1
0
00
11
pf x
qg
ris
xh
21
Refining decomposition pairs by simulation
a
d
b
x
c
e
a
d
bc
e
f
gh
i
x
q
p
sr
11
0
1
1
1
1
1
1
0
1
11
1
1
0
00
11
pf x
qg
ris
xh
22
Candidates for decomposition points
From design methodology: pairs of nets with same or related names
Through simulation: First set by simulation of random/user-supplied vectors Later simulations of witnesses of counterexamples for
false negative resolution
23
Candidates for decomposition points
Real negatives can refine many other equivalence classes:
initial randomsimulation
real negativewitnesssimulation
a
c
d
b A
D
Be
f
P
Q
e
P
Q
f
c
1
e
P
Q
f
c
1
24
False negative resolution example
h = pq p = p
= ab(c+d) = ab
Counterexample: a=1 b=1 c=0 d=0 e=0
a
d
b
x
c
e
a
d
bc
e
f
gh
i
x
q
p
sr
1
0
1
11
0
0
0
0
0
pf x
qg
ris
xh
===?
25
False negative resolution example
a
d
b
x
c
e
a
d
bc
e
f
gh
i
x
q
p
sr
pf x
qg
ris
xh
1
0
1
11
0
0
0
0
0
01
1
1
1
0
0
00 0
26
False negative resolution example
a
d
b
x
c
e
a
d
bc
e
f
gh
i
x
q
p
sr
pf x
qg
ris
xh
1
0
1
11
0
0
0
0
0
01
1
1
1
0
0
00 0
27
False negative resolution - Solution 1
Is f(y1, y2, ... yk, x1, x2, ..., xm) = 1 ?
where yi = gi(yi+1, ... yk, x1, x2, ..., xm)
Compose each decomposition point into f yi [f(y1, ... yk, x1, x2, ..., xm) (yi = gi(yi+1, ... yk, x2, ..., xm))]
Order of compositions is important Stop if BDD = constant 1 or if there exists a path to 0-vertex
consisting of only primary inputs
Best when resulting BDD = constant 1 (false negative)
[Intuition: final BDD is small (size = 1), so there might exist an order of compositions where no intermediate BDD blows up]
28
Order of compositions
Ordering heuristics: compose yi so that the new support is
minimized compose yi such that the BDD for (yi = gi) is
smallest if yi is in support of both yj and f, compose yj
y1, y2, ... yk: have to compose each point at most once
Stop if BDD = constant 1 or if there exists a path to 0-vertex consisting of only primary inputs
f
x1
y3
x2
y4
x5x3 x4
y2
y1
01
0 0
01
1
1x2
x5
y3
29
False negative resolution - Solution 2
k+1 BDDs: f, (y1 = g1), …, (yk = gk)
Find an assignment to all variables (y1, ... yk, x1, ..., xm) such that the corresponding path in each BDD leads to 1-vertex.
If such an assignment exists, we have a witness for f = 0 (real negative); otherwise, f = 1 for all possible assignments (false negative)
Search for an assignment among the set of all assignments. Works best if there exists one (or many) assignments (real negative).
30
Search strategies
Backtrack search: pick an unassigned variable x Set x=0, solve sub-problem If fail, set x=1 and solve sub-problem fail if any path in any BDD ends in 0-
vertex, success if all paths end in 1-vertex
Local search: pick a starting assignment to all variables make a local move (flip a variable) so that
cost function improves success if all paths end in 1-vertex
0
0
fail fail
fail01
1
1
1
x4
y1x7
y2
(x1 = 0, x2 = 1, y1 = 0) flip x2
y1x1
x2
y1y1
success
success
31
Summary of algorithm
Perform random simulation to obtain candidates for decomposition points
Verify decomposition point candidates: if false negative, create a decomposition point if real negative, refine future decomposition point
candidates
Heuristics for: selecting a “good” subset of candidates false negative resolution: “good” order of compositions or
search for real negative using real negatives to refine future candidates, to detect
bugs early
32
ATPG with decomposition points (Brand’93)
Stuck-at-1 fault redundancy => functional equivalence F
G
X
X
33
Recursive Learning (Kunz’93)
Case analysis to learn implications between nets in the designs
a dbc
e
f
x1
gx2
x2 = 1
1
f = 1 g = 1
34
Recursive Learning (Kunz’93)
Case analysis to learn implications between nets in the designs
a dbc
e
f
x1
gx2
x2 = 1
1
f = 1 g = 1
1
35
Recursive Learning (Kunz’93)
Case analysis to learn implications between nets in the designs
a dbc
e
f
x1
gx2
x2 = 1
1
f = 1 g = 1
1
a = 1 b = 1
36
Recursive Learning (Kunz’93)
Case analysis to learn implications between nets in the designs
a dbc
e
f
x1
gx2
x2 = 1
1
f = 1 g = 1
1
a = 1 b = 1
1
37
Recursive Learning (Kunz’93)
Case analysis to learn implications between nets in the designs
a dbc
e
f
x1
gx2
x2 = 1
1
f = 1 g = 1
1
a = 1 b = 1
10
1
x1 = 1
38
Recursive Learning (Kunz’93)
Case analysis to learn implications between nets in the designs
a dbc
e
f
x1
gx2
x2 = 1
1
f = 1 g = 1
1
a = 1 b = 1
1
x1 = 1
39
Recursive Learning (Kunz’93)
Case analysis to learn implications between nets in the designs
a dbc
e
f
x1
gx2
x2 = 1
1
f = 1 g = 1
1
a = 1 b = 1
1 1
x1 = 1
0
x1 = 1
40
Recursive Learning (Kunz’93)
Case analysis to learn implications between nets in the designs
a dbc
e
f
x1
gx2
x2 = 1
1
f = 1 g = 1
a = 1 b = 1
x1 = 1 x1 = 11
41
Recursive Learning (Kunz’93)
Case analysis to learn implications between nets in the designs
a dbc
e
f
x1
gx2
x2 = 1
1
f = 1 g = 1
a = 1 b = 10
1
x1 = 1
0
x1 = 11
x1 = 1