Built in Self-Test: 2. Testability Measuring 3. Design For Testability
Built in Self-Test: 2. Testability Measuring 3. Design For Testability
Built in Self-Test: 2. Testability Measuring 3. Design For Testability
1. Introduction
2. Testability measuring
3. Design for testability
4. Built in Self-Test
Outline
• Motivation for BIST
• Testing SoC with BIST
• Test per Scan and Test per Clock
• HW and SW based BIST
• Hybrid BIST
• Pseudorandom test generation with LFSR
• Exhaustive and pseudoexhaustive test generation
• Response compaction methods
• Signature analyzers
Source: Intel
Source: Elcoteq
• On circuit
– Test pattern generation Test Pattern Generation (TPG)
– Response verification
Circuitry Under Test
• Random pattern
BIST
Control Unit
CUT
generation,
very long tests Test Response Analysis (TRA)
IC
• Response compression
- test quality
Tester
Memory
BIST BIST BIST
System on Chip
Chips +/- + -
Boards +/- + - -
System +/- + - - - -
+ Cost increase
- Cost saving
+/- Cost increase may balance cost reduction
• BIST components:
– Test pattern generator
Test Pattern Generation (TPG)
(TPG)
– Test response
analyzer (TRA)
• TPG & TRA are usually
Circuitry Under Test
BIST implemented as linear
Control Unit feedback shift registers
CUT
(LFSR)
• Two widespread
Test Response Analysis (TRA) schemes:
– test-per-scan
– test-per-clock
Scan Path
Initial test set:
CUT
Scan Path
T1: 1100
.
T2: 1010
.
. T3: 0101
Scan Path T4: 1001
Test application:
• Assumes existing scan
architecture 1100 T 1010 T 0101T 1001 T
• Drawback: Number of clocks = 4 x 4 + 4 = 20
– Long test application time
• Test application:
• T1 T4 T3 T2
• Number of clocks = 10
Working modes: B1
LFSR 1
B1 B2 B2
0 0 Reset
0 1 Flip-flop (normal)
CC1
1 0 Scan mode
1 1 Test mode
Testing modes: B1
LFSR 2
B2
CC1: LFSR 1 - TPG
LFSR 2 - SA
CC2
CC2: LFSR 2 - TPG
LFSR 1 - SA
• Testing epoch I:
LFSR1 generates tests for CUT1 and CUT2
BILBO2 (LFSR3) compacts CUT1 (CUT2)
• Testing epoch II:
BILBO2 generates test patterns for CUT3
LFSR3 compacts CUT3 response
x x2 x3 x4
Modular LFSR
x x2 x3 x4
Polynomial: P(x) = x4 + x3 + 1
c1 c2 c3 c4
y1 y2 y3 y4
x x2 x3 x4
y0
j n
y j (t ) y j 1 (t 1) for j j 0 y0 (t ) c j y j (t )
j 1
y j (t ) y0 (t j )
j n
y j (t ) y0 (t ) x y0 (t ) c j y0 (t ) x j
j
j 1
where j represents the time
translation units
Technical University Tallinn, ESTONIA
Theory of LFSR
c1 c2 c3 c4
y1 y2 y3 y4
x x2 x3 x4
y0
j n
j n y0 (t )( c j x j 1) 0
y0 (t ) c j y0 (t ) x j j 1
j 1
Polynomial:
j n
y0 (t ) y0 (t ) c j x j y0 (t ) Pn ( x) 0
j 1
c1 c2 c3 c4
y1 y2 y3 y4
x x2 x3 x4
y0
Characteristic polynomial:
y0 (t ) Pn ( x) 0 For y0 (t ) 0 Pn ( x) 0
j n
where Pn ( x) 1 c j x j
j 1
x x2 x3 x4
Polynomial: P(x) = x4 + x3 + 1
Xn (t + 1) 0 1 0 … 0 0 Xn (t)
Xn-1 (t + 1) 0 0 1 … 0 0 Xn-1 (t)
. . . . . . .
. . . . . . .
. = . . . . . .
X3 (t + 1) 0 0 0 … 1 0 X3 (t)
X2 (t + 1) 0 0 0 … 0 1 X2 (t)
X1 (t + 1) 1 hn-1 hn-2 … h2 h1 X1 (t)
x x2 x3 x4
x x2 x3 x4
t x x2 x3 x4 t x x2 x3 x4
Polynomial: P(x) = x4 + x3 + 1 1 0 0 0 1 9 0 1 0 1
2 1 0 0 0 10 1 0 1 0
X4 (t + 1) 0 1 0 0 X4 (t) 3 0 1 0 0 11 1 1 0 1
X3 (t + 1) 0 0 1 0 X3 (t) 4 0 0 1 0 12 1 1 1 0
=
X2 (t + 1) 0 0 0 1 X2 (t) 5 1 0 0 1 13 1 1 1 1
X1 (t + 1) 1 h3 h2 h1 X1 (t) 6 1 1 0 0 14 0 1 1 1
7 0 1 1 0 15 0 0 1 1
8 1 0 1 1 16 0 0 0 1
1 0 0
Properties of Polynomials:
x3 x 1 x x 1
3 2
x3 1 x3 x 2 x 1
100 100 100 100
110 010 010 110
111 101 001 011
011 110 100 001
101 111 010 100
010 011 001 110
001 001 100 011
100 100 010 001
Technical University Tallinn, ESTONIA
Theory of LFSR: Examples
Reducible polynomial (non-primitive):
x2 x 1
x3 1 ( x 1)( x 2 x 1) x2 x 1
x3 1 x 1 x2 x 1 Multiplication of
two primitive
x2 x 1
polynomials: x3 x2 x
100 1 x 4 x3 x2
x x2
010 0
001 1 x4 x2 1
01
100 10 Is
x4 x2 1
11
01 a primitive polynomial?
Primitive polynomial
Irreducible polynomial of
x11 x 9 x 5 x 3
degree n is characterized by: x 4 x 2 1 x15 1
- An odd number of terms x15 x13 x11
including 1 term? x13 x11 1
Yes, it includes 3 terms x13 x11 x 9
-Divisibility into 1 + xk, x9 1
where k = 2n – 1 x9 x7 x5
No, there is remainder x3 1 x7 x5 1
x7 x5 x3
x4 x2 1 is non-primitive?
x3 1
Technical University Tallinn, ESTONIA
Theory of LFSR: Examples
Non-primitive polynomial Primitive polynomial
x4 + x2 + 1 x4 + x + 1
x x2 x3 x4 x x2 x3 x4
Example:
The reciprocal of polynomial P3(X) = 1 + X + X3
is P’3 (X) = 1 + X2 + X3
n other n other
Number of PP of
degree n 1 0 9 4 0
2 1 0 10 3 0
n No
3 1 0 11 2 0
1 1
4 1 0 12 7 4 3 0
2 1
5 2 0 13 4 3 1 0
4 2
6 1 0 14 12 11 1 0
8 16
7 1 0 15 1 0
16 2048
8 6 5 1 0 16 5 3 2 0
32 67108864
Technical University Tallinn, ESTONIA
Deterministic Synthesis of LFSR
Generation of the polynomial and seed for the given test sequence
Fault Coverage
Problems: Possible solutions
• Very long test • Weighted pattern PRPG
application time
• Combining pseudorandom
• Low fault coverage test with deterministic test
• Area overhead – Multiple seed
• Additional delay – Hybrid BIST
Time Time
4. pat. 87,5%
Truth table:
Faulty
3. pattern
functions Patterns Functions
75%
covered by 1 00…000 01 01 01…101 2n-1
1. pattern
Faulty 2
functions 00…001 00 11 00…011
Number of tested
covered by 00…010 00 00 11…111
patterns
2. pattern 50%!
… …
2n 11…111 00 00 00…111
n
50% Number of functions 1 22
m
1
2
2 2 1 i 1
n
2 n i
, 1 m 2n
Time
1
Testing of structural faults: 2 Combinational
circuit
under test
n
Not tested
faults 3. patttern
4. pat.
2. pattern Fault coverage
100%
Faults
covered by
1. pattern
Number of
patterns
Faults
Faulty
3. pattern covered by
functions
75% 1. pattern
covered by
Faulty
1. pattern 100%
functions
covered by
2. pattern
100% will be reached
Testing of
100% will be when all faults from
functions
reached only the fault list are
50% Testing of covered
after 2n test
patterns faults
c0 a0 b0 c1 a1 b1 c2 a2 b2 c3 …
1 0 0 0 0 0 0 0 0 0 0
2 0 0 1 0 0 1 0 0 1 0
3 0 1 0 0 1 0 0 1 0 0
4 0 1 1 1 0 0 0 1 1 1
5 1 0 0 0 1 1 1 0 0 0
6 1 0 1 1 0 1 1 0 1 1
7 1 1 0 1 1 0 1 1 0 1
8 1 1 1 1 1 1 1 1 1 1
0-bit testing 1-bit testing 2-bit testing 3-bit testing … etc
Gi ai bi Pi ai bi aibi Cn Gn PnCn1
Cn Gn Pn (Gn1 Pn1Cn2 ) Gn PnGn1 Pn Pn1Cn2
n-bit carry-lookahead adder:
Counter
Fault Coverage
Reset
S0 S0 S0
A= 0 A= 0 A= 0
S2 S2 S2
B=0 B=1 B=0 B=1 B=0 B=1
S3 S4 S3 S4 S3 S4
Digital System
• Status signals entering the
reset control part are made
FSM controllable
clock • In the test mode we can force
test/normal the UUT to traverse all the
control signals status
mode (TM) signals branches in the FSM state
transition graph
MUX
primary • The proposed idea of
inputs architecture requires small
Datapath device area overhead since a
masked simple controller can be
status bits
implemented to manipulate
observation the control signals
primary outputs points
LFSR
Example:
W03 = 1
W13 = 2
4. Transition counting
ri
b) Transition 10 ri
m
P ( R ) (ri 1 ri ) Test &
i 2 UUT T ri-1
5. Signature analysis
x x2 x3 x4
Modular LFSR
x x2 x3 x4
Polynomial: P(x) = x4 + x3 + 1
1 x x2 x4
UUT
x3
Modular LFSR
Response
string 1 x x2 x4
x3
Response in compacted
by LFSR
The content of LFSR after Polynomial: P(x) = 1 + x3 + x4
test is called signature
Example:
11001 R(x) = x4 + x3 + 1
Only the coefficients are of interest, not the actual value of x
However, for x = 2, R(x) is the decimal value of the bit string
n = 2m + r, r { 0,1 } or r n (modulo 2)
Linear - refers to the arithmetic unit (modulo-2 adder), used in CRC
generator (linear, since each bit has equal weight upon the output)
Examples:
x4 + x 3 + x + 1 x4 + x 3 + x + 1
+ x4 + x2 + x x + 1
x3 + x2 + 1 x5 + x 4 + x2 + x
x4 + x 3 + x + 1
x5 + x3 + x2 + 1
Characteristic Polynomials:
G ( x) c0 c1 x c2 x 2 ... cm x m ... cm x m
m 0
x2 x 1
Multiplication of x2 1
polynomials x2 x 1
x 4 x3 x 2
x 4 x3 x 1
Characteristic Polynomials:
G ( x) c0 c1 x c2 x 2 ... cm x m ... cm x m
m 0
x2 x 1 Quotient
Divider x2 1 x 4 x3 1 Dividend
x4 x2
x3 x 2 1
Division of x3 x
polynomials x2 x 1
x2 1
x Remainder
G ( x) x x x 1
3
x x3 x 1
Remainder R(x) is used as a check word in data transmission
The transmitted code consists of the unaltered message P(x) followed by the check
word R(x)
Upon receipt, the reverse process occurs: the message P(x) is divided by known
G(x), and a mismatch between R(x) and the remainder from the division indicates
an error
Example:
G(x) 101 = Q(x) = x2 + 1
101011 10001010
101011 P(x)
P( x) x x x
7 3
5 00100110
G ( x) x x 3 x 1 101011
0 0 1 1 0 1 = R(x) = x3 + x2 + 1
Signature
k 2N
k 2L Faulty
response
Correct
response
N << L
Technical University Tallinn, ESTONIA
BIST: Signature Analysis
Aliasing:
Response L - test length
UUT SA
N - number of stages in
L N Signature Analyzer
No aliasing is possible for those strings with L-N leading zeros since they are
represented by polynomials of degree N-1 that are not divisible by characteristic
polynomial of LFSR
000000000000000 ... 00000 XXXXX
2 L N 1 L 1 1
P N
Probability of aliasing: P L
2 1 2
Technical University Tallinn, ESTONIA
BIST: Signature Analysis
Parallel Signature Analyzer:
Single Input Signature Analyser
x4 x2 x 1
UUT
x3
x4 x2 x 1
x3
Multiple Input Signature
UUT Analyser (MISR)
Multiplexer Multiplexer
LFSR
1 x x2 x3 x4
UUT FF FF FF FF
Combinational circuit
Combinational circuit
FF FF FF
CC CC
CSTP
CC
R R
CC CC
CSTP CSTP
CSTP
M1 M2 M4
M3
MUX M5 BILBO
Concurrent
testing: MISR1
MUX M6
LFSR, CSTP M2 MISR1
M2 M5 MISR2 (Functional BIST)
CSTP M3 CSTP MISR2
LFSR2 M4 BILBO
Technical University Tallinn, ESTONIA
BIST Architectures
STUMPS: LOCST: LSSD On-Chip Self-Test
Self-Testing Unit Using MISR
and Parallel Shift Register Scan Path
Sequence Generator
BS BS
Test Pattern Generator
CUT
Scan chain
Scan chain
CUT CUT
TPG SA
...
Test
SI SO
Controller
MISR Error
IC
PS – Phase shifter
Scan-Forest
Scan-Trees
Scan-Segments (SC)
Weighted scan-
enables for SS
Compactor - EXORs
Fault Coverage
Possible solutions
• Weighted
Fault Coverage
pseudorandom test
• Combining
pseudorandom test
with deterministic test
– Multiple seed Time
– Bit flipping
Time
• Hybrid BIST
Hard
to test
faults
Fault Coverage
Hard
to test
Time faults
Pseudorandom
SoC
ROM
patterns Hybrid test set contains
... ... pseudorandom and
PRPG
Core
deterministic vectors
...
CORE UNDER
TEST random resistant faults
ATPG based:
R1 R2 Rk Rk+1 Rk+2 Rn
ATPG T1 Faults Faults to be
T2 detected detected
Task for . by
Detected fault . by
Faults pseudo-
simulator . random deterministic
. patterns patterns
Tn
All PR patterns?
Tn+1
No Yes Task for New detected
Next PR End ATPG Tp faults
pattern
ATPG T1
T2 Faults
detected Fault table
Task for .
By for full
Fault table fault .
deterministic
update simulator . pseudo- test
. random
Tn patterns
All PR patterns? Tn+1
Updated To be detected
No Yes fault Tp faults
Next PR End tabel
pattern
Hard
to test
faults
Fault Coverage
Pseudorandom
Solution: many seeds: test:
1 2n-1
Time
Seeds
ROM TPG UUT
RD
ADR Pseudorandom test windows
# seeds Window
Counter 2 Counter 1 CL
Seeds
• ROM contains test patterns for hard-to-test faults
• Each pattern Pk in ROM serves as an initial state of the LFSR for test pattern
generation (TPG) - seeds
• Counter 1 counts the number of pseudorandom patterns generated starting
from Pk - width of the windows
• After finishing the cycle for Counter 2 is incremented for reading the next
pattern Pk+1 – beginning of the new window
L
Seed 2
Block
size:
Problems: Deterministic
How to calculate the test (seeds): 100% FC
number and size of Seed 1
M
blocks? Seed 2
Constraints
Which deterministic Seed n
patterns should be the Seed n
seeds for the blocks?
Minimize L at given M and 100% FC
PTmin
All P-blocks are generated
… for all D-patterns and
ranked
The best P-block is selected
includeed into sequence
… and updated
The procedure ends when
Deterministic test vector (seed) DTi 100% fault coverage is
Pseudorandom test sequence PRi
Pseudorandom sequence removed with the
achieved
block length optimization
Technical University Tallinn, ESTONIA
Cost Curves for Hybrid BIST with Reseeding
Two possibilities for reseeding:
Constant block length (less HW overhead)
Dynamic block length (more HW overhead)
C1908
Test length L Memory cost M
10000 140
9000
L1(b) 120
8000
7000 100
6000
80
5000
L2(b)
60
4000
3000 40
2000
20
1000
M(b)
0 0
0 500 1000 1500 2000 2500 3000
Block size
b
Technical University Tallinn, ESTONIA
Functional Self-Test
SB=105 K*N
Fault
simulator
Register
block Functional
ALU test
Control Data Fault
compression: coverage
MUX
Automatic
M Test Pattern
Generator
Data
Technical University Tallinn, ESTONIA
Cost Functions for Hybrid Functional BIST
Cost
Total cost:
CTotal = CFB_Total +CD_Total
CTotal = CFB_Total +CD_Total
Opt.
The cost of functional test part: cost
CFB_Total = CFB_Const + CFB_T + CFB_M
CFB_T + CFB_M
The cost of deterministic test part: CD_T + CD_M
CD_Total = CD_Const + CD_T + CD_M CD_Const
Length of
CFB_Const FBIST
F
Register ALU
block
Improving
EXOR observability
Signature analyser
K
Data
Embedded Tester
C2670 C3540
Tester
Memory
BIST BIST BIST
SoC
How to pack
knapsack?
How to
compress the
test sequence?
4000
Real cost
Estimated Cost
Memory (bits)
Real Cost
Core costs
Cost Estimates
for Individual Cores
2000
Estimated cost
Total
test
0
500 542 1000 Total Test Lenght (clocks) 1500
length
Solution
Technical University Tallinn, ESTONIA
Total Test Cost Estimation
E
COST T,k Using PT length, we calculate
DT cost Total cost
the test processes for all cores:
Total cost
E* c432 4 205
COST
solution
T
Deterministic
Pseudorandom
c1355 86 50 73
j c499 136 48 25
PT length solution
Technical University Tallinn, ESTONIA
Multi-Core Hybrid BIST Optimization
Iterative optimization process:
1 - First estimation
1* - Real cost calculation
2 - Correction of the estimation
2* - Real cost calculation
3 - Correction of the estimation
3* - Final real cost
s3271 s298
Deterministic
Scan Path Scan Path
tests can only
Em bedded Tester Scan Path Scan Path
be carried out
LFSR
LFSR
LFSR
LFSR
Scan Path Scan Path
Test Scan Path Scan Path TAM for one core at a
C ontroller
time
Only one test
Tester
Mem ory access bus at
the system level
Scan Path Scan Path is needed.
LFSR
LFSR
LFSR
LFSR
Scan Path Scan Path
Scan Path Scan Path
Scan Path Scan Path
s1423 s838
SoC
While one module is tested by its test patterns, the same test
patterns can be applied simultaneously to other modules in the
manner of pseudorandom testing
Scan-In Scan-In
Faulty
Faulty 2) Effect-Cause block
area Fault Diagnosis
Cause
Faulty block is located in the
suspected faulty area
Faulty system
Fault
1) Cause-Effect
3) Fault Reasoning
Fault Diagnosis
Failing test patterns are mapped
Suspected faulty area is Failing
into the suspected defect or into a
located test
set of suspected defects in the Test patterns
faulty block
Embedded BIST Based Fault Diagnosis
Pseudorandom test
BISD scheme:
sequence:
Test Pattern Generator
(TPG) BISD
Control Unit
......
Faulty signature
SA1
Test pattern generator
SA2
D3
Fault D2
D1
CUD
D7
D5 D6
SA3
D4
SA1 SA2 SA3
SA1
SA2
D3
D1 D2
SA3
Optimization of the interface between D4
CUD and SA-s
240.0 65.0
230.0
220.0 60.0 Diagnosis with multiple
210.0
200.0 55.0 signatures:
190.0
180.0 Gain in 50.0
170.0 speed of
160.0 diagnosis 45.0
150.0
SAF
X-fault
Conditional fault Byzantine fault
Pattern fault Bridges
Constrained SAF Stuck-opens
Single faulty signal Multiple faulty signal
Technical University Tallinn, ESTONIA
Diagnosis of Fault Model Free Defects
Real test
experiment Simulation
Test pattern t
Real test
experiment Simulation Different classical fault cases
x1 x4
System level
x2 Defect
x3 x5 dy
Wd Defective
area
Error
Logic level detection
System
Parity bit
Examples:
Decimal digits: Parity check: 00 0 0 1
01 1 3 2
10 1 5 4
Eligible: 0,1,2,..., 9 11 0 6 7
Not eligible: 10,11,..., 15
Eligible
Not
eligible
Technical University Tallinn, ESTONIA
Error Detecting/Correcting Codes
Minimal number of bits
Hamming distance between codes: how two codes differ
from each other
d
Eligible
codes Parity bit
110
100 Parity check: 00 0 0 1
01 1 3 2
101 111 011
d=2 10 1 5 4
Eligible 001 11 0 6 7
codes 000
010
Eligible
Not
eligible
Not eligible codes
Eligible
codes
Eligible
codes
Detection
not possible
Correction
Not eligible codes not possible
d = 2e + 1 - 2e - error detection
e - error correction
bc+q b2 b1 bk 0, i 1,..., c
kPi
7 6 5 4 3 2 1 Pi – number of bits where bi = 1
P1 = b1 b3 b5 b7 = 0
Check bits
P2 = b2 b3 b6 b7 = 0
b2i, i = 0,1,,...,c-1 P3 = b4 b5 b6 b7 = 0
1 0 1 0 1 0 0 Initial code
7 6 5 4 3 2 1
1 0 1 1 1 0 0 Received code
Check bits Test
b2i, i = 1,...,c 7 6 5 4 3 2 1 0
P1 1 1 1 1 0
P1 = b1 b3 b5 b7 = 0 P2 1 1 1 1 0
P2 = b2 b3 b6 b7 = 0 P3 1 1 1 1 1
P3 = b4 b5 b6 b7 = 0
Initial code
Error
indication
Check-bits
generator Sender Receiver Checker
Error
Error
correction correction
code (restoring)
Received
correct code
Check
A B bit C(A) C(B)
generator
Residue Error
Comparator
calculator C(A + B) indicator
1 001
2 010
All
6 wires 3 011 opens
tested and
4 100
shorts
5 101
6 110
7 111 Stuck-at-0
test test
embedded
pattern TAM TAM responces’
source core sink
wrapper