RC DFT Guide
RC DFT Guide
RC DFT Guide
Compiler
Agenda
Basic DFT Flow
Defining Scan Setup & Running DFT Rules Check
Mapping Design to Scan & Shift-register Identification
Configuring & Connecting Scan Chains
Hierarchical Scan Insertion
Inserting Compression Structures
Interface to other Tools
Synthesis
Libraries
SDC
File
RTL
Files
Constraint
Files
(SDC, CTL,
Scan Abstract)
Gate-Level
Netlist
File
Scan
Abstract
Model
Scan DEF
File
Logic
Abstract
File
Testability
Analysis
File
ATPG
Interface
Files
Scan enable
System out/
Scan out
System Data
data_in
data_out
clk
Scan In
System Clock
Non-scan Flip-Flop
clk
div_clk
sub_mod
clk1
D
clk2
clk
enable
test_mode
test_mode
6
clk3
Gated_clk
The muxed scan style uses shift-enable signals to switch scan flipflops from system mode to scan-shift mode. Define these signals
before running the DFT rule checker.
You can associate a shift enable with each scan chain; default is to
use the first shift-enable signal that is defined (default) as the scan
enable for all the scan chains.
With same test clock domain, RC uses lockup latch to join the chains.
Chain1
Lockup
latch
clk1a
clk1b
chain1
clk1a
chain2
clk1b
clk
cki
n
ckp
ll
Example
set_attr dft_controllable PLLA/ckin inverting" PLLA/clkpll
10
U1
CLK
CK
CK
CK
CK
B1
U2
A
B2
By default, B1 and B2 can be treated as one clock (clk) and all flops can
be put on the same chain
Possibly for skew reasons, you might want to keep them as separate test
clocks, but in the same domain.
define_dft test_clock name SCKA domain SCK_D U1/Y
define_dft test_clock name SCKB domain SCK_D U2/Y
11
CK
CK
CK
CK_A
CK_B
To tell the DFT engine to treat above as the same clock for
scan chain hook-up purposes, use the following command:
13
To control the prefix used to name user-defined scan chains, set the
following root attribute:
set_attr dft_prefix SCAN_ /
15
/designs
/libraries
/hdl_libraries
dft
design_name
dft
reports
actual_scan_chains
scan_chains
actual_scan_segments
scan_segments
violations
test_clock_domains
test_signals
17
/messages
boundary_scan
jtag_ir
dft_configuration
_modes
jtag_instructions
19
20
21
This example shows the report for a design with an internally driven
clock signal and an asynchronous set signal
Reporting registers that pass DFT rules
Iset_reg PASS; Test clock: clk/rise
Reporting registers that fail DFT rules
out_reg_0 FAIL; violations: clock #(0 ) async set #(1 )
out_reg_1 FAIL; violations: clock #(0 ) async set #(1 )
out_reg_2 FAIL; violations: clock #(0 ) async set #(1 )
out_reg_3 FAIL; violations: clock #(0 ) async set #(1 )
Total registers that pass DFT rules: 1
Total registers that fail DFT rules: 47
22
Testability Analysis
In RTL Compiler (RC), user can run different sets of testability analysis starting
as early as elaborating the design
check_dft_rules
Propagates the tied constants, shift-enable and test mode signal values to prune
the circuit and identify the test paths
Identifies constructs in the design that prevent the flops from being included into
the scan chains
RC can provide feedback on the source or cause of the DFT violation back to the
HDL whenever possible
check_atpg_rules
Generate scripts to run Encounter Test ATPG rule checker to ensure that the
design is ATPG ready
check_design
General design rule checker that identifies problems in the circuit, such as
unconnected nets and multidriven nets that impact the DFT coverage
analyze_testability
This command runs Encounter Test ATPG to do a quick estimation of the fault
coverage
Can be used on an unmapped design in an assume scan mode. Accuracy
improves as design goes through mapping such as redundancy removal, and scan
chain hookup
23
The following command fixes violation vid_1 if the violation is of type async_set:
fix_dft_violations -violations {vid_1_async} -async_set test_control tm
26
rst_b
TM A
2:1
rst
TM B
2:1
rst
TM
reset
logic
27
D
other
logic
CK
Clock
Divider
div_ck
2:1
TM
Problem: div_ck is not controllable from the top-level port.
Sol: Add 2:1 MUX to bypass Clock Divider Circuit controlled by TM signal
define_dft test_mode -name tm -active high TM
fix_dft_violations -clock -test_mode tm -test_clock_pin
CK
28
29
Scan Synthesis
Run the DFT rule checker to update the DFT status of all
flip-flops in the lower-level blocks attributed with preserve
check_dft_rules
31
If the design has a large number of shift registers, user can use the twopass flow also to automatically identify the shift-register segments in the
design (post synthesis):
identify_shift_register_scan_segments
-min_length 2 -max_length 2000 [-preview]
replace_scan to_non_scan
To manually identify the shift registers in the design, user can use the
following command:
define_dft shift_register_segment -name shiftReg \
-start_flop tmp_reg[0] -end_flop tmp_reg[7]
32
Specify the scan flip-flop output pin to use for the scan data
path connection (default: auto):
set_attr dft_scan_output_preference
{auto|non_inverted|inverted} top
33
All registers that pass the DFT rule checks that are not
attributed with a dft_dont_scan or a preserve (if non-scan
flops) are mapped to scan flops during synthesis.
synthesize to_mapped [-auto_identify_shift_register]
34
35
To specify the maximum length of any scan chain, set the following
design attribute:
set_attribute dft_max_length_of_scan_chains integer
/designs/top
37
Constraint
set_attr dft_min_number_of_scan_chains 5 /designs/top
38
Constraint
set_attr dft_max_length_of_scan_chains 8 /designs/top
set_attr dft_mix_clock_edges_in_scan_chain false /designs/top
Configuration Output
Because the dft_mix_clock_edges_in_scan_chains attribute is set to false, the scan configuration
engine creates at least one scan chain for each active (rising and falling) edge of test clock, clk1.
2 chains with 8 scan flip-flops of rising edge of test clock clk1 &1 chain with 8 scan
flip-flops of falling edge of test clock clk1
4 chains with 8 scan flip-flops of rising edge of test clock clk2
If the dft_mix_clock_edges_in_scan_chains attribute is set to true, then the configuration output is 3
scan chains of 8 flops with test clock clk1 and 4 with 8 scan flops of test clock clk2 as the edges do not
39 matter
2013 Cadence Design Systems, Inc. All rights reserved.
Lockup
Flop
clk1a
Lockup
flop
clk1b
40
41
Now the pre-processed blocks can be integrated at the next level using
following set of commands:
Read logic abstract model (optional)
42
43
Block core definition includes the testrelated ports such as se, si, and so.
Top-level netlist
module test (inl. in2, m3. clk1, cIk2. out1, out2. out3. se, si. so);
input [3:0] inl. in2. in3:
input clkl, clk2, se. si;
output [3:0] out1. out2, out3:
output so;
reg [3:0] out1, out2;
always (posedge clk1)
out1 <= in1;
always (posedge clk2)
out2 <= in2;
core u_core (.clk1 (clk1), .clk2(clk2). .in1 (in3). .out1(out3)):
endmodule //test
44
[-ctl]
//
MacroDefs Internal_scan {
"test_setup" {
W "_default_WFT_";
V { "clk1"=0; "clk2"=0; "clk3"=0; }
V { "clk1"=0; "clk2"=0; "clk3"=0;
"SE"=#; }
}
}
Environment "test" {
CTLMode Internal_scan {
TestMode InternalTest;
DomainReferences {
SignalGroups Internal_scan;
ScanStructures Internal_scan;
Procedures Internal_scan;
MacroDefs Internal_scan;
}
Internal {
"clk1" {
Datatype MasterClock ScanMasterClock;
}
"clk2" {
Datatype MasterClock ScanMasterClock;
}
"clk3" {
Datatype MasterClock ScanMasterClock;
}
"se1" {
Datatype ScanEnable {
ActiveState ForceUp;
}
}
"rst" {
Datatype TestMode {
ActiveState ForceUp;
}
}
}
//
47
MISR Compression
De-compressor uses broadcast scan
(default) or xor spreader network.
Compressor uses MISR.
48
49
51
52
Reporting DFT
To analyze the scan chains, run the following command:
report dft_chains
54
55
56
57