Professional Documents
Culture Documents
Outline - Automatic Test Pattern Generation: - Test Generation Systems - Test Generation For Combinational Ckts
Outline - Automatic Test Pattern Generation: - Test Generation Systems - Test Generation For Combinational Ckts
0 1
1
The ATPG Problem
• Problem definition: Given a logical fault model, and
a circuit, determine a small set of test vectors
that detect all faults in the circuit.
• Problem complexity: Under the stuck-at fault
model, the problem is NP-complete even for
combinational circuits
– However, commercial test generators that
efficiently generate tests for >10M-gate ckts
are in use today.
2
A Simple Example
G2
D G5
f1
G1
A a
G6
B X
C f2
s.a.1
G3
Line Justification
H G3
A
F
G4
G2
• E s-a-1 ⇒ E =0
C
D
E G1
3
Completeness of ATPG Algorithms
G3
G1
A
B x
d s.a.0 G6
f
G4
d
G5
E
• d s-a-0 : ⇒ A = B = 1
• Propagate along G3, G6 requires C =1, G2 = G4 = G5 = 1.
– In order for G4 = 1 either E = 0 or G1 = 0 ⇒
inconsistency
⇒ E = 0, B = 1 ⇒ G5 = 0 ⇒ inconsistency
• Propagate along G4, G6 ⇒ E = 1 & G2 = G3 = G5 = 1
– G2 = 1 ⇒ C = 1, ABC = 111 ⇒ G3 = 0 inconsistency
⇒ No test
© K.T. Tim Cheng, 05_comb_tg, v1.0 8
4
But Boolean Difference Method
Finds Test ABCD=(1111)!!
G2
1
C
1 0
G1 G3
1 0/1 G6
A d
1/0
B s-a-0 1/0
1 1/0 G4
0/1
1 0 G5
E 1
1 0 G5
E 1
5
The D-Algebra
• Need to be able to deal with multiple “errors” at
the inputs to a gate.
• D represents a signal which has value 1 in normal
(fault-free, good) ckt, and value 0 in faulty ckt.
(I.e. D ≡ 1/0); Similarly, D ≡ 0/1
D D D D D 0
D D D
D D D D D 1
D D D
Primitive D-cubes
• Specifies the minimal input conditions which must
be applies to a logic element E in order to produce
an error signal at the output of E
Propagation D-cubes
• The propagation D-cubes of a logic element E
specify minimal input conditions which are
required to propagate an error signal on an input
(or inputs) to the output of that element.
6
8 G4
An Example
H
J 9 10 G5
G1 12
A 1 5 G3
7
B s.a.0
2 G6
13
F 11
G2
G1 s-a-0 :
6
C 3
E 4
1 2 3 4 5 6 7 8 9 10 11 12 13
primitive D-cube 1 1 D
primitive cubes of G2 0 X X 1
X 0 X 1
X X 0 1
1 1 1 0
primitive cubes of G3 1 X 1
X 1 1
0 0 0
primitive cubes of G4 1 X 1
X 1 1
0 0 0
primitive cubes of G5 X 0 0
0 X 0
1 1 1
primitive cubes of G6 0 X 0
X 0 0
1 1 1
The D-Algorithm
1) Select a primitive D-cube of the fault
2) Implication and checking for inconsistency.
If inconsistency occurs, go to (1).
3) D-drive: selects an element in D-frontier & attempts to propagate
D or D in its inputs to its output.
D-frontier consists of set of all elements whose output values
are unspecified but inputs have some signals with D or D.
D-drive is done by intersecting the test cube with a
propagation D-cube of the selected element.
Backtrack, i.e. select another propagation D-cube, if
intersection is null.
4) Implication of D-drive: perform implication for the new test cube.
5) Repeat 3) & 4) until faulty signal propagated to an output.
6) Line justification: Consistency check on input conditions required.
7
D-Algorithm Example
8 G4
H
J 9 10 G5
G1 12
A 1 5 G3
7
B s.a.0
2 G6
13
F 11
G2
6
C 3
E 4
8 G4
H
J 9 10 G5
G1 12
A 1 5 G3
7
B s.a.0
2 G6
13
F 11
G2
6
C 3
E 4 1 2 3 4 5 6 7 8 9 10 11 12 13
initial test cube ti 1 1 D
propagation D-cube of G3 D 0 D
test cube after D-drive 1 1 D 0 D
through G3 = tc'
perform implication 1 1 1 1 D 0 D
8
• Now D-frontier is G5 & G6
• Select G5 and a propagation D-cube of G5
1 2 3 4 5 6 7 8 9 10 11 12 13
perform implication 1 1 1 1 D 0 D
propagation D-cube of G5 D 1 D
Test cube after D-drive 1 1 1 1 D 0 D 1 D
Line justification 1 1 1 1 D 0 D 1 1 D
or 1 1 1 1 D 0 D 1 1 D
8 G4
H
J 9 10 G5
G1 12
A 1 5 G3
7
B s.a.0
2 G6
13
F 11
G2
6
C 3
E
© K.T.4Tim Cheng, 05_comb_tg, v1.0 17
9
Line Justification
Begin
yes
Select an unjustified
line and a primitive cube
C to justify the line
1 2 3 4 5 6 7 8 9 10 11 12
10
Potential Problems with D-Algorithm
• Since the assignment of values is allowed to internal
lines, more than one choice is available at such internal
line/gate and backtracking could occur at each gate
• Could result in inefficiency for large ckts and some
special classes of ckts.
• Example: An ECAT (error-correction-&-translation) ckt
A H
B s.a.0
C
E J
N
F K
P
G R
• Example:
First, a binary value is
assigned to an unassigned PI A
B
H s.a.0
fault site: A = 1
C
E J
forward implication): A= 1 L
cause no implication
Next, assign B = 1 M
A = B = 1 ⇒ imply H = D
11
PODEM Decision Tree for the Example
Start
B=0 B=1
C
E J
N
C=1 F K
G R
Q
E=1 L
E=0
F=0 M
F=1
G=0
G=1
Test has been
Successfully
generated
PODEM
• Essentially a process of finding a PI & a binary
value for initial assignment.
• Continue assigning PI values, checking to see if the
error is being propagated to outputs (after each
PI assignment, perform forward implication)
• If at any stage, either the fault cannot be excited
or the error cannot be propagated further,
backtrack to the most recent PI assignment and
change it.
12
Flowchart of PODEM
Start
Assign a binary value
to an unassigned PI
Steps in PODEM
(1) Determine an initial objective. If the fault
effect has not appeared at fault site, the initial
objective is directed toward providing the fault
effect on the faulty line.
(2) Given the initial objective, a PI & a logic value are
chosen that have a good likelihood of meeting the
object.
– Done using the backtrace procedure.
13
Flowchart of Backtrace
begin
Is
Found PI objective line
initial assignment
yes fed by a A
is the current
objective value no (fed by PI ?
gate G)
Current OR/NAND & V=1
objective value V AND/NOR & V=0
Exit and type of gate driving Next obj line is
objective the input of G
OR/NAND & V=0 line ? which is at x
AND/NOR & V=1 and is the
easiest to control
Next obj line is
the input of G Is G
which is at x a NAND/NOR
and is the gate ?
hardest to control yes
no
Next obj value Next obj value
is the same as is the complement
the current of the current
objective value objective value
A
© K.T. Tim Cheng, 05_comb_tg, v1.0 27
A PODEM Example
• Backtrace to PI : X2 = 1 G1
X1
• Initial objective: (0, G2) G5
X2 G8
• Backtrace: X3 = 1 X3
G2
s-a-1 Z1
G6
• Implication: G2 = D X4
• D-frontier is { G5, G6 } G3
G7
• Attempt to propagate through G5
– Require X1 = 1
• Implication: G1 = 0, G4 = 1, G5 = D
• Attempt to propagate D through G8
14
A PODEM Example – Cont’d
• Initial objective: ( 1, G6 )
• Backtrace to set X4 = 0
• Implication: G3 = 1, G7 = 0 & G8 = 1 ⇒ failed in propagating error
• Backtrack to most recent PI assignment ⇒ reassign X4 = 1
• Implication: G3 = 0, G6 = D, G8 = D ⇒ Test is generated
G4
X2 = 1
G1
X3 = 1
X1
G5
X2 G8
Decision tree G2
Z1
X1 = 1 X3 s-a-1
G6
X4
X4 = 1 X4 = 0
G3
test is found conflict & G7
backtrack
Cost of ATPG
15
Accelerating Comb. ATPG
Basic goals:
• Reduce number of backtracks
• Reduce processing between backtracking
Basic tools:
• Topological analysis
• Multiple backtrace
• Learning
16
Boolean Satisfiability Approach
A A
A C
C C
B B
(C + A) * (C + B) * (C +A + B) (C + A) * (C + B) * (C + A + B) (C + A) * (C + A )
17
Step 1: Extracting the formula – Cont’d
(a) Construct the formula of the good circuit output X
A
(D+A) *
(D+B) *
(D+A+B)
B
(X+D) *
(X+E) * X
(X+D+E)
C (C+E) *
(C+E)
D'
(X'+D') *
(X'+E) * X'
(X'+D'+E)
C (C+E) *
(C+E)
(X+D)x(X+E)x(X+D+E)x(D+A)x(D+B)x(D+A+B)x(C+E)x(C+E)
From (b):
(X’+D’)x(X’+E)x(X’+D’+E)xD’
From (c):
(V1+X)x(V1+X’)x(V1+X+X’)x(V2+X)x(V2+X’)x(V2+X+X’)x(BD+V1)x(BD+V2)x
(BD+V1+V2)xBD (note: BD=X⊕X’=(X+X’)x(X+X’)=V1xV2)
18
Step 2: Satisfying the Formula
- Boolean Satisfiability
• Given a suitable representation for a Boolean function f(X):
19
Test Compaction for Comb. Tests
20