Title: FPGA Technology Mapping: A Study of Optimality
1FPGA Technology Mapping A Study of Optimality
- Andrew C. Ling M.A.Sc. Candidate University of
Toronto - Deshanand P. Singh Ph.D. Altera Corporation
- Professor Stephen D. Brown Altera Corporation
Toronto University of Toronto
2Goals
- Determine how good current FPGA LUT based
technology mappers are in terms of
area-optimality - A. Farrahi and M. Sarrafzadeh (1994).Area
problem shown to be NP-Hard
3Method
- Take a set of benchmark circuits and technology
map them to LUTs using one of the best existing
LUT based technology mappers. - Devise a resynthesis technique that is able to
remove LUTs from these pre-existing technology
mapped circuit. - The more LUTs that can be removed, the farther
the original technology mapping was from
thearea-optimal solution.
4Resynthesis
- Attempt to map a cone with X LUTs to another cone
with less than X LUTs
5Sliding Window Approach
- Resynthesize subcircuits
- Does not give the globally optimal solution
however gives an indication of the area left on
the table
6Background The Propositional Satisfiability
(SAT) problem
- Defined over a set of variables, V
(a,b,c)
(C1,C2,C3)
- Comprised of a conjunction of clauses
- Each clause is a disjunction of literals of the
variables V
SAT Seek an assignment of to the variables, V,
which sets expression to 1.
Example
abc1
7Construction of CNF
- T. Larrabee, Test pattern generation using
Boolean satisfiability," TCAD, 1992 (Plaisted's
and Greenbaum's encoding which is based on
Tseitin's work) - Creates a Characteristic Function for circuits
f(x2g) (x1g) (x2x1g)
8Construction of CNF (contd)
f AND (x2z1) (x1z1) (x2x1 z1)
f OR (x3g) (z1g) (x3z1 g)
f total fAND fOR (x2z1) (x1z1) (x2x1
z1) (x3g) (z1g) (x3z1 g)
9Formulating Resynthesis Problem
2-LUT
f
g
2-LUT
2-LUT
2-LUT
?
2-LUT
- Can function f be implemented in circuit g ?
- Does there exist a configuration to g such that
for all inputs to g, f is equivalent to g
10Formulating Resynthesis Problem
2-LUT
f
g
2-LUT
2-LUT
2-LUT
?
2-LUT
- Derive characteristic function H for circuit g
- Replace all instances of g in H with f
- Hg/f (g f )
- f is equivalent to g
11Formulating Resynthesis Problem
2-LUT
f
g
2-LUT
2-LUT
2-LUT
?
2-LUT
- Does there exist a configuration to g such that
for all inputs to g, f is equivalent to g ?
(g f )
12Formulating Resynthesis Problem
2-LUT
f
g
2-LUT
2-LUT
2-LUT
?
2-LUT
- Does there exist a configuration to g such that
for all inputs to g, f is equivalent to g ?
A
E
l1lm x1xn(g f )
13Formulating Resynthesis Problem
2-LUT
f
g
2-LUT
2-LUT
2-LUT
SAT
2-LUT
- Express as a QBF with inputs (x1xn) and
configuration bits (l1lm) - l1lm x1xn (g f )
- Remove quantifiers to form a SAT problem(A.
Biere. Resolve and Expand, SAT04)
A
E
14Resynthesis Structures Used
- Given a MFFC with 10 or less inputs and
containing more than 3 LUTs, map it to
- Given a MFFC with 7 or less inputs and containing
more than 2 LUTs, map it to
4-LUT
4-LUT
4-LUT
4-LUT
4-LUT
4-LUT
4-LUT
4-LUT
15Resynthesis Results, 4-LUTs
16Digital Logic Blocks with Tricks
- How intelligent are current technologymappers
when it comes to some commondigital logic blocks?
17Techmap 41 MUX with 4-LUTs
a
b
out
c
d
s1
s0
18Techmap 41 MUX with 4-LUTs
a
b
s0
c
out
d
s1
19Techmap 41 MUX with 4-LUTs
a
s0
b
s0
c
out
d
s11
20Resuts using 4-LUTs
21Conclusions
- Current 4-LUT technology mappers still have room
for improvement(5 on average, up to 10 for
some circuits) - For some logic blocks, current technology mappers
have a very difficult time finding the optimal
mapping to 4-LUTs (36 geomean, up to 67). - Still has difficultly particularly for
non-disjoint decomposition.
22Future Work
- Explore BDDs, QBF solvers and All Solution SAT
solvers to speed up process - If fast enough, this technique can be used asa
valid resynthesis technique. - Use Multiple Output Resynthesis
- Search for other optimal configurations ofcommon
logic blocks, used in a caching schemefor
resynthesis - After technology mapping, search for digital
logic blocks found in our cache, replace digital
logic block with the cached optimal configuration
23Questions?