Digital Design Notes
Digital Design Notes
Spring 2013
5 6
CORRECT PASS/FAIL
Comparator
RESPONSES
7 8
Test Systems Purpose of Testing
Verify manufactured circuits
Improve system reliability
Reduce repair costs
Repair cost goes up by an order of magnitude each step
away from the fab. line
1000
1000
500
100
Cost 100
Cost 50
Per per 10
Fault fault
(Dollars)
10
5
(dollars) 1
1
0.5
IC Board System Warranty
IC Test
Test Board
Test System
Test Warranty
Repair
Test Test Repair
B. Davis, “The Economics of Automatic Testing” McGraw-Hill 1982
9 10
Rejects
11 12
Defect Level Defect Level vs. Fault Coverage
A defect level is the fraction of the
Defect Level
1.0
shipped parts that are defective Y = 0.1
Y = 0.01
0.8 Y = 0.25
DL = 1 – Y(1-T) 0.6
Y = 0.5
0.4
Y = 0.75
15 16
The Infamous Design/Test Wall Outline
30-years of experience proves that
test after design does not work!
Fault Modeling
Oops!
What does Fault Simulation
Functionally correct! this chip do?!
We're done!
Automatic Test Pattern Generation
Design Engineer
Test Engineer
17 18
19 20
Fault Modeling vs. Physical Defects
Fault Modeling vs. Physical Defects (cont’d)
Fault modeling Electrical effects
Model the effects of physical defects on the Shorts (bridging faults)
logic function and timing Opens
Transistor stuck-on/open
Resistive shorts/opens
Physical defects Change in threshold voltages
Silicon defects
Photolithographic defects Logical effects
Logical stuck-at-0/1
Mask contamination
Slower transition (delay faults)
Process variation
AND-bridging, OR-bridging
Defective oxides
21 22
1
PLA faults 1/0
1
stuck-at-0
23 24
Multiple Stuck-At Faults Why Single Stuck-At Fault Model ?
Several stuck-at faults occur at the same Complexity is greatly reduced
Many different physical defects may be modeled by the
time same logical single stuck-at fault
Common in high density circuits Stuck-at fault is technology independent
Can be applied to TTL, ECL, CMOS, BiCMOS etc.
Design style independent
For a circuit with k lines Gate array, standard cell, custom design
There are 2k single stuck-at faults Detection capability of un-modeled defects
There are 3k-1 multiple stuck-at faults Empirically, many un-modeled defects can also be
detected accidentally under the single stuck-at fault
A line could be stuck-at-0, stuck-at-1, or fault-free
model
One out of 3k resulting circuits is fault-free
Cover a large percentage of multiple stuck-at
faults
25 26
Wide applications x
The derived tests may be used for physical faults whose effect s-a-1 Z1=X1X2 Z2=X2X3
on circuit behavior is not completely understood or too X2
complex to be analyzed Z1f =X1 Z2f =X2X3
Popularity Z2
X3
Stuck-at fault is the most popular logical fault model
Sensitized path
Input vector 1011 detects the fault f (G2 stuck-at-1)
A path composed of sensitized wires is called a
sensitized path v/vf : v = signal value in the fault free circuit
vf = signal value in the faulty circuit
29 30
31 32
Test Set Typical Test Generation Flow
Complete detection test set Start Select next target fault
A set of tests that detects any detectable fault in a
designated set of faults
Generate a test (to be discussed)
Quality of a test set for the target fault
33 34
35 36
Equivalence Fault Collapsing Equivalent Fault Group
n+2, instead of 2(n+1), single stuck-at In a combinational circuit
faults need to be considered for n-input Many faults may form an equivalence group
These equivalent faults can be found in a reversed
AND (or OR) gates topological order from POs to PIs
s-a-1
s-a-1 s-a-0 x
s-a-1 s-a-1
s-a-0 s-a-0
s-a-1 s-a-0 Three faults shown are equivalent !
37 38
Test() is dominated by
Test() Dominance fault collapsing
Reducing the set of faults to be analyzed based on the
dominance relation
39 40
Stem vs. Branch Faults Analysis of a Single Gate
Detect A s-a-1: Fault Equivalence Class
z(t)zf(t) = (CDCE)(DCE) A
(A s-a-0, B s-a-0, C s-a-0) C
= DCD (C=0,D=1)
Fault Dominance Relations B
Detect C s-a-1: (C s-a-1 > A s-a-1) and
z(t)zf(t) = (CDCE)(DE) D (C s-a-1 > B s-a-1)
(C=0,D=1,E=0) or x AB C A B C A B C
A Faults that can be ignored:
(C=0,D=0,E=1) sa1 sa1 sa1 sa0 sa0 sa0
C x A s-a-0, B s-a-0, and C s-
Hence, C s-a-1 does not B
a-1 00 0 1
dominate A s-a-1 x
01 0 1 1
E
In general, there might be no
10 0 1 1
equivalence or dominance C: stem of a multiple fanout 11 1 0 0 0
relations between stem and A, B: branches
branch faults
41 42
a s-a-0
s-a-1 a d s-a-0
a s-a-1
b d s-a-1
d
e s-a-0
c e e s-a-1
43 44
Fault Collapsing Flow Prime Fault
is a prime fault if every fault that is
Sweeping the netlist from PO to PI Equivalence
Start
to find the equivalent fault groups analysis
dominated by is also equivalent to
Sweeping the netlist Dominance
to construct the dominance graph analysis
Representative Set of Prime Fault (RSPF)
A set that consists of exactly one prime fault
Discard the dominating faults from each equivalence class of prime faults
True minimal RSPF is difficult to find
Select a representative fault from
each remaining equivalence group
47 48
Why Inputs + Branches Are Enough ? Fault Collapsing + Checkpoint
Example Example:
Checkpoints are marked in blue 10 checkpoint faults
Sweeping the circuit from PI to PO to examine every a s-a-0 <=> d s-a-0 , c s-a-0 <=> e s-a-0
gate, e.g., based on an order of (A->B->C->D->E) b s-a-0 > d s-a-0 , b s-a-1 > d s-a-1
For each gate, output faults are detected if every input
fault is detected 6 faults are enough
A a a
d
D f
B
h
b
g
E e
C
c
49 50
Fault Simulation
Part of an ATPG program
A vector usually detects multiple faults
Automatic Test Pattern Generation Fault simulation is used to compute the faults
that are accidentally detected by a particular
vector
Design for Testability
To construct fault-dictionary
For post-testing diagnosis
51 52
Conceptual Fault Simulation Some Basics for Logic Simulation
Patterns Response
In fault simulation, our main concern is functional faults;
(Sequences) Comparison
gate delays are assumed to be zero unless delay faults are
(Vectors) Faulty Circuit #n (D/0) considered
Pick an event
Evaluate its effect #Fault (F)
#Pattern (P)
Schedule the newly born events
in the event-queue, if any
0 F1(s-a-0)
×
1
F2(s-a-0)
1
×
57 58
59
F/0 60
Deductive Fault Simulation Illustration of Fault List Propagation
Simulate all faulty circuits in one pass
For each pattern, sweep the circuit from PIs to POs. LA A
During the process, a list of faults is associated with Consider a two-input AND-gate: C LC
LB B
each wire
The list contains faults that would produce a fault effect
on this wire
The union fault list at every PO contains the detected Non-controlling case: Case 1: A=1, B=1, C=1 at fault-free,
faults by the simulated input vector LC = LA LB {C/0}
Controlling cases: Case 2: A=1, B=0, C=0 at fault-free,
Main operation is fault list propagation LC = (LA LB) {C/1}
Depending on gate types and values Case 3: A=0, B=0, C=0 at fault-free,
The size of the list may grow dynamically, leading to the
potential memory explosion problem LC = (LA LB) {C/1}
A G
1
B C
J
0 x
E 1 x 1
D
H
1
F
x
B C
B C J
x J 0 x
0
x E 1 x 1
E 1 1
D
D H
1 x
H 1
F
x
F
LB = {B/1}, LF = {F/0}, LA = , LC = LD = {B/1} LB = {B/1}, LF = {F/0}, LA = , LC = LD = {B/1},
Fault lists at G and E: LG = {B/1, G/1} , LE = {B/1, E/0}
LG = (LA LC) G/1 = {B/1, G/1} Fault list at H:
LE = (LD) E/0 = {B/1, E/0} 65 LH = (LE LF) LH = {B/1, E/0, F/0, H/0} 66
Fault Simulation
69 70
abc z z
000 0 0
001 0 0 Input vectors (1,1,0) and (1,1,-) are fully
010 0 0 and partially specified test patterns of
011 0 0 fault , respectively.
100 0 0
101 1 1
110 1 0
111 1 0
71 72
Structural Test Generation Structural Test Generation
D-Algorithm D-Algorithm
Test generation from circuit structure Fault activation
Two basic goals
(1) Fault activation (FA) Setting the faulty signal to either 0 or 1 is a Line Justification
(2) Fault propagation (FP) problem
Both of which requires Line Justification (LJ), i.e., finding input combinations that
force certain signals to their desired values
Fault propagation
Notations: 1. select a path to a PO decisions
1/0 is denoted as D, meaning that good-value is 1 while faulty value is 0 2. once the path is selected a set of line justification (LJ)
Similarly, 0/1 is denoted D’ problems are to be solved
Both D and D’ are called fault effects (FE)
Line justification
Involves decisions or implications
1 a fault activation Incorrect decisions: need backtracking
1/0
1 b
f To justify c=1 a=1 and b=1 (implication) a
c
To justify c=0 a=0 or b=0 (decision) b
0 fault propagation
0 c
73 74
77 78
j 1 j 1
e'0 e' 0
n n
e G2 e G2
1 D 1 k D
a 0 g D k a 0 g D
b 1 D’ ≠ 1 b 1 D’ (next D-frontier chosen)
c 1 c 1
l Conflict at k l
f' 1 Backtrack !
f' 0 1
Conflict at m
Backtrack !
f f
m 1 m
1 81 D’ ≠ 1 82
85 86
F F F S F S F F 87 88
PODEM Algorithm PODEM Algorithm
Objective Backtrace
Objective routine involves Backtrace routine involves
selection of a D-frontier, G finding an all-x path from objective site to a PI, i.e.,
selection of an unspecified input gate of G every signal in this path has value x
PODEM Algorithm
PI Assignment PODEM Algorithm
PODEM () /* using depth-first-search */
PIs: { a, b, c, d } a begin
Current Assignments: { a=0 } 0 If(error at PO) return(SUCCESS);
Decision: b=0 objective fails If(test not possible) return(FAILURE);
Reverse decision: b=1 (k, vk) = Objective(); /* choose a line to be justified */
Decision: c=0 objective fails 0
b (j, vj) = Backtrace(k, vk); /* choose the PI to be assigned */
1
Reverse decision: c=1 Imply (j, vj); /* make a decision */
Decision: d=0 If ( PODEM()==SUCCESS ) return (SUCCESS);
failure c Imply (j, vj’); /* reverse decision */
0 1
If ( PODEM()==SUCCESS ) return(SUCCESS);
failure Imply (j, x);
Failure means fault effect cannot be d
propagated to any PO under current Return (FAILURE);
PI assignments 0 end
S
91 92
PODEM Algorithm (1/4) PODEM Algorithm (2/4)
Example Example
h 1 Select D-frontier G2 and h 1 Select D-frontier G3 and
d' 0 set objective to (k,1) d' 0 set objective to (e,1)
d e = 0 by backtrace d No backtrace is needed
1 break the sensitization 1 Success at G3
i D’ i D’
G1 across G2 (j=0) G1
Backtrack !
j 0 j 1
e' 1 e' 0
n n
e G2 e G2
0 k 1 1 k
a 0 g D a 0 g D G3
b 1 1 b 1
c 1 c 1
l l
f' f'
f f
m m
G4
93 94
success 97 98
99 100
Why DFT ? Design for Testability
Direct testing is way too difficult ! Definition
Large number of FFs Design for testability (DFT) refers to those design
techniques that make test generation and testing cost-
Embedded memory blocks effective
Embedded analog blocks
DFT methods
Ad-hoc methods, full and partial scan, built-in self-test
(BIST), boundary scan
Cost of DFT
Pin count, area, performance, design-time, test-time,
etc.
101 102
103 104
Control Point Insertion Control Point Selection
Goal
0 w Controllability of the fanout-cone of the added
C1 MUX C2 point is improved
1
CP Common selections
CP_enable Control, address, and data buses
Inserted circuit for controlling line w Enable/hold inputs
Enable and read/write inputs to memory
Normal operation:
When CP_enable = 0
Clock and preset/clear signals of flip-flops
Inject 0: Data select inputs to multiplexers and
Set CP_enable = 1 and CP = 0 demultiplexers
Inject 1:
Set CP_enable = 1 and CP = 1
105 106
Common choice
Stem lines with more fanouts X Z
Global feedback paths
Shift-register R1 Shift-register R2
Redundant signal lines X’ Z’
Output of logic devices having many inputs
MUX, XOR trees
Output from state devices
Address, control and data buses
control Observe
107 108
What Is Scan ? Scan Concept
Objective
To provide controllability and observability at internal Combinational
state variables for testing Logic
Mode Switch
(normal or test)
Method
Add test mode control signal(s) to circuit Scan In
Connect flip-flops to form shift registers in test mode
Make inputs/outputs of the flip-flops in the shift register FF
controllable and observable
Types FF
Internal scan
Full scan, partial scan, random access
Boundary scan
FF
109
Scan Out 110
Logic Design before Scan Insertion Logic Design after Scan Insertion
MUX
MUX
D D
MUX
scan-input Q Q D Q
11 11 11
clock
scan-enable
clock
Sequential ATPG is extremely difficult:
due to the lack of controllability and observability at flip-flops. Scan Chain provides an easy access to flip-flops
111
Pattern generation is much easier !! 112
Scan Insertion Overhead of Scan Design
Example Case study
3-stage counter
#CMOS gates = 2000
Combinational Logic
Fraction of flip-flops = 0.478
input q1 output Fraction of normal routing = 0.471
q2 g stuck-at-0
pins q3 pins
Scan Predicted Actual area Normalized
q1
q2
q3 implementation overhead overhead operating
frequency
D D D
Q Q Q None 0 0 1.0
11 11 11
Hierarchical 14.05% 16.93% 0.87
clock Optimized 14.05% 11.9% 0.91
It takes 8 clock cycles to set the flip-flops to be (1, 1, 1), for detecting
the target fault g stuck-at-0 fault (220 cycles for a 20-stage counter !) 113 114