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
70BREL Configuration Cost function ? Sum of BDDs
sizes ISF Minimizer ? Minato-Morreale
explored relations 10
71(No Transcript)
72(No Transcript)
73(No Transcript)
74Recursive n-way decomposition
subsumes bi-decomposition
75Recursive n-way decomposition
0
subsumes bi-decomposition
76Recursive n-way decomposition
subsumes bi-decomposition
77(No Transcript)
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)