Professional Documents
Culture Documents
Vlsi Cad:: Logic To Layout
Vlsi Cad:: Logic To Layout
1
Logic to Layout Logic Synthesis:
Multilevel Logic and
the Boolean Network Model
Rob A. Rutenbar
University of Illinois
Why Multi-level Logic?
• 2-level forms are too restrictive: specific area vs. delay tradeoff
• Area = gates + literals (wires), i.e., things that take space on a chip
• Delay = maximum levels of logic gates required to compute function
• 2-level is minimum gate delay possible, but usually worst on area
1 2 3 4 999
?
~1000 gate
“block” of logic
1000
This is just NOT going to be the
preferred logic network structure...
Levels of
logic in
1 2 3 4 5 6 7 8 9 10 11 network
#Literals =
a
b Q = aX
Y = b+c Q
c
X = Yd + Z
Z = b•c
Z = ab
X = a + bc Y = cdZ + stuff Y = cdab + stuff
X = ab + c + r X=Q+r
Y = abd + cd Q = ab+c Y = Qd
divisor
Z = abrs+crs Z = Qrs
16 literals 10 literals
Slide 9 © 2013, R.A. Rutenbar
VLSI CAD: Lecture 6.2
Logic to Layout Logic Synthesis:
Multilevel Logic:
Algebraic Model for
Factoring
Rob A. Rutenbar
University of Illinois
Aside: Multilevel Synthesis Scripts
• Multilevel synthesis–like 2-level synthesis–is heuristic
• …but it’s also more complex. Write scripts of basic operators
• Do several passes of different optimizations over the Boolean logic network
• Do some “cleanup” steps to get rid of “too small” nodes (remove them)
• Look for “easy” factors, just sitting around as existing nodes, and try to use them
• Look for “hard” factors, do the work to extract them, try them, keep the good ones
• Do 2-level optimization of insides of each logic node in network (ESPRESSO)
• Lots of “art” in the engineering of these scripts
• For us, the one big thing you don’t know: How to factor…
x
a+a’ = 1 a•a’ = 0
NOT a•a = a a+a = a
ALLOWED a+1 = 1
a+(b•c) = (a+b)•(a+c)
F = ab + a’x + b’y
Let R = a’
Let S = b’
ab + Rx + Sy
• Idea
• Boolean functions manipulated as SOP expressions–like polynomials
• Each product term in such an expression is just a set of variables, e.g., abRy
• SOP expression itself is just a list of these products (cubes), e.g. ab + Rx = ab,Rx
Slide 14 © 2013, R.A. Rutenbar
Algebraic Division: Our Model for Factoring
• Given function D we want to factor as:
F = D•Q + R
divisor remainder (if =0, then we say the divisor
quotient is ‘technically’ called a Factor)
15 = 7•2 + 1 F = ac + ad + bc + bd + e
7 = D = divisor = (a+b)•(c+d) + e
2 = Q = quotient
1 = R = remainder (a+b) = D = divisor
(c+d) = Q = quotient
e = R = remainder
Slide 15 © 2013, R.A. Rutenbar
Algebraic Division
• Example F = ac + ad + bc + bd + e want F = D • Q + R
• Reminder: Quotient is only called a “Factor” if remainder is 0
• Output
• Quotient Q = F/D = cubes in quotient, or 0 (empty) if none
• Remainder R = cubes in remainder, or 0 (empty) if D was a factor
• i.e., figures out Q, R so that F = D•Q+ R = D•(F/D) + R
• Strategy
• Cubewise walk thru cubes in divisor D, trying to divide each of them into F
• ...being careful to track which cubes do divide into F
2 Q = c+d+e 4 Q = (c+d) ∩ }
R = F - ( Q • D );
(c+d+e) }
return ( quotient = Q, remainder = R)
= c+d
F = ab’c’ + ab + ac + bc G = ab + c’ want F / G
• Because must treat the true and complement forms of variable as different
F = a + ab + bc is redundant quotient ab
D = a is the divisor c 00 01 11 10
Now: compute F / D, i.e., F / a 0 1 1
use our algebraic division algorithm
1 1 1 1
à Problem: F / D = 1 + b, remainder = bc
à “1+b” is not operation in Algebraic model!
F1 = ab + c + x F1 = d1 + x
factor d1 = ab+c
F2 = abx + cx + q F2 = (d1)x+q
F3 = ab + q F3 = ab+q
remainder R remainder R
F = D•Q + R F = c•k + R
ab + acd + bd -- Yes
Kernels of F Intersect?
k3
≥2 cubes?
k1 F = new
F = stuff
k2
k3 k5
d = ab+c+…
k4 k5 Yes! d=… G = new
G = stuff Multi-cube
k6 k7
divisor extracted!
Kernels of G
F = cube1•d + …
kernel1 ∩ kernel2 = [X + Y]
d = X+Y
= a multicube divisor of F & G
G = cube2•d + …
F = ae + be + cde + ab G= ad + ae + bd + be + bc
K(F) Kernel Co-kernel K(G) Kernel Co-kernel
a+b+cd e a+b d or e
b+e a d+e a or b
a+e b d+e+c b
ae+be+cde+ab 1 ad+ae+bd+be+bc 1
So, this is workable multicube divisor we can consider for both F,G
F = cube1 • k1 + remainder1
• One technical point: need to start with a cube-free function F to make things work
right. If not cube-free, just divide by the biggest common cube to simplify F…
Slide 38 © 2013, R.A. Rutenbar
Kernel Algorithm
• Algorithm is then...
FindKernels( cube-free SOP expression F) {
K = empty;
for ( each variable x in F ) {
if ( there are at least 2 cubes in F that have variable x ) {
let S = { cubes in F that have variable x in them };
let co = cube that results from intersection of all cubes in S,
this will be the product of just those literals
that appear in each of these cubes in S;
K = K ∪ FindKernels( F / co) ;
} F/co = a kernel, returned at end.
} This is algebraic division, but
K=K∪F; simpler since it always
return( K ) Cube-free F is always its just divides by exactly
} own kernel, with 1 cube, a simple product term
trivial co-kernel = 1
Slide 39 © 2013, R.A. Rutenbar
Kerneling Example
• To start, divide F by each of the variables, and use to recurse
• We are looking for co-kernels that start with this ONE variable in them
• But—be smart, it cannot be a co-kernel unless it’s in at least 2 cubes
F = ace + bce + de + g
a b c d e g
no work no work cubes w/ c = no work cubes w/ e = no work
only 1 only 1 only 1 only 1
ace,bce ace,bce,de
cube w/ a cube w/ b cube w/ d cube w/ g
co =∩= co =∩=
ce e
Bug fix:
F/co = F/co = ac+bc+d
a+b ac+bc+d
Aside: “w/” = “with” recurse on: a+b recurse on: ac+bc+d
Slide 40 © 2013, R.A. Rutenbar
Kernel Hierarchy, Example Continued
• With this algorithm, overall recursion tree looks like this
F = ace + bce + de + g
a b c d e g
no work no work cubes= ace,bce no work cubes= ace,bce,de no work
co = ce co = e
F/co = a+b F/co = ac+bc+d
Kernel = ac+bc+d
no work for any variable
Kernel = a+b Co-kernel = e
Co-kernel = ce
a b c d e g
no work no work cubes= ac,bc no work no work no work
Kernel = a+b co =∩= c
Co-kernel = ce F/co = a+b
(get co-kernel by ANDing
co cubes up recursion tree no work for any variable
Slide 41 © 2013, R.A. Rutenbar
Kernel Hierarchy
• With this algorithm...
• Can find all the kernels (and co-kernels too)
• Get co-kernels by ANDing the divisor co cubes up recursion tree
F F = d•Q1 + R1
d
G G = d•Q2 +R 2