Unit 5
Unit 5
• Introduction
• Test Pattern Generation
• Test Response Analysis
• BIST Architectures
• Scan-Based BIST
TPG
ORA
• Exhaustive testing
• Pseudorandom testing
– Weighted and Adaptive TG
• Pseudoexhaustive testing
– Syndrome driver counter
– Constant-weight counter
– Combined LFSR and shift register
– Combined LFSR and XOR
– Cyclic LFSR
Z
Z
F/F F/F 0 1 1
S1 0 0 1
S1 1 0
S2 1 0 0
S2 0 1
S3 0 1 0
S1 1 0
S4 1 0 1
:
S5 1 1 0
S6 1 1 1
S7 = S0 0 1 1
:
Z=0101… Z=1100101…
2 states 7 states
Built-in self test.8
Two Types of LFSRs
C 1 C2 C n-1 C n = 1
D Q
Cn =1 Cn-1 Cn-2 C 1
D Q
Q1 Q2 Qn
Built-in self test.9
Mathematical Operations over GF(2)
• Multiplication (• ) • 0 1
0 0 0
• Addition ( ⊕ or simply +) 1 0 1
⊕ 0 1
0 0 1
1 1 0
Example: = = =
− = − = − =
if = − • + − • + − •
then
= + + =
Built-in self test.10
Analysis of LFSR using Polynomial
Representation
∞
= + + + + + = ∑
• Generating function :
=
Let =
be output sequence of an LFSR of type1
= ∑ −
=
= = =
∞
= ∑ ∑ − −
= =
∞
= ∑ − − + + − − + ∑
= =
∑
− −
+ + − −
= =
+ ∑
∴ =
depends on initial state and feedback
coefficients
Built-in self test.13
Denominator
= + + + +
is called the characteristic polynomial of the
LFSR
Example:
3 2 1 0
= + +
sequence
• Definition: The characteristic polynomial associated
with a maximum length sequence is a primitive
polynomial
• Theorem: # of primitive polynomials for an n-stage
LFSR is given by
λ = φ −
where
φ = ∏
−
Built-in self test.15
Primitive Polynomial
• # primitive polynomials of degree n N λ
1 1
2 1
4 2
8 16
16 2048
• Some primitive polynomials 32 67108864
1: 0 13: 4 3 1 0 25: 3 0
2: 1 0 14: 12 11 1 0 26: 8 7 1 0
3: 1 0 15: 1 0 27: 8 7 1 0
4: 1 0 16: 5 3 2 0 28: 3 0
5: 2 0 17: 3 0 29: 2 0
6: 1 0 18: 7 0 30: 16 15 1 0
7: 1 0 19: 6 5 1 0 31: 3 0
8: 6 5 1 0 20: 3 0 32: 28 27 1 0
9: 4 0 21: 2 0 33: 13 0
10: 3 0 22: 1 0 34: 15 14 1 0
11: 2 0 23: 5 0 35: 2 0
12: 7 4 3 0 24: 4 3 1 0 36: 11 0
Built-in self test.16
Primitive Polynomial (Cont.)
• Characteristic of maximum-length sequence:
– Pseudorandom though deterministic and
periodic
– # 1’s = # 0’s + 1
= + +
1 1 0 0
1 0 0 1
0 0 1 0
0 1 0 0
1 0 0 0 (repeat)
3 2 1 0
• Sequence becomes:
…
Built-in self test.19
What to Do if 2n is too Large?
• Using “pseudorandom”
e.g. generate 232 pattern only
• Partitioning
Circuit
under
test (CUT)
• Using pseudo-exhaustive
Input Output
test Circuit response Signature
Data S( R’)
sequence T under sequence R’
Compression
test
unit
(CUT)
Error
indicator
Comparator
Correct Signature S( R0 )
• Ones Count
• Transition Count
• Parity Checking
• Syndrome Checking
• Signature Analysis
• C: single-output circuit
• R: output response =
• 1C(R) = # ones in = ∑
s-a-0 fault f2
x1 11110000
11001100 10000000 = R2
x2 11000000 = R1 Signature (ones count)
Counter
10000000 = R0
z
x3
10101010 =
Raw output
=
Input test
s-a-1 fault f1
test response =
pattern
sequence T
Signature
10000000 = R2 (transition count)
Counter
11000000 = R1
T Network 10000000 = R0 =
D Q
=
=
− −
• =
−
• Does not guarantee the detection of single-bit
errors
−
• Prob. (single-bit error masked) =
−
• Prob. (masking error) π
Built-in self test.27
Parity-check Compression
Signature
00000000 = R2
11000000 = R1 (parity)
10000000 = R0
D Q
T Network =
=
Clock =
random
test CUT
pattern
Counter /
Syndrome
+/- 0 1 * 0 1
0 0 1 0 0 0
1 1 0 1 0 1
• Linear ckt.:
Response of linear combination of inputs
= Linear combination of responses of individual
inputs
+ = +
Built-in self test.30
Use LFSR as Signature Analyzer
• Single-input LFSR
… …
⊕ Internal Type LFSR
• Initial state =
• Final state
= + or = +
: The remainder, or the signature
Built-in self test.31
Signature Analyzer (SA)
Input sequence:
1 1 1 1 0 1 0 1 (8 bits)
( ) = + + + + + 1 ( ) = 1 + + +
Time Input stream Register contents Output stream
12345
0 10101111 00000 Initial state
1 1010111 10000
: : :
5 101 01111
6 10 00010 1
7 1 00001 01
8 Remainder 00101 101
Quotient
Remainder ( ) = + () = 1+
Built-in self test.32
Signature Analyzer (SA) (Cont.)
+ + +
× +
= + + +
+ = + + + + + =
D Q
Cn Cn-1 Cn-2 C 1
N N
R R*
… ⊕ …
Ci
i D Q D Q
C
⊕ I
i
A B
Normal: CK, B
Shift: S/T=0, A, B
MISR: S/T=1, A, B
CUT
D D
I I
TPG ORA
S S
T T
CUT
BIST
controller
TPG ORA
CUT
TPG ORA
• Distributed
• Embedded
• Combinational “Kernels”
• Chip level
• “Clouding” of circuit
• Registers based description of circuit
• BILBO registers
...
B2
Si 0
MUX
D Q D Q D Q D Q
1
...
Q Q Q Q S0
Q1
Q2 Qn-1 Qn
...
B1 B2 BILBO
0 0 shift register
0 1 reset
1 0 MISR (input ∗ constant ∗ LFSR)
1 1 parallel load (normal operation)
Built-in self test.46
Applications of BILBO
• Bus-oriented structure
BUS
R11 R1n
C1 … Cn
R21 R2n
BILBO
C2
…
BILBO
Cn
…
R1
C
C1
BILBO
R2
MISR or TPG ? R2 ?
Using CBILBO
+ +
TPG mode: C1, A2, B=0
MISR mode: C1, A1, C2=0
CUT
OR SA
CUT
1 0 0
S-a-0
1 0 0
0 1 0
1 0 1
1 1 0
1 1 1
0 1 1
0 0 1
32 bits
….. …..
S-a-0
Or
S-a-1
S-a-0
Memory testing.1
Memory Market Share in 1999
17
• DRAM: 8 X 10
16
• Flash: 6 X 10
16
• ROM: 2 X 10
15
• SRAM: 9 X 10
Memory testing.2
DRAM Price per Bit
Memory testing.3
Test Time as a Function of Memory Size
Cycle time: 10 ns
Memory
Row cell
decoder Write driver
array
Data
Data Data Read/write
Control Signal out in
Memory testing.5
Fault Models
Memory testing.6
Stuck-At Fault
• The logic value of a cell or a line is always 0 or 1.
Transition Fault
• A cell or a line that fails to undergo a 0 1 or a 1 0
transition.
Coupling Fault
• A write operation to one cell changes the content of
a second cell.
Memory testing.7
Neighborhood Pattern Sensitive Fault
• The content of a cell, or the ability to change its
content, is influenced by the contents of some other
cells in the memory.
Memory testing.9
Traditional Tests
Algorithm Test length Test Time Order
• Zero-One
• Checkerboard
• GALPAT +
• Walking 1/0 +
• Sliding Diagonal + ⋅ ⋅
• Butterfly + − ⋅
Algorithm March X
Step1: write 0 with up addressing
order;
Step2: read 0 and write 1 with up
addressing order;
Step3: read 1 and write 0 with down
addressing order;
Step4: read 0 with down addressing
order.
Memory testing.11
Notation of March Algorithms
w0 : write 0
w1 : write 1
r0 : read a cell whose value should be 0
r1 : read a cell whose value should be 1
Memory testing.12
March Algorithms
EX:
MATS ( modified algorithmic Test Sequence)
Memory testing.13
Some March Algorithms
Memory testing.14
Some March Algorithms (Cont.)
Memory testing.15
Tests for Stuck-At, Transition and
Coupling Faults
March alg. Test len. Fault coverage
MATS 4n Some AFs, SAFs
MATS+ 5n AFs, SAFs
Marching 1/0 14n AFs, SAFs, TFs
MATS++ 6n AFs, SAFs, TFs
March X 6n AFs, SAFs, TFs, Some CFs
March C- 10n AFs, SAFs, TFs, Some CFs
March A 15n AFs, SAFs, TFs, Some CFs
March Y 8n AFs, SAFs, TFs, Some CFs
March B 17n AFs, SAFs, TFs, Some CFs
Memory testing.16
NPSF
n n n b: base cell
n b n n: neighbor cells
n n n
Memory testing.17
DC Parametric Testing
• Contains:
1. Open / Short test.
2. Power consumption test.
3. Leakage test.
4. Threshold test.
5. Output drive current test.
6. Output short current test.
Memory testing.18
AC Parametric Testing
• Output signal: - the rise & fall times.
• Relationship between input signals:
– the setup & hold times.
• Relationship between input and output signals:
– the delay & access times.
• Successive relationship between input and output
signals:
– the speed test.
Memory testing.19
Dynamic Faults
• Recovery faults:
− Sense amplifier recovery
− Write recovery.
− Retention faults:
− Sleeping sickness
− Refresh line stuck-at
− Static data loss.
− Bit-line precharge voltage imbalance faults.
Memory testing.20
BIST: Pros & Cons
• Advantages:
– Minimal use of testers.
– Can be used for embedded RAMs.
• Disadvantages:
– Silicon area overhead.
– Speed; slow access time.
– Extra pins or multiplexing pins.
– Testability of the test hardware itself.
– A high fault coverage is a challenge.
Memory testing.21
Typical Memory BIST Architecture
Using Mentor’s Architecture
sys_addr
Pattern Generator
Algorithm-Based
di
sys_d addr Memory data
isys_wen wen
Module
rst_l
Compressor
clk q
compress_h clk
hold_l
rst
test_h si so
se
BIST Circuitry
Memory testing.22
Multiple Memory BIST Architecture
sys_addr1
sys_addr2
sys_di2 addr1 ROM4KX4 4
Pattern Generator
data
Algorithm-Based
sys_wen2 Module
sys_addr3
di2
sys_di3 addr2 RAM8KX8 8 data
sys_wen3 wen2 Module
rst_ di3
l clk addr3 RAM8KX8 8 data
wen3 Module
hold_l
test_h compress_h
BIST
Circuitry
q
se
Compressor so
si
Memory testing.23
Serial Testing of Embedded RAM
Go
BIST mode Done
Control Block
Timing
Counters Generator
BIST on
S0 S1
msb
Mission Control Read/Write
mode
interface { Data out
Data in
Address
1sb
c-1
Clock
log W c c 2
2
Memory testing.24
Built-in Self-Repair
Memory testing.25
BISR Using Switch Array
BISR module
Address
input RAM RAM-Array
Decoder Switch Array module
Data
Out
Data
input
Memory testing.26
BISR via Fault-Address Comparison
BISR module
Address
input Fault-Address RAM RAM-Array
Compare Decoder module
Data
Out
Data
input
Memory testing.27
Chapter 4: Memory Built-In
Built In
Self Test
Self-Test
Jin Fu Li
Jin-Fu
Dept. of Electrical Engineering
National Central University
Jhongli, Taiwan
Outline
• ROM BIST
• RAM BIST
• Serial BIST for RAMs
• Processor
Processor-Based
Based RAM BIST
• RAM BISTs in SOCs
• References
Test Controller
Buffer
NOR/NAND
Decoder
(ROM Array)
Buffer
Outputs
O t t
EE, National Central University Jin-Fu Li 5
An Example of ROM BIST
Counter
ROM
Controller MISR
Go/No-Go Status
Normal I/Os
T t Controller
Test C t ll
Test Collar
C
RAM
Test Pattern
Generator
Go/No-Go
Comparator
• Controller
− Generate control signals to the test pattern
generator & the memory under test
• Test pattern generator (TPG)
− Generate the required test patterns and Read/Write
signals
g
• Comparator
− Evaluate the response
EE, National Central University Jin-Fu Li 8
ROM-Based RAM BIST
• The features of ROM-based BIST scheme
− The ROM stores test procedures for generating test
patterns
− Self-test is executed by using BIST circuits controlled
by the microprogram ROM
− A wide range of test capabilities due to ROM
programming
p g g flexibility
y
• The BIST circuits consists of the following
functional blocks
− Microprogram ROM to store the test procedure
− Program counter which controls the microprogram
ROM
− TPG
− Comparator
EE, National Central University Jin-Fu Li 9
ROM-Based RAM BIST Architecture
Normal I/Os
E d
End Mi
Microprogram
Test Collar
ROM
RAM
TPG
Go/No-Go
Comparator
IF AC=MAX/0
ELSE DEC PC
INCREMENT AC
DECREMENT AC
EXCLUSIVE OR
INVERT/NORMAL
COMPARE/MASK
WRITE/READ
CLEAR
TEST END
EE, National Central University Jin-Fu Li 11
FSM-Based RAM BIST
Normal I/Os
E d
End
FSM
Test Collar
RAM
TPG
Go/No-Go
Comparator
R0 S1
NOT last address?
W1 S2
R1 S3
NOT last address?
W0 S4
R0 S5
NOT last address?
W1 S4
End S4
EE, National Central University Jin-Fu Li 13
Programmable RAM BIST
• A example
An l off the
h programmable
bl RAM BIST
Normal I/Os
CMD
T
TPG
BSI
Test Collar
Con
TGO
& Compar
BSC RAM
C
ntroller
C
ENA
BRS
rator
DONE
BGO
CLK
BNS
Idle BRS=1
BSC=1
DONE=1 Shift
Shift_cmd
d
BSC=0
Get_cmd
Apply ENA=1
DONE=0
Idle ENA=0
ENA=1
Init DONE/GO
Null=1
Null=0
Ifetch
Exec
Dfetch
Error=1 Error=0
No-Go Compare
Row de
Ci Ci+1
ecoder
Column decoder
Latch Latch
Write
Read
BIST on
To next test input
From previous output or serial input
or serial input
Ii Oi Ii+1 Oi+1
EE, National Central University Jin-Fu Li 20
Serial Shift Operation
• An example of serial shift operations for the
match element (R0W1)
Time Operation Serial Word Serial
in content out
0 X 0 0 0 0 X
1 R0 X 0 0 0 0 0
0
11 00 00 00 2 W1 1 1 0 0 0 0
3 R0 1 1 0 0 0 0
4 W1 1 1 1 0 0 0
5 R0 1 1 1 0 0 0
010 000 000 000
6 W1 1 1 1 1 0 0
7 R0 1 1 1 1 0 0
1
X
1 0
X
8 W1 1 1 1 1 1 0
Controller Timing
Counters
generator
SO SI
Control
lsb msb
Data out
Data in
Address C-1
Controller Timing
Counters
generator
g
SO SI
Add
Address R d/W it
Read/Write
SO SI Timing
g
C
Counters
t Controller generator
Address Read/Write
n
m wire
n
n
e
m wire
Normal I/Os
Processor
Test Collar
RAM
TPG
Go/No-Go
Comparator
ADDR_cpu
ADDR
ADDR_bist
DATAO
DATAO_sys
DATAO
DATAO_bist
Embedded On-chip Embedded
CPU
Clock_cpu
BIST core Mux_sel
bus Memory
Ctrl_bist control
Ctrl_cpu
RAL L
Lowest/highest
t/hi h t addr
dd ADDR_bist
Address
ADDR_cpu Address counter
RAH REA
decorder Up/down
RME RFLAG Read/Write
Control
RIR RED Controller
Match/unmatch
DATAI_bist
DATAI sys
DATAI_sys
Comparator
Data background
Register Function
RBG Store background data
RAL Store lowest address
RAH Store highest address
RME Store current March element
RIR Instruction register of BIST circuit
RFLAG Status register of BIST circuit
RED Erroneous response of defective cell
REA Address of defective cell
yes
Test program
Write FINISH to RFLAG
take over
EE, National Central University Jin-Fu Li 31
SOC Testing
• A typical SOC chip
ADC FPGA
Flash Memoryy
Wrapper
CPU UDL
DSP
Sink
TAM
Source Test Access Mechanism (TAM)
DRAM
MPEG SRAM SRAM
DRAM
MPEG SRAM SRAM
ADC FPGA
Flash
Wrapper Memory
On chip Source/Sink
On-chip UDL
CPU DSP
1. Close to Core-under-test Sink Sink
2 Less TAM area
2. Source Source
1500 Wrapper
W 1500 Wrapper
W
User-Defined
Test Controller
W
WBR
W
WBR
Core
Functional Functional
data data
WBY
WSO
WSI WIR
WSC
ADC FPGA
Flash Memory
DRAM
SRAM SRAM SRAM
BIST
BIST
DRAM
MPEG SRAM SRAM
BIST BIST
ADC FPGA
Flash Memory
CPU UDL
DSP
DRAM
SRAM SRAM SRAM BIST
BIST MBI
MBI MBI
BIST
MBI
BIST
MPEG SRAM DRAM
SRAM
• Bypass
yp Register
g
− It is selected if the corresponding memory core is not
tested
• Monitor Register
− Monitor
o to the
t e error
e o flag
ag ((indicating
d cat g whether
et e a memory
e oy
fault is detected or not)
• Status Register
− Record the key status values, such as Fail output from
the BIST
TPG &
BIST Controller Comparator
BIST C ll
Collar BIST C
Collar
ll BIST C ll
Collar
S
Source: P
Prof.
f C.
C W
W. Wu,
W NTHU
T
TAP
Wrapper
Con
TAP
ntroller
P
BIST RAM
ATE
TAM
Wrapper
S
Source: A
Appello
ll DD., et. al.l ITC03
Processor
Wrapper
Control
P1500 Test Program
Instructions Unit
S
Source: A
Appello
ll DD., et. al.l ITC03
I t ti
Instruction M
Meaning
i
Current_address ⇐ Add_Max
SET_ADD
Direction flag ⇐ BACKWARD
Current_address ⇐ Add_Min
RST_ADD
g ⇐ FORWARD
Direction flag
Current_data ⇐ DataBackGround[Dbg_index]
STORE_DBG
Dbg_index ⇐ Dbg_index+1
INV_DBG Current_data ⇐ NOT (Current_data)
WSI
WRCK W
WRSTN C
TAP controller
D
W W
Me
ShiftWR W R
emory
D
c
UpdateWR I Processor B
R R R
CaptureWR
W
SelectWIR B Test
Y Program CORE
WSO
Wrapper