done_DFT
done_DFT
OUTLINE
• Motivation
• Background and Definitions
• Boolean Difference and Testing of Digital Circuits
• Combinational Circuit Testing
– Path Sensitization
– D-Algorithm
How do we know that our Design
works?
x=(x0,x1,..,xn) q=(q0,q1,…qn)
f(x)
Fault!!!
System Validation Techniques
Simulation
– Validate a model of the system.
Emulation
– Build a prototype and validate.
Testing
– Check the correctness of actual system.
Formal Verification
– Mathematically show the ’Equivalence’ of the
specification and the implementation.
Definitions: Errors and Faults
• Error : Incorrect operation of the system.
• Cause of Error are Faults
– Design error, fabrication error, fabrication defect, physical
defects.
• Logical Fault: Faults which result in a change in logic
value at a point in a circuit.
• Fault Model: The effect of a fault is represented by a
model
– Stuck-at-fault
– Bridging fault
– Stuck-open fault
– Linking faults: Memories
Fault Probabilities
Dynamic Faults
49% Static Faults
Intermittent Faults
1%
50%
Fault Probabilities
• Dynamic Faults
• Timing Failures
• Components out of specification
• Static Faults
• Short-circuits
• Breaks
Cost of quality
Cost
Cost of
Cost of the fault
testing
Quality
0% Optimum 100%
test
Design for Testability( DFT)
• To take into account the testing aspects during
the design process so that testing is simpler and
faster.
– Reduce test effort
– Reduce test time
– Reduce cost of test equipment
– Increase product quality
• Limitations
– Hardware overhead ( 5-30%)
– Performance degradation
– Increase in design complexity
Fault Models
• Stuck Fault Model
– Stuck-at-0 (S-a-0) & Stuck-at-1 model (S-a-1)
• Observability
– Can we observe and distinguish between the behavior of a faulty
node and a free node?
Detectable Stuck-At Fault
a
&
b e
S-a-0 1
c
1
d
1 1
0 1
Good
0 1 Circuit
0 0
0
0 0
1 1
0 0 1 0
Faulty
0 0 Circuit
0
0 0
Fault Masking and Redundant Circuit
The fault cannot be detected because the circuit
has redundancy. Good Circuit
1
Example: 1 1 0
0 0 1
S-a-0 0
X X
a
&
b e
1 0
1 1 1
0 1 0
0
1 X X
d
Faulty Circuit
Undetectable faults
• In general, untestable faults are due to redundancy
C
E Z
B
C
E Z
B
Z2
Solution:
Add internal wires to propagate an internal value to a new output
Ad Hoc DFT Techniques
OP
• Test Point Insertion
C1 C2 C1 C2
CP0 CP1
D CP1 OP1
e CP2 OP2 M
C m u O
u CPN OPN x
x
1 2 m 1 2 m
Test Generation for Combinational
Circuits
• Truth Table and Fault Matrix
Example:
s-a-0 and x1 x2 x3 z z z zz z z
x1 s-a-1
x2 &
0 0 0 0 0 0 0 0
x2 1
x3
& z 0 0 1 0 0 1 0 1
0 1 0 0 0 0 0 0
x1
x3 & 0 1 1 1 1 1 0 0
1 0 0 0 0 0 0 0
Truth table approach not practical if 1 0 1 1 1 1 0 0
number of inputs is large. 1 1 0 1 0 1 1 0
1 1 1 1 1 1 0 0
Testing Sequential Circuits
Scanout
Scanin
Full Scan and Partial Scan
• Full Scan:
– Connect all the storage elements to form a long shift
register (scan chain)
– The storage elements can be easily tested by shifting
in a pattern and observing the output
– Testing of sequential circuit testing can be now treated
as testing of combinational circuit
– Full scan is costly and slow
• Partial Scan
– Select a subset of storage elements to be included in
the scan chain
Random Access Scan
• To achieve controllability and observability of all registers
– Access one register at a time
PI Comb. PO
Part
Memory
Scan-in Scan-out
Scan
Address
Board Level DFT: Boundary Scan
• Every input and output port of a chip is included in a
special scan chain
PI
Test Data In
Test Clock
Main Logic Test Mode
SO Test Data Out
SI
PO
Boundary Scan Cell
SO
PI M
u
PO
M x
u
x
ClockDR UpdateDR
SI
JTAG Standard (IEEE 1149.1)
Boundary Scan-path
I/O Pad Boundary-Scan cell
Summary of DfT
• Testing of complex digital systems is a hard but
very important task.
– Test Pattern Generation is most important in testing
• Testing contributes substantially to the cost and
effort required to design a new product.
• Methods are required to reduce this cost and
effort.
– Design for testability
– Reuse of proven designs
– Formal Methods
Test Pattern Generation - part I
Built-In Self Test (BIST) Methods
Testing a Circuit
Test Equipment
• Pulse and Function generators
• Oscilloscope
• Logic Analyzers
• Computers
• Specialized Zigs +
Test Engineer
Self-Test a Circuit –
Built-In Self Test (BIST)
Test Pattern Circuit Response
Generator Under Test Analyzer
Test Engineer
BIST: Requirements
• Comparing Response
– It is not possible to store the response in memory: area overhead
– Related to Test Pattern Generation
Correct Error
Test Signature
Comparator
Indicator
Generator
Unit
General Aspects of Compression
• Classification
– Centralized or Distributed BIST circuitry
– Embedded or Separate BIST
• Key Elements of BIST
– Test pattern Generator (TPG)
– Output Response Analyzers (ORA)
– Circuit Under Test (CUT)
– A Distribution system for transmitting data from TPG to CUT and
from CUT to ORAs.
– A BIST Controller
Test Pattern Generation for BISTs
Exhaustive Testing
Exhaustive Test Pattern Generators
Pseudo-Random testing
Weighted test generator
Adaptive Test Generator
Pseudo-Exhaustive testing
Constant Weight Counter
Combined LFSR and Shift Register
Combined LFSR and XOR
Cyclic LFSR
Exhaustive Testing
• Physical Segmentation
Compression Methods for BISTs
Basic Idea – Apply sequence, check signature after finishing...
Simple Analyzers
Ones-count Compression
Transition-count Compression
Signature Analyzers
Single-Input Signature Response (SISR)
Multi-Input Signature Response Analyser (MISR)
Generic BIST architectures
BILBO
Ones-Count Compression
x1
x2 Circuit Counter Signatures:
x3 1C(R0) = 1
1C(R1) = 2
1C(R2) = 0
Clock
Masking Probability
The probability of an erroneous output sequence having the same number
of 1’s as the correct sequence.
Theorem: The masking probability for ones-count compression for a
combinational network circuit asymptotically approaches (m)-1/2.
Transition-Count Compression
Transition
Detector
x1
x2 Circuit D Counter
x3
D Q
+ S0 0 1 1
S1 0 0 1
0 1 1 S2 1 0 0
S3 0 1 0
S4 1 0 1
S5 1 1 0
S6 1 1 1
S7 =S0 0 1 1
• Period of Linear Feed back shift register depends upon
– Feed back connections
– Intial value of register
Cn Cn-1 Cn-2 C1
+ D Q + D Q + +
+ + + +
Cn-2
Cn Cn-1 C1
D CUT D
TPG I I ORA
S S
CUT
T T
BIST
Controller
EXO EXO
R R
B1 B2 Operation
1 1 Normal Operation
0 0 Shift Register mode
1 0 PRPG or MISR
BIST design with BILBO Registers
• Example:
R1
To Test C1
•R1 as PRPG
C1 •R2 as MISR
To Test C2
R2 •R2 as PRPG
•R3 as MISR
C2
R3
Summary of BIST
– Write a test
– check fault cover (one test may cover more than 1 fault)
A E
B Z
C
D F
F ( X )
F ( x1 ,...xi 0,...xn ) F ( x1 ,...xi 1,...xn )
xi
Example: Functional Description
Example:
F( x1, x2 ,x3) = x1x2+ x2x3+ x3x1
Fault: x1 stuck-at-1
F
x x ( x x x x )
x1 2 3 2 3 2 3
= x2 x3
The function F will have different output, when
x2 x3 = 1, that is x2=0 and x3 =1 OR
x2= 1 and x3 = 0
Boolean Difference: Test pattern
generation
For a point Xi s-a-1
The solution of the equation
F
Xi 1
Xi
Gives all the tests for Xi stuck-at-1
F ( X )
0 if F(x) is independent of xi
xi
F ( X ) F(x) xi
1 if depends always on
xi
Boolean derivatives
F ( X )G ( X ) G ( X )
F ( X )
xi xi
F ( X ) G ( X ) G ( X )
F ( X )
xi xi
B & F
C & F 1 ( BC CA)
h
C
A
& BC CA
Test for h s-a-1 A B C
F AB ( A B C ) 1
h 1
h
ABC = 1
A = 1; B= 1; C= 0.
Example: Complete Test using
Boolean Derivatives
A E Z E F AB CD
B
Z E AB
C
D F CD
F
Z ( AB ) Z Z
CD CDB (C D)B A AB (C D) , A AB (C D)
A A A A
Z ( AB ) Z Z
CD CD A (C D) A B AB (C D) , B A B (C D)
B B B B
Z (CD) Z Z
AB ABD C ABCD , C ABC D
C C C C
Z (CD) Z Z
AB ABC D ABCD , D ABC D
D D D D
Z Z Z
F CD (C D) E ( A B )(C D) , E AB (C D)
E E E
Z Z Z
E AB F ABCD , F ABCD AB (C D)
F F F
Fault Cover Check
Test Pattern A B C D E F Z
Sa0 Sa1 Sa0 Sa1 Sa0 Sa1 Sa0 Sa1 Sa0 Sa1 Sa0 Sa1 Sa0 Sa1
0000 X X
0001 X X
0010 X X
0011 X
One of 1000 Redundant X X X X
these
0101 Redundant X X X X
0110 Redundant X X X X
0111 X
1000 X X
1001 X X
1010 X X
1011 X
1100 X X X X X
1101 Essential X X X X X X X
1110 X X X X X
1111 Essential X X X X
Path Sensitization
The method consists of two steps:
– Identify a sensitized path from the fault site to output
– Check for consistency of the assignments to the inputs
Example Circuit
1 X1 G1 7 S-a-0 G5 13
1 X2 & 1/0
10
0
G7 15
0 X3 G2 8 &
X X4 & G4 1 1/0
1 1
12 G6 14
X X5 G3 9 11
X X6 & Good value
X
Bad value
Path Sensitization
Node 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
G1 1 1 1/0
0 1/0
G5
G7 1 1/0
Gates
G4 1 1 1/0 0 0 1 1/0 1 1/0
G6 X 1 1
G3 X X X
G2 0 X 0 0 0
Faulty Circuit
0 1
0 0 D
Good
Circuit
1 D 1
Singular Cover
Singular Cube is a compact representation of the truth
table of a component.
Example: 2-input AND gate
Truth Table Singular Cover
A B C A B C
0 x 0
0 0 0
x 0 0
0 1 0
1 1 1
1 0 0
1 1 1
Primitive D-Cube
Model of the component in the presence of fault.
Example: 2-input NOR gate
A
Fault Primitive D-Cube
A B C B 1 C
A s-a-0 1 0 D
A s-a-1 0 0 D
C s-a-0 0 0 D
C s-a-1 1 X D
X 1 D
Propagation D-Cube
1 2 3 4 5 6 7 8 9
Singular Cover
0 0 x D 1 D D
G3 0 x 1
G3 0 x 1
G1 1 x 0
0 0 x x D 1 D D
G1 1 x 0
1 0 0 x 0 D 1 D D
Re-convergent Fanout
• Example: Point 6 s-a-0
G4 8
G1 5 1
1
X1 G5 9
1 1 G8
1
X2 2 G2 6 12
3 1 10
X3 1/0 G6
4 1
X4
G3
1 7 G7 11
1
D-Algorithm: Sensitizing Multiple Paths
X1 X2 X3 X4 5 6 7 8 9 10 11 12
G2 0 0 D
G5&G6 0 0 D D D
G8 0 D D 0 D
0 0 0 0 D 0 D D 0 D
G4
0 1 0
G7 0 1 0
G1 0 0 1
G3 0 0 1
D-Algorithm: Worst Case and Time
Complexity
• In the worst case the D-Algorithm will have to consider all
combinations of path.
• In a circuit with N components, the number of
combinations of paths from fault to output are: k2N.
• Worst case time complexity of D-Algorithm: O(2N).
• Fortunately, in practice average time complexity is much
smaller (N2).
– If size of circuit grows by 10, number of tests required grows by
100.
Appendix
Testing Sequential Circuits
Testing Sequential Circuits
S0
0/0
X Pattern Z S1 0/0
Detector (0110) 0/0 1/0
S2
State X= 0 X= 1 0/1 1/0
S3 1/0
S0 S1,0 S0,0
S1 S1,0 S2,0
S2 S1,0 S3,0
S3 S0,1 S0,0
Homing Sequence
Def.: Smallest input sequence which brings the
machine to a known state.
{S0,S1,S2,S3}
0 1
{S1,S1,S1,S3} {S0,S2,S3,S0}
0 1
{S1,S1,S1,S1} {S2,S2,S2,S0}
X Mod-4 counter Z
• Example 1 does not have a common
distinguishing sequence for all states.
• The common distinguishing sequence for
State X= 0 X= 1
Example 2 is ’1111’.
S0 S0,0 S1,0
S1 S1,0 S2,0 S0 Output = 0001
S2 S2,0 S3,0 S1 Output = 0010
S3 S3,0 S0,1 S2 Output = 0100
S3 Output = 1000
Transfer Sequence
Definition: Smallest input sequence which takes
the machine from state i to state j, for all states i
and j.
Example 1: Example 2:
i j Sequence i j Sequence
S0 S1 0 S0 S1 1
S0 S2 01 S0 S2 11
S0 S3 001 S0 S3 111
S1 S0 110 S1 S0 111
S1 S2 1 S1 S2 1
S1 S3 11 S1 S3 11
S2 S0 10 S2 S0 11
S2 S1 0 S2 S1 111
S2 S3 1 S2 S3 1
Checking Experiment: Steps
Steps:
1. Go to a known starting state by using a homing
sequence or a distinguishing sequence.
2. Check reachability of all the states
3. Check all transitions
Checking Experiment: Step 1
Known Initial State
Example 1
Homing Sequence: 00
Known State : S1
Example 2
Distinguishing Sequence: 1 1 1 1
Final State : If output = 0001 then S0
else if output = 0010 then S1
else if output = 0100 then S2
else S3;
Checking Experiment: Step2
Check reachability of all states
Example 2:
Known Intial State : say S1
Check reachability to S2
Give transfer sequence for S1 to S2, that is, 1
Distinguish S2 by distinguishing sequence 1111:
Output should be 0100 and final state S2.
Check reachability to S3
Give transfer sequence for S2 to S3, that is, 1
Distinguish S3 by distinguishing sequence 1111
Output should be 1000 and final state S3
Check reachability to S0
Checking Experiment: Step3
Check various transitions
Example 2:
Present State = S0
Check transition ( S0,0) S0/0
Give 0 and check output to be 0
To check next state as S0 give distinguishing sequence 1111 and
check output to be 0001.
Check transition ( S0,1) S1/0
Give 1 and check output to be 0
To check next state as S1 give distinguishing sequence 1111 and
check output to be 0010.
Similarly all other transitions.