DFT Documentation
DFT Documentation
DFT Flow:
MBIST Insertion
EDT/OCC insertion
using DFT Spec
Synthesis
ATPG
Simulation
What is DFT and why DFT is required
Adding testable features to the design converting all the flops in to scannable cells by adding
mux and stitching these cells to form a scan chain in shift register fashion.
In order to identify Manufacturing defects
Increased productivity
Improved quality
Increase the durability of a chip
Reduce the test – time and test – cost also test – data
Note: DFT is not to find the functional bugs DFT is to find the manufacturing defects.
What is testability?
The ability to put a design in to known initial state and then control and observe the internal
signal values
Controllability: Difficulty in setting the signal to the required logic value (either 0 or 1)
from the input side of the design
Observability: Difficulty in propagating the required logic value either 0 or 1) to the output
side of the design
Need of Scan:
In a smaller and purely combinational circuit it is easy to control the internal nodes from PI's
and observe the response at PO's.
Today's designs are usually complex and invariably contain sequential cells.
The internal nodes will be fed by the flip-flops which are logically far from the Primary
Inputs and outputs. This makes the internal nodes difficult to test.
Scan helps us in directly applying the stimulus to internal nodes by leading the flip-
flops feeding them and propagating the captured value in scan cells through shift
register mode.
SCAN Principle:
First convert the normal flop into scan flop by using multiplexer.
The test patterns are applied directly to the internal design by shifting in the input values
through the serial scan shift registers.
Apply the capture clock and capture the internal logic's response into the scan cells.
Captured values are shifted out, through the scan out.
1. Normal operation
During this mode of operation, all test signals are turned OFF.
In this mode, TM (Test Mode) pin is set to 0 and SE is set also 0 always.
The scan design operates in the original functional configuration.
The normal mode is activated when Scan Enable is 0.
The mux selects the normal mode Data input (DI) to the D pin of actual flip-flop. And
the value from D pin is propagate to Q output.
2. Shift operation
In this operation, we shift the test pattern into the scan chain.
Here, we shift the test patterns into the scan chains.
It covers the shift paths when SE is equals to 1.
In this mode, TM pin is set to 1 and SE pin is also set to 1 always.
Here we use scan chains that are used to shift-in and shift-out the test data.
A number of flops connected back-to-back in chain with output of one flop connected
to input of next flop.
It acts as shift register.
The scan data fed from SI(Scan-In) pin.
The output of last flop is connected to SO(Scan-Out). Which is take shifted data out.
3. Capture operation
In this mode, SE (Scan Enable) pin is de-asserted (Logic Low). So that, the flip-flops
work in a normal functional mode.
The response from the combinational circuit is captured, corresponding applied a test
pattern, the response gets loaded into a scan chain.
It runs at functional frequency. During this mode, TM pin is set to 1, but SE pin is set
to 0 always
Scan – Insertion Flow
1. Setup (or) Build Phase:
Design (Netlist contains of clocks, pins, reset, constraint information)
Library (Information about Gates, Flops, Model reference name)
Scan configuration (Number of chains required to build based on number of pins and
pads, gives requirements of scan clock, scan enable, TM, Scan-in and Scan -out
declarations)
set_context dft -scan
read_cell_library<mentor.lib>
read_verilog<netlist>
add_clocks 0<clock name>
set_scan_enable<scan_enable>
set_scan_pins input/output si/so
add_pin_constarints testmode c1
set_current_design<top_module name>
2. Analysis:
In analysis mode, it will analyze whether the design is proper for scan insertion or not
In analysis mode, it will check for the DRC’s by taking design and library cell as inputs
DRC rule checks will be done here
check_design_rules
write_results
report_scan_chains
report_scan_cells
3. Insertion:
Replace DFF with SDFF and build the scan chains
Create necessary ports (TM, SE, etc)
insert_test_logic <number>
read_config_data
write_config_data
process_specification
extract_sdc
extract_icl
write_atpg_setup
write_scan_order
report_wrapper_cells
report_static_dft_signal_settings
Scan advantages:
Scan disadvantages:
Scan design rules also called as SCAN DRC’S in order to implement scan into a design, the
design must comply with a set of scan design rules. As they limit the fault coverage.
Scan design rules that are labeled “avoid” must be fixed throughout the shift and capture
operations
Suppose we have 100 flops then we require 100 cycles for shiftin 100 cycles for shiftout and 1
cycle for capture total we require 201 cycles for one pattern.
For 100 patterns we require 201x100 = 20100 cycles. Assume the frequency is 10 MHz clock
then time period for each cycle is 100ns so for 100 patterns we require 20100x100ns =
201000ns=2.01 msec
Advantages of compression:
Reduce test cost
Reduce test time: (LxW)/Frequency
Reduce test data volume (LxWxH)
where
L=Length of longest scan chain
W=Number of patterns
H= Number of scan channels
Scan channels
Number of channels
Each compressed test pattern has a small number of additional shift cycles, so the
total number of shifts per pattern would be slightly more than the number of scan
cells in each chain.
The term “additional shift cycles” refers to the sum of the initialization cycles,
masking bits (when using Xpress), low power bits (when using a low-power
decompressor), and user defined pipeline bits.
You can use the following equation to predict the number of initializations cycles
the tool adds to each pattern load.
In this equation, “ceil” indicates the ceiling function that rounds a fraction to the next
highest integer.
Scan compression main blocks:
Decompressor
Compressor
Masking logic
Decompressor:
It is located between the external scan channel inputs and the internal scan chain inputs
LFSR:
LFSR (linear feedback shift register) consists of ‘N’ flops and XOR gates.
LFSR represented by characteristic polynomial.
The inputs of LFSR are coming from external scan channels. The output of LFSR
will connect to scan chain inputs through phase shifter.
The initial value to the LFSR is called “seed value”.
After that based on characteristic polynomial LFSR will generate the patterns.
Example: seed value = 0 0 1
clk Q0 Q1 Q2
-- 0 0 1
1 1 0 0
2 1 1 0
3 1 1 1
4 0 1 1
5 1 0 1
6 0 1 0
7 0 0 1
8 1 0 0
In the above circuit the patterns are repeating after 7th clock pulse so this is one of the
disadvantages of the LFSR.
so to overcome that disadvantage we will use phase shifter.
Phase Shifter:
One of the major disadvantage of LFSR is there is no enough randomness. In the
absence of phase shifter there exists a diagonal relationship between adjacent bit
streams.
So, to introduce more randomness between the bit streams we will use a phase shifter
which is implemented by XOR network.
Compactor:
It is located between the internal scan chain outputs and external scan channel
output
Used to compress the number of scan chain data which is fed to scan channels by
using the XOR logic
Masking Logic:
If Design contains x-source logic which can drives the x-values to scan chain
output.
For these x-source logic effects the test coverage. Need to mask x-source
logic by using masking logic.
The mask logic is masking some errors
X-masking
If any internal scan chain logic drives x-value to the xor logic, the xor logic
always drives x-value at output of scan channel.
By using x-masking we can mask that particular scan chain logic by using
AND gate logic
Aliasing effect
The output of scan chain gives same value with fault and without fault then
this effect is called aliasing effect.
This effect can eliminate by using masking AND logic
Scan Compression Flow:
1.Set up mode:
set_context_dft_edt
read_cell_library
read_verilog
ATPG dofile (clocks added in scan, how many scan flops, scan chains, pin
constraints added in scan)
set_current_design
set_edt_options -channel<number>
2. Analysis Mode:
write_edt_files
report_dft_control_points
report_config_data
ATPG (Automatic test pattern generation):
The procedure involves the generation of input patterns that can ascertain presence or absence
of faults at some location in a circuit
For detection of faults in design we generate patterns called test pattern generation, if it is
automated through a DFT tool we call as automatic test pattern generation.
ATPG Flow:
1.Setup Phase:
2. DRC Mode:
set_system_mode analysis
design flatteningwhich converts the blocks in to design primitives (and, or, xor etc.)
learning analysis it will trace the shift path from SO to SI
scan chain identification how many memory elements
edt finder analysisedt blocks, scan chain scan cells
edt setup and rule checking --> enters edt pattern generation phase
transparent latch check
scan clock rule check non scan elements will be identified and those are categorized
in to TLA (those gates propagate values without holding state, tie0, tie1, pin or state
elements constrained to a specific value (0,1, x, z) the rule checker may also determine
that state elements exhibited behavior and replace them with the appropriate tie gates)
3. ATPG Phase:
ATPG Inputs:
Libraries: contains information of gates, flops, model reference name in the form of a
code
Scan +compressed netlist: contains scan & compression inserted logic
ATPG setup files: contains the setup information for ATPG
ATPG Dofile: has scan info, chain length from SI to SO
ATPG testproc files: contains timescale, setup procedure, load/unload, shift, capture,
sequential procedure info, edt clock, edt update, edt bypass information etc.
SDC files: Synopsis Delay Constraints, contains timing information like false path,
multicycle path info, etc
Log files: contains all the report information
Run files: contains the path of the netlist, library to execute the operation
ATPG Outputs:
Testbenches: chain test (Shift) and shift & capture testbenches for serial & parallel
simulations. These are the inputs for simulations
Cycle counts & Pattern counts: contains how many flops are present per chain info &
how many patterns generated after ATPG
Coverage reports: contains fault coverage & test coverage info
AU fault list files: contains the info of ATPG untestable faults and why the coverage is
less
Scan chain & Scan group files: contains number of scan chains and scan chain group
information
ATPG Faults Model
A fault model is something that could go wrong in the construction or defect of design.
Stuck at Fault
Transition Fault
Path delay Fault
IDDQ fault
Stuck at Fault:
The stuck fault model is the state of logic signals on a line in logic circuit
including primary inputs and primary outputs.
It appears to be stuck at a constant logic value
SAF done at slow clock frequency.
stuck at fault models perform get the controllability and observability of the design.
stuck at – 0 fault: It drives the constant logic 0 value.
stuck at – 1fault: It drives the constant logic 1 value.
Transition Fault:
A transition at any node means that the effect of any transition from 0>1(slow to rise)
or 1>0 (slow to fall) will not reach at primary output or scan flop output with in the
stipulated time
Slow to rise: when the system is at max freq, it is unable to produce transition from 0
to 1. OR gate is used for 0 to 1 transition.
Slow to fall: when the system is at max freq, it fails to transit from 1 to 0. AND gate is
used for 1 to 0 transition.
IDDQ fault:
IDDQ testing is a method for testing CMOS integrated circuits for the presence of
manufacturing faults.
This has the advantage of checking the chip for many possible faults with one
measurement.
Another advantage is that it may catch faults that are not found by conventional stuck-
at fault test vectors.
ATPG Faults Classes
Fault classes means it is a set of class where we can define the fault models
There are two type of Faults classes
Testable It could able to detect fault while performing the fault model is called as
testable faults
Untestable Untestable (UT) faults are faults for which no pattern can exist to either
detect or possible-detect them. The tools acquire some knowledge of faults prior to
ATPG, they classify certain unused, tied, or blocked faults before ATPG runs
Untestable
Redundant fault
Tide Fault
Blocked
Unused
DI (Detectable Implication)
Testable
DS (Detectable simulation)
• Backboxes
• Pin constraints
Possible Detectable • Insufficient Seq depth
• Analog boxes
• Tide to unknown logic
• Non scan elements
Uncontrollable
ATPG Untestable
Unobservable
Undetectable
Untestable:
Redundant fault:
The redundant fault class includes faults the test generator considers undetectable. After the
test pattern generator exhausts all patterns, it performs a special analysis to verify that the fault
is undetectable under any conditions
Tide Fault:
The tied fault class includes faults on gates where the point of the fault is tied to a value identical
to the fault stuck value because tied values propagate, the tied circuitry at A causes tied faults
at A, B, C, and D.
Blocked:
The blocked fault class includes faults on circuitry for which tied logic blocks all paths to an
observable point. Tied faults and blocked faults can be equivalent faults.
Unused:
The unused fault class includes all faults on circuitry unconnected to any circuit observation
point and faults on floating primary outputs
Testable:
Detectable:
The detected fault class includes all faults that the ATPG process identifies as detected. The
detected fault class contains two sub classes
Det simulation (DS) - faults detected when the tool performs fault simulation.
Det implication (DI) - faults detected when the tool performs learning analysis.
Possible Detectable:
The posdet, or possible-detected, fault class includes all faults that fault simulation identifies
as possible-detected but not hard detected. A possible-detected fault results from a 0-X or 1-
Xdifference at an observation point. The posdet class contains two subclasses.
ATPG Untestable:
Untestable (UT) faults are faults for which no pattern can exist to either detect or possible-
detect them.
Untestable faults cannot cause functional failures, so the tools exclude them when calculating
test coverage
• Undetectable:
The undetected fault class includes undetected faults that cannot be proven untestable or ATPG
untestable. The undetected class contains two subclasses:
uncontrolled (UC) - undetected faults, which during pattern simulation, never achieve the value
at the point of the fault required for fault detection-that is, they are uncontrollable.