dft3
dft3
SystemC is a trademark of the Open SystemC Initiative and is used under license.
ARM and AMBA are registered trademarks of ARM Limited.
All other product or company names may be trademarks of their respective owners.
Printed in the U.S.A.
ii
Contents
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
2. Scan Styles
DFT Compiler Scan Styles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Scan Style Selection Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Setting the Scan Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Multiplexed Flip-Flop Scan Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Clocked Scan Scan Style. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
iii
Level-Sensitive Scan Design (LSSD) Scan Style . . . . . . . . . . . . . . . . . . . . . . 16
5. Test-Ready Compile
What is Test-Ready Compile? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
The Test-Ready Compile Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Preparing for Logical and Physical Test-Ready Compile . . . . . . . . . . . . . . . . . 31
Performing Test-Ready Compile in the Logical Domain. . . . . . . . . . . . . . 31
Performing Test-Ready Compile in the Physical Domain . . . . . . . . . . . . . 32
Controlling Test-Ready Compile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Comparing Default Compile and Test-Ready Compile . . . . . . . . . . . . . . . . . . 33
Complex Compile Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Index
iv
About This Manual
The DFT Compiler Scan Replacement User Guide describes scan replacement
strategies when using DFT Compiler.
Audience
This manual is intended for ASIC deisgn engineers who have some exposure
to testability concepts and strategies. It is also useful for test and
design-for-test engineers who want to understand how basic test automation
concepts and practices relate to DFT Compiler.
Related Publications
For additional information about DFT Compiler, see:
• Documentation on the Web, which provides HTML and PDF documents and
is available through SolvNet at:
http://solvnet.synopsys.com
• The documentation installed with the DFT Compiler software and available
through the DFT Compiler Help menu
• Synopsys Online Documentation (SOLD), which is included with the
software for CD users or is available to download through the Synopsys
Electronic Software Transfer (EST) system
v
About This Manual
Conventions
You might also want to refer to the documentation for the following related
Synopsys products:
• Design Compiler
• BSD Compiler
• TetraMAX
Conventions
The following conventions are used in Synopsys documentation.
Convention Description
Regular bold User input that is not Synopsys syntax, such as a user
name or password you enter in a GUI.
vi
About This Manual
Customer Support
Convention Description
Edit > Copy Indicates a path to a menu command, such as opening the
Edit menu and choosing Copy.
Customer Support
Customer support is available through SolvNet online customer support and
through contacting the Synopsys Technical Support Center.
Accessing SolvNet
SolvNet includes an electronic knowledge base of technical articles and
answers to frequently asked questions about Synopsys tools. SolvNet also
gives you access to a wide range of Synopsys online services including
software downloads, documentation on the Web, and “Enter a Call to the
Support Center.”
To access SolvNet:
vii
About This Manual
Customer Support
viii
1
Scan Replacement Process1
Scan Replacement
The scan replacement process inserts scan cells into your design by replacing
nonscan sequential cells with their scan equivalents. If you start with an HDL
description of your design, scan replacement occurs during the initial mapping
of your design to gates. You can also start with a gate-level netlist. When you
do, scan replacement occurs as an independent process.
With either approach, scan synthesis considers the design constraints and the
impact of both the scan cells themselves and the additional loading due to scan
chain routing to minimize the impact of the scan structures on the design.
Figure 1 shows the flow for the scan replacement process. This figure assumes
that you are starting with an HDL description of the design. If you are starting
with a gate-level netlist instead, you must use constraint-optimized scan
insertion.
1
Scan Replacement Process
Scan Replacement
Select
scan style
Violations
Change Check test
design design rules
No
violations
Prepare for
synthesis
Synthesize and
replace scan
2
Scan Replacement Process
Scan Replacement
Test-ready compile maps all sequential cells directly to scan cells. During
optimization, DFT Compiler considers the design constraints and the impact
of both the scan cells themselves and the additional loading due to scan
chain routing to minimize the impact of the scan structures on the design.
No
Use
Test-Ready Compile
3
Scan Replacement Process
Identifying Barriers to Scan Replacement
4
Scan Replacement Process
Identifying Barriers to Scan Replacement
5
Scan Replacement Process
Identifying Barriers to Scan Replacement
Master-slave latch pairs with extra states cause DFT Compiler to generate
one of these messages (depending on the situation):
• The cell uses a single clock per internal state (the cell might use different
clocks for functional and test operations).
Cells that violate this requirement cause DFT Compiler to generate one of
these messages:
6
Scan Replacement Process
Identifying Barriers to Scan Replacement
Your design contains unsupported sequential cells only if you instantiate them.
DFT Compiler does not insert unsupported sequential cells in your design.
Attributes
The following attributes prevent scan replacement:
• scan_element false
A scan_element false attribute excludes sequential cells from scan
replacement. Just remember that nonscan sequential cells generally reduce
the fault coverage results for full-scan designs.
• dont_touch
A dont_touch attribute on a flip-flop prevents scan replacement but still
allows scan routing of the flip-flop if it is already scan replaced. A
dont_touch attribute also prevents AutoFix from fixing a clock or reset
violation on a flip-flop.
Be aware that a dont_touch attribute on the top-level design does not
prevent scan replacement on the design.
These attributes differ in that the dont_touch attribute can be assigned at any
level, but the scan_element attribute is ignored unless you apply it at the
same level where you issue the insert_dft command.
DFT Compiler generates the following message when a sequential cell has a
scan_element false attribute:
Information: Cell %s (%s) will not be scanned due to a
or set_scan_element command. (TEST-202)
DFT Compiler generates this message when a nonscan sequential cell has a
dont_touch attribute:
7
Scan Replacement Process
Identifying Barriers to Scan Replacement
8
Scan Replacement Process
Identifying Barriers to Scan Replacement
• A system or test clock used during scan testing must be driven from a single
top-level port.
An active clock edge at a sequential cell must be the result of a clock pulse
applied at a top-level port, not the result of combinational logic driving the
clock net.
• A system or test clock used during scan testing must not be driven from a
bidirectional port.
DFT Compiler does not support the use of bidirectional ports as clock ports.
When a bidirectional port drives a clock net, DFT Compiler forces the net to
X, and cells clocked by the net become black box sequential cells.
• A system or test clock used during scan testing must be generated in a
single tester cycle.
The clock pulse applied at the clock port must reach the sequential cells in
the same tester cycle. DFT Compiler does not support sequential gating of
clocks, such as clock divider circuitry.
• A system or test clock used during scan testing cannot be the result of
multiple clock inputs.
DFT Compiler does not support the use of combinationally combined clock
signals (even if the same port drives the signal).
Note:
If the same port drives the combinationally combined clock signal (as in
the design on the left in Figure 3 or the design in Figure 4), DFT
Compiler does not detect the problem in nonscan or unrouted scan
designs.
Figure 3 shows sample designs that use combinationally combined clocks.
When multiple clock signals drive a clock net, DFT Compiler forces the net
to X, and cells clocked by the net become black box sequential cells.
Figure 3 Examples of Combinationally Combined Clock Nets
d q d q
clk clk1
clk2
9
Scan Replacement Process
Identifying Barriers to Scan Replacement
d q
clk
• A test clock must remain active throughout the scan shift process.
To load the scan chain reliably, make sure the test clock remains active until
scan shift completes. For combinationally gated clocks, you must configure
the design to disable the clock gating during scan shift.
DFT Compiler supports combinational clock gating during the parallel
capture cycle.
Test design rule checking on a nonscan design might not detect invalid clock
nets. DFT Compiler identifies all invalid clock nets only in existing scan designs.
DFT Compiler cannot control the clock net when:
• A sequential cell drives the clock net
• A multiplexer with an unspecified select line drives the clock net (test clocks
only)
• Combinational clock-gating logic can generate an active edge on the clock
net
DFT Compiler generates this message when it detects an uncontrollable clock:
Warning: Normal mode clock pin %s of cell %s (%s) is
uncontrollable. (TEST-169)
10
Scan Replacement Process
Identifying Barriers to Scan Replacement
Because invalid gated-clock nets prevent scan replacement, you should correct
invalid gated clocks. You can use AutoFix to bypass invalid gated clocks when
using the multiplexed flip-flop scan style. You might also be able to change the
test configuration to bypass the violation.
11
Scan Replacement Process
Identifying Barriers to Scan Replacement
12
2
Scan Styles2
13
Scan Styles
Scan Style Selection Considerations
14
Scan Styles
Setting the Scan Style
15
Scan Styles
Clocked Scan Scan Style
The multiplexed flip-flop scan style has the disadvantage that hold-time or clock
skew problems can occur on the scan path because of a short path from a scan
cell’s scan output pin to the next scan cell’s scan input pin. DFT Compiler can
reduce the occurrence of these problems by considering hold-time violations
during optimization.
16
3
Verifying Scan Equivalents in the Technology Library3
17
Verifying Scan Equivalents in the Technology Library
Checking for Scan Equivalents
The following command sequence shows the use of the filter command:
dc_shell-t> read_db class.db
dc_shell-t> get_pin class/*/* -filter "@signal_type ==
test_scan_in"
If the library contains scan cells, the filter command returns a list of pins;
if the library does not contain scan cells, the filter command returns an
empty list.
• Check the test design rules.
As one of the first checks it performs, the dft_drc command determines
the presence of scan cells in the technology library. If the technology
libraries identified in the target_library variable do not contain scan
cells, dft_drc generates the following message:
Warning: Target library for design contains no
scan-cell models. (TEST-224)
You must define the current_design before you run the dft_drc
command.
If your technology library does not contain scan cells, check with your
semiconductor vendor to see if the vendor provides a technology library that
supports test synthesis.
In verbose mode (dft_drc -verbose), the TEST-120 message lists all scan
equivalent pairs available in the target library in the selected scan style. If the
target library contains no scan equivalents in the chosen scan style, no scan
equivalents are listed.
Suppose you have a design containing D flip-flops, but the target technology
library only contains scan equivalents for JK flip-flops. Example 1 shows the
18
Verifying Scan Equivalents in the Technology Library
Checking for Scan Equivalents
19
Verifying Scan Equivalents in the Technology Library
Checking for Scan Equivalents
20
4
Scan Cell Replacement Strategies4
This chapter describes how to select the set of scan cells and
multibit components to use in your scan replacement strategy.
21
Scan Cell Replacement Strategies
Specifying Scan Cells
Note:
The set_scan_register_type command applies to the operation of
both the compile -scan command and the insert_dft command.
The set_scan_register_type command has the following syntax:
set_scan_register_type [-exact]
-type scan_flip_flop_list [cell_or_design_list]
The scan_flip_flop_list is the list of scan cells that compile -scan is allowed
to use for scan replacement. There must be at least one such cell named in the
command. Specify each scan cell by its cell name alone (without the library
name).
The cell_or_design_list is a list of designs or cell instances where the restriction
on scan cell selection is to be applied. In the absence of such a list, the
restriction applies to the current design (as set by the current_design
command) and to all lower-level designs in the design hierarchy.
The -exact option determines whether the restriction on scan cell selection
also applies to back-end delay and area optimization done by insert_dft or
by subsequent synthesis operations such as compile -incremental. If -
exact is used, the restriction still applies to back-end optimization. In other
words, scan cells will only be replaced by other scan cells in the specified list. If
-exact is not used, the optimization algorithm is free to use any scan cell in
the target library.
This command causes compile -scan to use only FD1S scan cells to replace
nonscan cells in the current design. Because of the -exact option, this
restriction applies to both initial scan replacement and subsequent
optimization.
set_scan_register_type -exact
-type {FD1S, FD2S} {add2, U1}
This command causes compile -scan to use only an FD1S or FD2S scan
cell to replace each nonscan cell in all designs and cell instances named add2
or U1. In all other designs and cell instances, compile -scan can use any
scan cells available in the target library. The -exact option forces any back-
22
Scan Cell Replacement Strategies
Specifying Scan Cells
end delay optimization to respect the scan cell list, thus allowing only FD1S and
FD2S to be used.
set_scan_register_type -type {FD1S FD2S} {add2 U1}
This command is the same as the previous example, except that the -exact
option is not used. This means that the back-end optimization algorithm is free
to replace the FD1S and FD2S cells with any compatible scan cells in the target
library.
If you use the set_scan_register_type command on generic cell
instances, be sure to include the -scan option in the compile command.
Otherwise, the scan specification will be lost.
To determine the current settings resulting from previous use of the
set_scan_register_type command, execute the following command:
report_test -register
This returns a report on all set_scan_register_type settings currently in
effect.
To cancel all set_scan_register_type settings currently in effect, execute
the following command:
remove_scan_register_type
23
Scan Cell Replacement Strategies
Multibit Components
Multibit Components
Multibit components are supported by DFT Compiler during scan replacement.
In this section, the following topics are discussed:
• What are Multibit Components?
• How DFT Compiler Assimilates Multibit Components
• Controlling Multibit Test Synthesis
• Performing Multibit Component Scan Replacement
24
Scan Cell Replacement Strategies
Multibit Components
they have different bit widths. Multibit synthesis ensures regularity and
predictability of layout.
HDL Compiler infers multibit components through HDL directives. See the HDL
Compiler for Verilog Reference Manual for more information about multibit
inference. Specify multibit components using the Design Compiler
create_multibit command and remove_multibit command. Control
multibit synthesis using the set_multibit_options command. See the
Design Compiler Reference Manual: Optimization and Timing Analysis for
details.
When you create a new multibit component with the create_multibit
command, choose a name that is different from the name of any existing object
in your design. This will prevent possible conflicts later when you use the
set_scan_path and set_scan_segment commands.
Structured logic synthesis is a special case of multibit synthesis in which the
individual bits of a multibit component are implemented as distinct elements.
Use the set_multibit_options -mode structured command to enable
structured logic synthesis.
25
Scan Cell Replacement Strategies
Multibit Components
26
Scan Cell Replacement Strategies
Multibit Components
27
Scan Cell Replacement Strategies
Multibit Components
28
5
Test-Ready Compile5
29
Test-Ready Compile
What is Test-Ready Compile?
30
Test-Ready Compile
Preparing for Logical and Physical Test-Ready Compile
Specify technology
requirements
Select
Library objects compile strategy
link_library
target_library Top-down hierarchical compile
symbol_library time-budget compile
bottom-up hierarchical compile
Design rules
set_max_transition
set_max_fanout
Set
set_max_capacitance
design constraints
create_clock
Define set_clock_skew
design environment set_input_delay
set_output_delay
set_operating_conditions set_max_area
set_wire_load
set_drive
set_driving_cell Resolve multiple
set_load design instances
set_fanout_load
For details of how to constrain your design and for other compile options, see
the Design Compiler Reference Manual: Optimization and Timing Analysis.
31
Test-Ready Compile
Controlling Test-Ready Compile
If you want to perform scan replacement and physical optimization in one step,
use the following command:
psyn> compile_physical -scan
32
Test-Ready Compile
Comparing Default Compile and Test-Ready Compile
Note:
Use the set_scan_element false statement sparingly. For
combinational ATPG, using nonscan elements generally results in lower
fault coverage.
You might want to specify which flip-flop scan cells are to be used for replacing
nonscan cells in the design. In that case, use the set_scan_register_type
command as described in the next section.
input d1,d2,d3,sel,clk;
output q1,q2;
reg q1,q2;
always @ (posedge clk) begin
q1 = d1;
if (sel) begin
q2=d2;
end else begin
q2=d3;
end
end
endmodule
33
Test-Ready Compile
Comparing Default Compile and Test-Ready Compile
The following command sequence performs the default compile process on the
Verilog design example:
--------------------------------------------------
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
--------------------------------------------------
entity EXAMPLE is
port( d1:in STD_LOGIC;
d2:in STD_LOGIC;
d3:in STD_LOGIC;
sel:in STD_LOGIC;
clk:in STD_LOGIC;
q1:out STD_LOGIC;
q2:out STD_LOGIC
);
end EXAMPLE;
--------------------------------------------------
architecture RTL of EXAMPLE is
begin
process
begin
wait until (clk’event and clk = ‘1’);
q1 <= d1;
if (sel = ‘1’) then
q2 <= d2;
else
q2 <= d3;
end if;
end process;
end RTL;
34
Test-Ready Compile
Comparing Default Compile and Test-Ready Compile
The following command sequence performs the default compile process on the
VHDL design example:
Figure 7 shows the result of the default compile process on the design
example. Design Compiler uses the D flip-flop (FD1) and the multiplexed flip-
flop scan cell (FD1S) from the class technology library to implement the
specified functional logic.
Figure 7 Gate-Level Design: Default Compile
FD1
FD1S
Using default compile increases the scan replacement runtime and can result
in sequential cells that do not have scan equivalents.
To invoke test-ready compile, specify the scan style before optimization and
use the -scan option of the compile command.
dc_shell-t> set test_default_scan_style = multiplexed_flip_flop
dc_shell-t> compile -scan
35
Test-Ready Compile
Complex Compile Strategies
Figure 8 shows the result of the test-ready compile process on the design
example. During test-ready compile, DFT Compiler:
• Implements the scan equivalent cells using the multiplexed flip-flop scan cell
(FD1S)
• Ties the scan enable pins (SE) to logic 0 to enable the functional logic
• Connects the Q output of the flip-flops to the scan input pins (SI) to reflect
the scan loading effect
During scan routing, DFT Compiler replaces the temporary scan connections
with the appropriate scan connections.
Figure 8 Gate-Level Design: Test-Ready Compile
A scan equivalent might not exist for the exact implementation defined, such as
for the simple D flip-flop in the previous example. If the target library contains a
scan cell that can be degenerated to the required implementation (for example,
the scan cell has asynchronous pins that can be tied off), test-ready compile
automatically uses that scan cell.
36
Test-Ready Compile
Complex Compile Strategies
dc_shell-t> current_design A
dc_shell-t> compile -scan
dc_shell-t> current_design B
dc_shell-t> compile -scan
37
Test-Ready Compile
Complex Compile Strategies
38
6
Validating Your Netlist6
Before you assemble the scan structures, use the link and
check_design commands to check the correctness of your
design. Fix any errors reported by these commands to
guarantee the highest possible fault coverage.
39
Validating Your Netlist
Running the check_design Command
If the unresolved reference involves a simple cell, you can often fix the problem
by adding the cell to the library or by replacing the reference with a valid library
cell.
Handling a compiled cell requires a more complex solution. If the compiled cell
does not contain internal gates (for example, a ROM or programmable logic
array), you can compile a behavioral model of the cell into gates, then run DFT
Compiler on the equivalent gates.
For more information about missing references or link errors, see the Design
Compiler User Guide.
40
Index
A clock
asynchronous pins bidirectional ports 9
invalid
uncontrollable 11
fault coverage impact 8
correcting 11
gated 11
fault coverage impact 11
identifying 10
attributes
uncontrollable 10
dont_touch 7
locating 8 reconvergent 10
removing 8 requirements 8
scan_element 7 system 8
test 8
clocked scan 16
B clocking constraints
bidirectional port, using as clock 9 requirements for valid clocks 8
bottom-up compile 36 commands
check_design 40
compile 31
C create_multibit 25
check_design command 40 dft_drc 18
check_test command 18 filter 17
identifying link 39
scan cells 18 remove_multibit 25
messages, information 7 remove_scan_register_type 23
(see also messages, information) report_test
-register option 23
set_dont_touch 8
set_multibit_options 25
set_scan_configuration
-style option 32
set_scan_register_type 21
compile -scan command 31
specifying scan cells 21
constraint-optimized scan insertion, when to use 3
41
correcting LSSD
invalid clock gating 11 advantages 16
uncontrollable asynchronous pins 11 disadvantages 16
uncontrollable clocks 11
unresolved references 39
M
create_multibit command 25
messages
information
D TEST-121 8
definitions TEST-202 7
scan replacement 1 TEST-204 8
system clock 8 warning
TEST-116 11
test clock 8
TEST-120 5, 18
test-ready compile 29
TEST-169 10
unresolved reference 39
TEST-186 11
design state, unrouted scan 30
TEST-224 5, 18
dft_drc command
identifying TEST-462 6
scan equivalents 18 TEST-463 6
identifying invalid clock nets 10 TEST-464 6
dont_touch attribute 7 TEST-465 6
TEST-466 7
TEST-467 7
F TEST-468 6
fault coverage multibit
impact component scan replacement 26
invalid clock nets 8 components 24
uncontrollable asynchronous pin 11 controlling test synthesis 26
fault coverage, impact multiplexed flip-flop, advantages and
scan equivalents 14 disadvantages 15, 16
filter command 17
flows
scan replacement 2 N
netlist, validating 39
I
identifying O
scan cells 17, 18 optimization
scan equivalents 18 default compile
identifying invalid clock nets 10 Verilog example 34
VHDL example 35
incremental compiles 36
insert_scan command preparing for 31
specifying scan cells 21 test-ready compile 29, 35
L R
link command 39 reference, unresolved 39
link_library variable 39 remove_multibit command 25
listing scan equivalents 18 remove_scan_register_type command 23
removing attributes 8
42
report_test command T
-register option 23
test clock 8
requirements, clocks 8
test_allow_clock_reconvergence variable 10
test_default_scan_style variable 15
S TEST-116 message 11
scan cell 18 TEST-120 message 5, 18
determining scan functionality 14 TEST-121 message 8
library description 14 TEST-169 message 10
specifying 21 TEST-186 message 11
scan equivalents
TEST-202 message 7
fault coverage impact 14
TEST-204 message 8
identifying 18
listing 18 TEST-224 message 5, 18
scan implementation, controlling 32 TEST-462 message 6
-scan option, compile command 31 TEST-463 message 6
scan replacement TEST-464 message 6
definition 1 TEST-465 message 6
flow 2 TEST-466 message 7
preventing 7 TEST-467 message 7
process 4 TEST-468 message 6
selecting a strategy 3 test-ready compile 29
using test-ready compile 29 benefits 3
scan style bottom-up compile 36
selecting 14 complex compiles 36
specifying 15 controlling 32
supported options 13 controlling scan implementation 32
scan_element attribute 7 degeneration support 36
selecting example 35
scan replacement strategy 3 incremental compiles 36
scan style 14 invoking 31
set_dont_touch command 8 when to use 3
set_multibit_options command 25
set_scan_configuration command
-style option 15, 32 U
set_scan_register_type command 21 uncontrollable asynchronous pin 11
specifying correcting 11
scan style 15 fault coverage impact 11
structured logic uncontrollable clock 10
defining 25 unresolved reference 39
disabling 27 unrouted scan design, after test-ready compile 30
-style option, set_scan_configuration command 15
synthesis 31
synthesizable segment
V
defining 25 validating
system clock 8 netlist 39
43
variables
link_library 39
test_allow_clock_reconvergence 10
test_default_scan_style 15
44