Professional Documents
Culture Documents
!!Objective
"!Libraries "!Problem
"!Algorithms
methods
This presentation can be used for non-commercial purposes as long as this note and the copyright footers are not removed Giovanni De Micheli All rights reserved
Library binding
!!Given an unbound logic network and a set of library cells
"!Transform "!Optimize
#! (under
Major approaches
!!Rule-based systems
"!Generic, "!Hard "!Data
area or power constraints) delay and/or power constraints delay and/or area constraints
"!Optimize
#! Under
#! Set
#! Local
"!Optimize
#! Under
!!Heuristic algorithms
"!Typically "!Library
Page 1
Examples
!!Matching:
"!A
cell matches a sub-network when their terminal behavior is the same problem assignment problem
"!Tautology
"!Input-variable
!!Covering:
"!A
cover of an unbound network is a partition into sub-networks which can be replaced by library cells. covering problem
"!Binate
Assumptions
!!Network granularity is fine
"!Decomposition "!2-input
Example
!!Trivial binding
"!Use
"!There
#! Base-cost
Page 2
Example
Library AND2 OR2 OA21 Cost 4 4 5
a
Example
v2 v1 x v3
z y
!! Vertex covering:
"! Covering v1 "! Covering v2 "! Covering v3
x=b+c y = ax z = xd
b c d
: ( m 1 + m4 + m5 ) : ( m 2 + m4 ) : ( m 3 + m5 )
v2 v1
x
!! Input compatibility:
"! Match
v3
a b c d x
m1: {v1,OR2}
y
m2 requires m1 m3 requires m1
v2
#!
"! Match
#!
v3
(m2+m4)(m3+m5)(m2+m1)(m3+m1) = 1
10
Decomposition
network and library in standard form into base functions #! Example, NAND2 and INV
#! Decompose
"!Partitioning
#! Break #! Reduce
network into cones to many multi-input, single-output networks each sub-network by library cells
"!Covering
#! Cover
Page 3
Partitioning
Covering
13
14
Heuristic algorithms
!!Structural approach
"!Model "!Rely
Example
!!Boolean vs. structural matching !! f = xy + xy + yz !! g = xy + xy + xz !!Function equality is a tautology
"! Boolean
functions by patterns
tree, dags
#! Example:
!!Boolean approach
"!Use
match
"!Solve
#! Use
"!More
powerful
15
16
Page 4
Example
by dags
isomorphism
!!Simplification:
"!Use
tree patterns
17
18
Tree-based matching
!! Network:
"! Partitioned
#! #!
Example
SUBJECT TREE PATTERN TREES
and decomposed
#!
Subject tree
!! Library
"! Represented "! Possibly
!! Pattern recognition
"! Simple
"! Aho-Corasik
(c) Giovanni De Micheli
Page 5
Example: Lib
Match of s: t1 cost = 2 Match of u: t2 cost = 3 r s t u s r t u s r t u s r t u s r t u Match of t: t1 cost = 2+3 = 5 Match of t: t3 cost = 4 Match of r: t2 Match of r: t4 cost = 3+2+4 =9 cost = 5+3 =8
Tree covering
!!Dynamic programming "!Visit subject tree bottom up !!At each vertex "!Attempt to match:
#! Locally #! Find
"!There
!!Bottom-up search yields and optimum cover !!Caveat: "!Mapping into trees is a distortion for some cells "!Overall optimality is weakened by the overall strategy of splitting into several stages
21
22
Simple library
#! Add
is fanout independent
computed with (max, +) rules delay of match to highest cost of sub-trees scheme is required
#! Delay #! Add
"!Delay
is fanout dependent
#! Look-ahead
23
24
Page 6
INV:2
NAND2:3
x y z w o
AND2: 4 AOI21: 6
Gate NAND2(b,c) INV(a) NAND2(x,d) NAND2(y,z) INV(w) AND2(y,z) AOI21(x,d,a) 3 2 3+3 = 6 3+6+ 2 = 11 2+11 = 13 6 + 4 + 2 = 12 6+3=9 t2 t1 t2 t2 t1 t3 t6B
Subject graph
Vertex Match
!! Fixed delays: INV:2 NAND2:4 AND2: 5 AOI21: 10 !! All inputs are stable at time 0, except for td = 6
Network o I w y z v v N I N N v v
26
Subject graph
Cost
6+4 = 10 10 + 4 = 14 14 + 2 = 16 10 + 5 = 15 10 + 6 = 16
x b
d c
x b
d c
delay is d = ! + " cap_load load depends on the driven cells (fanout cone) is a finite (possibly small) set of capacitive loads
Subject graph
Cost
!! Algorithm
"! Visit
6+4 = 10 10 + 4 = 14 14 + 2 = 16 10 + 5 = 15 10 + 6 = 16
each input to a matching cell, the best match for the corresponding load is selected solution when all possible loads are considered group loads into bins
!! Optimality
"! Optimum "! Heuristic:
x b
d c
27
Page 7
x b
d c
29
Module 2
!!Objectives
"!Boolean "!Boolean
Boolean covering
!!Decompose network into base functions !!Partition network into cones !!Apply bottom-up covering to each cone
"! When
#!
"!Simultaneous "!Extensions
considering vertex v:
Construct clusters by local elimination #! Limit the depth of the cluster by limiting the support of the function #! Associate several functions with vertex v #! Apply matching and record cost
37
38
Page 8
behavior
behavior
exist a permutation operator P and complementation operators Ni and No, such that f(x) = No g ( P Ni x) is a tautology
!!P-equivalence
"!Is
!!Variations:
"!N-equivalence "!PN-equivalence
there a permutation operator P, such that f(x) = g ( P x) is a tautology? check over all input permutations pattern ROBDD capturing all permutations
39
!!Approaches:
"!Tautology "!Multi-rooted
(c) Giovanni De Micheli
40
Boolean matching
!!Pin assignment problem:
"!Map
Example
!!Cluster terminals: x -- cell terminals: y
x1 x2
&
f g
x1 x2 y1 y2
"!Characteristic
f g
!!Tautology problem
"! f(x) "!!x
= gA (x)
= y1 y2
41
Page 9
variables in f(x) with unate variables in g(y) variables in f(x) with binate variables in g(y)
sizes
43
44
Example
!! Cluster function: f = abc
"! Symmetries "! Unate
{ { a,b,c} }
!! Pattern functions
"! g1
=a+b+c
Symmetries { { a,b,c} } Unate
#! #!
"! g2
= ab +c
!!Mechanism
"!Binding "!Exploit
"! g3
= abc + abc
45
46
Page 10
Example
47
48
Example
!!Assume vx is bound to an OR3(c,b,e) !!Dont care set includes x " (c+b+e) !!Consider fj = x(a+c) with CDC = xc !!No simplification.
"! Mapping
Example
to a MUX gate.
49
50
Page 11
Extended matching
!! Motivation: "! Search implicitly for best pin assignment "! Make a single test, determining matching and assignment !! Technique:
"! Construct
Example
!!g = y1 + y2 y3 !!y1 (c,x) = (c0c1x1 + c0c1x2 + c0c1x3) " c2 !!G = y1 (c,x) + y2(c,x) y3(c,x)
!! Visual intuition:
"! Imagine "! Each "! Input
#!
cell input can be routed to any cluster input (or voltage rail) polarity can be changed:
"! Cell
Example
!!Cell: g=xy !!Cluster: f = wz
z w a c z w 1 0 1 0 b d x y
&
log2 n variables for pin permutation #! One variable for input polarity
"!Total "!One
size of c: m( log2 n + 1 )
!!M(c) = abcd + abcd
&
54
Page 12
Extended matching
!!Extended matching captures implicitly all possible matches !!No extra burden when exploiting dont care sets !!M (c) = !x [ G(x,c) " f(x) + fDC(x) ] !!Efficient BDD representation !!Extensions:
"!Support "!Full
G1 L
!!Visual intuition
"!All
G2
multiple-output matching
library representation
"!Vector
#! Feasible #! Feasible
56
Summary
!!Library binding is a key step in synthesis !!Most systems use some rules together with heuristic
results are obtained with Boolean matching structural matching is used for speed
"!Sometimes
design
57
Page 13