You are on page 1of 50

VLSI Testing

ATPG
ATPG Algorithms
Algorithms

Virendra Singh
Indian Institute of Science (IISc)
Bangalore
virendra@computer.org

E0-286: Testing and Verification of SoC Design


Lecture - 10
Feb 9, 2008 E0-286@SERC 1
D-Algorithm
D-Algorithm
Start

Initialize test cube (tc)


None
None
exists No test
exists Select a primitive D-cube
exists
of fault as C
Inconsistent
D-intersect C with previous
test cube (tc) and
perform implication
Consistent
Is there a D or D’ Yes
on any PO? Line Justification
Impossible done

Test
Backtrack to the last No generated
point a choice existed
Select a gate from D-frontier
and propagate D-cube of the
Selected gate as C
Feb 9, 2008 E0-286@SERC 2
D-Algo
D-Algo (Line
(Line Justification)
Justification)
Begin

No Test has
Is there any line in tc been
which are not justified? generated

Yes
Select an unjustified line and
a singular cube C to justify the line

Interset C with previous


test cube tc
Consistent
Inconsistent
Backtrack to the last
point a choice existed
None
exists
Line Justification
impossible
Feb 9, 2008 E0-286@SERC 3
Example2: Fault A
Example2: Fault A sa0
sa0

„ Step 1 – D-Drive – Set A = 1

D
1 D

Feb 9, 2008 E0-286@SERC 4


Step
Step 2
2 --
-- Example
Example 2
2

„ Step 2 – D-Drive – Set f = 0

0
D D
1 D

Feb 9, 2008 E0-286@SERC 5


Step
Step 3
3 --
-- Example
Example 2
2

„ Step 3 – D-Drive – Set k = 1

1
D
0
D D
1 D

Feb 9, 2008 E0-286@SERC 6


Step
Step 4
4 --
-- Example
Example 2
2

„ Step 4 – Consistency – Set g = 1

1 1
D
0
D D
1 D

Feb 9, 2008 E0-286@SERC 7


Step
Step 5
5 --
-- Example
Example 2
2

„ Step 5 – Consistency – f = 0 Already set

1 1
D
0
D D
1 D

Feb 9, 2008 E0-286@SERC 8


Step
Step 6
6 --
-- Example
Example 2
2

¾ Step 6 – Consistency – Set c = 0, Set e = 0

1 1
0 D
0
0
D D
1 D

Feb 9, 2008 E0-286@SERC 9


D-Chain
D-Chain Dies
Dies -- Example
Example 2
2

„ Step 7 – Consistency – Set B = 0


„ Fault detected at PO, although D-Chain dies

X
1 1
0 D
0 0
0
D D
1 D

„ Test cube: A, B, C, D, e, f, g, h, k, L
Feb 9, 2008 E0-286@SERC 10
D-Algorithm
D-Algorithm :: Example
Example

1
D’

1 1 D
1 0
D’ 1
D’

1
1 0
1 D’ 1
D’

Feb 9, 2008 E0-286@SERC 11


Decision
Decision Tree
Tree

Feb 9, 2008 E0-286@SERC 12


9
9 -- V
V Algorithm
Algorithm (Muth)
(Muth)

¾ Logic values {0/0, 1/1, 0/1, 1/0, 0/u, 1/u, u/0, u/1, u/u}
0/u = {0, D’}, 1/u = {D, 1}, u/0 = {0, D}, u/1 = {D’, 1}
u/u = {0, 1, D, D’}

¾ Reduces amount of search done in multiple path


sensitization – D-Algo

Feb 9, 2008 E0-286@SERC 13


9
9 -- V
V Algorithm
Algorithm

D’

Feb 9, 2008 E0-286@SERC 14


9
9 -- V
V Algorithm
Algorithm

1 0
D

1/u

D’

Feb 9, 2008 E0-286@SERC 15


9-V
9-V Algorithm:
Algorithm: Value
Value Comp
Comp

Feb 9, 2008 E0-286@SERC 16


9-V
9-V Algorithm:
Algorithm: Value
Value Comp
Comp

No Backtracking

Feb 9, 2008 E0-286@SERC 17


Path
Path Oriented
Oriented DEcision
DEcision
Making
Making
(PODEM)
(PODEM)

P.
P. Goel,
Goel, IBM,
IBM, 1981
1981
Feb 9, 2008 E0-286@SERC 18
PODEM
PODEM

„ New concepts introduced:


Expand binary decision tree only around
primary inputs
Use X-PATH-CHECK to test whether D-
frontier still there
Objectives -- bring ATPG closer to
propagating D (D’) to PO
Backtracing

Feb 9, 2008 E0-286@SERC 19


Motivation
Motivation

¾ IBM introduced semiconductor DRAM


memory into its mainframes – late 1970’s
¾ Memory had error correction and
translation circuits – improved reliability
D-ALG unable to test these circuits
™ Search too undirected
™ Large XOR-gate trees
™ Must set all external inputs to define
output
Needed a better ATPG tool

Feb 9, 2008 E0-286@SERC 20


PODEM
PODEM High-Level
High-Level Flow
Flow

1. Assign binary value to unassigned PI


2. Determine implications of all PIs
3. Test Generated? If so, done.
4. Test possible with more assigned PIs? If
maybe, go to Step 1
5. Is there untried combination of values on
assigned PIs? If not, exit: untestable fault
6. Set untried combination of values on
assigned PIs using objectives and
backtrace. Then, go to Step 2

Feb 9, 2008 E0-286@SERC 21


PODEM-Algorithm
PODEM-Algorithm
Start

Assign binary value to an unssigned PI

Deternine implications of all PIs

Yes
Test Is there a D or D’
generated on any PO?
No
May be
Test Possible with additional
Assigned PIs?

No

Is there an untried combination of No No test


No PIs?
Values on assigned exists
Yes
Set untried combination of vaues
On assigned PIs
Feb 9, 2008 E0-286@SERC 22
PODEM
PODEM

Feb 9, 2008 E0-286@SERC 23


D-Algorithm
D-Algorithm :: Example
Example

1
D’

1 D

D’ 1
D’

1
1 0
1 D’ 1

Feb 9, 2008 E0-286@SERC 24


PODEM
PODEM :: Example
Example

Feb 9, 2008 E0-286@SERC 25


PODEM
PODEM :: Value
Value Comp
Comp

Feb 9, 2008 E0-286@SERC 26


PODEM
PODEM :: Decision
Decision Tree
Tree

Feb 9, 2008 E0-286@SERC 27


PODEM
PODEM
PODEM doesn’t need
¾ Consistency check – conflict can never
occur
¾ J-frontier – there are no values that
require justification
¾ Backward implication – values are
propagated only in forward directions

Feb 9, 2008 E0-286@SERC 28


Example
Example
„ Select path s – Y for fault propagation

sa1

Feb 9, 2008 E0-286@SERC 29


Example
Example --
-- Step 2 ss sa1
Step 2 sa1
„ Initial objective: Set r to 1 to sensitize fault

sa1

Feb 9, 2008 E0-286@SERC 30


Example
Example --
-- Step 3 ss sa1
Step 3 sa1
„ Backtrace from r

sa1

Feb 9, 2008 E0-286@SERC 31


Example
Example --
-- Step 4 ss sa1
Step 4 sa1
„ Set A = 0 in implication stack

1
0

sa1

Feb 9, 2008 E0-286@SERC 32


Example
Example --
-- Step 5 ss sa1
Step 5 sa1
„ Forward implications: d = 0, X = 1

1
1
0
0
sa1

Feb 9, 2008 E0-286@SERC 33


Example
Example --
-- Step 6 ss sa1
Step 6 sa1
„ Initial objective: set r to 1

1
1
0
0
sa1

Feb 9, 2008 E0-286@SERC 34


Example
Example --
-- Step 7 ss sa1
Step 7 sa1
„ Backtrace from r again

1
1
0
0
sa1

Feb 9, 2008 E0-286@SERC 35


Example
Example --
-- Step 8 ss sa1
Step 8 sa1
„ Set B to 1. Implications in stack: A = 0, B = 1

1
1
0
0
1 sa1

Feb 9, 2008 E0-286@SERC 36


Example
Example --
-- Step 9 ss sa1
Step 9 sa1
„ Forward implications: k = 1, m = 0, r = 1, q = 1,
Y = 1, s = D, u = D, v = D, Z = 1
1
1
0
0
1 0 sa1 D 1
1 1
D
D
1

Feb 9, 2008 E0-286@SERC 37


Backtrack
Backtrack --
-- Step 10 ss sa1
Step 10 sa1
„ X-PATH-CHECK shows paths s – Y and s–u–v–
Z blocked (D-frontier disappeared)
1
1
0
0
sa1

Feb 9, 2008 E0-286@SERC 38


Step
Step 11 -- ss sa1
11 -- sa1
„ Set B = 0 (alternate assignment)

1
0

0 sa1

Feb 9, 2008 E0-286@SERC 39


Backtrack -- ss sa1
Backtrack -- sa1
„ Forward implications: d = 0, X = 1, m = 1, r = 0,
s = 1, q = 0, Y = 1, v = 0, Z = 1. Fault not sensitized.
1
0
0
0
1
0 1 sa1
1
0
1
0
1

Feb 9, 2008 E0-286@SERC 40


Step
Step 13 -- ss sa1
13 -- sa1
„ Set A = 1 (alternate assignment)

1
1

sa1

Feb 9, 2008 E0-286@SERC 41


Step
Step 14 -- ss sa1
14 -- sa1
„ Backtrace from r again

1
1

sa1

Feb 9, 2008 E0-286@SERC 42


Step
Step 15 -- ss sa1
15 -- sa1
„ Set B = 0. Implications in stack: A = 1, B = 0

1
1

0 sa1

Feb 9, 2008 E0-286@SERC 43


Backtrack -- ss sa1
Backtrack -- sa1
„ Forward implications: d = 0, X = 1, m = 1, r = 0. Conflict:
fault not sensitized. Backtrack
1
0
1
0
0 1
1 sa1
1
0
1
0
1

Feb 9, 2008 E0-286@SERC 44


Step
Step 17 -- ss sa1
17 -- sa1
„ Set B = 1 (alternate assignment)

1
1

1 sa1

Feb 9, 2008 E0-286@SERC 45


Fault
Fault Tested
Tested -- Step 18 ss sa1
Step 18 sa1
„ Forward implications: d = 1, m = 1, r = 1, q = 0, s = D, v =
D, X = 0, Y = D

0
1
1
1
1 1 sa1 D
D
0

D
D
X

Feb 9, 2008 E0-286@SERC 46


Backtrace
Backtrace (s,
(s, vvss)Pseudo-Code
)Pseudo-Code

v = vs;
while (s is a gate output)
if (s is NAND or INVERTER or NOR) v = v;
if (objective requires setting all inputs)
select unassigned input a of s with hardest
controllability to value v;
else
select unassigned input a of s with easiest
controllability to value v;
s = a;
return (s, v) /* Gate and value to be assigned */;

Feb 9, 2008 E0-286@SERC 47


Objective
Objective Selection
Selection Code
Code

if (gate g is unassigned) return (g, v);


select a gate P from the D-frontier;
select an unassigned input l of P;
if (gate g has controlling value)
c = controlling input value of g;
else if (0 value easier to get at input of
XOR/EQUIV gate)
c = 1;
else c = 0;
return (l, c );

Feb 9, 2008 E0-286@SERC 48


PODEM
PODEM Algorithm
Algorithm
while (no fault effect at POs)
if (xpathcheck (D-frontier))
(l, vl) = Objective (fault, vfault);
(pi, vpi) = Backtrace (l, vl);
Imply (pi, vpi);
if (PODEM (fault, vfault) == SUCCESS) return (SUCCESS);
(pi, vpi) = Backtrack ();
Imply (pi, vpi);
if (PODEM (fault, vfault) == SUCCESS) return (SUCCESS);
Imply (pi, “X”);
return (FAILURE);
else if (implication stack exhausted)
return (FAILURE);
else Backtrack ();
return (SUCCESS);
Feb 9, 2008 E0-286@SERC 49
Thank You

Feb 9, 2008 E0-286@SERC 50

You might also like