Design For Testability and Design For Testability and Built Built - in Self in Self - Test Test
Design For Testability and Design For Testability and Built Built - in Self in Self - Test Test
Jin-Fu Li Advanced Reliable Systems (ARES) Lab Lab. Department of Electrical Engineering National Central University Jungli, Taiwan
Outline
Basics Design-for-Testability (DFT) Techniques
Ad Hoc DFT Structural Methods
Scan Partial Scan BIST Boundary Scan Syndrome-Testable Design C-Testable Design g
Summary S
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 2
Definitions
Definition
A fault is testable if there exists a well-specified procedure to expose it which is implementable with it, a reasonable cost using current technologies. A circuit is testable with respect to a fault set when each and every fault in this set is testable h h d f lt i thi t i t t bl
Definition
Design for testability (DFT) refers to those design techniques that make test generation and test application cost-effective
Electronic systems contain three types of components: (a) digital logic, (b) memory blocks, blocks and (c) analog or mixed signal circuits mixed-signal In this chapter, we discuss DFT techniques for digital logic
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 3
Mode
T1 T2
0 0 1 0 1 0
C1
1 0
C2
CP3
CP4
X
(present state) y
Combinational Logic
Z Y (next state)
clk
state
T SCAN-IN
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 9
10
Comb. logic D1 D2 CK
Jin-Fu Li, EE, NCU
Q FF Comb. logic
11
A A B T
0
FF CK Test
Testing derived clocks requires the use of a mux to bypass the division stages yp g
CK Freq. Divider q FF CK Freq. Divider FF
FF
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU
Test
FF
12
FF
FF
FF
FF
Test
13
14
I1
I2 Combinational logic
O1
O2
PO
S1
S2
N1
N2
15
S1
S2
PO
O1
O2
SCAN-OUT
N1
N2
SCAN-INK
Scan Register 3
SCAN-OUTK
18
Hierarchical Scan
Scan flip-flops are chained within subnetworks before chaining subnetworks Advantages:
Automatic scan insertion in netlist Circuit hierarchy preserved helps in debugging and design changes
Hierarchical netlist
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU
Flat layout Fl t l t
19
Y Y
SCAN OUT
Combinational ATPG Combinational vectors Scan sequence S and test program generation Scan chain order Design and test D i dt t data for manufacturing
Scan netlist
Chip layout: S Chi l t Scanchain optimization, timing verification
Test program
Mask data
21
check_test
Pre-Scan DRC
insert_scan
Insert Scan
check_test
Post-Scan DRC Preview Coverage g
HDL
Constraint-Based Scan Synthesis: Routing, balancing, gate-level optimization Source: H.-J. Huang, CIC
22
Shift Registers
Scan added:
SHFT_IN SI SHFT_OUT/ SO
DFF
DFF
DFF
CLK SE
Revised:
SHIFT_IN SI SE CLK SHIFT_OUT
DFF
DFF
DFF
F1
F2
latch
F3
CLK_RTZ_1
tINV
CLK_RTZ_2
clk1 clk2
clk1 clk2
OK!
24
X C SI
L L
C/L
SO
25
CK2 Addr
SO
Advantages
Fast; i i F t minimal i l impact on normal path t l th Fast for testingrandom access Ability to watch a node in normal operation mode
Disadvantages
Hardware cost i l H d t is large; more pins added i dd d
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 26
Sin SCK
During normal operation the storage cells operate in their parallel-load mode parallel load To scan in a bit, the appropriate cell is addressed, the data are applied to sin
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 27
Test Procedure
1. Set test input to all test points 2.Apply 2 Apply the master reset signal to initialize all memory elements 3.Set scan in 3 Set scan-in address and data and then apply the scan data, clock 4.Repeat 4 Repeat step 3 until all internal test inputs are scanned in 5.Clock 5 Clock once for normal operation 6.Check states of the output points 7.Read the scan-out states of all memory elements by applying appropriate X-Y signals
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 28
HOLD
The control input HOLD keeps the output steady at previous state of flip-flop Applications
Reduce power dissipation during scan, etc.
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 29
[Source: EE Times]
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 30
[Source: EE Times] [S Ti ]
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 31
Syndrome-Testable Design
Definition
S( f )
The syndrome of a Boolean function f is , where k is the number of 1s (minterms) in f and n is the number of independent input variables A typical syndrome testing set up set-up
(Counter) CUT Exhaustive patterns Syndrome register
Reference syndrome
k( f ) 2n
Comparator C t Go/No-go
0 S( f ) 1
S
Advanced Reliable Systems (ARES) Lab.
ANDn 1 / 2n
ORn 1 (1 / 2 n )
XORn 1/2
NOT 1/2
32
Syndrome Computation
Consider a circuit having 2 blocks, f and g, with unshared inputs p
O/P Gate
OR S f + Sg S f Sg
NOR 1 S f Sg + S f Sg
Example
Calculate the syndrome of the following circuit
S1 = 1 1/4 = 3/4 1-1/4 S2 = 1-1/4 = 3/4 S3 = 1/8 S4 = 1- S2 - S3 + S2S3 = 7/32 S = S1S4 = 21/128
S1 S2 S4 S3
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU
33
Syndrome-Testable Design
Consider the function f = xz + y z . The circuit is syndrome untestable
If the circuit has a fault z / 0 , then the corresponding syndrome of the faulty circuit is S'f =1/ 2 Thus the circuit is syndrome untestable
S f = 1/ 2
A realization C of a function f is said to be syndrome-testable if no single stuck-at fault causes the circuit to have the same syndrome as the fault-free circuit Syndrome is a property of function, not of implementation
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 34
Syndrome-Testable Design
Definition
A logic function is unate in a variable xi if it can be g represented as an SOP or POS expression in which the variable xi appears either only in an uncomplemented form or only in a complemented form For example:
in x1
Theorem
A 2-level irredundant circuit realizing a unate l l d d l function in all its variables is syndrome testable
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 35
Syndrome-Testable Design
Theorem
Any 2-level irredundant circuit can be made y syndrome-testable by adding control inputs to the AND gates
For example
The function f = xz + y z is syndrome untestable Now add a control input c f = cxz + y z , where 1 when in normal operation mode C normal i/ l i/p when in test mode h i t t d S = 3 / 8, f = y , and S = 1 / 2 S Syndrome testable
Drawbacks
Only for combinational logic Exhaustive; modification doubles test set size
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 36
(i, j )
i 1
37
38
C-Testability
Definition
A C-testable array is an array testable with constant number of test patterns i d t t b ft t tt independent of the d t f th size of the array
A cell is a combinational machine ( , , f ) , where f : is the cell function and = {0,1}I and = {0,1}O for I , O N Definition
), A cell function is injective if (i1, j1) (i2, j2 ) f (i1, j1) f (i2, j2 ) . If a function is injective and = , then the function is bijective.
Theorem
A k -dimensional ILA with a bijective cell function is C-testable
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 39
s
a
s
c
40
a
b
z
w
s
a
s
c
s
a
s
b c
41
a
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
z
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
s c
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
a b s c
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 0 0 1 1 0 0 1 1 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 1
a
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
Jin-Fu Li, EE, NCU
z
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
s c
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
a b s c
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 0 0 1 1 0 0 1 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
42
J
I2
I1
J
2
I3
J3
J
4
I4
I2
J3
I3
(i, j )
J
I4
4
I5
I3
J
I4
I5
J5
I6
J5
43
Advantages of BIST
Test patterns generated on chip controllability on-chip increased ( (Compressed) response evaluated on-chip p ) p p observability increased Test can be on-line (concurrent) or off-line Test can run at circuit speed more realistic; shorter test time; easier delay testing External test equipment g q p greatly simplified, or even y p , totally eliminated Easily adopting to engineering changes
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 44
Voter
Output
Module N
PG
RA
Go/No Go Go/No-Go
Controller BIST
Test generation
Prestored TPG, e.g., ROM or shift register Exhaustive TPG, e.g., binary counter , g, y Pseudo-exhaustive TPG, e.g., constant-weight counter, combined LFSR and SR Pseudo-random pattern gene ato e g Pse do andom patte n generator, e.g., LFSR
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 46
Linear feedback shift register (LFSR) can be both the test generator and response analyzer We need a gold unit to generate the good signature or a simulator
47
Signature Analysis
A compression technique based on the concept of cyclic redundancy checking (CRC) and realized i hardware using li li d in h d i linear f db k feedback shift registers Definition D fi iti
A function f(x1,x2,,xn) is said to be linear if it can be expressed in the form
f = a 0 a1 x1 a 2 x 2
,n
an xn
There are 2n+1 linear functions of n variables Linear operations: modulo addition, module scalar multiplication, & delay Nonlinear operations: AND, OR, NAND, NOR, etc.
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 48
Let M=fault-free circuit response, B=faulty circuit response, and E=error syndrome (Hamming), where E M B th (H i ) h E=M thus M B E M=B and B=M E
We W need a circuit to take B as input and d i it t t k i t d compact it but still be able to tell if M!=B
LFSR is considered as a popular approach for conside ed pop la app oach fo test response compaction
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 49
Structures of LFSR
Two types of generic standard LFSRs
C1
C2
CN-1
CN
D FF
Y1
D FF
Y2 YN-1
D FF
YN
C1
C2
CN-1
CN
D FF
Y1
D FF
Y2
Jin-Fu Li, EE, NCU
D FF
YN-1 YN
50
If we denote the translation operator as Xk, where k i the time translation unit h is th ti t l ti it Y j (t ) = Y0 (t ) X j On the Nth h d O th other hand, Y0(t) can b expressed as be d Then Th
Y0 (t ) = C jY j (t )
j =1
Y0 (t ) = C jY0 (t ) X j for 1 j N
j =1
51
j Also, Also Y 0 ( t )( C j X + 1) = 0
where PN ( X ) = 1 + C j X j
j =1
+ m1 X + m0
C2 Cr-1 Cr
D FF
m(X) s1
D FF
s2 sr-1
D FF
q( ) q(X) sr
c( X ) = cr X r + cr 1 X r 1 +
Advanced Reliable Systems (ARES) Lab.
+ c1 X + c0
53
The Th quotient q(X) appears serially at the i (X) i ll h output of the SR. The remainder s(X) is in the SR after n+1 shifts:
s ( X ) = sr X r + sr 1 X r 1 + + s1 X + s0
54
An Example
The following LFSR divides any m(X) by c(X)=X5+X4+X2+1
m(X)
D0
D1
D2
D3
D3
q(X)
D0 D1 D2 D3 D4 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1
O/P 1 01 101
55
Signature Analysis
Let m(X) be the input polynomial of degree k-1, q(X) the quotient, and s(X) the signature (remainder). Then m(X)=q(X)c(X)+s(X) The error syndrome can be represented as a polynomial e(X) E.g., le m(X)=X4+X3+1(11001), and an erroneous m(X) X input b(X)=X3+X+1(01011), then the error syndrome is 11001 01011=10010, and is represented b e(X)=X4+X t d by (X) X In general, an erroneous input polynomial can be represented by B(X)=m(X)+e(X)
56
Signature Analysis
Theorem1: Input streams m(X) and b(X) have the same signature iff e(X) is a multiple of c(X)
Proof: an error is not detected when m(X) and b(X) have the same signature, i.e., b(x)=q(X)c(X)+s(X). Since m(X)=q(X)c(X)+s(X), we obtain e(X)=m(X)+b(X)=c(X)(q(X)-q(X)) (X) (X) b(X) (X)( (X) (X))
Theorem2: Undetected errors correspond to error patterns which are multiples of c(X) Theorem3: If c(X) has 2 or more nonzero , coefficientsi.e., at least 1 feedback termthen it can detect all single-bit errors
Proof: all nonzero multiples of c(X) must have at least 2 nonzero coefficients. Therefore, any error with only 1 ffi i t Th f ith l nonzero coefficient cannot be a multiple of c(X) and must be detectable.
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 57
Aliasing Probability
Theorem4: for a k-bit response sequence, if all possible error patterns are equally likely, then the probability p obabilit of failing to detect an error (i.e., the e o (i e aliasing probability) by the LFSR of length r is 2 k r 1 Pal = k 2 1 Proof: For a k-bit response, deg(m(X))=k-1, and k bit deg(m(X)) k 1, deg(e(X))<=k-1. Therefore, the number of possible error polynomial is represented by e(X)=c(X)p(X) for fo some nonzero p(X). Since deg(c(X)) non e o p(X) deg(c(X))=r, the number of possible p(X)s is 2k-r-1. Thus
2 k r 1 Pal = k 2 1
D FF
D FF
D FF
Cr
Cr-1
C2
C1
The mathematical theory is a direct extension of the results shown above For equally likely error patterns and long data streams, the aliasing probability for an MISR of r stages also is P 1/ 2r.
al
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 59
Response Compaction
Usually, we think of data compression as a process that preserves data integrity. This is why we given more attention here to data compaction, which may result in some losses There are several compaction testing techniques Parity testing One counting Transition counting Syndrome calculation Signature analysis
60
Parity Testing
This is the simplest of all techniques but also the most lossy The parity of responses to the test patterns is calculated as i=L P = i =1 ri , where L is the length of the test and ri is the response for the ith test pattern The response of the circuit under test (CUT) to pattern i and the partial product Pi-1 is illustrated as below
Test Patterns
Advanced Reliable Systems (ARES) Lab.
CUT
ri
Pi 1
D FF
61
One Counting
The number of 1s in the response stream is calculated and compared to the number of 1s in the fault-free esponses fa lt f ee responses Consider the circuit shown below
a b c
11110000 11001100 11101010 10101010 11000000
If we have a test of length L and the fault free count fault-free is m, the possibility of aliasing is [C(L,m)-1] patterns out of a total number of possible strings of length L, p g g , (2L-1)
62
Transition Counting
In transition counting compaction, it is only the number of transition 0 1 and 1 0 that are counted. Thus Th s the signature is given by signat e gi en b i = L1 i=1 ri ri+1 , where the summation is ordinary addition and is XOR operation The compaction scheme is shown below
ri
Test Patterns
CUT
D FF
ri 1
63
64
Q1
Q2
Q3
Q4
output
State 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15=0
Q1 Q2 Q3 Q4 1 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 1 1 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0
The output sequence is 000111101011001, which repeats after 15(2n-1) clocks p g Max period for an n-stage ALFSR=2n-1 All-0 state of the register cannot occur in the max-length cycle
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 65
C1
C2
Cn-2
Cn-1
Cn
am
Q1
am 1
Q2
am 2
Qn-1
amn+1 n
Qn
am n m
G ( X ) a0 + a1 X +
+ am X +
m
= m = 0 a m X m
In th I the above figure, assume that the current state of Qi i b fi th t th t t t f is am-i, i=1,2,,n, and the initial state of Qi is a-i=0, n i=1,2,,n, but a-n=1, then am = i =1 ci ami
Advanced Reliable Systems (ARES) Lab. Jin-Fu Li, EE, NCU 66
m =0
am X
i
m =0 i
(
+ +
+
i =1
cia m i ) X
1
i =1
ci X
m =0 m i
a m i X
m i
= =
=
i =1
ci X [a i X ci X [a i X
ci X i [a i X
i
+ a 1 X + a 1 X
+ a 1 X
n
+ +
m =i
a m i X am X
m
i =1
m =0
1
+ G ( X )]
i
i =1
= 1+
i =1
ci X G ( X ) + ci X G ( X ) =
i
i =1
ci X i ( a i X ci X i ( a i X
i n
+ +
+ a 1 X + a 1 X
1
i =1
i =1
G(X ) =
n i =1
ci X i ( a i X 1+
+
i
+ a 1 X
c X i =1 i
67
1 G(X ) = = c( X )
m =0
) )
p
( a 0 + a1 X +
+ a p 1 X
p 1
p 1
p 1
= ( a 0 + a1 X +
= ( a 0 + a1 X + 1 X
+ a p 1 X
+ a p 1 X
+ a p 1 X
p
p 1
)( 1 + X
)
+ X
2p
1 X p = a 0 + a1 X + c( X )
Advanced Reliable Systems (ARES) Lab.
Theorems
Theorem: If the initial state of an n-stage LFSR is a-i=0, i=1,2,,n-1, and a-n=1, then the LFSR sequence {am} is i periodic with a period th t i th smallest i t i di ith i d that is the ll t integer p for which c(X) divides 1-Xp
The period p<=2n-1 p< 2 1 For a given n, we want to find a c(X) that maximizes p
Definition: The sequences produced by max-length LFSRs are called pseudorandom sequences or msequences. The characteristic polynomial associated with an m-sequence is called a primitive polynomial polynomial. An irreducible polynomial is one that cannot be factored
Pseudorandom sequences (or m-sequences) are not really random since they are produced by a fixed circuit.
69
Theorems
Theorem: An irreducible polynomial c(X) satisfies the following 2 conditions:
It has an odd number of terms including the constant h dd b ft i l di th t t term If its degree n>3, then c(X) must divide 1+Xp, where g , ( ) p=2n-1
Theorem: A primitive polynomial is irreducible if the smallest positive integer p that allows the polynomial to divide evenly into 1+Xp occurs for p=2n-1, where n is the degree of the p y g polynomial
70
Built-In-Logic-Block-Observer (BILBO)
A BILBO is a multi-purpose test module which serves as a test generator or a signature analyzer. It is composed of a row of FFs and some additional gates for shift and feedback operation
Z1 B1 B2 SI
0 1
Z2
Z3
Z4
B1 B2
0 1 0 1 1 1 0 0
Function
All FFs are reset Behaves as separate latchesnormal mode A linear shift registerSR mode MISR/PRPGtest mode
Jin-Fu Li, EE, NCU 71
STUMPS Architecture
Logic BIST with STUMPS architecture
PRPG
PIs
Test T t control signal
CUT BSR
POs
MISR
72
Summary
Design-for-testability techniques
Ad-hoc techniques q Scan LSSD Random access scan Syndrome-testable C-testability
Scan is a popular DFT technique in modern IC design DFT can increase the controllability and observability of the circuit under test
73
Summary
Built-in self-test methodology is more and more important for deep submicron designs p p g Two key components of BIST
Test pattern g p generator
E.g., LFSR
Response evaluator
E.g., BILBO
74