Combinational_ATPG
Combinational_ATPG
1
Test Generation
• Introduction
• Random Test Generation
• Theoretical Foundations
• Deterministic Combinational ATPG
• Deterministic Sequential ATPG
• Untestable Fault Identification
• Simulation-based ATPG
• ATPG for Delay and Bridge Faults
2
Introduction
• Test generation is the bread-and-butter in VLSI
Testing
▪ Efficient and powerful ATPG can alleviate high costs of DFT
▪ Goal: generation of a small set of effective vectors at a low
computational cost
• ATPG is a very challenging task
▪ Exponential complexity
▪ Circuit sizes continue to increase (Moore’s Law)
– Aggravate the complexity problem further
▪ Higher clock frequencies
– Need to test for both structural and delay defects
3
Conceptual View of ATPG
• Generate an input vector that can distinguish the
defect-free circuit from the hypothetically defective one
4
Simple illustration of ATPG
• Consider the fault d/1 in the defective circuit
• Need to distinguish the output of the defective circuit
from the defect-free circuit
• Need: set d=0 in the defect-free circuit
• Need: propagate effect of fault to output
• Vector: abc=001 (output = 0/1)
5
Stuck-at fault test generation
s-a-0
PI justify y
propagate PO
6
Basic Problem
• Inputs
○ Acircuit netlist
○ A fault list F
• Outputs
○ A set of test vectors T to detect the faults in F
○ A list of undetected faults
7
Motivation
• Drastically reduce the number of required test vectors
as compared to naive approach
• Some example
○ 4 input AND gate
■ Need 5 vectors as compared to 16
● {0111,1011,1101,1110,1111}
○ 5 input XOR gate
■ Need 2 vectors as compared to 32
● {00000,11111}
8
A Typical ATPG System
• Given a circuit and a fault model
▪ Repeat
■ Generate a test for each undetected fault
■ Drop all other faults detected by the test using a fault
simulator
■ Until all faults have been considered
9
How to arrive at a test set?
10
Generating test vector from Truth Table
● How to generate test for s-a-0 fault ?
11
Random Test Generation
• Take a random vector as test vector.
• Calculate the performance of the circuit with & without
faults.
• Identify all the faults that can affect the output for this
test vector.
• Remove the covered faults from the fault list.
• If there are some more faults in the fault list, take
another random vector and repeat the process until the
fault list becomes empty.
12
Random Test Generation
• Simplest form of test generation
▪ N tests are randomly generated
13
Flow diagram of RTG
14
Fault-targeted Test Generation(FTG)
• Here we start with a vector which can detect a specified fault.
15
RTG & FTG
• The fault targeted simulation is a slow process
initially compared to RTG.
17
Boolean Difference Example
• To excite the fault y/0, set y=1
• Thus, synonymous to propagating
the fault effect at node y to
the primary output f
18
Boolean Difference Equation
• The Boolean difference of f with respect to y is written
as
19
Another Example
xyz=001, 101
can detect w/0
But:
20
A Third Example
• Fault: z/0
21
Deterministic ATPG
• In general, we don’t need an entire set of vectors that can detect
the target fault
• Rather than using Boolean Difference that can obtain all vectors
▪ Simply use a branch-and-bound search to find one vector quickly
22
Exhaustive Algorithm
n
• For n-input circuit, generate all 2 input patterns
• Infeasible, unless circuit is partitioned into cones of
logic, with 15 inputs
≤
– Perform exhaustive ATPG for each cone
– Misses faults that require specific activation patterns for multiple
cones to be tested
23
Algorithm Completeness
• Definition: Algorithm is complete if it ultimately can
search entire binary (decision) space, as needed, to
generate a test
24
5-valued Algebra for Comb. Circuits
• Instead of using two circuits (fault-free and the
faulty)
▪ We will solve the ATPG problem on one single circuit
25
Boolean Operators on 5-Valued Algebra
● Five valued logic (0,1,D,D’,X)
○ D = 1/0, 1 in fault free circuit and 0 in faulty circuit
○ D’ = 0/1, 0 in fault free circuit and 1 in faulty circuit
○ X means ‘Not yet specified’ in ATPG
26
Terms used
• Singular Cover
• D Drive
• D Frontier
• J Frontier
• Consistency
• Backtracking
• Implications
27
D-Frontier
28
J-Frontier
• J-Frontier: All gates whose outputs are specified by
are not justified by the input assignments
29
Idea Behind D Algorithm
● Create D frontier (fault activation)
● Drive D-frontier towards output (fault effect propagation)
● Justify J-frontier
● Backtrack if any conflict occurs
30
Primitive D-Cubes for a Fault (PDCF)
•
31
Singular Cover (SC)
● Minimum gate assignments for gate output = 0 or
=1
32
Propagation D-Cube (PDC)
● Minimum gate assignments required to propagate
a D or D’ from gate input to gate output
33
D-Drive
● D-Drive selects an element in D-frontier
○ an attempts to propagate D or D’ from gate input to
gate output
○ using propagation D-Cube
34
Implications
● Forward Implications
○ partially (or fully) specified input values uniquely determines
the output values
● Backward Implications
○ Knowing the output values (and some input values) can
uniquely determine the unspecified input values
● Examples
36
Justification
• Justification may fail when there are fanout branches
37
D Algorithm
• Can handle arbitrary combinational circuits, with
internal fanout structures
• Initially, all circuit nodes are X, except for the fault cite,
where a fault effect (D or D-bar) is placed.
38
D-Algorithm Steps
• Use D-algebra
• Activate fault
• Place a D or D’ at fault site
• Justify all signals
• Repeatedly propagate D-chain toward POs through a gate
• Justify all signals
• Backtrack if
• A conflict occurs, or
• All D-chains die
• Stop when
• D or D’ at a PO, i.e., test found, or
• Search exhausted, no test possible
39
Step 1 - Fault A sa0
• Step 1 – Fault activation – Set A = 1
D
1 D
D-frontier = {e, h}
40
Step 2 – D Drive
• Step 2 – D Drive – Set f = 0
D 0
1 D
D
41
Step 3 – D Drive
• Step 3 – D Drive – Set k = 1
D
D 0
1 D
D
42
Step 4 – Consistency
• Step 4 – Consistency – Set g = 1
1 1
D
D 0
1 D
D
43
Step 5 – Consistency
• Step 5 – Consistency – f = 0 already set
1 1
D
D 0
1 D
D
44
Step 6 – Consistency
• Step 6 – Consistency – set c = 0, e = 0
1 1
0
D
0 0
D
1 D
D
45
Step 7 – Test Found
• Step 7 – Consistency – Set B = 0
• Test: A = 1, B = 0, C = 0, D = X
1 1
0
0 D
0 0
D
1 D
D
46
D Algorithm
47
D Algorithm drawback
• Decision making process involves entire circuit
• Every gate could be a decision point
48
PODEM (Path-Oriented Decision Making)
• Also a branch-and-bound search
50
X-Path used by PODEM
51
PODEM Example
53
55
54 CChV.E2S-T,DIeITsiHgnYDfoERrATeBsAtDability- P.
55
Another PODEM Example
55
FAN (Fanout Oriented)
• PODEM reduced the number of decision points
significantly but it is still high