






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Professor: Lysecky; Class: Computer-Aided Logic Design; Subject: Electrical & Computer Engr; University: University of Arizona; Term: Unknown 1989;
Typology: Study notes
1 / 12
This page cannot be seen from the preview
Don't miss anything!







ECE 474a/575a Susan Lysecky
1 of 36
Lecture 15
Technology Mapping
ECE 474a/575a Susan Lysecky
2 of 36
Technology Mapping
Minimized size of equation and/or number of literals Didn’t consider how we will implement the circuit
Transforms technology independent logic network into gates implemented with a technology library standard cell library, gate array library, look-up tables (for FPGAs)
F = w’z’ + wz + yz
F(w, x, y, z) = w’x’y’z’ + w’x’yz + w’x’yz’ + w’xy’z’ + w’xyz + w’xyz’ + wxy’z + wxyz + wx’y’z + wx’yz
F = a + c’
F(a, b, c) = a + a’b’c’ + bc’
F = hi’j’k’ + h’i’ + jk
F(h, i, j, k) = h’i’j’k’ + hi’j’k’ + h’i’k + h’i’j + jk F = w’z’ + wz + yz F = a + c’ F = hi’j’k’ + h’i’ + jk
ECE 474a/575a Susan Lysecky
3 of 36
Technology Mapping Example
Uses library of pre-layed-out gates or small pieces technology known as cells Designer instantiates and connects these cell to implement a digital circuit
library 1
library 2
F = abcd + a’b’
a b c d a b
ab cd
a b
ECE 474a/575a Susan Lysecky
4 of 36
Technology Mapping Phases
Technology mapping broken down into 3 phases
Decomposition
Pattern Matching
Covering
ECE 474a/575a Susan Lysecky
5 of 36
Decomposition
Depending on the input function, circuit may need to be modified
Cell library typically limited to a few primitives functions with few inputs
Most practical cell libraries limit primitives to 2-input NAND gates and INV
Library 1 Library 2
a b
c d
F
c
ECE 474a/575a Susan Lysecky
6 of 36
Why NAND and NOR Gates?
CMOS Transistor Level Gate Implementation
At the low level NAND/ NOR gates are require fewer transistors than AND/OR
gates and are more desirable to use
a (^) F b
a F b
a F (^) b
a F b
a F
F
0
x
1
NOT gate NOR gate
F
0
1
x y
x y
OR gate
F
0
1
0
1
x y
x y
NAND gate
F
0
1
x y
x y
AND gate
0
1
x y
x y
F
0
1
ECE 474a/575a Susan Lysecky
10 of 36
Decomposition
Many ways to decompose logic network
Typically not limited to 1 decomposition
Potential to be helpful Make sure leftover cascading inverters covered by wires
Decomposition phase greatly impacts resulting circuit
ECE 474a/575a Susan Lysecky
11 of 36
Pattern Matching
Several pattern matching techniques available
Structural matcher
Boolean matcher
PLA matcher
1 0
a
d d
c T
E
T E T
E
T
E
f
b b T E ET c E (^) T 1 0
b ET
c T
E
a
c d F
c c
a c
ECE 474a/575a Susan Lysecky
12 of 36
Pattern Matching
PLA Matcher – AND/OR Truth Table Representation
Programmable logic array (PLA)
Table as wide as number of entries 1 = term positive, 0 = term negative, X = term doesn’t apply
Table as wide as number of outputs 1 = term belong to output, 0 = term doesn’t belong to output
abc
F = abc’ + b’a’
G = ac + a’c’
abc’ b’a’ ac a’c’
AND Table
f g 10 10 01 01
abc 110 00 X 1 X 1 0 X 0
abc’ b’a’ ac a’c’
OR Table
ECE 474a/575a Susan Lysecky
13 of 36
Covering
Objective function indicates which subset to choose (delay, cost, reliability, power)
Rows represent nodes in graph Column represent pattern matches “1” in matrix signifies node in row covered by pattern in column
Find set of columns so all rows covered Choose columns to obtain minimal cost Each match has inputs available from output of other matches
P 1 P 2 … Pn N 1
Nm
patterns found
nodes in logic
network
ECE 474a/575a Susan Lysecky
14 of 36
Covering
Dynamic Programming
Propose mapping method based on tree- covering
programming algorithm available
General idea of dynamic programming
optimal solutions of sub-problems can be used to find the optimal solutions of the overall problem
same sub-problems are used to solve many different larger problems.
savings and re-use of already-computed sub-solutions
ECE 474a/575a Susan Lysecky
15 of 36
Example 3
Dynamic Programming
INV (1)
numbers in parenthesis represent cost
b
NAND2 [a] (2)* NAND2 (2)
NAND3 (3)
AOI21 (3)
a
d
g
c
e f
j
i
h Start with leaves to root Given node, look for best cover of subtree based on node
Node a NAND2 is only match, cost of 2 *** indicates best solution for subtree** [] indicates which nodes are covered by pattern
ECE 474a/575a Susan Lysecky
19 of 36
Example 3
Dynamic Programming
cell library
INV (1)
numbers in parenthesis represent cost
b
NAND2 [a] (2)* NAND2 (2)
NAND3 (3)
AOI21 (3)
a
d
g
c e f
j
i
h
NAND2 [i] (5) NAND3 [i, h, g] (3)*
INV [b] (1)*
INV [d] (1)*
NAND2 [g] (2)* (^) INV [h] (3)*
NAND2 [c] (5)*
NAND2 [e] (8) INV [f] (9) AOI21 [f, e, c, d] (6)**
Node h INV is only match, cost of 3 (2 + 1)
Node i NAND2 is a possible match, cost is 5 NAND3 is a possible match, cost is 3
ECE 474a/575a Susan Lysecky
20 of 36
Example 3
Dynamic Programming
INV (1)
numbers in parenthesis represent cost
b
NAND2 [a] (2)* NAND2 (2)
NAND3 (3)
AOI21 (3)
a
d
g
c
e f
j
i
h
NAND2 [i] (5) NAND3 [i, h, g] (3)*
INV [b] (1)*
INV [d] (1)*
NAND2 [g] (2)* (^) INV [h] (3)*
NAND2 [c] (5) NAND2 [e] (8) INV [f] (9) AOI21 [f, e, c, d] (6)*
NAND2 [j] (11) NAND3 [j, f, e] (12)*
Node j NAND2 is a possible match, cost is 11 NAND3 is a possible match, cost is 12
ECE 474a/575a Susan Lysecky
21 of 36
Example 3
Dynamic Programming
INV (1)
numbers in parenthesis represent cost
b
NAND2 [a] (2)* NAND2 (2)
NAND3 (3)
AOI21 (3)
a
d
g
c
e f
j
i
h
NAND2 [i] (5) NAND3 [i, h, g] (3)*
INV [b] (1)*
INV [d] (1)*
NAND2 [g] (2) INV [h] (3)**
NAND2 [c] (5) NAND2 [e] (8) INV [f] (9) AOI21 [f, e, c, d] (6)*
NAND2 [j] (11) NAND3 [j, f, e] (12)*
Now we backtrack starting from root and choose the best covering seen
At node j, NAND2 gives best cost
ECE 474a/575a Susan Lysecky
22 of 36
Example 3
Dynamic Programming
cell library
INV (1)
numbers in parenthesis represent cost
b
NAND2 [a] (2)* NAND2 (2)
NAND3 (3)
AOI21 (3)
a
d
g
c e f
j
i
h
NAND2 [i] (5) NAND3 [i, h, g] (3)*
INV [b] (1)*
INV [d] (1)*
NAND2 [g] (2)* (^) INV [h] (3)*
NAND2 [c] (5)*
NAND2 [e] (8) INV [f] (9) AOI21 [f, e, c, d] (6)**
NAND2 [j] (11) NAND3 [j, f, e] (12)*
At node f, AOI21 gives best cost At node a, NAND2 gives best cost At node b, INV gives best cost At node i, NAND3 gives best cost
ECE 474a/575a Susan Lysecky
23 of 36
Conclusion
Technology mapping phases
Only considered a few techniques
Delay, Power, Reliability, Layout, Congestion, etc.
Simplify technology mapping by finding a minimal area solution Apply post technology mapping transformations to customize solution to specific interest
ECE 474a/575a Susan Lysecky
24 of 36
Lecture 16
Course Summary and Additional Topics
ECE 474a/575a Susan Lysecky
28 of 36
Pipelining
Time
a
You wash plate 1
Then friend dries plate 2, while you wash plate 3; and so on You don’t sit and watch friend dry; you start on the next plate
Digital Design Copyright © 2006 Frank Vahid
ECE 474a/575a Susan Lysecky
29 of 36
Concurrency
Dishwashing example: Divide stack into 3 substacks, give substacks to 3 neighbors, who work simultaneously -- 3 times speedup (ignoring time to move dishes to neighbors' homes) Concurrency does things side-by-side; pipelining instead uses stages (like a factory line)
Task
Can do both, too
Digital Design Copyright © 2006 Frank Vahid
ECE 474a/575a Susan Lysecky
30 of 36
Component Level Optimization and Tradeoffs
May use different adder types in different parts of same design Faster adders on critical path, smaller adders on non-critical path
FA
a
co s
b
FA
a0b0 ci
FA
a
s2 s1 s
b
FA
a1b 4-bitCLA logic
4-bitCLA logic
4-bitCLA logic
4-bitCLA logic
4-bitCLA logic
4-bitCLA logic
4-bitCLA logic
4-bitCLA logic 2-bitCLA logic
4-bitCLA logic
4-bitCLA logic
P G c SPG block
P
P P
GP^ P^ P^ P^ P^ P^ P
G G
cG^ G^ G^ G^ G^ G^ G
c c
c c c c c c c
carry-ripple adder carry-lookahead adder
Digital Design Copyright © 2006 Frank Vahid
ECE 474a/575a Susan Lysecky
31 of 36
Power Optimization
Measured in Watts (energy/second) Rate at which energy is consumed
Power not scaling down at same rate as size Means more heat per unit area – cooling is difficult Coupled with battery’s not improving at same rate Means battery can’t supply chip’s power for as long CMOS technology: Switching a wire from 0 to 1 consumes
P = k * CV^2 f k: constant; C: capacitance of wires; V: voltage; f: switching frequency Power reduction methods Reduce voltage: But slower, and there’s a limit What else?
energy (1=value in 2001)
(^8)
4
2 1
battery energy density
energy demand
2001 03 05 07 09
Digital Design Copyright © 2006 Frank Vahid
ECE 474a/575a Susan Lysecky
32 of 36
Power Optimization using Clock Gating
After all, clock goes to every register Portion of FIR filter shown on right Notice clock signals n1, n2, n3, n
Achieve using AND gates FSM only sets 2nd^ input to AND gate to 1 in those states during which register gets loaded
Putting gates on clock wires creates
be done with great care
yreg
xt0 c0 xt1 c1 xt2 c X
x_ld
y_ld
clk n1 n2 n3 n
yreg
X xt0^ c0 xt1^ c1 xt2 c
x_ld
y_ld
n2 n3 n
n clk
clk n1, n2, n n
Much switching on clock wires
clk n1, n2, n n
Greatly reduced switching – less power
s
s
Digital Design Copyright © 2006 Frank Vahid
ECE 474a/575a Susan Lysecky
33 of 36
Power Optimization
Multiple versions of gates may exist Fast/high-power, and slow/low-power, versions Use slow/low-power gates on non-critical paths Reduces power, without increasing delay
g
f
e
d
c
a b
26 transistors 3 ns delay 5 nanowatts power
nanowatts nanoseconds (^) gf
e
d
c
a b
26 transistors 3 ns delay 4 nanowatts power
low-power gates delay
high-power gates low-power gates on non-critical path
size
Digital Design Copyright © 2006 Frank Vahid