Design For Testability Notes
Design For Testability Notes
DFT is a technique that makes test generation and test application easier
and cost effective.
In testing of sequential circuits it is difficult to control and observe the
internal flops.
DFT techniques help in making the internal flip-flop easily controllable
and observable.
The method of ad hoc mainly uses some experience of guide line and practice to
replace bad design. The main techniques are:
1) Insert test point;
2) Avoid a sync set/reset for storage elements;
3) avoid combinational feedback;
4) avoid redundant logic;
5) avoid async logic;
6) Partition a large circuit into small blocks;
Test point insertion (TPI): First, internal nodes are obtained through testability
analysis.
Observation point insert: SE=0, capture result; SE=1, shift result;
control point insert: TM=0; destination = source; TM=1; destination = CP_input
Structured techniques
In this technique, extra logic and signals are added to the circuit to allow the test
according to some predefined procedure.
A few examples of structured DFT which we will cover extensively in future
lessons:
Scan Path
Partial Scan
Level Sensitive Scan
BIST
Boundary Scan
2. At-speed Faults
It models the manufacturing defects that behave as gross delays on gate input-
output ports. So each port is tested for logic 0-to-1 transition delay (slow-to-rise
fault) or logic 1-to-0 transition delay (slow-to-fall fault).
Bridging Faults
A bridging fault is said to have occurred when two or more signal lines in
a circuit are accidentally connected together. It is quite possible due to
imperfection during layout fabrication.
Delay Faults
Delay faults are those in which a pin of a gate responds to the transition
too slowly on a particular set of stimuli, plus a specific transition.
Path delay fault model
Let’s say due to some faults in gates propagation delay of each gate is
increased by some amount.
No. of path delay faults in a circuit = 2 x No. of paths
Transition delay fault model
In this model, faults are assumed to be lumped in a single node, as shown
by a red cross. Each node has two transition delay faults: slow-to-rise
and slow-to-fall (STF).
No. of path delay faults in a circuit = 1-STR + 1-STF = 2
Stuck-Open Fault
Stuck-Short Fault
IDDQ Testing
The aim of test generation at the gate level is to verify that each logic gate in
the circuit is functioning correctly, and the interconnections are good. If only a
single stuck-at fault is assumed to be present in the circuit under test, then the
problem is to construct a test set that will detect the fault by utilizing only the
inputs and the outputs of the circuit.
Fault equivalent :
while creating fault site list, tool identifies fault which are dependent to each
other and consider them as equivalent faults.
Fault collapsing :
If 4 faults are equivalent, then tool mark one of them as a real fault and rest
three of them are marked as collapsed to the real fault. This concept is
called fault collapsing. With this tool need to work on only one fault instead of
four faults.
Fault simulation :
After we generate all the test patterns, we need to validate those test patterns.
So, we can trust those test patterns as golden test patterns. Thus we run
simulation those test patterns with fault. This process is called fault simulation.
For any “n” input gate, the number of faults remaining after equivalent and
dominant collapsing is “n+1”.
Stages of ATPG
The following are the benefits of ATPG that made it popular in the EDA
industry.
The flip-flops are the main culprits that make sequential circuit testing difficult.
The idea is to separate the flip-flops from the rest of the circuit so that the
combinational part can be tested easily using ATPG. Now, if we can control and
observe these pseudo inputs and outputs to the combinational circuit, we can
easily test this circuit with previously discussed ATPG methods. Hence, we
don’t need to worry about flip-flops. This is the essence of Internal Scan
Design.
Scan Flip-Flop
Scan Chain
In the modified design, the scan flip-flops are stitched together one after another
in a Scan Chain. In the previous circuit, the outputs of the combinational circuit
were directly connected to the flip-flop inputs. But, in the newer design, we
have disconnected the line using a multiplexer. Now, we have the choice to
either connect the combinational circuit output to the flip flop inputs (Normal
Mode) or to connect it to Scan In pin (Test Mode). Hence the circuit now has
two operation modes: Normal mode and Test mode.
The idea of the Internal Scan is to connect internal Flip-Flops and latches so that
we can observe them in test mode. Scan remains one of the most popular
structured techniques for digital circuits. This above process is known as Scan
chain Insertion. In the VLSI industry, it is also known as DFT
Insertion or DFT synthesis.
Replace FF/latch
Stitch FF/latch into a chain
Normal Mode
Test Mode
Step 1: Shift In
Step 2: Capture
Step 3: Shift Out
By converting sequential design to scan design, there are three working modes:
2) In shift mode and capture mode, the test mode signal is always valid;
Design Flow:
Implementation process:
1) Switch to shift mode, input the stimulus into the scan cell;
scan enable (SE) is used to select the input of data input and scan input.
The cell contains two latches, a master latch and a slave latch.
Among them, A/B/D are all clocks, D is data input, and I is scan input.
The advantage is that race-free can be guaranteed, but it will also increase the
routing of the clock.
Scan architecture
1) full-scan design: all storage elements are transformed into scan cell,
combinational ATPG to generate test;
The main advantage is to convert sequential ATPG into simple combinational
ATPG;
Almost full-scan design: do not add scan on some critical paths and
insignificant paths.
Muxed-D Full-Scan Design:
LSSD Full-Scan Design: Two clocks C1/C2, A/B to control shift and capture
modes.
In the logic of full-scan, the input consists of two types:
Two outputs:
2) partial-scan design: Part of the storage element is converted into scan cell,
combination and sequential ATPG to generate test;
In the test generation process, the sequential ATPG must contain the non-scan
FF control and observe, which will increase the test generation
Full-scan and partial-scan are both defined as serial scan design. The advantage
is that the cost of routing will be relatively low. The disadvantage is that each
individual scan-cell cannot
On the premise of not affecting other cells in this scan chain, complete the shift
mode, resulting in high switching the power consumption.
The Q terminal of the Scan cell is directly connected to the SI terminal of the
next-level Scan cell. At the same time another load into the combinational logic.
During the capture process, the number of clocks must be controlled to ensure
that the response generated by ATPG is correct.
The positions of the stimulus and response Registers in each scan chain are not
corresponding. The one generated by ATPG shall prevail.
Scan synthesis converts a testable design into a scan design. Currently, the
design contains several scan chains.
Scan extraction is to extract the structure of the final scan chain for use by
ATPG.
Check the scan design rule, and some clock control structures need to be
modified to increase the at-speed test.
The check of the scan design rule can also be done after the scan synthesis to
ensure that no new violations appear.
In the shift operation, all clocks can be controlled by external pins, between two
adjacent scan cells
In the capture operation, the originate/terminate clock of the data path may be
different, which needs to be considered
Scan Synthesis
Recently, the operation of scan synthesis has been integrated in logic synthesis,
such processing is called one-pass
1)Scan configuration;
2)Scan replacement;
3)Scan reordering;
4) Scan stitching;
The scan chain number is mainly determined by the number of input and output
of the circuit, and the high-speed IO pad cannot
The type of scan cell is mainly determined by lib. Generally, each storage
element used will have a corresponding scan cell type.
To ensure that functionality and timing are minimally affected under normal
operation.
The storage element of exclude is mainly due to critical path or security reason.
In general, a scan chain consists of scan cells belonging to the same clock
domain (because in the DC process, the entire scan chain is a data path
When a clock domain contains a lot of scan cells, some scan chains will be
structured and the scan-chain operation is used to reduce the length of the scan-
chain.
When a scan-chain contains both negative-edge scan cell and positive-edge scan
cell, the negative scan cell
Should be placed in front of the positive scan-cell. (only move one bit per cycle
for the clock)
If the positive scan-cell is placed in front, then the two cells will shift data
within one clock cycle.
When a scan-chain scan cell comes from a different clock domain, a lock-up
latch needs to be inserted.
In this way, it can be guaranteed that the operation of shift is correct regardless
of whether CK2 prioritizes CK1 or CK1 prioritizes CK2.
But it must be ensured that the skew between CK1 and CK2 is less than one
duty cycle.
When the clock structure of the scan chain is determined, the stitching of the
scan cell is carried out to the scan chain and these scan cells
Scan Replacement:
The inputs of these scan cells are usually connected to the outputs of the same
scan cell to avoid floating. These connections are removed at the stitch stage.
Currently, partial scan replacement can also be implemented in the RTL stage.
Scan Reordering
reorder within the chain) and inter_scan_chain reordering (scan cell reorder
between different scan chains)
scan stitching
Stitch all scan cells together to form a scan chain. Connect the output of each
scan cell to the input of the next level.
Connect the input of the first scan cell to the primary input, and the output of
the last scan cell to the primary output.
In the process of stitching, some lock_up latches and lock_up FFs need to be
inserted to ensure that the shift operation is correct.
Scan extraction is mainly used to extract all instances from scan design to
ensure the integrity of the scan chain.
And ensure that all design changes are integrated into scan design.
Scan Verificaiton
1) Hold time violation in shift operate, if two scan cells are at the same clock,
CTS is required to ensure that there is a clock skew
The value of minimum. If the clock is an asynchronous clock, the lock_up latch
needs to be inserted.
3) Check and repair of incomplete scan design rule, set/reset of reg and
enable/gate of clock, etc.
4) The error of scan synthesis, put the positive before the negative, etc.
The scan capture operation may have a mismatch between zero_delay and
full_timing.
In order to ensure that the clock skew also meets the requirements, the use case
uses a value such as "01100", including all scenarios of 0-0, 0-1, 1-0, and 1-1.
In order to quickly locate the position of the wrong scan cell, the flush testbench
needs to have a process that can observe the internal scan cell.
If there are multiple clocks in a scan chain, the latency between each clock is
different, and the design requires it to be kept within half a cycle.
2) scan hold time and setup time in same clock, CTS redone or insert buffer.
At present, the verification of scan shift and scan capture can also be performed
by STA.
1) area overhead cost, including two parts, the replacement of scan cell and FF,
and the part of scan routing.
2) I/O pin cost, including a dedicated test mode pin (can be avoided by an initial
sequence)
And the shared with function of I/O.
4) Design effort cost, in addition to the normal flow, design rule checking and
repair, scan synthesis,
When doing STA at the same time, many false paths will also be added.
2) Snapshot Scan can capture internal states of element without interrupting the
functional operation of logic.
The design is realized by adding a scan cell to the required storage element (not
replacing it). This design is called a scan set.
RTL DESIGN FOR TESTABILITY:
Due to the time-to-market relationship, more and more testability issues hope to
be fixed in the RTL stage.
2) Clock network delay and skew, clock latency----delay of the clock network
relative to the source.
3) Gated clock, perform both setup and hold check on the gating signal.
create_clock -period 10 -waveform {2 4} [get_ports A]
The source of the clock can be port A, net N or pin Q of FF. When no source is
specified, it means virtual clock.
-name The name of the clock. If not added, it will be replaced by the source
name of the clock.
-add define two clocks on the same source, create_clock -period 20 -waveform
{1 3} [get_ports A] -add.
-waveform [a1 a2] The first value represents the first rising edge, and the first
value represents the first falling edge.
Latency includes clock source latency and clock network latency. The middle
point clock definition point.
The uncertainty represents the maximum difference in the clock arrival signals
of the register. Also called skew.
Use set_clock_latency -source to model the source latency, and divide the
model of network latency into different stages:
-late/early specifies longest path as late path, shortest path as early path.
When doing setup check, the source clock is used as late version, and
the destination clock is used as early version.
When doing hold check, the source clock is the early version, and the
destination clock is the late version.
Intraclock Uncertainty:
To define skew and jitter on single clock, you need to specify a clock, port, pin,
If you specify a clock, it means that all sequential elements of this clockdrive
will use this uncertainty,
If you specify a port, pin, it means that all fanout will use this uncertainty.
For the check of setup and hold, the value of uncertainty can be set differently, -
setup/-hold
setup check is affected by jitter and skew, and hold is only affected by skew.
Interclock uncertainty:
-from means start clock (launch reg), -to means destination clock (capture reg)
Both setup check and hold check will be affected by jitter and skew.
The properties of -from and -to will be strictly enforced. If there is a situation
where -from models capture reg, it needs to be defined.
If both interclock uncertainty and intraclock uncertainty are defined, inter has a
higher priority.
set_clock_transition 0.64 -fall [get_clocks CLK1]
The relationship between these two clocks is sync, the time zero defined by
create_clock is the sync point, expands to the two clock clocks
Async clock, for two clock domains, clock edges can occur at any time of the
clock.
For such an async clock, launched by one clock, captured by other, PrimeTime
will not check the timing path,
Exclusive clock, no interact clock, only one clock is enabled at any given time.
When two groups are defined, it means that the two groups are exclusive, and
there is no such setting between the third group. (CK1 and CK2 exclusive)
When only one group is defined, it means that the group and all remaining
clocks are set in this way. (CK1 and all remaining clocks are exclusive)
Masking logic
1) Standard techniques
Dynamic compression--------In the same pattern, test several faults targets
1) Guarantee the correctness of the shift operation, one data per cycle
2) In other operations, a clock cycle can be saved because it uses the falling
edge.
ATPG
ATPG stand for Automatic Test Pattern Generation. It takes a gate level netlist,
along with some input and output constraints, clock definitions, scan chain
definitions, and generates a test pattern that can be used to find manufacturing
defects in the real silicon. It also produces a fault coverage report that tells you
how good your test it, and which nets are and are not covered by the test pattern.
Input and Output constraints is defining some inputs to certain logic value to
enable ATPG to run correctly. For example, scan enable or and test mode
signals.
The number of pins usually does not matter in ATPG, but it does matter on the
ATE. But that is different issue
Logic BIST reduces test costs by placing a lot of tester functionality in CUT,
but the more important aspect is at-speed testing.
There are three basic capture-clocking schemes for multiple clock domain test:
1) single-capture;
2) skewed-load;
3) double-capture;
Single-capture is a slow-speed test technology that only needs one capture pulse
to test the structural faults of intra-clock-domain and inter-clock-domain.
1) One-Hot Single-Capture
Only one capture pulse is needed under one capture window, so don't worry
about the clock skew between different clock domains, but this method can only
test the structure faults, synchronous and asynchronous clock domains of intra-
clock-domain and inter-clock-domain It will be all right.
Synchronous clock here refers to the clock that is exactly the same as edge, and
asynchronous means that edge does not complete the same clock.
A single, slow-speed global scan enable (GSE) can be used to drive both clock
domains, so it is convenient for physical implementation.
Staggered Single-Capture
Skewed-Load
The values of last shift pulse and next-to-last-shift pulse are different to ensure
the generation of transition, and use this capture pulse to capture output
response
The Scan enable signal must transition from shift mode to capture mode in one
clock cycle.
1) one-hot skewed-load
2) aligned skewed-load
3) staggered skewed-load
One-hot Skewed-load
2) Each scan enables signal switch operations from shift to capture within one
clock cycle.
Aligned skewed-load
Mainly divided into capture aligned skewed-load and launch aligned skewed-
load,
Staggered skewed-load
The disadvantage is also that the physical implementation of the scan enable
signal is too difficult.
1) one-hot double-capture
Only one clock is tested at a time, which can realize the delay fault of the intra-
clock-domain of the synchronous/asynchronous clock domain.
shortcoming:
Inter-clock-domain delay faults cannot be tested, and there must be a long test
time.
2) Aligned Double-Capture
shortcoming:
3) Staggered Double-Capture
Scan design and logic bist are two of the most important structure offline test
techniques to improve production quality.
However, with the complexity of the process, 100% single-stuck fault coverage
can also guarantee perfect production quality.
The remaining faults include: timing-independent (due to increasing resistance
on the connection) and non-single-stuck-at faults, non-feedback bridging faults.
For the three major parts of the chip, our DFT engineers have three magic
weapons
BSCAN technology -- test IO pad, the main implementation tools are Mentor-
BSDArchit, sysnopsy-BSD Compiler
Mentor's tools updated to the Tessent platform, including tools: Tessent Fast
Scan Tessent MemoryBIST Tessent test Kompress Tessent Scan Tessent
Diagnosis
Insert scan:
1. Although textbooks will introduce many kinds of DFT DRC, in actual design,
95% of the work is to fix the DRC violation of scan_clk and scan_reset
At the same time, scan_clk and scan_reset pad will be used for ATE to
apply excitation to the chip
3. When inserting scan, DFT Compiler must fix DRC violations category
D1/D2/D3/D9
4. When doing full-chip DFT design, you need to insert mux at the
OEN/IE/REN end of the IO pad of scan_in, scan_out, scan_reset, scan_clk to
control the input and output directions of the pad
1. All analog modules, such as PLL, POR, etc., are generally set as black-box,
and cannot be tested with ATPG
2. The control registers of the chip clk, power and reset are generally not placed
on the scan_chain, so as not to change the working state of the chip due to the
action of the registers during the test
4. If there are analog IO pads, they must be masked off when the pattern is
generated, because they are not digital, and the ATPG tool cannot control them
5. The industry generally uses DC to insert OCC (on chip clocking) module to
realize at-speed scan test circuit
3) Compare the output, and then turn off the scan clock to input the next
stimulus.
The scan operation can be divided into full scan and partial scan. Full scan has
the highest coverage and ATPG is easy to generate, but it is not friendly to area
and timing.
Partition Scan: For large-scale designs, scan design is performed from the block
level, adding scan input/output/enable
Test Points: For some points that are difficult to observe and control, additional
mux is added for control.
For example, the output of the OR gate has a 1 input, and the other input is
difficult to observe, and the subsequent logic is difficult to control.
At this point, a mux, an input and an output can be added after the OR gate to
ensure coverage. (See the album for the routine)
ATPG (Automatic Test Pattern Generation), Test patterns is also called test
vector.
There are two kinds of random pattern and Deterministic pattern, but most of
them use random, which consists of two parts:
1) Generation patterns;
1) Functional test, mainly for static defects, (open, short, stuck-on, stuck-open)
For a Full static CMOS circuit, IDDQ is close to zero, pull-up and pull-down,
the IDDQ of the tri-state bus is higher,
High IDDQ is also generated in dynamic memory such as RAM.
All of the above are single fault models, and fault collapsing may also occur.
Terminology in scan:
Scan Cells: A scan cell contains at least one memory element (FF or latch) in a
scan chain.
Master Element: The scan cell that gets the data directly from the previous scan
cell and is directly connected to the scan input.
Slave Element: The scan cell of the same clock in the scan chain.
Copy Element: A scan cell that has the same or opposite data as the upper and
lower scan cells.
Extra Element: Any element between the master element and the slave element.
Scan Groups: A series of scan chains (with their own input and output) that can
be processed in parallel.
Scan Clocks: Clock signals for scan operations, including reset and set signals.