Sie sind auf Seite 1von 527

BHASKER REDDY k VLSI ppts for M.Tech and B.

Tech 1
UNIT::II::Topics
Layouts for logic networks.
Channel routing.
Simulation.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 2
Standard cell layout
Layout made of small cells: gates,
flip-flops, etc.
Cells are hand-designed.
Assembly of cells is automatic:
cells arranged in rows;
wires routed between (and through)
cells.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 3
Standard cell structure
VDD
VSS
n tub
p tub
Intra-cell wiring
pullups
pulldowns
pin
pin
F
e
e
d
t
h
r
o
u
g
h

a
r
e
a

BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 4
Standard cell design
Pitch: height of cell.
All cells have same pitch, may have
different widths.
VDD, VSS connections are designed
to run through cells.
A feedthrough area may allow wires
to be routed over the cell.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 5
Single-row layout design
Routing channel
cell cell cell cell cell
cell cell cell cell cell
wire Horizontal track
Vertical track
height
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 6
Routing channels
Tracks form a grid for routing.
Spacing between tracks is center-to-
center distance between wires.
Track spacing depends on wire layer
used.
Different layers are (generally) used
for horizontal and vertical wires.
Horizontal and vertical can be routed
relatively independently.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 7
Routing channel design
Placement of cells determines
placement of pins.
Pin placement determines difficulty of
routing problem.
Density: lower bound on number of
horizontal tracks needed to route the
channel.
Maximum number of nets crossing from
one end of channel to the other.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 8
Pin placement and routing
before
a b c
b c a
before
a b c
b c a
Density = 3
Density = 2
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 9
Example: full adder layout
Two outputs: sum, carry.
sum
carry
x1
x2
n1
n2
n3
n4
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 10
Layout methodology
Generate candidates, evaluate area
and speed.
Can improve candidate without starting
from scratch.
To generate a candidate:
place gates in a row;
draw wires between gates and primary
inputs/outputs;
measure channel density.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 11
A candidate layout
x1 x2 n1 n2 n3 n4
a
b
c
s
cout
Density = 5
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 12
Improvement strategies
Swap pairs of gates.
Doesnt help here.
Exchange larger groups of cells.
Swapping order of sum and carry groups
doesnt help either.
This seems to be the placement that
gives the lowest channel density.
Cell sizes are fixed, so channel height
determines area.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 13
Left-edge algorithm
Basic channel routing algorithm.
Assumes one horizontal segment per
net.
Sweep pins from left to right:
assign horizontal segment to lowest
available track.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 14
Example
A B C
A B B C
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 15
Limitations of left-edge
algorithm
Some combinations of nets require
more than one horizontal segment
per net.
B A
A B
aligned
?
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 16
Vertical constraints
Aligned pins form vertical constraints.
Wire to lower pin must be on lower
track; wire to upper pin must be above
lower pins wire.
B A
A B
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 17
Dogleg wire
A dogleg wire has more than one
horizontal segment.
B A
A B
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 18
Rats nest plot
Can be used to judge placement
before final routing.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 19
Simulation
Goals of simulation:
functional verification;
timing;
power consumption;
testability.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 20
Types of simulation
Circuit simulation:
analog voltages and currents.
Timing simulation:
simple analog models to provide timing
but not detailed waveforms.
Switch simulation:
transistors as semi-ideal switches.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 21
Types of simulation, contd.
Gate simulation:
logic gates as primitive elements.
Models for gate simulation:
zero delay;
unit delay;
variable delay.
Fault simulation:
models fault propagation (more later).
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 22
Example: switch simulation
a
+
+
b
c
d
c
1
0
0
X
X
X
o
0
1
1
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 23
Example, contd.
a
+
+
b
c
d
c
1
0
0
0
1
1
o
0
1
0
0
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 24
Topics
Combinational network delay.
Logic optimization.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 25
Sources of delay
Gate delay:
drive;
load.
Wire:
lumped load;
transmission line.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 26
Fanout
Fanout adds capacitance.
source
sink
sink
sink
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 27
Ways to drive large fanout
Increase sizes of driver transistors.
Must take into account rules for
driving large loads.
Add intermediate buffers. This may
require/allow restructuring of the
logic.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 28
Buffers
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 29
Wire capacitance
Use layers with lower capacitance.
Redesign layout to reduce length of
wires with excessive delay.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 30
Placement and wire capacitance
unbalanced load
more balanced
dvr
g1
g2
g3
g4
dvr
g1
g2
g3
g4
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 31
Path delay
Combinational network delay is
measured over paths through
network.
Can trace a causality chain from
inputs to worst-case output.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 32
Path delay example
network
graph model
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 33
Critical path
Critical path = path which creates
longest delay.
Can trace transistions which cause
delays that are elements of the
critical delay path.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 34
Delay model
Nodes represent gates.
Assign delays to edgessignal may
have different delay to different sinks.
Lump gate and wire delay into a
single value.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 35
Critical path through delay
graph
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 36
Reducing critical path length
To reduce circuit delay, must speed
up the critical pathreducing delay
off the path doesnt help.
There may be more than one path of
the same delay. Must speed up all
equivalent paths to speed up circuit.
Must speed up cutset through critical
path.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 37
False paths
Logic gates are not simple nodes
some input changes dont cause
output changes.
A false path is a path which cannot be
exercised due to Boolean gate
conditions.
False paths cause pessimistic delay
estimates.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 38
Logic rewrites
deep logic
shallow
logic
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 39
Logic transformations
Can rewrite by using subexpressions.
Flattening logic increases gate fanin.
Logic rewrites may affect gate
placement.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 40
False path example
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 41
Logic optimization
Logic synthesis programs transform
Boolean expressions into logic gate
networks in a particular library.
Optimization goals: minimize area,
meet delay constraint.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 42
Technology-independent
optimizations
Works on Boolean expression
equivalent.
Estimates size based on number of
literals.
Uses factorization, resubstitution,
minimization, etc. to optimize logic.
Technology-independent phase uses
simple delay models.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 43
Technology-dependent
optimizations
Maps Boolean expressions into a
particular cell library.
Mapping may take into account area,
delay.
May perform some optimizations on
addition to simple mapping.
Allows more accurate delay models.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 44
Topics
Transistor sizing:
Spice analysis.
Logical effort.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 45
Transistor sizing
Not all gates need to have the same
delay.
Not all inputs to a gate need to have
the same delay.
Adjust transistor sizes to achieve
desired delay.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 46
Example: adder carry chain
+
+
a
i

b
i

a
i

c
i

b
i

c
i

b
i

a
i

b
i

a
i

c
i+1

One stage:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 47
Carry chain optimization
Connect four stages.
Optimize delay through carry chain by
selecting transistor sizes.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 48
Case 1
W/L for all stages: n = 0.75/0.5, p = 1.5/0.5
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 49
Case 2
Wider pulldowns for first stage XOR, larger first stage inverter:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 50
Case 3
Larger transistors in second and third stages:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 51
Inter-stage effects in transistor
sizing
Increasing a gates drive also
increases the load to the previous
stage:
Larger
drive
Larger
load
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 52
Logical effort
Logical effort is a gate delay model
that takes transistor sizes into
account.
Allows us to optimize transistor sizes
over combinational networks.
Isnt as accurate for circuits with
reconvergent fanout.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 53
Logical effort gate delay model
Gate delay is measured in units of
minimum-size inverter delay t.
Gate delay formula:
d = f + p.
Effort delay f is related to gates load.
Parasitic delay p depends on gates
structure.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 54
Effort delay
Effort delay has two components:
f = gh.
Electrical effort h is determined by
gates load:
h = C
out
/C
in

Logical effort g is determined by
gates structure.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 55
Logical effort
1 input 2 inputs 3 inputs 4 inputs n inputs
inverter 1
NAND 4/3 5/3 6/3 (n+2)/3
NOR 5/3 7/3 9/3 (2n+1)/3
mux 2 2 2 2


BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 56
Logical effort along a path
Logical effort along a chain of gates:
G = H g
i
.

Total electrical effort along path
depends on ratio of first and last
stage capacitances:
H = C
out
/C
in
.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 57
Branching effort
Takes into account fanout.
Branching effort at one stage:
b = (C
onpath
+ C
offpath
/ C
onpath
)
Branching effort along path:
B = H b
i
.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 58
Path delay
Path effort:
F = GBH.
Path delay is sum of delays of gates
along the path:
D = E g
i
h
i
+ E p
i
= D
F
+ P.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 59
Sizing the transistors
Optimal buffer chains are
exponentially tapered:
f^ = F
1/N
.
Determine W/L of each gate on path
by working backward from the last
gate:
C
in,i
= g
i
C
out,
i / f^
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 60
Example: logical effort
Size transistors in a chain of three
two-input NAND gates.
First NAND is driven by minimum-size
inverter.
Last NAND is connected to 4X inverter.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 61
Example, contd.
Logical effort G = 4/3 * 4/3 * 4/3.
Branching effort = 1.
Electrical effort = 4.
F = G B H = 9.5.
Optimum effort per stage f^ = 2.1.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 62
Topics
Interconnect design.
Crosstalk.
Power optimization.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 63
Interconnect
Even assuming logic structure is
fixed, we can:
change wire topology;
resize wires;
add buffers;
size transistors.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 64
Multipoint nets
Two-point nets are easy to design.
Multipoint nets are harder:
How do we connect all the pins using
two-point connections?
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 65
Styles of wiring trees
source
sink 2
sink 1
Spanning tree
Steiner tree
Steiner point
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 66
Sized Steiner tree
source
sink 2
sink 1
Feeds both branches
Smaller currents in each branch
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 67
Buffer insertion in wiring trees
More complex than placing buffers
along a transmission line:
complex topology;
unbalanced trees;
differing timing requirements at the
leaves.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 68
Van Ginneken algorithm
Given:
placements of sources and sinks;
routing of wiring tree.
Place buffers within tree to minimize
the departure time at the source to
meet all the sink arrival times:
T
source
= min
i
(T
i
-D
i
)
T
i
= arrival time at node i, D
i
= delay to
node I.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 69
Delay calculation
Use Elmore model to compute delay
along path from source to sink.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 70
Recursive delay calculation
Recursively compute Elmore delay
through the tree.
Start at sinks, work back to source.
r, c are unit resistance/capacitance of
wire.
L
k
is total capacitive load of subtree
rooted at node k.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 71
Modifying the tree
Add a wire of length l at node k:
T
k
= T
k
- r/L
k
- 0.5rcl.
L
k
= L
k
+ cl.
Buffer node k:
T
k
= T
k
- D
buf
- R
buf
L
k
.
L
k
= C
buf
.
Join two subtrees m and n at node k:
T
k
= (T
m
, T
n
).
L
k
= L
m
+ L
n
.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 72
Crosstalk
Capacitive coupling introduces
crosstalk.
Crosstalk slows down signals to static
gates, can cause hard errors in
storage nodes.
Crosstalk can be controlled by
methodological and optimization
techniques.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 73
Coupling and crosstalk
Crosstalk current depends on
capacitance, voltage ramp.
w1 w2
C
c
i
c
t
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 74
Crosstalk analysis
Assume worst-case voltage swings,
signal slopes.
Measure coupling capacitance based
on geometrical alignment/overlap.
Some nodes are particularly sensitive
to crosstalk:
dynamic;
asynchronous.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 75
Coupling situations
sig1
a x r
better
worse
bus[0]
bus[1]
bus[2]
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 76
Layer-to-layer coupling
Long parallel runs on adjacent layers
are also bad.
bus[0]
siga
SiO
2
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 77
Methodological solutions
Add ground wires between signal
wires:
coupling to V
SS
, a stable signal,
dominates;
can use V
SS
to distribute power, so long
as power line is relatively stable.
Extreme caseadd ground plane.
Costs an entire layer, may be overkill.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 78
Ground wires
V
SS
sig1
V
SS
sig2
V
SS
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 79
Crosstalk and signal routing
Can route wires to minimize required
adjacency regions.
Take advantage of natural holes in
routing areas to decouple signals.
Minimizes need for ground signals.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 80
Crosstalk routing example
Channel:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 81
Assumptions
Take into account coupling only to
wires in adjacent tracks.
Ignore coupling of vertical wires.
Assume that coupling/crosstalk is
proportional to adjacency length.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 82
Bad routing
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 83
Good routing
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 84
Crosstalk analysis
Want to estimate delays induced by
crosstalk.
Effect of coupling capacitance C
c

depends on relative transitions.
Aggressor changes, victim does not: C
c
.
Aggressor, victim move in opposite
directions: 2C
c
.
Aggressor, victim move in same
direction: 0.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 85
Crosstalk analysis, contd.
Coupling effects depend on relative
switching time of nets.
Must use iterative algorithm to solve
for coupling capacitances and delays.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 86
Power optimization
Glitches cause unnecessary power
consumption.
Logic network design helps control
power consumption:
minimizing capacitance;
eliminating unnecessary glitches.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 87
Glitching example
Gate network:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 88
Glitching example behavior
NOR gate produces 0 output at
beginning and end:
beginning: bottom input is 1;
end: NAND output is 1;
Difference in delay between
application of primary inputs and
generation of new NAND output
causes glitch.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 89
Adder chain glitching
bad
good
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 90
Explanation
Unbalanced chain has signals arriving
at different times at each adder.
A glitch downstream propagates all
the way upstream.
Balanced tree introduces multiple
glitches simultaneously, reducing
total glitch activity.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 91
Signal probabilities
Glitching behavior can be
characterized by signal probabilities.
Transition probabilities can be
computed from signal probabilities if
clock cycles are assumed to be
independent.
Some primary inputs may have non-
standard signal probabilities control
signal may be activated only
occasionally.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 92
Delay-independent probabilities
Compute output probabilities of
primitive functions:
P
NOT
= 1 - P
in

P
OR
= 1 - H(1 P
i
)
P
AND
= H P
i

Can compute output probabilities of
reconvergent fanout-free networks by
traversing tree.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 93
Delay-dependent probabilities
More accurate estimation of glitching.
Glitch accuracy depends on accuracy
of delay model.
Can use simulation-style algorithms
to propagate glitches.
Can use statistical models coupled
with delay models.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 94
Power estimation tools
Power estimator approximates power
consumption from:
gate network;
primary input transition probabilities;
capacitive loading.
May be switch/logic simulation based
or use statistical models.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 95
Factorization for low power
Proper factorization reduces glitching.
bad good
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 96
Factorization techniques
In example, a has high transition
probability, b and c low probabilities.
Reduce number of logic levels
through which high-probability signals
must travel in order to reduce
propagation of glitches.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 97
Layout for low power
Place and route to minimize
capacitance of nodes with high
glitching activity.
Feed back wiring capacitance values
to power analysis for better
estimates.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 98
Topics
Switch networks.
Combinational testing.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 99
Boolean functions and switches
pseudo-AND
pseudo-OR
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 100
Driving switch outputs
If switch network output is not
connected to power supply through
switch path, output will float.
Switch network inputs may be
connected to power supply or logic
signals.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 101
Switching logic signals
b
a
b
a
ab + ab
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 102
Switch multiplexer
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 103
Charge sharing
Interior nodes in a switch network
may not be driven.
Charge can accumulate on small
parasitic capacitances.
Shared charge can produce erroneous
output values.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 104
Charge division
At undriven nodes, charge is divided
according to capacitance ratio.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 105
Charge sharing example
Long chains of switches have
intermediate nodes which may be
disconnected from power supplies.
C
ab
C
ia
C
bc
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 106
Charge over time
time i C
ia
a C
ib
b C
bc
c C
0 1 1 1 1 1 1 1 1
1 0 0 1 0 0 1 0 1
2 0 0 0 1/2 1 1/2 0 1
3 0 0 0 1/2 0 3/4 1
3/4
4 0 0 0 0 0 3/4 0
3/4
5 0 0 0 3/8 1 3/8 0
3/4
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 107
Avoiding charge sharing
Make sure that for every input
combination there is a path from the
power supply to the output.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 108
Manufacturing testing
Errors are introduced during
manufacturing.
Testing verifies that chip corresponds
to design.
Varieties of testing:
functional testing;
performance testing (binning chips by
speed).
Testing also weeds out infant
mortality.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 109
Testing and faults
Fault model:
possible locations of faults;
I/O behavior produced by the fault.
Good news: if we have a fault model,
we can test the network for every
possible instantiation of that type of
fault.
Bad news: it is difficult to enumerate
all types of manufacturing faults.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 110
Stuck-at-0/1 faults
Stuck-at-0/1: logic gate output is
always stuck at 0 or 1, independent
of input values.
Correspondence to manufacturing
defects depends on logic family.
Experiments show that 100% stuck-
at-0/1 fault coverage corresponds to
high overall fault coverage.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 111
Testing procedure
Testing procedure:
set gate inputs;
observe gate output;
compare fault-free and observed gate
output.
Test vector: set of gate inputs applied
to a system.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 112
Stuck-at faults in gates
a b OK SA0 SA1
0 0 1 0 1
0 1 1 0 1
1 0 1 0 1
1 1 0 0 1
a b OK SA0 SA1
0 0 1 0 1
0 1 0 0 1
1 0 0 0 1
1 1 0 0 1
NAND
NOR
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 113
Testing single gates
Three ways to test NAND for stuck-
at-0, only one way to test it for stuck-
at-1.
Three ways to test NOR for stuck-at-
1, only one way to test it for stuck-at-
0.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 114
Testing combinational networks
100% coverage: test every gate for
stuck-at-0;
stuck-at-1.
Assume that there is only one faulty
gate per network.
Most networks require more than one
test vector to test all gates.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 115
Multiple test example
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 116
Example
Can test both NANDs for stuck-at-0
simultaneously (abc = 000).
Cannot test both NANDs for stuck-at-
1 simultaneously due to inverter.
Must use two vectors.
Must also test inverter.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 117
Stuck-at-open/closed model
Models transistors always on/off.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 118
Stuck-open behavior
If t
1
is stuck open (switch cannot be
closed), there can be no path from
V
DD
to output capacitance.
Testing requires two cycles:
must discharge capacitor;
try to operate t
1
to see if capacitor can
be charged.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 119
Delay fault
Delay falls outside acceptable limits:
gate delay fault assumes that all delays
are lumped into one gate;
path delay fault models delay problems
along path through network.
Delay problems reduce yield:
performance problems;
functional problems in some types of
circuits.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 120
Combinational network testing
Two parts to testing:
controlling the inputs of (possibly
interior) gates;
observing the outputs of (possibly
interior) gates.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 121
Combinational testing example
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 122
Testing procedure
Goal: test gate D for stuck-at-0 fault.
First step: justify 0 values on gate
inputs.
Work backward from gate to primary
inputs:
w1 = 0 (A output = 0);
i1 = i2 = 1.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 123
Testing procedure, contd
Observe the fault at a primary output:
o1 gives different values if D is true/faulty.
Work forward and backward:
Fs other input must be 0 to detect true/fault.
Justify 0 at Es output.
In general, may have to propagate fault
through multiple levels of logic to primary
outputs.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 124
Fault masking
Redundant logic can mask faults:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 125
Redundancy example
Testing NOR for SA0 requires setting
both inputs to 0.
Network topology ensures that one
NOR input will always be 1.
Function reduces to 0:
f = (ab) + b = a + b + b = 0.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 126
Redundancies and testing
Redundant logic cannot be controlled.
Observations requiring control of
redundant logic may not be possible.
Redundant logic should be minimized
to eliminate redundancy.
Redundancies can introduce delay
faults and other problems.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 127
UNIT::3::Topics
Memory elements.
Basics of sequential machines.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 128
Memory elements
Stores a value as controlled by clock.
May have load signal, etc.
In CMOS, memory is created by:
capacitance (dynamic);
feedback (static).
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 129
Variations in memory elements
Form of required clock signal.
How behavior of data input around
clock affects the stored value.
When the stored value is presented to
the output.
Whether there is ever a combinational
path from input to output.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 130
Memory element terminology
Latch: transparent when internal
memory is being set from input.
Flip-flop: not transparentreading
input and changing output are
separate events.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 131
Clock terminology
Clock edge: rising or falling transition.
Duty cycle: fraction of clock period for
which clock is active (e.g., for active-
low clock, fraction of time clock is 0).
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 132
Memory element parameters
Setup time: time before clock during
which data input must be stable.
Hold time: time after clock event for
which data input must remain stable.
clock
data
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 133
Dynamic latch
Stores charge on inverter gate
capacitance:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 134
Latch characteristics
Uses complementary transmission
gate to ensure that storage node is
always strongly driven.
Latch is transparent when
transmission gate is closed.
Storage capacitance comes primarily
from inverter gate capacitance.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 135
Latch operation
| = 0: transmission gate is off,
inverter output is determined by
storage node.
| = 1: transmission gate is on,
inverter output follows D input.
Setup and hold times determined by
transmission gatemust ensure that
value stored on transmission gate is
solid.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 136
Stored charge leakage
Stored charge leaks away due to
reverse-bias leakage current.
Stored value is good for about 1 ms.
Value must be rewritten to be valid.
If not loaded every cycle, must
ensure that latch is loaded often
enough to keep data valid.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 137
Stick diagram
| |
V
DD
V
SS
D
Q
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 138
Layout
D Q
V
DD
V
SS
| |
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 139
Multiplexer dynamic latch
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 140
Non-dynamic latches
Must use feedback to restore value.
Some latches are static on one phase
(pseudo-static)load on one phase,
activate feedback on other phase.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 141
Recirculating latch
Static on one phase:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 142
Clocked inverter
symbol
circuit
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 143
Clocked inverter operation
| = 0: both clocked transistors are
off, output is floating.
| = 1: both clocked inverters are onn,
acts as an inverter to drive output.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 144
Clocked inverter latch
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 145
Regenerative latch
+
+
+
|
in
out
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 146
Clocked inverter latch operation
| = 0: i1 is off, i2-i3 form feedback
circuit.
| = 1: i2 is off, breaking feedback; i1
is on, driving i3 and output.
Latch is transparent when | = 1.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 147
Flip-flops
Not transparentuse multiple storage
elements to isolate output from input.
Major varieties:
master-slave;
edge-triggered.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 148
Master-slave flip-flop
|
D Q
master slave
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 149
Master-slave operation
| = 0: master latch is disabled; slave
latch is enabled, but master latch
output is stable, so output does not
change.
| = 1: master latch is enabled,
loading value from input; slave latch
is disabled, maintaining old output
value.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 150
Sequential machines
Use memory elements to make
primary output values depend on
state + primary inputs.
Varieties:
Mealyoutputs function of present state,
inputs;
Mooreoutputs depend only on state.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 151
Sequential machine definition
Machine computes next state N,
primary outputs O from current state
S, primary inputs I.
Next-state function:
N = o(I,S).
Output function (Mealy):
O = (I,S).
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 152
FSM structure
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 153
Constraints on structure
No combinational cycles.
All components must have bounded
delay.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 154
Signal skew
Machine data signals must obey setup
and hold timesavoid signal skew.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 155
Clock skew
Clock must arrive at all memory
elements in time to load data.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 156
Topics
Clocking disciplines.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 157
Flip-flop-based sequential
machines
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 158
Flip-flop rules
Primary inputs change after clock (|)
edge.
Primary inputs must stabilize before
next clock edge.
Rules allow changes to propagate
through combinational logic for next
cycle.
Flip-flop outputs hold current-state
values for next-state computation.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 159
Signals in flip-flop system
positive clock edge
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 160
Latch-based machines
Latches do not cut combinational
logic when clock is active.
Latch-based machines must use
multiple ranks of latches.
Multiple ranks require multiple phases
of clock.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 161
Two-sided latch constraint
Latch must be open less than the
shortest combinational delay.
Period between latching operations
must be longer than the longest
combinational delay.
Note: difference between shortest
and longest combinational delay may
be large (sum
0
vs. sum
31
).
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 162
Latch shoot-through
Latch may allow data to shoot through:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 163
Strict two-phase clocking
discipline
Strict two-phase discipline is
conservative but works.
Can be relaxed later with proper
knowledge of constraints.
Strict two-phase machine makes
latch-based machine behave more
like flip-flop design, but requires
multiple phases.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 164
Strict two-phase architecture
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 165
Two-phase clock
Phases must not overlap:
non-overlap region
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 166
Why it works
Each phase has a one-sided
constraint: phase must be long
enough for all combinational delays.
If there are no combinational loops,
phases can always be stretched to
make that section of the machine
work.
Total clock period depends on sum of
phase periods.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 167
Clocking types
Logic on different phases operate at
different timescant mix signals
from different phases.
Primary inputs must obey the same
rules as internal signals.
Clocking types are bookkeeping that
help us ensure that machine structure
is valid.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 168
Stable signals
A logic signal is always stable during
one phasephase in which the latch
which produced it is not active.
Easiest to think of machine behavior
in terms of stable signals, though
signals propagate while not stable.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 169
Signal types
Clocks are separate type: |
1
, |
2
.
Two types of stable data signal:
stable |
1
(s |
1
)
stable |
2
(s |
2
)
A stable signal has a complementary
valid signal:
stable |
2
(s |
2
) = valid |
1
(v |
1
)
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 170
Stable data signal
inactive clock
stable until latch
feeding this
logic goes active
stable |
2
becomes
valid at end of |
1
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 171
How clocking types combine
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 172
Clocking types in the two-phase
machine
combinational
logic
D Q
combinational
logic
D Q
I
1
(s |
2
)
|
1
O
1
(s |
2
)
I
2
(s |
1
)
O
2
(s |
1
)
s |
1
s |
2
|
2
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 173
Clocking type propagation
Combinational logic does not change
type of signal.
Primary inputs must be compatible.
Latches change signals from one
clock type to another.
In strict system, never mix clocks
with data signals in combinational
logic.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 174
Two-coloring
combinational
logic
D Q
combinational
logic
D Q
I
1
(s |
2
)
|
1
O
1
(s |
2
)
I
2
(s |
1
)
O
2
(s |
1
)
s |
1
s |
2
|
2
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 175
Example: shift register
Want to displace bit by n registers in
n cycles.
Each register requires two phases:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 176
Shift register layout
Forms a linear array:
c1(latch)
|
1
|
1

c2(latch)
|
2
|
2

c3(latch)
|
1
|
1

c4(latch)
|
2
|
2

V
DD
V
SS
in
out
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 177
Shift register operation
|
1
= 1, |
2
= 0
|
1
= 0, |
2
= 1
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 178
Non-strict disciplines
Some relaxation of the rules can be
useful:
reduce area;
increase performance.
Rules must be relaxed in a way that
ensures the machine will still work.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 179
Qualified clocks
Use logic to generate a clock signal
which is not always active.
Qualification must not introduce
glitches into the clockglitches
violate the fundamental definition of a
clock by introducing extra edges.
Use stable signals to qualify clocks.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 180
Uses of qualified clocks
May want to conditionally load a
register.
May qualify a clock to turn off
machine for low-power operation.
Latch must be not lose its value
during inactive period.
Difficult to ensure that logic value will
come high in timeuse quasi-static
latch.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 181
Recirculating latch
q|
1
|
2
s |
2
s |
2
s |
1
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 182
Qualified clocks and skew
Logic in the clocking path introduces
delay.
Delay can cause clock to arrive at
latches at different times, violating
clocking assumptions.
When designing qualification logic:
minimize and check skew;
sharpen clock edge.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 183
Qualification skew example
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 184
Topics
Sequential machine implementation:
clocking.
Sequential machine design.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 185
Clock period
For each phase, phase period must be
longer than sum of:
combinational delay;
latch propagation delay.
Phase period depends on longest
path.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 186
Unbalanced delays
Logic with unbalanced delays leads to
inefficient use of logic:
long clock period short clock period
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 187
Retiming
Retiming moves memory elements
through combinational logic:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 188
Retiming properties
Retiming changes encoding of values
in registers, but proper values can be
reconstructed with combinational
logic.
Retiming may increase number of
registers required.
Retiming must preserve number of
latches around a cyclemay not be
possible with reconvergent fanout.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 189
Advanced performance analysis
Latch-based systems always have
some idle logic.
Can increase performance by blurring
phase boundaries. Results in cycle
time closer to average of phases.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 190
Example with unbalanced
phases
One phase is much longer than the
other:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 191
Spreading out a phase
Compute only part of long paths in one
phase:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 192
Spreading out a phase, contd.
Use other phase for end of long logic
block and all of short logic block:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 193
Problems
Hard to debugcant stop the
system.
Hard to initialize system state.
More sensitive to process variations.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 194
Sequential machine design
Two ways to specify sequential
machine:
structure: interconnection of logic gates
and memory elements.
function: Boolean description of next-
state and output functions.
Best way depends on type of machine
being described.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 195
Counter
Easy to specify as one-bit counter.
Harder to specify n-bit counter
behavior.
Can specify n-bit counter as structure
made of 1-bit counters.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 196
One-bit counter
Truth table:

count C
in
next C
out
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 197
One-bit counter implementation
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 198
One-bit counter operation
All operations are performed as s|
2
.
XOR computes next value of this bit
of counter.
NAND/inverter compute carry-out.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 199
One-bit counter sticks
l1(latch) n(NAND) i(INV) x(XOR) l2(latch)
C
in
C
out
V
DD
V
SS
|
1
|
1
|
2
|
2

BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 200
n-bit counter structure
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 201
State transition graphs/tables
Basic functional description of FSM.
Symbolic truth table for next-state,
output functions:
no structure of logic;
no encoding of states.
State transition graph and table are
functionally equivalent.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 202
01 string recognizer
Behavior of machine which recognizes
01 in continuous stream of bits:

time 0 1 2 3 4 5
input 0 0 1 1 0 1
state bit1 bit2 bit2 bit1 bit1 bit2
next bit2 bit2 bit1 bit1 bit2 bit1
output 0 0 1 0 0 1
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 203
01 recognizer operation
Waits for 0 to appear in state bit1.
Goes into separate state bit2 when 0
appears.
If 1 appears immediately after 0,
cant have a 01 on next cycle, so can
go back to wait for 0 in state bit1.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 204
State transition table
Symbolic state transition table:

input present next output
0 bit1 bit2 0
1 bit1 bit1 0
0 bit2 bit2 0
1 bit2 bit1 1
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 205
State transition graph
Equivalent to state transition table:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 206
State assignment
Must find binary encoding for
symbolic statesstate assignment.
Choice of state assignment directly
affects both the next-state and
output logic:
area;
delay.
May also encode some machine
inputs/outputs.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 207
01 recognizer encoding
Choose bit1= 0, bit2 = 1:

input present next output
0 0 1 0
1 0 0 0
0 1 1 0
1 1 0 1
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 208
Logic implementation
After encoding, truth table can be
implemented in gates:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 209
Traffic light controller
Intersection of two roads:
highway (busy);
farm (not busy).
Want to give green light to highway
as much as possible.
Want to give green to farm when
needed.
Must always have at least one red
light.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 210
Traffic light system
highway
farm road
sensor
traffic
light
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 211
System operation
Sensor on farm road indicates when
cars on farm road are waiting for
green light.
Must obey required lengths for green,
yellow lights.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 212
Traffic light machine
Build controller out of two machines:
sequencer which sets colors of lights,
etc.
timer which is used to control durations
of lights.
Separate counter isolates logical
design from clock period.
Separate counter greatly reduces
number of states in sequencer.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 213
Sequencer state transition
graph
hwy-
green
farm-
green
hwy-
yellow
farm-
yellow
(cars & long) / 0 green red
cars & long / 1 green red
short /
0 yellow red
short / 1 yellow red
cars & long / 0 green red
cars & long / 1 green red
short /
0 red yellow
short/ 1 red yellow
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 214
Topics
State assignment.
Power optimization of sequential
machines.
Design validation.
Sequential testing.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 215
State assignment
Encoding bits in symbolic state =
state assignment.
State assignment affects:
combinational logic area;
combinational logic delay;
memory element area.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 216
State assignment in n-space
0
s1 code = 111
s2 code = 110
1
1
1
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 217
State assignment and delay
output
Next state
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 218
Power optimization
Memory elements stop glitch
propagation:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 219
Sequential testing
Much harder than combinational
testingcant set memory element
values directly.
Must apply sequences to put machine
in proper state for test, be able to
observe value of test.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 220
Example
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 221
Testing the machine
To test NAND for stuck-at-1, must set
both NAND inputs to 1.
Primary input i1 can be controlled
directly.
To set lower NAND input, must set
state to ps0 = ps1 = 1.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 222
Example state machine
State codes:
s0 = 11
s1 = 10
s2 = 01
s3 = 00
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 223
Controlling an FSM
Dont know initial state of machine.
Must find a sequence which drives
machine to required state
independent of initial state.
State sequence for test:
* -> s0 -> s1 -> s3.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 224
Time-frame expansion
A model for sequential test: unroll
machine in time.
Time frame expansion illustrates how
single-stuck-at fault in sequential
machine appears to be multiple-SA
fault.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 225
Time-frame expansion example
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 226
Unreachable states
State assignment may cause some
states to be unreachable.
As a result, it may not be possible to
apply some required test values.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 227
Unreachable state example
s
0

s
1

s
2

1/
0/
1/
0/ 0/
1/
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 228
Example
State codes:
s0 = 00
s1 = 01
s2 = 10.
This creates a fourth state which is
unreachable.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 229
Implemented FSM
00 01
10 11
1/ 0/
1/
0/ 0,1/
0/
1/
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 230
LSSD
LSSD = level-sensitive scan design.
Way to achieve full controllability,
observability of registers.
Links all registers in a scan chain.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 231
LSSD latch
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 232
Partial scan
Full scan is expensivemust roll out
and roll in state many times during a
set of tests.
Partial scan selects some registers for
scanability.
Requires analysis to choose which
registers are best for scan.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 233
UNIT::4::Topics
Shifters.
Adders and ALUs.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 234
Combinational shifters
Useful for arithmetic operations, bit
field extraction, etc.
Latch-based shift register can shift
only one bit per clock cycle.
A multiple-shift shifter requires
additional connectivity.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 235
Barrel shifter
Can perform n-bit shifts in a single
cycle.
Efficient layout.
Does require transmission gates and
long wires.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 236
Barrel shifter structure
Accepts 2n data inputs and n control
signals, producing n data outputs.
d
a
t
a

1

d
a
t
a

2

n bits
n bits
o
u
t
p
u
t

n bits
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 237
Barrel shifter operation
Selects arbitrary contiguous n bits out
of 2n input bits.
Examples:
right shift: data into top, 0 into bottom;
left shift: 0 into top, data into bottom;
rotate: data into top and bottom.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 238
Barrel shifter layout
Two-dimensional array of 2n vertical
X n horizontal cells.
Input data travels diagonally upward.
Output wires travel horizontally.
Control signals run vertically. Exactly
one control signal is set to 1, turning
on all transmission gates in that
column.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 239
Barrel shifter cell
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 240
Barrel shifter in action
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 241
Analysis
Large number of cells, but each one is
small.
Delay is large, considering long wires
and transmission gates.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 242
Adders
Adder delay is dominated by carry
chain.
Carry chain analysis must consider
transistor, wiring delay.
Modern VLSI favors adder designs
which have compact carry chains.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 243
Full adder
Computes one-bit sum, carry:
s
i
= a
i
XOR b
i
XOR c
i

c
i+1
= a
i
b
i
+ a
i
c
i
+ b
i
c
i
Ripple-carry adder: n-bit adder
built from full adders.
Delay of ripple-carry adder goes
through all carry bits.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 244
Carry-lookahead adder
First compute carry propagate,
generate:
P
i
= a
i
+ b
i

G
i
= a
i
b
i

Compute sum and carry from P and
G:
s
i
= c
i
XOR P
i
XOR G
i

c
i+1
= G
i
+ P
i
c
i
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 245
Carry-lookahead expansion
Can recursively expand carry
formula:
c
i+1
= G
i
+ P
i
(G
i-1
+ P
i-1
c
i-1
)
c
i+1
= G
i
+ P
i
G
i-1
+ P
i
P
i-1
(G
i-2
+ P
i-1
c
i-2
)
Expanded formula does not depend
on intermerdiate carries.
Allows carry for each bit to be
computed independently.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 246
Depth-4 carry-lookahead
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 247
Analysis
Deepest carry expansion requires
gates with large fanin: large, slow.
Carry-lookahead unit requires
complex wiring between adders and
lookahead unitvalues must be
routed back from lookahead unit to
adder.
Layout is even more complex with
multiple levels of lookahead.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 248
Carry-skip adder
Looks for cases in which carry out of
a set of bits is identical to carry in.
Typically organized into m-bit stages.
If a
i
= b
i
for every bit in stage, then
bypass gate sends stages carry input
directly to carry output.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 249
Two-bit carry-skip structure
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 250
Carry-select adder
Computes two results in parallel, each
for different carry input assumptions.
Uses actual carry in to select correct
result.
Reduces delay to multiplexer.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 251
Carry-select structure
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 252
Manchester carry chain
Precharged carry chain which uses P
and G signals.
Propagate signal connects adjacent
carry bits.
Generate signal discharges carry bit.
Worst-case discharge path goes
through entire carry chain.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 253
Manchester carry chain circuit
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 254
Serial adder
May be used in signal-processing
arithmetic where fast computation is
important but latency is unimportant.
Data format (LSB first):
0 1 1 0
LSB
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 255
Serial adder structure
LSB control signal clears the carry shift
register:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 256
ALUs
ALU computes a variety of logical and
arithmetic functions based on
opcode.
May offer complete set of functions of
two variables or a subset.
ALU built around adder, since carry
chain determines delay.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 257
Function block circuit
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 258
Function blocks and ALUs
Function block may be used to
compute required intermediate
signals for a full-function ALU.
Requires little area.
Transmission gates may introduce
significant delay.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 259
ALU structure
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 260
ALU design
P and G compute intermediate values
from inputs. May not correspond to
carry lookahead P and G for non-
addition functions.
Add unit is adder of choice.
Output unit computes from sum,
propagate signal.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 261
Topics
Multipliers.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 262
Elementary school algorithm
0 1 1 0 multiplicand
x 1 0 0 1 multiplier
0 1 1 0
+ 0 0 0 0
0 0 1 1 0
+ 0 0 0 0
0 0 0 1 1 0
+ 0 1 1 0
0 1 1 0 1 1 0
partial product
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 263
Word serial multiplier
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 264
Combinational multiplier
Uses n adders, eliminates registers:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 265
Array multiplier
Array multiplier is an efficient layout
of a combinational multiplier.
Array multipliers may be pipelined to
decrease clock period at the expense
of latency.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 266
Array multiplier organization
0 1 1 0
x 1 0 0 1
0 1 1 0
+ 0 0 0 0
0 0 1 1 0
+ 0 0 0 0
0 0 0 1 1 0
+ 0 1 1 0
0 1 1 0 1 1 0
product
skew array
for rectangular
layout
multiplicand
multiplier
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 267
Unsigned array multiplier
+
x0y0 x1y0 x2y0
xny0
0
x0y1
+
x1y1
0
+
x0y2
+
x1y2
+
0
+
P(2n-1)
P(2n-2)
P0
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 268
Baugh-Wooley multiplier
Algorithm for twos-complement
multiplication.
Adjusts partial products to maximize
regularity of multiplication array.
Moves partial products with negative
signs to the last steps; also adds
negation of partial products rather
than subtracts.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 269
Booth multiplier
Encoding scheme to reduce number
of stages in multiplication.
Performs two bits of multiplication at
oncerequires half the stages.
Each stage is slightly more complex
than simple multiplier, but
adder/subtracter is almost as
small/fast as adder.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 270
Booth encoding
Twos-complement form of multiplier:
y = -2
n
y
n
+ 2
n-1
y
n-2
+ 2
n-2
y
n-2
+ ...
Rewrite using 2
a
= 2
a+1
- 2
a
:
y = -2
n
(y
n-1
-y
n
) + 2
n-1
(y
n-2
-y
n-1
) + 2
n-
2
(y
n-3
-y
n-2
) + ...
Consider first two terms: by looking
at three bits of y, we can determine
whether to add x, 2x to partial
product.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 271
Booth actions
y
i
y
i-1
y
i-2
increment
0 0 0 0
0 0 1 x
0 1 0 x
0 1 1 2x
1 0 0 -2x
1 0 1 -x
1 1 0 -x
1 1 1 0
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 272
Booth example
x = 011001 (25
10
), y = 101110 (-
18
10
).
y
1
y
0
y
-1
= 100, P
1
= P
0
- (10 011001)
= 11111001110.
y
3
y
2
y
1
= 111, P
2
= P
1
+ 0 =
11111001110.
y
5
y
4
y
3
= 101, P
3
= P
2
- 0110010000 =
11000111110.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 273
Booth structure
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 274
Wallace tree
Reduces depth of adder chain.
Built from carry-save adders:
three inputs a, b, c
produces two outputs y, z such that y +
z = a + b + c
Carry-save equations:
y
i
= parity(a
i
,b
i
,c
i
)
z
i
= majority(a
i
,b
i
,c
i
)
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 275
Wallace tree structure
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 276
Wallace tree operation
At each stage, i numbers are
combined to form ceil(2i/3) sums.
Final adder completes the
summation.
Wiring is more complex.
Can build a Booth-encoded Wallace
tree multiplier.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 277
Serial-parallel multiplier
Used in serial-arithmetic operations.
Multiplicand can be held in place by
register.
Multiplier is shfited into array.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 278
Serial-parallel multiplier
structure
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 279
Topics
Memories:
ROM;
SRAM;
DRAM.
Datapaths.
PLAs.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 280
High-density memory
architecture
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 281
Memory operation
Address is divided into row, column.
Row may contain full word or more than
one word.
Selected row drives/senses bit lines in
columns.
Amplifiers/drivers read/write bit lines.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 282
Read-only memory (ROM)
ROM core is organized as NOR
gatespulldown transistors of NOR
determine programming.
Erasable ROMs require special
processing that is not typically
available.
ROMs on digital ICs are generally
mask-programmedplacement of
pulldowns determines ROM contents.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 283
ROM core circuit
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 284
Static RAM (SRAM)
Core cell uses six-transistor circuit to
store value.
Value is stored symmetricallyboth
true and complement are stored on
cross-coupled transistors.
SRAM retains value as long as power
is applied to circuit.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 285
SRAM core cell
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 286
SRAM core operation
Read:
precharge bit and bit high;
set select line high from row decoder;
one bit line will be pulled down.
Write:
set bit/bit to desired (complementary)
values;
set select line high;
drive on bit lines will flip state if
necessary.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 287
SRAM sense amp
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 288
Sense amp operation
Differential pairtakes advantage of
complementarity of bit lines.
When one bit line goes low, that arm
of diff pair reduces its current,
causing compensating increase in
current in other arm.
Sense amp can be cross-coupled to
increase speed.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 289
3-transistor dynamic RAM
(DRAM)
First form of DRAMmodern
commercial DRAMs use one-transistor
cell.
3-transistor cell can easily be made
with a digital process.
Dynamic RAM loses value due to
charge leakagemust be refreshed.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 290
3-T DRAM core cell
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 291
3-T DRAM operation
Value is stored on gate capacitance of
t
1
.
Read:
read = 1, write = 0, read_data is
precharged;
t
1
will pull down read_data if 1 is stored.
Write:
read = 0, write = 1, write_data = value;
guard transistor writes value onto gate
capacitance.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 292
Data paths
A data path is a logical and a physical
structure:
bitwise logical organization;
bitwise physical design.
Datapath often has ALU, registers,
some other function units.
Data is generally passed via busses.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 293
Typical data path structure
Slice includes one bit of function units,
connected by busses:
registers shift ALU
bus
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 294
Bit-slice structure
Many arithmetic and logical functions
can be defined recursively on bits of
word.
A bit-slice is a one-bit (or n-bit)
segment of an operation of minimum
size to ensure regularity.
Regular logical structure allows
regular physical structure.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 295
Abutting and pitch-matching
Cells in bit-slice may be abutted
togetherrequires matching positions
on terminals.
Pitch-matching is designing cells to
ensure that pins are at proper
positions for abutting.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 296
Wiring plans
A wiring plan shows layer
assignments and directions for major
signals.
Put most important signals on lowest-
impedance, accessible layers.
cell1 cell2 cell3
V
DD
V
SS
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 297
Bus circuits
Cannot support full connectivity
between all data path elements
must choose number of transfers per
cycle allowed.
A bus circuit is a specialized
multiplexer circuit.
Two major choices: pseudo-nMOS,
precharged.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 298
Pseudo-nMOS bus circuit
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 299
Precharged bus circuit
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 300
Programmable logic array (PLA)
Used to implement specialized logic
functions.
A PLA decodes only some addresses
(input values); a ROM decodes all
addresses.
PLA not as common in CMOS as in
nMOS, but is used for some logic
functions.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 301
PLA organization
AND plane OR plane
p1
p2
p3
p4
f
0
f
1
i
0
i
0
i
1
i
1

product term
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 302
PLA structure
AND plane, OR plane, inverters
together form complete two-level
logic functions.
Both AND and OR planes are
implemented as NOR circuits.
Pulldown transistors form
programming/personality of PLA.
Transistors may be referred to as
programming tabs.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 303
PLA AND/OR cell
programming
tab
no tab
V
SS
input 1 input 2
output 1
output 2
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 304
UNIT:5::Topics
Block placement.
Global routing.
Switchbox routing.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 305
Floorplanning strategies
Floorplanning must take into account
blocks of varying function, size,
shape.
Must design:
space allocation;
signal routing;
power supply routing;
clock distribution.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 306
data path
RAM
std cell
Bricks-and-mortar floorplan
blocks
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 307
Purposes of floorplanning
Early in design:
Prepare a floorplan to budget area, wire
area/delay. Tradeoffs between blocks
can be negotiated.
Late in design:
Make sure the pieces fit together as
planned.
Implement the global layout.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 308
Types of routing
Channel routing:
channel may grow in one dimension to
accommodate wires;
pins generally on only two sides.
Switchbox routing:
cannot grow in any dimension;
pins are on all four sides, fixing
dimensions of the box.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 309
Channels and switchboxes
channel switchbox
channel
switchbox
pins
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 310
Block placement
Blocks have:
area;
aspect ratio.
Blocks may be placed at different
rotations and reflections.
Uniform size blocks are easier to
interchange.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 311
Blocks and wiring
Cannot ignore wiring during block
placementlarge wiring areas may
force rearrangement of blocks.
Wiring plan must consider area and
delay of critical signals.
Blocks divide wiring area into routing
channels.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 312
Channel definition
Channels end at block boundaries.
Several alternate channel definitions
are possible:
A
B C
channel 1
ch 2
ch 1 ch 2
ch 3
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 313
Channel definition changes with
block spacing
Changing spacing changes relationship
between block edges:
A
B
C C
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 314
Channel graph
A
B
C
D
E
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 315
Channel graph usage
Nodes are channels, edges placed
between two channels that touch.
Channel graph shows paths between
channels.
Channel graph can be used to guide
global routing.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 316
Channels must be routed in
order
Wire out of end of one channel creates
pin on side of next channel:
channel A
channel B
constraint
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 317
Windmills
Can create an unroutable combination
of channels with circular constraints:
A
B
C
D
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 318
Slicable floorplan
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 319
Slicability property
A slicable floorplan can be recursively
cut in two without cutting any blocks.
A slicable floorplan is guaranteed to
have no windmills, therefore
guaranteed to have a feasible order
of routing for the channels.
Slicability is a desirable property for
floorplans.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 320
Global routing
Goal: assign wires to paths through
channels.
Dont worry about exact routing of
wires within channel.
Can estimate channel height from
global routing using congestion.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 321
Line probe routing
Heuristic method for finding a short
route.
Works with arbitrary combination of
obstacles.
Does not explore all possible paths
not optimal.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 322
Line probe example
A
A
line 1
line 2
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 323
Channel utilization
Want to keep all channels about
equally full to minimize wasted area.
Important to route time-critical
signals first.
Shortest path may not be best for
global wiring.
In general, may need to rip-up wires
and reroute to improve the global
routing.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 324
Switchbox routing
Cant expand a switchbox to make
room for more wiring.
Switchbox may be defined by
intersection of channels.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 325
Routing order and switchboxes
Switchboxes frequently need more
experimentation with wiring order
because nets may block other nets:
B
A
B
A
B blocks A
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 326
Topics
Power/ground routing.
Clock routing.
Floorplanning tips.
Off-chip connections.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 327
Power distribution
Must size wires to be able to handle
currentrequires designing topology
of V
DD
/V
SS
networks.
Want to keep power network in
metalrequires designing planar
wiring.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 328
Low-resistance jumper
We want to avoid this:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 329
Interdigitated power and
ground lines
V
DD
V
SS
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 330
Power tree design
Each branch must be able to supply
required current to all of its
subsidiary branches:
I
x
= E
b c x
I
b

Trees are interdigitated to supply
both sides of power supply.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 331
Planar power/ground routing
theorem
Draw a dividing line through each cell
such that all V
DD
terminals are on one
side and all V
SS
terminals on the
other.
If floorplan places all cells with V
DD
on same
side, there exists a routing for both V
DD
and
V
SS
which does not require them to cross.
cell
V
DD
V
DD
V
SS
V
SS
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 332
Planar routing theorem
example
A
B
C
V
DD

V
SS

V
DD

V
DD

V
DD

V
DD

V
SS

V
SS

V
SS

V
SS

cut line
cut line
no cut line
no connection
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 333
Power supply noise
Variations in power supply voltage
manifest themselves as noise into the
logic gates.
Power supply wiring resistance
creates voltage variations with
current surges.
Voltage drops on power lines depend
on dynamic behavior of circuit.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 334
Tackling power supply noise
Must measure current required by
each block at varying times.
May need to redesign power/ground
network to reduce resistance at high
current loads.
Worst case, may have to move some
activity to another clock cycle to
reduce peak current.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 335
Clock distribution
Goals:
deliver clock to all memory elements
with acceptable skew;
deliver clock edges with acceptable
sharpness.
Clocking network design is one of the
greatest challenges in the design of a
large chip.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 336
Clock delay varies with position
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 337
H-tree
|
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 338
Clock distribution tree
Clocks are generally distributed via
wiring trees.
Want to use low-resistance
interconnect to minimize delay.
Use multiple drivers to distribute
driver requirementsuse optimal
sizing principles to design buffers.
Clock lines can create significant
crosstalk.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 339
Clock distribution tree example
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 340
Floorplanning tips
Develop a wiring plan. Think about
how layers will be used to distribute
important wires.
Sweep small components into larger
blocks. A floorplan with a single NAND
gate in the middle will be hard to
work with.
Design wiring that looks simple. If it
looks complicated, it is complicated.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 341
Floorplanning tips, contd.
Design planar wiring. Planarity is the
essence of simplicity. It isnt always
possible, but do it where feasible (and
where it doesnt introduce
unacceptable delay).
Draw separate wiring plans for power
and clocking. These are important
design tasks which should be tackled
early.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 342
Off-chip connections
A package holds the chip. Packages
can introduce significant inductance.
Pads on the chip allow the wires on
chip to be connected to the package.
Pads are library components which
require careful electrical design.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 343
Structure of a typical package
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 344
Package structure
Package body is physical/thermal
support for chip.
Cavity holds chip.
Leads in package connect to pads,
provide substrate connection to chip.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 345
Some packages
DIP
PGA
PLCC
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 346
Pin inductance
Package pins have non-trivial
inductance.
Power and ground nets typically
require many pins to supply required
current through the packaging
inductance.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 347
Pin inductance example
Power circuit including pin indutance:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 348
Pin inductance example, contd
Voltage across pin inductance:
v
L
= L di
L
/ dt
Current surge into chip causes
inductive voltage drop:
L = 0.5 nH;
i
L
= 1A;
v
L
= 0.5 V.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 349
I/O architecture
Pads are placed on top-layer metal to
provide a place to bond to the
package.
Pads are typically placed around
periphery of chip.
Some advanced packaging systems
bond directly to package without
bonding wire; some allow pads across
entire chip surface.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 350
Pad frame architecture
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 351
Pad frame design
Must supply power/ground to each
pad as well as chip core.
Positions of pads around frame may
be determined by pinout
requirements on package.
Want to distribute power/ground pins
as evenly as possible to minimize
power distribution problems.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 352
Input pads
Main purpose is to provide
electrostatic discharge (ESD)
protection.
Gate voltage of transistor is very
sensitivecan be permanently
damaged by high voltage.
Static electricity in room is sufficient
to damage CMOS ICs.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 353
Input pad circuits
Resistor is used in series with pad to
limit current caused by voltage spike.
May use parasitic bipolar transistors
to drain away high voltages:
one for positive pulses;
another for negative pulses.
Must design layout to avoid latch-up.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 354
Output pad circuits
Dont need ESD protectiontransistor
gates not connected to pad.
Must be able to drive capacitive load
of pad + outside world.
May need voltage level shifting, etc.
to be compatible with other logic
families.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 355
Output pad circuit, contd.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 356
Three-state pad
Combination input/output, controlled
by mode input on chip.
Pad includes logic to disconnect
output driver when pad is used as
input.
Must be protected against ESD.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 357
Three-state pad circuit
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 358
Boundary scan
Boundary scan is a technique for
testing chips on boards. Pads on
chips are arranged into a scan chain
that can be used to observe and
control pins of all chips.
Requires some control circuitry on
pads along with an on-chip controller
and boundary-scan-mode control
pins.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 359
UNIT:6::Topics
Basics of register-transfer design:
data paths and controllers;
ASM charts.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 360
Register-transfer design
A register-transfer system is a
sequential machine.
Register-transfer design is
structuralcomplex combinations of
state machines may not be easily
described solely by a large state
transition graph.
Register-transfer design concentrates on
functionality, not details of logic design.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 361
Register-transfer system
example
A register-transfer machine has
combinational logic connecting
registers:
D Q
combinational
logic
D Q D Q
combinational
logic
combinational
logic
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 362
Block diagrams
Block diagrams specify structure:
wire bundle
of width 5
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 363
Register-transfer simulation
Simulates to clock-cycle accuracy.
Doesnt guarantee timing.
Important to get proper function of
machine before jumping into detailed
logic design. (But be sure to take into
account critical delays when choosing
register-transfer organization.)
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 364
Simulation coding
Hardware description languages are
typically supported by a simulation
system: VHDL, Verilog, etc.
Simulation engine takes care of
scheduling events during simulation.
Can hand-code a simulation in a
programming language.
Must be sure that register-transfer
events happen in proper order.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 365
Sample VHDL code
sync: process begin
wait until CLOCKevent and CLOCK=1;
state <= state_next;
end process sync;
combin: process begin
case state is
when S0 =>
out1 <= a + c;
state_next <= S1;
...
end process combin;
sync process models
registers
combin process models
combinational logic
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 366
Sample C simulator
while (TRUE) {
switch (state) {
case S0:
x = a + b;
state = S1;
next;
case S1:
...
}
}

loop executed once
per clock cycle
each case corresponds
to a state; sets outputs,
next state
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 367
Data path-controller systems
One good way to structure a system
is as a data path and a controller:
data path executes regular operations
(arithmetic, etc.), holds registers with
data-oriented state;
controller evaluates irregular functions,
sets control signals for data path.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 368
Data and control are equivalent
We can rewrite control into data and
visa versa:
control: if i1 = 0 then o1 <= a; else o1 <= b;
end if;
data: o1 <= ((i1 = 0) and a) or ((i1 = 1) and
b);
Data/control distinction is useful but
not fundamental.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 369
Data operators
Arithmetic operations are easy to
spot in hardware description
languages:
x <= a + b;
Multiplexers are implied by
conditionals. Must evaluate entire
program to determine which sources
of data for registers.
Multiplexers also come from sharing
adders, etc.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 370
Conditionals and multiplexers
if x = 0 then
reg1 <= a;
else
reg1 <= b;
end if;
code
register-transfer
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 371
Alternate data path-controller
systems
controller
data path
one controller,
one data path
controller
data path
controller
data path
two communicating
data path-controller
systems
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 372
ASM charts
An ASM chart is a register-transfer
description.
ASM charts let us describe function
without choosing a partitioning
between control and data.
Once we have specified the function,
we can refine it into a block diagram
which partitions data and control.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 373
Sample ASM chart
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 374
ASM state
An ASM state specifies a machine
state and a set of actions in that
state. All actions occur in parallel.
s1
x = a + b
y = c - d + e
o1 = 1
name of state (notation only)
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 375
Actions in state
Actions in a state are unconditionally
executed.
A state can execute as many actions
as you want, but you must eventually
supply hardware for all those actions.
A register may be assigned to only
once in a state (single-assignment
rule).
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 376
Implementing operations in an
ASM state
state with one addition
two additions requires two adders
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 377
Sequences of states
States are linked by transitions.
States are executed sequentially.
Each state may take independent
actions (including assigning to a
variable assigned to in a previous
state).
s1
x = a + b
s2
x = c + d
y = a + d
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 378
Data paths from states
Maximum amount of hardware in data
path is determined by state which
executes the most functionality.
Function units implementing data
operations may be reused across
states, but multiplexers will be
required to route values to the shared
function units.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 379
Function unit sharing example
mux allows +
to compute
a+b, a+c
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 380
Conditionals
Conditional chooses which state to
execute next based on primary input
or present state value.
Can be drawn in either of two ways:
a = b x
00 01 10 11
T
F
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 381
Execution of conditionals
An ASM chart describes a Moore
sequential machine. If the logic
associated with an ASM chart
fragment doesnt correspond to a
legal sequential machine, then it isnt
a legal ASM chart.
Conditional can evaluate only present
state or primary input value on
present cycle.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 382
Implementing an ASM branch in
a Moore machine
ASM chart
state transition
graph of
controller
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 383
Mealy machines and ASM
Mealy machine requires a conditional
output.
ASM notation for conditional output:
i1
0
y = c + d
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 384
Extracting data path and
controller
ASM chart notation helps identify
data, control.
Once you choose what values and
operations go into the data path, you
can determine by elimination what
goes into the controller.
Structure of the ASM chart gives
structure of controller state transition
graph.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 385
Data path-controller extraction
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 386
Topics
Modeling with hardware description
languages (HDLs).
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 387
Hardware description languages
Textual languages for describing
hardware:
structure;
function.
Most people today use textual
languages rather than schematics for
most digital design.
Schematics make poor use of screen
space.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 388
Major HDLs
Two major HDLs designed for
simulation:
VHDL;
Verilog.
Similar capabilities but somewhat
different language philosophies.
EDIF is a standard netlist format.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 389
Simulation vs. programming
Simulation tags computations with
times.
Must know when signals change to
properly simulate hardware.
Simulation is parallel.
Many statements can execute at the
same (simulation) time.
Just like hardware.

BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 390
Types of simulation
Compiled code simulation.
Generate program that evaluates a
hardware block.
Operational details within the hardware
block are lost.
Event-driven simulation.
Propagate events through simulation.
Dont simulate a block until its inputs
change.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 391
Event-driven simulation
An event is a
change in a nets
value.
An event has two
components:
value;
time.

time t=35 ns
net1=0 @ 35 ns
net
event
n
e
t
1

BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 392
Propagate events
only when nets
change value.
If an input change
doesnt cause an
output change, no
event is
propagated.
0
1
1
0
no
event
1
0
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 393
Timewheel
The timewheel is a data structure in
the simulator that efficiently
determines the order of events
processed.
Events are placed on the timewheel in
time order.
Events are taken out of the head of
the timewheel to process them in
order.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 394
Timewheel operation
a
b
c
1
0
1
a=1 @ 0 ns
netlist
timewheel
b=1 @ 1 ns
1
c=0 @ 2 ns
0
time
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 395
Order of evaluation
Order of evaluation is important.
Causality must be obeyed.
Evaluating events in the wrong order
can cause inaccurate results.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 396
Order of evaluation example
a
b
c
0
0
0
netlist
timewheel
b=1 @ 1 ns
1
d=1 @ 2 ns
1
d
e
1
e=0 @ 4 ns
0
1
time
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 397
Modeling
Structural modeling describes the
connections between components.
Netlists are structural models.
Behavioral models describes the
functional relationship between inputs
and outputs.
Similar to programming but values are
events.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 398
HDLs language constructs
Must be able to define component types.
A model may be behavioral or structural.
May be able to define abstract data types.
A wire may carry an enumerated value.
Multi-valued simulation may be defined using
abstract data types.
May be able to define modules to control
the scope of names.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 399
Testbenches
A testbench is a model used to
exercise a simulation.
Provides stimulus.
Checks outputs.
Testbenches help automate design
verification.
Rerun edited module against testbench.
Run models at behavioral, RTL levels
against the same testbench.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 400
Synthesis subsets
VHDL and Verilog were designed for
simulation.
A synthesis subset is:
synthesizable;
produces consistent simulation results.
Different tools may use different
synthesis subsets.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 401
Register-transfer synthesis
Most common type of synthesis.
Synthesizes gates from abstract RT
model.
Registers are explicit.
Some tools will infer storage elements---
be careful.
Optimized for performance, area,
power.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 402
Topics
VHDL register-transfer modeling:
basics using traffic light controller;
synthesis.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 403
VHDL
Combines a general-purpose
programming language and an HDL.
Modeled on Ada programming language.
VHDL is a rich language:
modules;
abstract data types.
VHDL is case-insensitive.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 404
Abstract data types
package lights is
---this is a comment
subtype light is bit_vector(0 to 1);
constant red : light : B00;
constant green : light : B01;
constant yellow : light : B10;
end lights;
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 405
VHDL entities
An entity defines the interface to the
module.
May plug various descriptions into the
entity interface:
behavioral;
RT;
gate.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 406
VHDL constants
Bit constant:
0, 1
Bit vector constant:
B0101
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 407
Traffic light entity declaration
entity tlc_fsm is
port( CLOCK: in BIT; -- machine clock
reset : in BIT; -- global reset
cars : in BIT; -- car signal
short, long : in BIT;
highway_light : out light := green;
farm_light : out light := red;
start_timer : out BIT
);
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 408
VHDL processes
A process is a unit of parallel execution.
All processes in an entity execute in parallel.
Processes are used to build up behavior.
Our RT model will have at least two
processes:
combinational process for the logic;
sequential process for the flip-flops.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 409
VHDL process example
combin : process(state,hg)
begin
highway_light <= green;
end process combin;
Sensitivity list
Event assignment
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 410
VHDL formulas
a and b Boolean AND
a or b Boolean OR
not a Boolean NOT
a <= b Signal assignment
a = b Equality
after 5 ns time



BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 411
VHDL data types
std_logic Binary signal
std_logic_vector Binary signal vector


BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 412
Operations in the process
if (b or c) = 1 then
y <= 1;
else
y <= 0;
if (b or c) = 1 then
y <= 1;
else
z <= a or b;
y assigned value
in both cases
different net assigned
in true, false cases
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 413
Conditional assignments
if (b or c) = 1 then
y <= 1;
else
z <= a or b;
Simulation:
Condition is tested
based on current
signal states.
Only one net gets
an event.
Synthesis:
Creates dont-cares
for y and z.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 414
Some useful constructs
avec: out std_logic_vector(11 downto 0)
vector
constant zerovec: std_logic_vector(0 to 7) :=
B00000000;
constant vector
sum <= a + b;
adder
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 415
Structure of a VHDL model
Library use statements.
Entity declaration.
Architecture declaration.
Processes, etc. that form the
architecture.
An entity may have multiple
instantiations.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 416
A synthesizable VHDL
archtiecture
Declarations of types and signals.
Combinational process.
May be several combinational processes
that communicate via signals.
Synchronous process.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 417
A synthesizable synchronous
process
sync: process(CLOCK)
begin
wait until CLOCKevent and CLOCK =
1;
ctrl_state <= ctrl_next;
end process sync;
Transfers next state to present state
Ensures evaluation on clock edge
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 418
Testbench structure
Unit under test
(UUT)
testbench
tester
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 419
VHDL testbed organization
Library calls.
Entity declaration.
Generally has no inputs or outputs.
Architecture section.
UUT is a component.
Testbench logic is a process.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 420
Testbench tester process
tester: process
begin
reset <= 1;
clock <= 0;
wait for 5 ns;
clock <= 1;
wait for 5 ns;
assert(highway_light = green);
Clock tick
Checks output of UUT
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 421
Topics
Verilog register-transfer modeling:
basics using traffic light controller;
synthesis.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 422
Verilog
Verilog was designed as an efficient
simulation language.
Relatively simple, terse syntax.
Most popular HDL in use today.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 423
Verilog formulas
a & b Boolean AND
a | b Boolean OR
~a Boolean NOT
a = b Assignment
a == b Equality
#1 time
a <= b Concurrent
assignment

BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 424
Verilog constants
Bit constant:
0, 1
Bit vector constant:
4b1010
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 425
Some useful constructs
define aconst 2b00
constant vector
$monitor($time,,a=%b, b=%b,a,b);
value monitor output
#1 a=0; b=0
#2 a=1; b=0
sequence of waveforms
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 426
Four-valued OR function
0 1 X z
0 0 1 x x
1 1 1 1 1
X x 1 x x
Z x 1 x x


BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 427
Four-valued AND function
0 1 X z
0 0 0 x x
1 0 1 x x
X x x x x
Z x x x x


BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 428
Verilog structural model
Module adder(a,b,cin,sum,cout);
input a, b, cin;
output sum, cout;
xor #2 s(sum,a,b,cin); // sum
and #1 // carry out
c1(x1,a,b); c2(x2,a,cin); c3(x3,b,cin);
or #1
c4(cout,x1,x2,x3);
endmodule
Time delay for output
Output
wire
Input wires
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 429
If statements
if (b | c) then
y = 1;
else
y <= 0;
if (b | c) then
y = 1;
else
z = a | b;
y assigned value
in both cases
different net assigned
in true, false cases
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 430
Conditional assignments
if (b | c) then
y = 1;
else
z = a | b;
Simulation:
Condition is tested
based on current
signal states.
Only one net gets
an event.
Synthesis:
Creates dont-cares
for y and z.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 431
Loop statement
A loop performs an operation over an
array of signals:
for (i=0; i<N; i=i+1)
x[i] = a[i] & b[i];
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 432
always statement
always guards execution of a block of
statements.
Block is always executed on the logical
condition.
always @(sigval) begin .. end
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 433
Structure of a Verilog model
Module statement.
Declares I/O pin names.
Declarations:
inputs and outputs;
registers.
Body.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 434
A synthesizable Verilog
archtiecture
Declarations of pins and registers.
Definitions of constants (similar to C
#define statement).
define GREEN 2b11
Combinational and sequential
portions.
Within @always statements.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 435
Verilog combinational portion
always @(ctrl_state or short or long or cars)
begin
when HG: begin // state hwy-green
highway_light = GREEN;
farm_light = RED;
if (cars & long) then
begin ctrl_next = HY; start_timer = 1; end
else begin ctrl_next - HG; start_timer = 0;
end
end
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 436
Verilog sequential portion
always @(posedge clock or negedge reset)
if (~reset)
ctrl_state <= 0;
else
ctrl_state <= ctrl_next;
end
Condition on clock/reset
Transfer of next state
to current state
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 437
Testbench structure
Unit under test
(UUT)
testbench
tester
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 438
Verilog testbed organization
Module declaration.
Two components: UUT and tester.
Definition of UUT.
Definition of tester.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 439
Testbench tester process
initial
begin
$monitor($time,,a=%b,a);
#1 a=0; b=0; cin=0;
#1 a=1; b=0; cin=0;
#2 a=1; b=1; cin=1;
end
endmodule
Test inputs
Prints signal values
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 440
Topics
High-level synthesis.
Architectures for low power.
Testability and architecture.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 441
High-level synthesis
Sequential operation is not the most
abstract description of behavior.
We can describe behavior without
assigning operations to particular
clock cycles.
High-level synthesis (behavioral
synthesis) transforms an unscheduled
behavior into a register-transfer
behavior.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 442
Tasks in high-level synthesis
Scheduling: determines clock cycle on
which each operation will occur.
Binding (allocation): chooses which
function units will execute which
operations.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 443
Functional modeling code in
VHDL
o1 <= i1 or i2;
if i3 = 0 then
o1 <= 1;
o2 <= a + b;
else
o1 <= 0;
end if;
clock cycle boundary can
be moved to design different
register transfers
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 444
Data dependencies
Data dependencies describe
relationships between operations:
x <= a + b; value of x depends on a, b
High-level synthesis must preserve
data dependencies.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 445
Data flow graph
Data flow graph (DFG) models data
dependencies.
Does not require that operations be
performed in a particular order.
Models operations in a basic block of
a functional modelno conditionals.
Requires single-assignment form.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 446
Data flow graph construction
original code:
x <= a + b;
y <= a * c;
z <= x + d;
x <= y - d;
x <= x + c;
single-assignment
form:
x1 <= a + b;
y <= a * c;
z <= x1 + d;
x2 <= y - d;
x3 <= x2 + c;
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 447
Data flow graph construction,
contd
Data flow forms directed acyclic graph
(DAG):
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 448
Goals of scheduling and
allocation
Preserve behaviorat end of
execution, should have received all
outputs, be in proper state (ignoring
exact times of events).
Utilize hardware efficiently.
Obtain acceptable performance.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 449
Data flow to data path-
controller
One feasible schedule for last DFG:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 450
Binding values to registers
registers fall on
clock cycle
boundaries
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 451
Choosing function units
muxes allow
function units
to be shared
for several
operations
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 452
Building the sequencer
sequencer requires three states,
even with no conditionals
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 453
Choices during high-level
synthesis
Scheduling determines number of
clock cycles required; binding
determines area, cycle time.
Area tradeoffs must consider shared
function units vs. multiplexers,
control.
Delay tradeoffs must consider cycle
time vs. number of cycles.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 454
Finding schedules
Two simple schedules:
As-soon-as-possible (ASAP) schedule
puts every operation as early in time as
possible.
As-late-as-possible (ALAP) schedule puts
every operation as late in schedule as
possible.
Many schedules exist between ALAP
and ASAP extremes.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 455
ASAP and ALAP schedules
ASAP
ALAP
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 456
Critical path of schedule
Longest path through data flow
determines minimum schedule
length:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 457
Operator chaining
May execute several
operations in sequence in
one cycleoperator
chaining.
Delay through function
units may not be additive,
such as through several
adders.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 458
Control implementation
Clock cycles are also known as
control steps.
Longer schedule means more states
in controller.
Cost of controller may be hard to
judge from casual inspection of state
transition graph.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 459
Controllers and scheduling
functional
model:
x <= a + b;
y <= c + d;
one state
two states
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 460
Distributed control
one centralized controller
two distributed controllers
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 461
Synchronized communication
between FSMs
To pass values between two machines, must schedule output
of one machine to coincide with input expected by the other:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 462
Hardwired vs. microcoded
control
Hardwired control has a state register
and random logic.
A microcoded machine has a state
register which points into a microcode
memory.
Styles are equivalent; choice depends
on implementation considerations.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 463
Data path-controller delay
Watch out for long delay paths created
by combination of data path and
controller:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 464
Architectures for low power
Two important methods:
architecture-driven voltage scaling
power-down modes
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 465
Architecture-driven voltage
scaling
Add extra logic to increase parallelism
so that system can run at lower rate.
Power improvement for n parallel
units over Vref:
P
n
(n) = [1 + C
i
(n)/nC
ref
+
C
x
(n)/C
ref
](V/V
ref
)
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 466
Power-down modes
CMOS doesnt consume power when
not transitioning. Many systems can
incorporate power-down modes:
condition the clock on power-down
mode;
add state to control for power-down
mode;
modify the control logic to ensure that
power-down/power-up dont corrupt
control state.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 467
Architecture testing
Want to make system as testable as
possible with minimum cost in
hardware, testing time.
Can use knowledge of architecture to
help choose testability points.
May want to modify architecture to
improve testability.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 468
Some scan latches are more
useful than others
Acyclic register-transfer graphs are
easy to test.
Register-transfers with feedback are
harder to teststate becomes
contaminated during test.
When choosing partial scan registers,
choose feedback paths first.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 469
Identifying partial scan
opportunities
Construct register graph, which
shows connections between registers:
nodes are registers;
edge between two nodes if there is a
combinational path between them.
Sequential depth is distance from
primary input to a node.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 470
Register graph example
machine
register graph
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 471
Analyzing register graphs
High sequential depth implies that the
register is harder to test.
Registers contained register-graph
cycles (FF2-FF3) are hard to test
(although self-loops are not hard).
Add partial scan registers to
effectively reduce sequential depth of
node and its neighbors.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 472
Built-in self test (BIST)
Includes on-chip machine responsible
for:
generating tests;
evaluating correctness of tests.
Allows many tests to be applied.
Cant afford large memory for test
resultsrely on compression and
statistical analysis.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 473
Generating vectors
Use a linear-feedback shift register to
generate a pseudo-random sequence
of bit vectors:
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 474
BIST architecutre
One LFSR to generates test sequence.
Another LFSR captures/compresses
results.
Can store a small number of signatures
which contain expected compressed
result for valid system.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 475
UNIT:7::Topics
Design methodologies.
Kitchen timer example.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 476
Design methodologies
Every company has its own design
methodology.
Methodology depends on:
size of chip;
design time constraints;
cost/performance;
available tools.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 477
Generic design flow
architectural
simulation
floorplan
register-transfer
design
logic
design
circuit
design
layout
functional/
performance
verification
testability
detailed
specs
tapeout
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 478
Specification and planning
Driven by contradictory impulses:
customer-centric concerns about cost,
performance, etc.;
forecasts of feasibility of cost and
performance.
Features, performance, power, etc.
may be negotiated at early stages;
negotiation at later stages creates
problems.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 479
Estimation and planning
Estimation techniques vary with
module:
memories may be generated once size is
known;
data paths may be estimated from
previous design;
controllers are hard to estimate without
details.
Estimates must include speed, area,
power.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 480
Floorplanning and budgeting
The purpose of early floorplanning is
to establish budgets for each major
component: area, delay, power, etc.
The project leader must ensure that
budgets are met at all times. If it
becomes clear that meeting a budget
for a component is impossible, the
floorplan must be redone ASAP.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 481
Logic design
For controllers, good state
assignment is usually requires CAD
tools.
Logic synthesis is an option:
very good for non-critical logic;
can work well for speed-critical logic.
Logic synthesis system may be
sensitive to changes in the input
specification.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 482
Circuit/layout design
Tasks:
size transistors;
draw layout.
Alternative design styles:
full custom logic (very tedious);
standard cell.
Full custom most likely for datapaths,
least likely for random logic off critical
path.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 483
Design validation
Must verify:
layout (design rule check = DRC);
circuit performance;
clock distribution;
functionality;
power consumption / power bussing.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 484
Testing
Automatic test pattern generation =
ATPG.
Must verify that circuit can be tested,
generate a compact set of
manufacturing test vectors.
Test vectors often comprised of
vectors taken from simulation +
ATPG-generated vectors.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 485
Tapeout
Tapeout: generating final files for
masks. Shipped to mask-making
house.
Pre-tapeout verification is importance
since it will take months to get results
from fab.
Tapeout party follows. Size of party
depends on importance of chip design
project.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 486
Kitchen timer chip
Simple example which illustrates
overall design process.
Kitchen timer keeps two independent
timers:
set minutes, seconds.
go, clear;
Not performance-sensitive; is power-
sensitive.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 487
Kitchen timer system
timer
chip
timer 1 timer 2 go
minutes seconds clear
seconds
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 488
Timer chip architecture sketch
buttons
enable
segments
buzzer
controller
timer 1 timer 1
buzz
display
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 489
Functional simulator
Given in Appendix C.
Operates in event-driven style:
seconds clock;
button depressions.
Provides basic functional verification,
allows exercising major architectural
components.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 490
Major design decisions
Use binary-coded decimal (BCD) to
represent times:
allows direct display of timer register
values;
requires a few more registers than binary,
but BCD/7-segment decoder is much
smaller than binary/7-segment decoder.
Use scanned displaysend only one
digit at a time to display to reduce
wiring between components.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 491
Kitchen timer component
hierarchy
timer chip
controller buzz timers display
timer 1 timer 2
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 492
Component inventory
Timers: Holds time in register; can
increment, decrement, clear.
Inputs: incr_seconds[2], incr_minutes[2],
seconds, go[2], digit_select[2], timer.
Outputs: done, digit[4].
Display: Cycles through displayed
digits.
Inputs: digit[4].
Outputs: digit_select[2], enable[4],
segments[7].
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 493
Component inventory (contd)
Buzz: Enables buzz signal until stop.
Inputs: done, stop. Outputs: buzz.
Controller: Generates all required
control signals.
Inputs: timer_1, timer_2, minutes_in,
seconds_in, clear_in, go_in.
Outputs: timer_select, incr_minutes, go,
clear, output_select.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 494
Component size estimates
One timer: 14 latches and about 30
gates.
Timers: 28 latches and 70 gates.
Display: 4 latches and about 15
gates.
Buzz: 2 latches and 2 gates.
Controller: 8 latches and 20 gates.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 495
Kitchen timer initial floorplan
timers
display
controller
buzz
4
4
4
1
4
7
1
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 496
Topics
CAD systems.
Simulation.
Placement and routing.
Layout analysis.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 497
CAD systems
Tools arent very useful if they dont
talk to each other.
Design interchange languages:
VHDL (TM), Verilog (TM) (function and
structure);
EDIF (netlists);
GDS, CIF (masks).
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 498
CAD tool interactions
database
tool 1 tool 2
tool 3 tool 4
database (hub-and-spoke) translator
tool 1 tool 2
tool 3 tool 4
xlate a
xlate c
xlate b
xlate e
xlate d
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 499
Back annotation
Often want to iteratively improve
design.
Back annotation updates a more-
abstract design with information from
later design stages.
Example: annotate logic schematic with
extracted parasitic Rs and Cs.
Back annotation requires tools to
know more about each other.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 500
Event-driven simulation
Event-driven simulation is designed
for digital circuit characteristics:
small number of signal values;
relatively sparse activity over time.
Event-driven simulators try to update
only those signals which change in
order to reduce CPU time
requirements.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 501
Event-driven simulator
structure
An event is a change in a signal
value.
A timewheel is a queue of events.
Simulator traces structure of circuit to
determine causality of eventsevent
at input of one gate may cause new
event at gates output.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 502
Event-driven simulation
example
A
B
C
D
logic network behavior
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 503
Event-driven simulation
example, contd
Events at primary inputs:
A changes at t=1;
B changes at t=2.
Immediate causality:
C changes at t=3 when both inputs to
NOR are 0.
Event propagation:
D changes at t=4.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 504
Delay models
Unit-delay simulators assume that
each component has a one-unit delay.
Model function but not performance.
Variable-delay simulators allow each
component to have its own delay.
Accuracy of performance estimates from
variable-delay simulators depends on
how well circuits can be extracted to
digital model.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 505
Switch simulation
Special type of event-driven
simulation optimized for MOS
transistors.
Treats transistor as switch. Takes
capacitance into account to model
charge sharing, etc.
Can also be enhanced to model
transistor as resistive switch.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 506
Switch simulation example
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 507
Switch simulation example,
contd
Node g may be connected to either
power supply, but signals on that
node are terminated by gate of
transistor.
To solve for values of a and b nodes,
must first solve for value of g node.
If g=1, then a=b.
If g=0, other parts of circuit determine a
and b independently.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 508
Switch simulation and charge
sharing
Closed transistor connects source and
drain nodes. Want to determine
voltages of source/drain nodes taking
into account capacitance.
Capacitance determines node size.
Use size of connected nodes to
determine new value of nodes.
Result may be X (unknown).
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 509
Layout synthesis
Two critical phases of layout design:
placement of components on the chip;
routing of wires between components.
Placement and routing interact, but
separating layout design into phases
helps us understand the problem and
find good solutions.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 510
Placement metrics
Quality metrics for layout:
area;
delay.
Area and delay deterined in part by
wiring.
How do we judge a placement
without wiring? Estimate wire length
without actually performing routing.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 511
Wire length as a quality metric
bad placement good placement
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 512
Wire length measures
Estimate wire length by distance
between components.
Possible distance measures:
Euclidean distance (sqrt(x
2
+ y
2
));
Manhattan distance (x + y).
Multi-point nets must be broken up
into trees for good estimates.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 513
Placement techniques
Can construct an initial solution,
improve an existing solution.
Pairwise interchange is a simple
improvement metric:
Interchange a pair, keep the swap if it
helps wire length.
Heuristic determines which two
components to swap.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 514
Placement by partitioning
Works well for components of fairly
uniform size.
Partition netlist to minimize total wire
length using min-cut criterion.
Partitioning may be interpreted as 1-
D or 2-D layout.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 515
Min-cut bisecting partitioning
partition 1 partition 2
A
B
C
D
3 nets
1 net
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 516
Min-cut bisecting partitioning,
contd
Swapping A and B:
B drags 1 net;
A drags 3 nets;
total cut increase: 4 nets.
Conclusion: probably not a good
swap, but must be compared with
other pairs.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 517
Kernighan-Lin algorithm
Compute min cut criterion:
count total net cut change.
Algorithm exchanges sets of nodes to
perform hill-climbingfinding
improvements where no single swap
will improve the cut.
Recursively subdivide to determine
placement detail.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 518
Simulated annealing
Powerful but CPU-intensive
optimization technique.
Analogy to annealing of metals:
temperature determines probability of a
component jumping position;
probabilistically accept moves.
start at high temperature, cool to lower
temperature to try to reach good
placement.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 519
Routing
Major phases in routing:
global routing assigns nets to routing
areas;
detailed routing designs the routing
areas.
Net ordering is a major problem.
Order in whch nets are routed
determines quality fo result. Net
ordering is a heuristic.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 520
Maze routing
Will find shortest path for a single
wire, if such a path exists.
Two phases:
Label nodes with distance, radiating from
source.
Use distances to trace from sink to
source, choosing a path that always
decreases distance to source.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 521
Maze routing example
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 522
Detailed routing
Dogleg router breaks net into multiple
segments as needed.
Try to minimize number of dogleg
segments per net to minimize
congestion for future nets.
One good heuristicuse left-edge
criterion on each dogleg segment to
fill up the channel.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 523
Rivest-Fiduccia channel router
Routes from left to right. Assigns all nets
that cross the current column to tracks.
Heuristics:
Make connections to pins.
Add jogs to put multi-track net into one
track.
Add jogs to reduce distance in multi-
track nets.
Add jogs to move net toward next pin.
Add tracks when necessary.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 524
YACR2
Tries to minimize number of vias as
well as number of tracks.
Temporarily satisfies vertical
constraints by adding blank space
between pins.
Eliminates blank space ater by adding
jobs.
May route in both directions on same
layer.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 525
Layout analysis
Test design rules using Boolean
combinations of masks, grow/shrink.
M1
M2
M1 and M2
not (M1 or M2)
M1
M2
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 526
Scan line algorithm
Mark each edge of polygon with
direction.
Sweep scan line across layout.
At each point on scan line, count
number of left-hand and right-hand
edges to determine what rectangle
that point is in.
BHASKER REDDY k VLSI ppts for M.Tech and B.Tech 527
Scan line algorithm example
M1
M2
sweep
a
b

Das könnte Ihnen auch gefallen