Académique Documents
Professionnel Documents
Culture Documents
Technology Mapping
Where is it used
After technology independent optimization Initial logic network techn-independent techn-independent optimization optimization technology technology mapping mapping
Role
Assign logic functions to gates from custom library Optimize for area, delay, power, etc.
Cell library
manufacturing
2
Technology-independent Optimization
Original logic network (16 literals):
t1 = a + bc t2 = d + e t3 = ab + d t4 = t1t2 + fg t5 = t4h + t2t3 F = t5
F t4
F t5 t4h + t2t3
This representation is called the subject graph. Each gate of the library is likewise represented using the base set. This generates pattern graphs.
Represent each gate in all possible ways.
Subject Graph
F F
t4
c g h
d+e
b+h
For minimum area, the cost of the cover is the sum of the areas of the gates in the cover. Find a minimum cost covering of the subject graph by choosing from the collection of pattern graphs for all the gates in the library.
Subject Graph
f g
t1 = d + e t2 = b + h t3 = at2 + c t4 = t1t3 + fgh F = t4
d e h b a c
8
f g d e h b F
a c
10
Better Covering
and2(3) f
t1 = d + e t2 = b + h t3 = at2 + c t4 = t1t3 + fgh F = t4
aoi22(4)
a c inv(1) nand2(2)
11
Alternate Covering
f
t1 = d + e t2 = b + h t3 = at2 + c t4 = t1t3 + fgh F = t4
nand3(3) and2(3) F
oai21(3)
a c
Output:
General Approach:
Construct a subject DAG for the network. Represent each gate in the target library by pattern DAGs. Find an optimal-cost covering of subject DAG using the collection of pattern DAGs.
13
14
Simply covering all the nodes in the subject graph is not enough.
Need to make sure that the inputs of the matches in the cover are also the outputs of some matches in the cover.
Each primary input must have some match that generates it as an output (an Sj type clause). Each clause must be satisfied.
17
18
Covering Table
variables
clauses
19
20
Gate inv inv nand2 nand2 nand2 inv nand2 inv nand2 nand3 nand3 xnor2 nand4 oai21
Cost 1 1 2 2 2 1 2 1 2 3 3 5 4 3
Inputs b a g1,g2 a,b g3,g4 g4 g6,c g7 g8,d g6,c,d a,b,c a,b a,b,c,d a,b.g4
Produces g1 g2 g3 g4 g5 g6 g7 g8 g9 g9 g7 g5 g9 g5 g1 g2 g3 g4 g5 g6 g7 g8 g9
Covers
Each selected match input must be a primary input or the output of some other selected match.
(m3+m1)(m3+m2) (m5+m3) (m5+m4) (m6+m4) (m7+m6) (m8+m7) (m9+m8) (m10+m6) (m14+m4)
22
23
Final Solution
24
25
Dynamic Programming
An algorithmic method that solves an optimization problem by decomposing it into a sequence of decisions. Such decisions lead to an optimum solution if the following Principle of Optimality is satisfied [Bellman 1957]:
An optimal sequence of decisions has the property that whatever the initial state and decisions are, the remaining decisions must constitute an optimal decision sequence w.r.to the state resulting from the fist decision.
dik
cost(k)
k
26
c
2
a
6
5 5 0
t
s
4
b
5
27
gi k1 k2
28
Consider a node N of a subject tree Recursive Assumption: for all children of N, a best cost match (which implements the node) is known Cost of a leaf of the tree is 0. Compute cost of each pattern tree which matches at N, Cost = SUM of best costs of implementing each input of pattern plus the cost of the pattern Choose least cost matching pattern for implementing N
29
inv (2)
inv (2)
b c
aoi12 (6)
31
nand4
32
33
Leads to 3 trees
34
output
output
35
Min-Delay Covering
For trees:
identical to min-area covering use optimal delay values within the dynamic programming paradigm
For DAGs:
if delay does not depend on number of fanouts: use dynamic programming as presented for trees leads to optimal solution in polynomial time we dont care if we have to replicate logic
Combined objective
e.g. apply delay as first criteria, then area as second combine with static timing analysis to focus on critical paths
36