Atpg 2
Atpg 2
D Algorithm
D Algorithm plus/Minus
• + D Algorithm is complete ATPG
• Guarantee to generate a pattern for testable fault
We only need to
backtrace to the
headlines to
reduce the number
of decisions
• Bound Line:- Line fed directly or indirectly by fanout
stem
• Free Line:- Line that is not Bound
• Objectives: {k=0, m=1}
• Backtrace from k=0 may favor b=0, but simulate(b=0) would
violate the second objective m=1!
• Makes backtrace more intelligent to avoid future conflicts
•
•
• Direct implications for f=1:
▪ {d=1, e=1, g=1, j=1, k=1}
• Direct implications for j=0:
▪ {h=0, g=0, f=0, w=1, w=0, z=0}
• Direct implications for f=1:
• {d=1, e=1, g=1, j=1, k=1}
• Indirect Implications for f=1 obtained by simulating the
direct implications of f=1:
• {x=1}
• This is repeated for every node in the circuit
• Direct and indirect implications for f=1:
▪ {d=1, e=1, g=1, j=1, k=1, x=1}
• Ext. Back. Implications obtained by
enumerating cases for unjustified gates
▪ Unjustified gates: {d=1}
• In order to justify d=1, need either a=1 or b=1
▪ Simulate(a=1, impl(f=1)) = Sa
▪ Simulate(b=1, impl(f=1)) = Sb
• Intersection of Sa and Sb is the the set of ext. back. Implications for f=1
▪ f=1 implies {z=0}
• This is repeated for every unjustified gate, as well as for every node in
the circuit
• Static Implications are computed one time for entire
circuit; Dynamic Implications are derived during
ATPG.
• Suppose c=1 has already been assigned
▪ Then to obtain z=0, b must be 0
▪ This is the intersection of having either d=0 or e=0 in the
presence of c=1
• A sequential circuit has memory in addition to
combinational logic.
• Test for a fault in a sequential circuit is a sequence of
vectors, which
• Initializes the circuit to a known state
• Activates the fault, and
• Propagates the fault effect to a primary output
• Methods of sequential circuit ATPG
• Time-frame expansion methods
• Simulation-based methods
Huffman’s model of a FSM
● Sequential ATPG
○ Generate test pattern for
sequential circuit
○ without DFT or scan
Assumptions: Sequential ATPG
▪ Control only PI: Flip-Flops are not controllable
• Assumption
• No SCAN allowed
■ control Pi and observe Po
• Faults only in CL only
■ No fault in FF or latch
•
● Idea: Replicate circuits and connect time frames by wires
○ yi = “States”; No FF
○ Replace clock cycles by space
● Become Combinational ATPG problem
○ NOTE: Target fault appears in every time frame
1. Select a target fault
2. Create a copy of the combinational logic, set it to time frame 0
3. Generate a test for f for time frame 0 using D Algorithm
4. If the fault effect is propagated to the FF’s, continue the fault
effect propagation in the next time frame
5. If there are values required in the FF outputs, continue the
justification in the previous time frame
● STEP 2: Create Time frame 0
● STEP 3: generate a test
○ a0=1; y1=0; Y1=D’
● STEP 4: Fault effect propagation to time frame 1
○ a1=1
● STEP 5: Fault activation back to time frame -1
○ a-1=0
● SA0 at input of OR
● No way to propagate
○ This fault is untestable by sequential ATPG
● Endless timeframe expression
○ Memory explosion..!
Extended D-Algorithm
Extended D-algorithm Fails!
Time frame -1 Time frame 0
b a conflict 1 b a0 z
z
x sa1 x sa1 D’ D D’
0
1
0
0 1 D’ 0
0
Y0 Over-specified!!
0
0 1 D’ 0
0
Y0 Over-specified!!
⚫ Traditional 5-valued logic (0/0, 1/1, x/x, 0/1, 1/0) is NOT sufficient
◆ cannot express 1/x, 0/x, x/0, x/1
D (1/0) 1 0 1 0
D’ (0/1) 0 1 0 1
0 (0/0) 0 0 0 0
1 (1/1) 1 1 1 1
X (x/x) X X X X
G0 (0/x) - - 0 X
G1 (1/x) - - 1 X
F0 (x/0) - - X 0
F1 (x/1) - - X 1
Nine-valued Truth Table
⚫ Example of AND gate
0/1
1/X
0/X
0/X 1/X 0/1 0/0
0/X
a b
V1 0 0
Test pattern successfully generated
V2 0 1
Comparison: 9 v.s. 5 valued
9-valued
0/X 0/X 1/X 0/1
b a b a
z z
x sa1 x sa1 0/1 1/0
0/X 0/1
1/X
0
0 1/X 0/1 0/0
0/X
5-valued
b a conflict 1b a0
z z
x sa1 x sa1 D’
D D’
0 1
0
0 1 D’ 0
0
Over-specified!!
8
Simulation-Based Methods
⚫ Idea: use logic/fault simulators to guide ATPG [Seshu 62]
◆ Simulation is faster than ATPG
⚫ Approach
◆ Generate candidate test vectors
◆ Fitness* of candidates evaluated by logic or fault
simulation
◆ Select best candidate based on a certain cost function
⚫ Advantage:
◆ No time frame expansion. Easy memory management
C 110 10 2
FF 01
C
0
A X DD0
110 SA0 AB cost = distance
D’D’1 of D or D’ to PO
K
010 111 J 10 0
B
C 000 11 0
FF 00
C1
A 0D’0 01
010 AB
D’01
K
001 D’D’1 J 00 0
B
X
C SA1 DD0 10 1
FF 01
C
0
Need Phase 3
⚫ Experience shows test patterns for all stuck-at faults are
usually clustered instead of being evenly distributed
⚫ When only a few faults are left, their tests will be isolated
vectors and we need a different test generation strategy
* K is a chosen constant
CA and DC Example
⚫ CA(g1 stuck-at 0) = DC1(g1) =10 easier
⚫ CA(g2 stuck-at 1) = DC0(g2) =100
(0,16)
(10,0) g1
1 0 0
0
(0,4) (0,10)
0 (0,4) (0,10)
0
1 0
X
FF
(DC0, DC1) = (6,0) X
(100,10)
(100,104) g2
Propagation Cost, CP
⚫ Cp(g) = Dynamic Observability of node g
⚫ Dynamic observability (DO)
◆ Similar to combinational observability in SCOAP
◆ Measure the effort to observe the fault on a
given node
– the number of gates between N and PO’s, and
– the minimum number of PI assignments
required to propagate the logical value on
node N to a primary output.
Dynamic Observability (DO)
⚫ Similar to combinational observability in SCOAP
DO(A)
A
C DO(C) + DC1(B) + 1
B
A
C DO(C) + DC0(B) + 1
B
A C DO(C) + 1
C1
A min[DO(C1),DO(C2)]
C2
Primary outputs 0
Cp and DO Example
⚫ Cp(g1) = DO(g1) =1
⚫ Cp(g2) = DO(g2) =1
DO = 1
DC=(0,16)
(10,0) g1 0 0
1
0
DC=(0,4) 0 DO=0
(0,4) DC=(0,4) DO = 1
DO=1
0 DO = 101
1 X
FF DO=0
DC=(DC0, DC1) = (6,0) g2
X
DC=(100,104)
DO = 1
Total Cost
⚫ Fault g1: CA = 10, Cp= 1
⚫ Fault g2: CA = 100, Cp=1
❑ Choose g1 SA0 as target fault to generate test vector
DO = 1
DC=(0,16)
(10,0) g1 0 0
1
0
DC=(0,4) 0 DO=0
(0,4) DC=(0,4) DO = 1
DO=1
0 DO = 101
1 X
FF DO=0
DC=(DC0, DC1) = (6,0) g2
X
DC=(100,104)
DO = 1
• Random and weighted-random ATPG are the simplest forms
of simulation-based ATPG
01x011001 01111001
Summary
⚫ Simulation-based methods
◆ Randomly generate many trial test vectors
◆ Evaluate test vectors by simulation and pick the best
◆ Need many testability measure to help smart decision
⚫ Advantages
◆ Better memory management than time frame expansion
◆ Timing can be considered
◆ Use genetic algorithm to optimize
⚫ Disadvantages
◆ Cannot identify untestable faults
◆ Test length can be longer than time frame expansion