DFT Student
DFT Student
Introduction
• Sequential circuit testing requires (dseq+1) number of
test patterns
• Inconsistency may occur in any time frame
• Difficulty in controlling secondary inputs and difficulty in
observing secondary outputs --- sequence of patterns for
ATPG
• Various techniques to make the flip-flops controllable
and observable which convert a sequential circuit into
virtual combinational one such that ATPG for
combinational circuit can be used for seq. circuits
• Results in additional circuitry, called design for test
(DFT), will be put on-chip, adding to extra area overhead
2
Design for testability (DFT)
• Refers to those design techniques that make test
generation and test application cost-effective
• Improve
• Controllability: a measure of the difficulty of
setting internal circuit nodes to 0 or 1 by assigning
values to primary inputs (PIs)
• Observability: a measure of the difficulty of
propagating a node’s value to a primary output
(PO)
Design for testability (DFT)
• DFT methods for digital circuits:
• Ad-hoc methods
• Structured methods:
• Scan
• Partial Scan
• Built-in self-test (BIST)
• Boundary scan
Ad-Hoc DFT Methods
Good design practices learnt through experience are
used as guidelines
clk FF
reset
Input(D) Output(Q) Set Reset clk
1 1 0 0 Clk edge
0 0 0 0 Clk edge
7
Test generation using set/reset pins
b set=1
1
c
D Q
Primary input sa1 FF Primary output
clk 8
Reset = 0
Test generation using set/reset pins
b=1 set=0
D
c
D D Q
Primary input=0 sa1 FF Primary output
clk
Reset = 0
b set=0
D
c
D Q
Primary input sa1 FF Primary output
clk 9
Reset = 0
Test generation using set/reset pins
10
Test generation using set/reset pins -
Drawback
• Irrespective of the value of dseq, only 2 patterns are
required to test a sequential circuit with set/reset FFs –
Solves the problem of too many test patterns
• Increase pin-out – increase ATE cost
set1 set2
a
Primary output
b
circuit
c
clk
reset1 reset2
11
ATPG : set and reset by Shift register
• Avoid large pinout using shift registers
• Three additional I/O pins are required – Test in, Test out,
s_clk set = 1 set = 1
a
j
b
c D Q
1 e . f
D Q
i
2 sa0
d k
clk clk FF2 4
FF1
g h
3
reset = 0
reset = 0
Test in
D Q .1
D Q . 0
D Q . 1
D Q . Test out
0
13
ATPG: Time Frame Expansion VS
Shift register
• In time frame method, dseq number of time frames are
required to load the FFs and then apply the test pattern
• (dseq+1) number of test patterns
• Generally dseq ≤ n
• In Shift register (SR) based method, 2n number of extra FFs
are required
• time frame expansion method less popular
-- uses the primary inputs to set/reset the FFs, more
complex
-- May arrive at an inconsistency after some time frames
• In the case of SR method, direct access to the FFs - No
question of inconsistency 14
Controllability and observability using
Scan Register
• Scan register – register with parallel load and shift
capability (serially connected Scan FF or scan
storage cell)
• Loading data – scan in; reading data scan out
NI
NI
Q
Q SI sout
SI
sin Scan FF
Scan FF clk
clk
M
M
Controllability and observability using
Scan Flipflop
• Simultaneous controllability/observability
• Run circuit up to t: At t+1 make M = 1, data in SSC injected
on to z’: z loaded to SSC (Scan storage cell)
• Through serial in required data can be stored in SSC
• Through serial out data can be observed at output
z z’
C1 0
MUX C2
1
M
z
D Q
C1 C2
FF
clk
Controllability and observability using
Scan Register
• Non Simultaneous controllability/observability
• Run circuit up to t: At t+1 if M = 1, data in SSC
injected on to z’: M=0, z’ loaded to SSC
z
C1 0 z’
MUX C2
1
M
NI
Q
FF
clk
Controllability and observability using
Scan Register
• Observability only
z
C1 C2
NI
Q
SI
Scan FF
clk
M
Controllability and observability using
Scan Register
• Controllability only
z
C1 0 z’
MUX C2
1
M
NI M
Q
SI
Scan FF
clk
M
Generic scan based designs
Sec.input
Normal input D Q Scan out
from NSF mux clk FF
mode
Scan in
(an additional input)
Scan chain: Advantages
• n number of clk pulses and n bit pattern are required in scan
chain method in contrast to 4n number of clock pulses and
4n bit pattern in the case of shift register method. Need for
extra 2n number of FFs is eliminated
• Required to have n number of multiplexers whose sizes are
very less compared to the size of extra FFs
• No problem of inconsistency
• FFs do not need set/reset pins, hence saving in the area
• Additional mux area is compensated by reduced sizes of FFs
• Only problem is n number of clock pulses and n bit pattern to
set/reset the FFs
• Clock can be in two different speeds
• Best method of testing of sequential circuits so far
23
ATPG and testing using scan chain:
An example
• To test the sa0 fault at net j, the signal values at nets d
and i are to be 1
Scan out
a
b j
c NI Q
1
e
. f
NI Q
i
2 D
sa0
d SI k
SI
clk 4
FF2
FF1
g h
clk 3
M
M
Scan in
24
Scan chain: example 2
Scan out
a f
5 NI g n
b Q
SI 6
clk
FF3
M
c
d sa0 D l
e NI Q h 1
i
. j
NI
SI
Q
1
k
2
m
SI
clk 4
FF2
FF1
clk o 3 p
M
M
Scan in
25
Scan chain: Modified application
• Scan chain can be used to set the FFs to the desired value for
testing. However, D-algorithm is required on the entire circuit
(after removing the FFs) to find the test pattern
• Scan chain eliminates the need for performing the ATPG on
the whole circuit
• Consider the input of the nearest FF from the fault site as an
output line and perform ATPG on the sub-circuit lying in the
cone of influence of that output line (i.e., inputs of the nearest
FF)
26
Scan chain: Modified application
• Nearest FF from fault site is FF2
• Fault effect needs to be propagated to net j which is the input
of FF2
• ATPG has to be performed on the sub-circuit which lies in the
cone of influence of net j, which includes inputs d, e and AND
gate 1
• Test pattern is d=1, e=1
a f
g n
5
b 6
c
d sa0 D i l
e h 1 . j
k
2
m
4
o p 27
3
Scan chain vs. time frame expansion
method
• Time frame expansion method: dseq number of clk pulses and patterns
to set the FFs when testing
• Scan chain: n clk pulses required to set/reset ‘n’ FFs
• As n ≥ dseq, test time is higher for scan chain based testing compared
to time frame expansion method
• Also, MUXs are required in scan chain method while no extra circuitry
in time frame method
• Only ATPG complexity is less in the case of scan chain method which
is an offline exercise and test time is very expensive as patterns are
applied by an automatic test equipment
• However, scan chain method is still the most widely accepted
technology
• Time frame expansion method can’t set/reset the FFs which are cyclic.
So, scan chain based scheme or set/reset using shift register is
required for cyclic circuits
28
Isolated serial scan
• Rs shadow register of R
• Higher overhead compared to full serial integrated
scan
• Advantage: Support some form real time and online
testing
• Single test at operational C Z
X
clock speed (else at k clock
interval) – real time test R
clk
• Online – test during normal
Sin Rs Sout
operation of circuit
Non serial scan
• Random access scan
• Bit addressable storage cells used instead of shift
registers
• Advantage: Only selected bits can be controlled and
observed
C Z
X
Si Sin
Clocks and Addressable
control SCK
storage
element
Sout
address decoder
Storage cells for scan design
• Clocked D-latch
• Multiplexed data flipflop (MS)
• Two port dual clock flipflop
• Multiplex data shift register latch
• Two port shift register latch
• Raceless two port D flipflop
• Polarity hold addressable latch
Storage cells for scan design
• Clocked D-latch
NI Q
clk
40
Routing optimization
X’
X
IO SFF
pad cell
SCANIN
Flip-
flop
cell
Y Y’
TC SCAN
OUT
m
a=1
b=1 j
c=1
D Q
1
e f
. X
D Q
i 2 X
D
sa0
X X
1 d k
clk 4
FF2
FF1
g h
clk 3
42
Partial scan
• Two FFs are to be controlled to 1; nets d and i must be made 1
• Making net d=1 is simple and can be achieved by applying c=1 and a
clk pulse
• Control of net d via FF1 is by time frame expansion method; as dseq
=1 for FF1, one clk pulse and one pattern are enough to control it
• FF2 can’t be controlled by time frame expansion method, it must
have scan chain facility
m
a=1
b=1 j
c=1
D Q
1
e f
. X
D Q
i 2 X
D
sa0
X X
1 d k
clk 4
FF2
FF1
g h
clk 3
43
Partial scan
m
a=1
b=1 j
c=1
D Q
1 .
e f
1
NI Q
i 2 1
D
sa0
SI 1
1 d k
clk 4
FF2
FF1
g M=1 h
clk 3
Scan in
44
Partial scan
• Now, both d and i are 1
• Make a=1, b=1, c can be X. We will get j=1, g=1 and h=0. Circuit can
be tested
• Overall sequential depth is only 1, which requires one pattern to test
it
• Some FFs set using time frame expansion and others using scan
chain based method
m
a=1
b=1 j
c=X
D Q
1 .
e f 1 NI Q
i 2 1
D
sa0 D
SI 1
1 d k
clk 4
FF2
FF1
g M=0 h
clk 3
45
Multiple scan chains
48
Automated Scan Design
Behavior, RTL, and logic
Rule
Design and verification
violations
Scan design
rule audits
Gate-level
netlist
Combinational Scan hardware
ATPG insertion
Combinational Scan
vectors netlist
Scan sequence Scan chain order Chip layout: Scan-
and test program chain optimization,
generation timing verification
Design and test
data for
Test program Mask data
manufacturing
Commercial tools
50
Boundary scan
• Developed for testing chips on a printed circuit board
(PCB)
52
Chip architecture using IEEE 1149.1 std.
53
Boundary scan Hardware
• Test Access port (TAP)
• User defined
Typical test procedure
• Shift a boundary-scan test instruction into the IR through
the TDI
• Repeat steps 3 to 5
Boundary scan cell
To next
cell
To
From system
system logic
pin From 57
last cell
Boundary scan cell
• normal =0
mode
To next
cell
To
From system
system logic
pin From 58
last cell
Boundary scan cell
• scan =1
mode
active
To next
cell
To
From system
system logic
pin From 59
last cell
Boundary scan cell
• update =1
mode
active
To next
cell
to
From system
system logic
pin From 60
last cell
Boundary scan cell
• capture =0
mode
active
To next
cell
From
From system
system logic
pin From 61
last cell
Serial Board / MCM Scan
Parallel Board / MCM Scan
• One bit of test data shifted into (out of) the selected
data register through TDI (TDO) (with each clock
cycle)
75
EXTEST-sequence
Instructions-INTEST
• Test system logic (optional)
77
INTEST -sequence
Other Optional Instructions
• RUNBIST: issue BIST commands to a component through
the JTAG hardware - concurrent self-test process