Download Automatic Test Pattern Generation: Outline and Techniques and more Study notes Theatre in PDF only on Docsity!
© K.T. Tim Cheng, 05_comb_tg, v1.0 1
Outline – Automatic Test Pattern
Generation
- Test generation systems
- Test generation for combinational ckts
- D-Algorithm
- PODEM
- Boolean Satisfiability approach
- Test compaction
- Test generation for sequential ckts
- Time-frame expansion & Extended D-Algorithm
- Nine-valued test generation
- Potential detection
- Issues of sequential ATPG
© K.T. Tim Cheng, 05_comb_tg, v1.0 3
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.
Test Generation Systems
Circuit
Description
Test
Patterns
Undetected
Faults
Redundant
Faults
Aborted
Faults
Backtrack
Distribution
Fault
List
Compacter
ATPG
With fault
simulator
Ack: Bushnell and Agrawal, Essential of Electronic Testing, 2000
© K.T. Tim Cheng, 05_comb_tg, v1.0 7
- E s-a-1 ⇒ E =
- C = D = 1 to propagate through G 1.
- To propagate G 4 , need G 2 = G 3 = 1
Attempt to line justify G 2 = G 3 = 1
- G 3 = 1possible if A = F = 1 or B = H = 1
- If A = F = 1 ⇒ inconsistency since C = 1 so G 2 = 0.
⇒ Therefore, G 3 = 1 ⇒ B = H = 1
- G2 = 1 need A = 0 or F = 0
⇒ Tests are ABCDEH, BCDEFH
G 1
G 2 G^4
G 3
A
C
B
DE
H
F
Line Justification
Completeness of ATPG Algorithms
• A test generation algorithm is deemedcomplete iff
it will find a test for a fault if exists or prove that
there exists no test, given sufficient time.
- Complete algorithms can identify untestable faults
- Major complete algorithms for comb. ckts
- D-algorithm (Roth, 1966)
- PODEM (Goel, 1981)
- FAN (Fujiwara, 1983)
- Socrates (Schulz, 1988)
- Boolean-SAT-based ATPG (Larrabee, 1992)
© K.T. Tim Cheng, 05_comb_tg, v1.0 9
Single Path Sensitization Is NOT
Complete
G 3
G 2
G 4
G 5
G (^1) f
C
E
A B d
d s.a.
x G 6
- d s-a-0 : ⇒ A = B = 1
- Propagate along G 3 , G 6 requires C =1, G 2 = G 4 = G 5 = 1.
- In order for G 4 = 1 either E = 0 or G 1 = 0 ⇒
inconsistency
⇒ E = 0, B = 1 ⇒ G 5 = 0 ⇒ inconsistency
- Propagate along G 4 , G 6 ⇒ E = 1 & G 2 = G 3 = G 5 = 1
- G 2 = 1 ⇒ C = 1, ABC = 111 ⇒ G 3 = 0 inconsistency
⇒ No test
G 3
G 2
G 4
G 5
G 1
C
E
A
B
d
1 G 6
s-a-
But Boolean Difference Method
Finds Test ABCD=(1111)!!
© K.T. Tim Cheng, 05_comb_tg, v1.0 13
Primitive D-cubes
- Specifies the minimal input conditions which must
be applies to a logic elementE in order to produce
an error signal at the output ofE
Propagation D-cubes
• The propagation D-cubes of a logic elementE
specify minimal input conditions which are
required to propagate an error signal on an input
(or inputs) to the output of that element.
D
1 2 3 4 5 6 7 8 9 10 11 12 13 1 1 0 0 0
X X X X X X 1 1 1
1 1 1 0 1 1 1
1
0 0 0
X
X
1 1
1 1
X X 0 0 0 0 0 0 0
X X 1 1 1 0 0 0
0
1 1 1
X X
primitive D-cube primitive cubes of G 2
primitive cubes of G 3
primitive cubes of G 4
primitive cubes of G 5
primitive cubes of G 6
G 1 s-a-0 :
G 4
G 3
G 1
G 2
G 6
G 5
H J A B C E 8 9 1 2 3 4
5
6
s.a.
F 11
(^10 )
13
7
An Example
© K.T. Tim Cheng, 05_comb_tg, v1.0 15
The D-Algorithm
Select a primitive D-cube of the fault
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.
- Repeat 3) & 4) until faulty signal propagated to an output.
6) Line justification: Consistency check on input conditions required.
D-Algorithm Example
G 4
G 3
G 1
G 2
G 6
G 5
H J A B C E
s.a.
F 11
© K.T. Tim Cheng, 05_comb_tg, v1.0 19
Flowchart for D-algorithm
start
Initialize test cube (tc)
Select a primitive D-cube of that as C
D-intersect C with previous test cube tc and perform implication
Is there a D or D on any PO?
Select a gate from D-frontier and a propagation D-cube of the selected gate as C
Backtrack to the last point a choice exists
Line Justification
inconsistent consistent
yes
impossible
Test has been none exists generated
no done
Line Justification
Begin
Intersect C with previous test cube tc
Is there any line in tc which are not justified
Select an unjustified line and a primitive cube C to justify the line
Backtrack to the last point a choice exists
inconsistent consistent
yes
Test has been generated
none exists
no
Line justification impossible
© K.T. Tim Cheng, 05_comb_tg, v1.0 21
D
1 2 3 4 5 6 7 8 9 10 11 12
1 1
1 1 1
1
1 0
1 1 1 D
0 1 0
X
D 0
0 0 0 D 1
1
primitive D-cube (1)
Select D-frontier G 5 (3)
Implication Line justification (7)
1 1 D
D D D
D
0 1 1 1
1 D D
1 D 1 1 D 1 1 1 0 D 1 D 1 1 D 1 1 1 1 1 1 D 1 1 D
1 1 1 0 0 D 0 1 D 1 1 D 1 1 1 0 0 D 0 1 D 1 1 D 1 0
1 1 1 0 D 1 D 1 D D 1 1 1 1 0 D 1 DD 1 1 0 0 1 1 1 1 0 D 0 1 D D 1 D
implication (2)
implication (4)
implication (10)
Select D-frontier G 8 (6)
Implication Line justification (8)
inconsistent & backtrack to (6) Select D-frontier G 6 (9)
implication (8)
Test is found : 1 1 1 1
implication (5) 1 D
G 8
G 5
G 4
G 6
G 7
G 2
4
2 6
1
3
8
11
9
s-a-
12
10
G (^15)
G 3 7
A D-Algorithm
Example
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 B C E F G H s.a.
J
K N
L
Q
P (^) R
M
© K.T. Tim Cheng, 05_comb_tg, v1.0 25
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.
Flowchart of PODEM
Start
Assign a binary value to an unassigned PI
Determine implication of all PIs
Is there a D or D on any P0? Test possible with additional assigned PIs? Is there an untried combination of values on assigned PIs?
Set untried combination of values on assigned PIs
Test is found
No test exists
maybe
yes
no
no
no
yes
© K.T. Tim Cheng, 05_comb_tg, v1.0 27
Steps in PODEM
(1) Determine aninitial 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 thebacktrace procedure.
Flowchart of Backtrace
begin
Is objective line fed by a PI?
Current objective value V and type of gate driving objective line?
Next obj line is the input of G which is at x and is the hardest to control
Next obj line is the input of G which is at x and is the easiest to control
Is G a NAND/NOR gate?
Next obj value is the same as the current objective value
Next obj value is the complement of the current objective value
Found PI initial assignment is the current objective value
A
Exit
no (fed by gate G) OR/NAND & V= AND/NOR & V=
yes
OR/NAND & V= AND/NOR & V=
A
yes no
© K.T. Tim Cheng, 05_comb_tg, v1.0 31
Cost of ATPG
(A) How long? (Time complexity)
(B) How much RAM? (Space complexity)
(C) How many vectors generated? (Test application time)
- Theoretical result (Ibarra & Sahni, 1975) :
- Generating a test for comb. ckt is NP-complete
- Worst-case time ∝ constantG^ (G = # of gates)
- Emperical result (average-time behavior):
- Total ATPG time ∝ constant • G^2
- Test length ∝ G
Accelerating Comb. ATPG
Basic goals:
- Reduce number of backtracks
- Reduce processing between backtracking
Basic tools:
- Topological analysis
- Multiple backtrace
- Learning
© K.T. Tim Cheng, 05_comb_tg, v1.0 33
Socrates: Static Learning
Preprocessing the ckt:
(1) Assign a logic value to a certain signal of the ckt
(2) Perform all implications from that assignment
(3) Learn from the results of implications
- Using law of contraposition: (A ⇒ B ) ⇔ (!B ⇒ !A)
X (^) X
X
X X
d
e
f
c
a
b
1
X (^1)
1
1 X
d
e
f
c
a
b
1
( a = 1 ⇒ f = 1 ) ⇔ ( f = 0 ⇒ a = 0 )
X (^) X
0
X X
d
e
f
c
a
b
X
X (^) X
0
X X
d
e
f
c
a
b
⇒^0
Preprocessing:
Learned information
During ATPG:
Boolean Satisfiability Approach
Given a fault, it consists of two steps:
- Step 1: Construct a formula expressing the
Boolean Difference of a circuit with respect to
the fault
- Step 2: Apply a Boolean Satisfiability (SAT) solver
to the resulting formula
© K.T. Tim Cheng, 05_comb_tg, v1.0 37
(c) Construct the formula of the Boolean Difference:
XOR of (a) & (b) and the output of XOR should be 1
From (a):
(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):
(V 1 +X)x(V 1 +X’)x(V 1 +X+X’)x(V 2 +X)x(V 2 +X’)x(V 2 +X+X’)x(BD+V 1 )x(BD+V 2 )x
(BD+V 1 +V 2 )xBD (note: BD=X⊕X’=(X+X’)x(X+X’)=V 1 xV 2 )
Step 1: Extracting the formula – Cont’d
X
X’
BD=(X+X’)x(X+X’)=V 1 xV 2 =
Step 2: Satisfying the Formula
- Boolean Satisfiability
- Given a suitable representation for a Boolean functionf(X):
- Find an assignmentX* such thatf(X*) = 1
- Or prove that such an assignment does not exist (i.e.f(X) = 0
for all possible assignments)
- In the “classical” SAT problem,f(X) is represented in product-of-
sums (POS) or conjunctive normal form (CNF)
- Many decision (yes/no) problems can be formulated either directly
or indirectly in terms of Boolean Satisfiability
© K.T. Tim Cheng, 05_comb_tg, v1.0 39
Conjunctive Normal Form (CNF)
Clause
Positive
Literal
Negative
Literal
ϕ = ( a + c ) ( b + c ) (¬ a + ¬ b + ¬ c )
- Source: João Marques-Silva and Karem A. Sakallah, “Boolean Satisfiability in EDA”, CAV2000 tutorial.
Literal & Clause Classification
ϕ = ( a + ¬ b )(¬ a + b + ¬ c )( a + c + d )(¬ a + ¬ b + ¬ c )
a assignedb assigned 0 c and d unassigned 1
violated satisfied unresolved (^) satisfied
- Source: João Marques-Silva and Karem A. Sakallah, “Boolean Satisfiability in EDA”, CAV2000 tutorial.