Title: A recursive paradigm to solve Boolean relations
1A recursive paradigm to solve Boolean relations
- David Bañeres Univ. Politècnica de
Catalunya - Jordi Cortadella Univ. Politècnica de
Catalunya - Mike Kishinevsky Strategic CAD Lab.,
Intel Corp.
2Boolean relation example
3Boolean relation example
x y z
b
c
a
f
01010?10
00110011
01010101
00001111
a
4Boolean relation example
x y z
b
c
a
f
01010?10
00110011
01010101
00001111
x
0
?
y
z
5Boolean relation example
x y z
b
c
a
f
01010?10
00110011
01010101
00001111
0?0 0?0 0?0 0?0
x
0
?
y
z
6Boolean relation example
x y z
b
c
a
f
01010?10
00110011
01010101
00001111
0?0 0?0 0?0 0?0
?
x
0
y
z
7Boolean relation example
x y z
b
c
a
f
01010?10
00110011
01010101
00001111
0?0 ?01 0?0 ?01 0?0 ?01 0?0 ?01
?
x
0
y
z
8Boolean relation example
x y z
b
c
a
f
01010?10
00110011
01010101
00001111
0?0 ?01 0?0 ?01 0?0 ?01 0?0 ?01
x
1
?
y
z
9Boolean relation example
x y z
b
c
a
f
01010?10
00110011
01010101
00001111
0?0 ?01 1?0 0?0 ?01 1?0 0?0 ?01 1?0 0?0
?01
x
1
?
y
z
10Boolean relation example
x y z
b
c
a
f
01010?10
00110011
01010101
00001111
0?0 ?01 1?0 0?0 ?01 1?0 0?0 ?01 1?0 0?0
?01
?
x
1
y
z
11Boolean relation example
x y z
b
c
a
f
01010?10
00110011
01010101
00001111
0?0 ?01 1?0 ?11 0?0 ?01 1?0 ?11 0?0
?01 1?0 ?11 0?0 ?01
?
x
1
y
z
12Boolean relation example
x y z
b
c
a
f
01010?10
00110011
01010101
00001111
0?0 ?01 1?0 ?11 0?0 ?01 1?0 ?11 0?0
?01 1?0 ?11 0?0 ?01
x
?
y
z
13Boolean relation example
x y z
b
c
a
f
01010?10
00110011
01010101
00001111
0?0 ?01 1?0 ?11 0?0 ?01 1?0 ?11 0?0
?01 ? ? ? 1?0 ?11 0?0 ?01
x
?
y
z
14Boolean relation example
x y z
b
c
a
00110011
01010101
00001111
0?0 ?01 1?0 ?11 0?0 ?01 1?0 ?11 0?0
?01 ? ? ? 1?0 ?11 0?0 ?01
a
15Boolean relation example
x y z
b
c
a
00110011
01010101
00001111
0?0 ?01 1?0 ?11 0?0 ?01 1?0 ?11 0?0
?01 ? ? ? 1?0 ?11 0?0 ?01
16Applications of Boolean Relations
- Boolean matching techniques for library binding
- L. Benini and G.D. Micheli, 1997
- FSM encoding
- B. Lin and F.Somenzi, 1990
- Boolean decomposition
- M. Damiani, J. Yang, and G.D. Micheli, 1995
- and others
17Outline
- Boolean Relations
- The semi-lattice of solutions
- The recursive paradigm
- Experimental results
18Boolean Relations
19Boolean Relations
20Boolean Relations
21Solving Boolean Relations
Finding f and g suchthat ?R is a tautology
22Solving Boolean Relations
Finding f and g suchthat ?R is a tautology
23Solving Boolean Relations
Finding f and g suchthat ?R is a tautology
24Solving Boolean Relations
Finding f and g suchthat ?R is a tautology
25Solving Boolean Relations
Finding f and g suchthat ?R is a tautology
26Solving Boolean Relations
Finding f and g suchthat ?R is a tautology
27Related work
- Exact solvers
- F. Somenzi and R.K. Brayton (1989)
- Method similar to Quine-McCluskey
- Extension of primes to c-primes
- S. Jeong and F.Somenzi (1992)
- Formulate the problem as a BCP
28Related work
- Heuristic approaches (based on ESPRESSO)
- A. Ghosh, S. Devadas and A. Newton (1992)
- Y. Watanabe and R. K. Brayton (1993)
GYOCRO xInitial Solution do REDUCE(x) E
XPAND(x) IRREDUNDANT(x) while (x is
improved)
29f g
a b
Boolean relation
30f g
a b
31(No Transcript)
3200 01 10 11
00 01 10 11
33R?R
?
Semi-lattice
Functions
34(Bn ? Bm)
35Optimum-cost function
36(Bn ? Bm)
Number of variables
Number of functions
? ( )
Size of the semi-lattice
37Shortcut use 2-level minimizers ! (ESPRESSO,
Minato-Morreale, Scherzo)
38Subclasses of Boolean relations
General Boolean Relations
Incompletely Specified Functions
Completely Specified Functions
ESPRESSO Minato-Morreale (BDDs) Scherzo (ZDDs) ...
3910 00 ?1 01 10
10 11 ?1 01 10
10 00 11 01 10
10 00 01 01 10
10 11 01 01 10
10 11 11 01 10
10 00 01 01
10 00 01 10
10 00 11 01
10 00 11 10
10 11 01 01
10 11 01 10
10 11 11 01
10 11 11 10
40Quick solver for Boolean Relations(initial
solution in Gyocro)
41Quick solver for Boolean Relations(initial
solution in Gyocro)
f
42Gyocro
10 00 ?1 01 10
10 11 ?1 01 10
10 00 11 01 10
10 00 01 01 10
10 11 01 01 10
10 11 11 01 10
10 00 01 01
10 00 01 10
10 00 11 01
10 00 11 10
10 11 01 01
10 11 01 10
10 11 11 01
10 11 11 10
43GYOCRO xInitial Solution do REDUCE(x) E
XPAND(x) IRREDUNDANT(x) while (x is
improved)
10 00 11 01
10 11 11 10
44Another example
x y
Quick solver (also Gyocro)
45Quick solver for Boolean Relations
- The solution is determined by theminimization
order. - Solutions are typically unbalanced.
- Difficult to escape from the local minimum.
46The recursive approach(BREL)
47Projections
48Projections
f
49Projections
f
f g
a b
00 01 10 11
10 ?? ?1 ??
merge
g
R
R
R is an incompletely specified function, but
has more flexibility than R (R ? R)
50ISF
projection
BR
51ISF
ISF minimizer
done !
52ISF
ISF minimizer
incompatible !
53The recursive paradigm
ISF with more flexibility
54The recursive paradigm
ISF with more flexibility
55ISF
ISF minimizer
incompatible !
56The recursive paradigm
ISF with more flexibility
57The recursive paradigm
58ISF
ISF minimizer
incompatible !
59BR1 BR2
60The recursive paradigm
?
61The recursive paradigm
f g
10 00 11 01
?
ISF
62The recursive paradigm
f g
10 00 11 01
?
ISF
ISF
63The recursive paradigm
f g
10 00 11 01
?
ISF
ISF
6410 00 ?1 01 10
10 11 ?1 01 10
10 00 11 01 10
10 00 01 01 10
10 11 01 01 10
10 11 11 01 10
10 00 01 01
10 00 01 10
10 00 11 01
10 00 11 10
10 11 01 01
10 11 01 10
10 11 11 01
10 11 11 10
6510 00 ?1 01 10
10 11 ?1 01 10
10 11 01 01 10
10 11 11 01 10
10 00 11 01
10 11 01 01
10 11 01 10
10 11 11 01
10 11 11 10
6610 00 ?1 01 10
10 11 ?1 01 10
10 00 11 01
67(No Transcript)
68BREL (R,bestF ) R project (R) F
ISF-minimize (R) if cost(F) ? cost(bestF)
return if F ? R then bestF F else
x pick-one-conflict (F,R) (R1,R2) split
(R,x) BREL(R1,bestF) BREL(R2,bestF)
endif
69Algorithmic engineering details
- BDDs for the exploration of solutions
- Efficient manipulation of characteristic
functions - ISF minimizers (Minato-Morreale, Restrict, )
- Intensive use of the cache (many identical
sub-problems) - Store the best k solutions
- ESPRESSO factorization (accurate cost
estimation) - Hybrid exploration of the tree (BFS DFS quick
solver) - Clever conflict selection (with many neighboring
conflicts) - Highly customizable cost function, traversal
strategy, best
solution after timeout
70Gyocro Gyocro Gyocro BREL BREL BREL
PI PO LIT AREA CPU LIT AREA CPU
int1 4 3 8 9280 0.03 9 8352 0.01
int10 6 4 32 44544 0.08 34 41296 0.02
c17i 5 3 34 34336 0.04 30 32016 0.01
she1 5 3 16 16240 0.04 15 17632 0.00
she2 5 5 31 30624 0.09 24 26488 0.01
she3 6 4 23 24592 0.08 21 21344 0.01
she4 5 6 56 62176 0.14 40 46864 0.03
gr 14 11 318 346608 3.43 313 322016 6.79
b9 16 5 321 382336 4.68 256 306240 0.19
int15 22 14 506 525248 21.94 459 472352 19.14
vtx 22 6 117 151728 30.10 101 94656 0.58
Normalized sum Normalized sum Normalized sum 1.00 1.00 1.00 0.89 0.86 0.44
BREL Configuration Cost function ? Sum of BDDs
sizes ISF Minimizer ? Minato-Morreale
explored relations 10
71Gyocro Gyocro Gyocro BREL BREL BREL
PI PO LIT AREA CPU LIT AREA CPU
int1 4 3 8 9280 0.03 9 8352 0.01
int10 6 4 32 44544 0.08 34 41296 0.02
c17i 5 3 34 34336 0.04 30 32016 0.01
she1 5 3 16 16240 0.04 15 17632 0.00
she2 5 5 31 30624 0.09 24 26488 0.01
she3 6 4 23 24592 0.08 21 21344 0.01
she4 5 6 56 62176 0.14 40 46864 0.03
gr 14 11 318 346608 3.43 313 322016 6.79
b9 16 5 321 382336 4.68 256 306240 0.19
int15 22 14 506 525248 21.94 459 472352 19.14
vtx 22 6 117 151728 30.10 101 94656 0.58
Normalized sum Normalized sum Normalized sum 1.00 1.00 1.00 0.89 0.86 0.44
72Gyocro Gyocro Gyocro BREL BREL BREL
PI PO LIT AREA CPU LIT AREA CPU
int1 4 3 8 9280 0.03 9 8352 0.01
int10 6 4 32 44544 0.08 34 41296 0.02
c17i 5 3 34 34336 0.04 30 32016 0.01
she1 5 3 16 16240 0.04 15 17632 0.00
she2 5 5 31 30624 0.09 24 26488 0.01
she3 6 4 23 24592 0.08 21 21344 0.01
she4 5 6 56 62176 0.14 40 46864 0.03
gr 14 11 318 346608 3.43 313 322016 6.79
b9 16 5 321 382336 4.68 256 306240 0.19
int15 22 14 506 525248 21.94 459 472352 19.14
vtx 22 6 117 151728 30.10 101 94656 0.58
Normalized sum Normalized sum Normalized sum 1.00 1.00 1.00 0.89 0.86 0.44
73Gyocro Gyocro Gyocro BREL BREL BREL
PI PO LIT AREA CPU LIT AREA CPU
int1 4 3 8 9280 0.03 9 8352 0.01
int10 6 4 32 44544 0.08 34 41296 0.02
c17i 5 3 34 34336 0.04 30 32016 0.01
she1 5 3 16 16240 0.04 15 17632 0.00
she2 5 5 31 30624 0.09 24 26488 0.01
she3 6 4 23 24592 0.08 21 21344 0.01
she4 5 6 56 62176 0.14 40 46864 0.03
gr 14 11 318 346608 3.43 313 322016 6.79
b9 16 5 321 382336 4.68 256 306240 0.19
int15 22 14 506 525248 21.94 459 472352 19.14
vtx 22 6 117 151728 30.10 101 94656 0.58
Normalized sum Normalized sum Normalized sum 1.00 1.00 1.00 0.89 0.86 0.44
74Recursive n-way decomposition
subsumes bi-decomposition
75Recursive n-way decomposition
0
subsumes bi-decomposition
76Recursive n-way decomposition
subsumes bi-decomposition
77ALGEBR SPEED ALGEBR SPEED BREL-DECOMPOSITION BREL-DECOMPOSITION BREL-DECOMPOSITION
PI PO PO AREA DELAY AREA DELAY CPU
9symml 9 1 1 293712 9.79 149872 7.85 192.34
majority 5 1 1 8352 3.06 7424 2.86 3.32
b1 3 4 4 12528 2.86 10672 2.81 0.97
cm150a 21 1 1 63568 7.25 63568 5.96 46.02
cm85a 11 3 3 68208 5.57 57072 4.82 30.42
cm162a 14 5 5 83520 5.93 75632 5.37 42.26
cm163a 16 5 5 61248 6.19 63104 5.44 29.26
frg1 28 3 3 139664 9.07 68672 5.67 679.48
c8 28 18 18 150800 6.99 198128 6.01 84.92
cc 21 20 20 87696 5.98 89088 5.16 29.20
ttt2 24 21 21 232464 8.66 271904 7.29 162.19
cht 47 36 36 174000 6.08 270976 5.16 40.67
i5 133 66 66 447296 8.20 600880 6.99 503.50
i7 199 67 67 724304 8.71 817568 7.29 283.52
x3 135 99 99 832416 11.10 1215680 7.50 1082.86
Normalized sum Normalized sum Normalized sum Normalized sum 1.00 1.00 1.17 0.81
78Conclusions
- Boolean relations carry a huge space of
solutions. - Easy to be trapped on sub-optimal local minima.
- The semi-lattice is infested by ISFs !
- BREL finds a path to the best ISF by
recursivelysolving conflicts - Future work
- Exploitation of symmetries
- Boolean decomposition targeting at delay
minimization - BREL publicly available (send e-mail)