DFTC1 2007.12 LabGuide
DFTC1 2007.12 LabGuide
DFTC1 2007.12 LabGuide
DFT Compiler 1
Workshop
Lab Guide
30-I-011-SLG-012 2007.12
www.synopsys.com
Copyright Notice and Proprietary Information
Copyright 2008 Synopsys, Inc. All rights reserved. This software and documentation contain confidential and
proprietary information that is the property of Synopsys, Inc. The software and documentation are furnished under a
license agreement and may be used or copied only in accordance with the terms of the license agreement. No part of the
software and documentation may be reproduced, transmitted, or translated, in any form or by any means, electronic,
mechanical, manual, optical, or otherwise, without prior written permission of Synopsys, Inc., or as expressly provided by
the license agreement.
Disclaimer
SYNOPSYS, INC., AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH
REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Trademarks (™)
AFGen, Apollo, Astro, Astro-Rail, Astro-Xtalk, Aurora, AvanWaves, Columbia,Columbia-CE, Cosmos, CosmosEnterprise,
CosmosLE, CosmosScope, CosmosSE, DC Expert, DC Professional, DC Ultra, Design Analyzer, Design Vision,
DesignerHDL, Direct Silicon Access, Discovery, Encore, Galaxy, HANEX, HDL Compiler, Hercules, Hierarchical
Optimization Technology, HSIMplus, HSPICE-Link, iN-Tandem, i-Virtual Stepper, Jupiter, Jupiter-DP, JupiterXT,
JupiterXT-ASIC, Liberty, Libra-Passport,Library Compiler, Magellan, Mars, Mars-Rail, Milkyway, ModelSource, Module
Compiler, Planet, Planet-PL, Polaris, Power Compiler, Raphael, Raphael-NES,Saturn, Scirocco, Scirocco-i, Star-RCXT,
Star-SimXT, Taurus, TSUPREM-4, VCS Express, VCSi, VHDL Compiler, VirSim, and VMC are trademarks of Synopsys,
Inc.
SystemC is a trademark of the Open SystemC Initiative and is used under license. ARM and AMBA are registered
trademarks of ARM Limited. Saber is a registered trademark of SabreMark Limited Partnership and is used under license.
All other product or company names may be trademarks of their respective owners.
Learning Objectives
Lab Duration:
90 minutes
Part A Overview
The files for Part A of this lab are located in the directory lab4a_protocol.
Directory Structure
Lab4a_protocol Current working directory
analyzed Intermediate acs_read_hdl files
logs Session log files
unmapped Unmapped protocol
mapped Gate-level netlist
reports DFTC reports
tmax Files for downstream tools
scripts Constraint and run scripts
../ref/rtl/RISC_CORE/vhdl Design files
../ref/db Library files
When working interactively, you do not need to type the entire command or option.
dc_shell> read_test_p -v
dc_shell> all_inputs -cl
Instructions
During this lab, you will use the Design Vision GUI for debugging dft_drc
problems related to test protocols, write a script to create and verify a test protocol
and explore a dc_shell log file.
UNIX% cd lab4a_protocol
UNIX% pwd
UNIX% ls –a
2. Specify the libraries and append to the search path by editing the
.synopsys_dc.setup file with a text editor.
Question 1. You use the set command to assign values to ‘things’ such
as target_library and link_library; what are these
‘things’ called in TCL?
....................................................................................................
Question 2. When you write out a design to a .ddc file, what is the
difference in how values defined with the set command are
treated, compared to how values defined with commands
starting with set_, such as set_scan_configuration or
set_dft_signal, are treated?
....................................................................................................
....................................................................................................
# shortcuts
history keep 100
alias h "history"
set sh_enable_line_editing true ;# wow - read man page
....................................................................................................
5. Invoke Design Vision from the UNIX prompt in the lab4_protocol directory:
UNIX% design_vision
Note: You must open Design Vision from the same directory where the
.synopsys_dc.setup exists,because, as shown in the previous
steps, variables such as search_path are defined relative to the
directory containing the setup file.
Note: If you see any errors while invoking DV, refer to the golden solution at
./.solutions/dot.synopsys_dc.setup
6. List the contents of the logs directory. You should see the two log files
discussed above.
Task 2. Create a test protocol with a script
Utilize the flowchart below and the protocol test attributes specification to its right
as a guide to write and verify a DFTC script to create a test protocol.
no Test attributes
correctly applied?
yes
no
Question 4. What command is used to see which DFT signals have been
applied to the design?
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
Question 7. What command tells whether the entire design was compiled
to the target library?
....................................................................................................
1. Verify that the entire design was compiled to the target library.
Question 8. What target library was it compiled to?
....................................................................................................
Question 9. Now that you know the design has been properly compiled,
how do you determine if the flip-flops have been scan
replaced?
....................................................................................................
....................................................................................................
Question 11. How do you verify the library variables are set up correctly?
....................................................................................................
Question 12. How do you read VHDL or Verilog code into Design Vision?
....................................................................................................
....................................................................................................
Part B Overview
All files for Part B of this lab except for designs and libraries are located in the
directory lab4b_init.
Directory Structure
Lab4b_init Current working directory
analyzed Intermediate acs_read_hdl files
logs Session log files
unmapped Unmapped protocol
mapped Gate-level netlist
mapped_scan Gate-level scan design netlist
reports DFTC reports
tmax Files for downstream tools
scripts Constraint and run scripts
../rtl/ORCA_init/vhdl Design files
../libs Library files
Design Introduction
The design used in this task requires a custom test initialization protocol. You
obtained the following schematic from the ORCA design documentation that
describes the process for asserting the internal test_mode signal.
CLOCK_GEN
pclk F4
int_clk
test_mode = 1
CONFIG
Status Bits
Initialization
101 Sequence
1 0 1
conf F1 F2 F3
1
conf_ena
pclk
Instructions
Since DFTC cannot infer a test protocol of this type you must develop one for this
design. Answer the following questions in preparation for doing the subsequent lab
tasks.
Question 14. What value must be placed on the conf_ena signal to initialize
the configuration register flip-flops F1, F2 and F3?
....................................................................................................
Question 15. How many cycles must you pulse pclk before test_mode is
asserted?
....................................................................................................
Question 16. What values should conf_ena and pclk have the cycle after
test_mode is asserted?
....................................................................................................
Question 17. Write in STIL format the Vector statements that would go
into the “test_setup”?
. . .
MacroDefs {
"test_setup"
{
. . .
. . .
}
You will use this information later when you develop the initialization
protocol for ORCA.
Instructions
During this lab you will, develop a custom test initialization protocol for a design
that has an internal test_mode signal.
UNIX% cd lab4b_init
2. Invoke DFTC.
dc_shell
4. A mapped design has been prepared for you in the interest of saving time
during lab (Reading the RTL and compiling).
Examine the contents of the script that reads the saved ddc file for the ORCA
design and then source the script to read in ORCA.
s scripts/1read_design.tcl
Question 18. Where is the design read from? Is the design RTL or mapped
gates?
....................................................................................................
Before you create the starting test protocol you must specify all your
clocks, resets, constants, etc. The clocks and the resets are already
defined in the 2create_test_protocol.tcl script.
Question 19. After the test initialization asserts the internal test_mode
signal what must you do to keep the ORCA design in that
mode throughout the rest of the scan testing?
....................................................................................................
s scripts/2create_test_protocol.tcl
Review the results of the dft_drc run on the ORCA RTL design.
Question 20. Are there few or many testability problems reported?
....................................................................................................
write_test_protocol –o orca_mapped.spf
vi orca_mapped.spf
....................................................................................................
3. Verify that your initialization vectors are correct by reading in your custom
protocol and rerunning dft_drc.
Question 22. What happens when you first try to read orca_mapped.spf
back into DFTC?
....................................................................................................
4. Solve the problem by removing the previous protocol and reading in your
custom initialization.
remove_test_protocol
read_test_protocol -section test_setup \
orca_mapped.spf
5. Re-create the rest of the test protocol before attempting to run dft_drc.
Question 23. How do the results of dft_drc compare to your first run?
....................................................................................................
Answers / Solutions
Variables
Question 2. When you write out a design to a .ddc file, what is the
difference in how values defined with the set command are
treated, compared to how values defined with commands
starting with set_, such as set_scan_configuration
or set_dft_signal, are treated?
no Test attributes
correctly applied?
yes
create_test_protocol
yes
dft_drc
yes
Violations?
no
Question 4. What command is used to see which DFT signals have been
applied to the design?
report_dft_signal
Question 5. a. What value is the TEST_MODE port set to?
b. What is the name of the test clock port?
c. What is the period of the test clock?
d. When does the test clock go high?
e. When does the test clock go low?
f. What is the name of the reset port?
g. What type of reset has been assumed?
a. TEST_MODE = 1
No
Question 9. Now that you know the design has been properly compiled,
how do you determine if the flip-flops have been scan
replaced?
****************************************
Report : test
-state
Design : RISC_CORE
****************************************
. . .
Creating Test Protocols Lab 4-17
Synopsys DFT Compiler 1 Workshop
Lab 4 Answers / Solutions
MacroDefs {
“test_setup”
{
. . .
V { “conf_ena”=1; “conf”=1; “pclk”=P; }
V { “conf_ena”=1; “conf”=0; “pclk”=P; }
V { “conf_ena”=1; “conf”=1; “pclk”=P; }
V { “conf_ena”=0; “pclk”=0; }
. . .
}
Task 2. Read a Mapped Design and Create a Test
Protocol
Question 18. Where is the design read from? Is the design RTL or
mapped gates?
mapped/ORCA.ddc
The design is mapped gates.
Question 19. After the test initialization asserts the internal test_mode
signal what must you do to keep the ORCA design in that
mode throughout the rest of the scan testing?
Many.
4010 PRE-DFT VIOLATIONS
2828 Uncontrollable clock input of flip-flop violations (D1)
1133 DFF set/reset line not controlled violations (D3)
32 Clock feeding both clock and data input violations (D11)
6 Clock feeding multiple clock/set/reset inputs violations (D12)
1 Clock path affected by clock captured by clock in trailing edge
clock_port violation (D16)
10 Clock_port not capable of capturing data violations (D17)
Question 21. Since you only changed the “test_setup” section of the
STIL test protocol, which command should you use to read
it back into DFTC?
3 OTHER VIOLATIONS
1 Cell is constant 0 violation (TEST-
504)
2 Cell is constant 1 violations (TEST-
505)
Learning Objectives
Lab Duration:
45 minutes
Overview
All files for this lab except for designs and libraries are located in the directory
lab5_drc.
Directory Structure
lab5_drc Current working directory
analyzed Intermediate acs_read_hdl files
logs Session log files
unmapped Unmapped protocol
mapped Gate-level netlist
mapped_scan Will contain final netlist
reports DFTC reports
tmax Files for downstream tools
scripts Constraint and run scripts
../ref/rtl/RISC_CORE/vhdl Design files
../ref/db Library db files
Instructions
During this lab, you will perform DFT design rule checks and various points in the
scan insertion flow.
1. Invoke DC/DFTC.
UNIX% cd lab5_drc
UNIX% dc_shell | tee logs/rtl_drc.log
2. Read the RTL design into DFTC and create the test protocol.
s scripts/task1_setup.tcl
Question 1. What command verifies that the RTL design and the protocol
are compatible?
....................................................................................................
Question 2. What variable needs to be set to enable file and line number
tracking for RTL DFT DRC?
....................................................................................................
3. Run dft_drc
dft_drc
....................................................................................................
5. The TEST_MODE signal (active high) was not declared prior to creating the
test protocol. Declare the signal with set_dft_signal and rerun
dft_drc
set_dft_signal ...
remove_test_protocol
create_test_protcol –capture_procedure multi_clock
dft_drc
....................................................................................................
6. Exit dc_shell
exit
1. Invoke DC/DFTC.
s scripts/task2_setup.tcl
....................................................................................................
Question 6. From looking at the logfile, can you tell if automatic shift
register identification was performed?
....................................................................................................
Question 7. What command verifies that the gate-level design and the
protocol are compatible?
....................................................................................................
dft_drc
Question 8. Are the results the same as when dft_drc was run on the
RTL? Is the report format the same?
....................................................................................................
....................................................................................................
1. Specify scan constraints and preview the scan architecture that will result.
s scripts/task3_setup.tcl
Question 10. How many scan chains does preview_dft report will be
inserted?
....................................................................................................
insert_dft
Question 11. What command verifies that the inserted scan chain follows
design rules?
....................................................................................................
dft_drc
....................................................................................................
Question 13. What section of the dft_drc report is now included when
performing DRC check on a post-scan inserted netlist?
....................................................................................................
Question 14. What dft_drc command option is used to report an ATPG test
coverage estimate after scan insertion?
....................................................................................................
dft_drc ...
....................................................................................................
Answers / Solutions
dft_drc
Question 2. What variable needs to be set to enable file and line number
tracking for RTL DFT DRC?
No.
Yes, it is enabled.
Note: Automatic shift-register identification is enabled for scan. Not all registers
will be scan-replaced (OPT-467)
Question 7. What command verifies that the gate-level design and the
protocol are compatible?
dft_drc
Question 8. Are the results the same as when dft_drc was run on the
RTL? Is the report format the same?
One.
Question 11. What command verifies that the inserted scan chain follows
design rules?
dft_drc
Question 12. Were there any DRC violations?
No.
Question 13. What section of the dft_drc report is now included when
performing DRC check on a post-scan inserted netlist?
-------------------------------------------------------------------------
-------------------------------------------------------------------------
help –v dft_drc
99.77%
Learning Objectives
Lab Duration:
45 minutes
Overview
All files for this lab except for designs and libraries are located in the directory
lab6_gui.
Directory Structure
lab6_gui Current working directory
analyzed Intermediate acs_read_hdl files
logs Session log files
unmapped Unmapped protocol
mapped Gate-level netlist
mapped_scan Will contain final netlist
reports DFTC reports
tmax Files for downstream tools
scripts Constraint and run scripts
../ref/rtl/RISC_CORE/vhdl Design files
../ref/db Library db files
Instructions
UNIX% cd lab6_gui
UNIX% design_vision | tee logs/gui.log
....................................................................................................
Once in Design Vision, you can take advantage of its graphical interface for
debugging and troubleshooting problems, or work in dc_shell, taking advantage
of the speed of a shell.
2. Read the file containing the RISC_CORE entity or module, and read all
associated subfiles, by applying the following command:
Before executing the command, click on the Log tab in the lower left corner
of the GUI, and make the Session Window as large as possible, so that you
can follow the progress of the read.
acs_read_hdl -f vhdl \
-hdl_source ../ref/rtl/RISC_CORE/vhdl RISC_CORE
....................................................................................................
source -e -v constraints.tcl
Question 3. The constraint file is in the scripts subdirectory; you did not
have to specify the directory when you sourced the
constraints file, why not?
....................................................................................................
compile_ultra -scan
The compile command synthesizes the design to the target library by taking
the GTECH (Generic Technology) library parts and translating them into the
target library parts (in this case, a 0.13μ training library).
Compile maps to ordinary D flip-flops by default. The –scan switch directs
DC to translate the GTECH sequential elements directly to special test
flip-flops called scan flops. This is called “test-ready compile” or “1-Pass
Scan Synthesis”.
3. Save the design using the command:
This command saves your design in Synopsys internal (DDC) format into the
mapped subdirectory. The name of the file is RISC_CORE.ddc. Saving all
the sub blocks in the design is enabled by the –hierarchy switch.
1. Resize your Session Window, making it smaller so that you can focus on the
graphical display at the top portion of the GUI.
The following figure shows some key points for navigating in Design Vision.
Design Overview Window. Once the designs have been read into
Design Vision, this window shows the top-level block and all of the
subblock names.
A + sign indicates subblocks exist beneath
For instance, select the + sign next to I_STACK_TOP to see
the subblocks of the STACK_TOP block
....................................................................................................
You can also display the current design from the TCL shell by using the
current_design command. Try it:
current_design
3. Display all the designs from the TCL shell by using the list_designs
command.
list_designs
Select the pull down arrow to the right of the current design; the results match
those from the list_designs command.
5. Display a schematic of the entire RISC_CORE ASIC.
Notice the Cell name and ref name of each subdesign are shown. Cells are
also called instances. Ref names are also called designs.
Select the orange AND gate in the toolbar. You should see a schematic of the
RISC_CORE ASIC.
You can zoom in and out to see things more clearly.
7. Zoom in to examine the schematic in more detail.
Note: You may first have to select an area of the schematic which has nothing
in it with the mouse to be able to use the Zoom features.
Once in Zoom In mode, you may need to click on the Selection Tool
before changing to another mode, such as Zoom Out. The escape key
(ESC) is the shortcut for the Selection Tool.
You can also use the middle mouse button to zoom and pan, using so
called strokes, e.g. depress the middle mouse button then move the mouse
from SW to NE. You should have zoomed in.
8. Display the symbol view (input and output ports) of the RISC_CORE ASIC.
Select the green IC chip icon next to the orange AND gate.
report_hierarchy
Remove all of the designs, bring in the unmapped design once more, and run
the report_hierarchy command:
remove_design –design
acs_read_hdl -f vhdl \
–hdl_source ../ref/rtl/RISC_CORE/vhdl RISC_CORE
report_hierarchy
Notice the RPT-7 message and that all the cells are GTECH library cells
because the design is unmapped.
11. Verify that all the library variables have been defined correctly.
printvar *_library
exit
read_ddc mapped/RISC_CORE.ddc
dft_drc
....................................................................................................
create_test_protocol
dft_drc
Question 6. Is the design free of DFT problems or does the report contain
many violations?
....................................................................................................
18. Look at the GUI. You should see a Violation Browser showing the same
errors shown by the command output of dft_drc. You can bring up the
violation browser any time using the menu Test Æ Browse Violations.
19. Click on the “+” infront of “PRE-DFT”, then click on the D1 category.
Select the first violation on the right. On the bottom, you will see an
explanation of the error.
20. Right click on the first D1 violation, then select “Inspect Violation”, or click
on the “Inspect Violation” button on the lower right. A schematic should
appear.
Question 7. What logic value is present on the clock?
....................................................................................................
Lab 6-10 Introduction to Design Vision
Synopsys DFT Compiler 1 Workshop
Lab 6
....................................................................................................
21. Type the command that you just noted (check the back for help).
22. Recreate the test protocol, then switch back to the Violation Browser, and
click on “Run DFT DRC”. The schematic window should disappear.
Note: The test protocol is recreated by simply re-running the
create_test_protocol command.
....................................................................................................
23. Once again, “Inspect Violation” for the first D1 violation shown.
Question 10. What value is shown for TEST_MODE?
....................................................................................................
Question 11. What DFTC command is needed to specify this test mode?
....................................................................................................
24. Type the command that you just noted (check the back for help).
25. Recreate the test protocol, then switch back to the Violation Browser, and
click on “Run DFT DRC”.
Question 12. Was the number of violations affected at all?
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
27. Type the command you just noted down (check the back for help).
28. Recreate the test protocol, then switch back to the Violation Browser, and
click on “Run DFT DRC”.
....................................................................................................
Answers / Solutions
Question 11. What DFTC command is needed to specify this test mode?
Question 16. How do you optimize, map, and scan-replace the flip-flops
in a design with Design Vision?
acs_read_hdl -f vhdl \
–hdl_source ../ref/rtl/RISC_CORE/vhdl RISC_CORE
source -e -v constraints.tcl
compile_ultra -scan
write –format ddc –hier -output mapped/RISC_CORE.ddc
set_dft_signal -view exist -type ScanClock \
-timing {45 55} -port Clk
set_dft_signal -view exist -type Constant \
-active 1 -port TEST_MODE
set_dft_signal -view exist -type Reset \
-active 0 -port Reset
create_test_protocol
dft_drc
sold is a UNIX alias which invokes Adobe Acrobat reader and opens up a
file called top.pdf, which is the top-level view of all documents.
2. To search for information in SOLD and look only in specific documents, you
need to set up indexes to customize the searches. SOLD consists of a host of
documentation for the various Synopsys tools. Each set of documentation is
accessed through its corresponding index. For instance, there is an index for
the Man Pages and one for Test Automation, as well as many others. When
the indexes are set up properly, you can use SOLD to search in one or many
indexes to control how much information you will receive from any search
you perform.
3. For information on how to setup indexes consult this SolvNet article
https://solvnet.synopsys.com/retrieve/903898.html “Script for building SOLD
search indexes”.
4. To search for information in a SOLD index, first select the binoculars icon
(the binoculars icon with documents behind it is the Search button).
Learning Objectives
Lab Duration:
45 minutes
Overview
All files for this lab except for designs and libraries are located in the directory
lab7_fixing.
Directory Structure
Lab7_fixing Current working directory
analyzed Intermediate acs_read_hdl files
logs Session log files
unmapped Unmapped protocol
mapped Gate-level netlist
reports DFTC reports
tmax Files for downstream tools
scripts Constraint and run scripts
../ref/rtl/RISC_CORE_nodft/vhdl Design files
../ref/db Library files
./.solutions Solution files
Instructions
During this lab you will debug Uncontrollable Clock and Reset DFT problems using
the Design Vision GUI, propose a fix and implement a fix using AutoFix.
UNIX% design_vision
source scripts/4read_gate_and_protocol.tcl
...................................................................................................
...................................................................................................
...................................................................................................
2. In the Violation Browser, analyze the first D1 violation and you should
observe a schematic similar to the one shown below.
Figure 1.
Question 2. What is the netlist name for the flip-flop on the left, the
cause for the D1 violation?
...................................................................................................
3. Analyze some of the other D1 violations. Select the Violation Browser tab,
then select some of the other D1 violations and examine the schematic.
Question 4. What can you conclude about the D1 violations in the
RISC_CORE design?
...................................................................................................
Analyze one of the D3 violations in the same manner as you did the D1
violations. To expand the second X input to I_RST/q2_reg, double click on
the D input.
....................................................................................................
1) You could re-code the RTL design and check the design once again using
the unmapped DFTflow. When you have no more violations you can
continue on to the mapped flow.
2) You could draw the solution and have someone else re-code the design for
you.
3) You can use the AutoFix capability of DFTC.
...................................................................................................
...................................................................................................
source –e –v scripts/5preview_dft.tcl
...................................................................................................
...................................................................................................
4. Perform both AutoFix and scan insertion by running step 6 of the DFT flow.
source –e –v scripts/6insert_dft.tcl
...................................................................................................
...................................................................................................
Question 11. What kind of fault coverage would you expect to get, if you
had not AutoFixed the design?
...................................................................................................
Answers / Solutions
I_DIV_CLK/q_reg
Question 3. Draw a schematic “fix” for this uncontrollable clock
problem.
RISC_CORE
DIV_CLK ALU
TEST_MODE
Carry_Flag_Reg
Q D Q D Q
....
q_req 0 SE
F0
SE
FN
1
Clk
RISC_CORE
RST ALU
TEST_MODE +Vdd
Carry_Flag_Reg
D Q D Q D Q D Q
RST
The D3 violations all come from the same launch point and
the solution in Question 5 is adequate to fix all of the D3
violations.
Dft signals:
TestMode: TEST_MODE (no hookup pin)
TestData: Clk (no hookup pin)
TestData: Reset (no hookup pin)
0 violations.
No cells with violations.
99.73%
Question 11. What kind of fault coverage would you expect to get, if you
had not AutoFixed the design?
Learning Objectives
Lab Duration:
45 minutes
Overview
Unmapped Flow:
2. Create and save a test protocol; verify that the design and the test protocol are
compatible.
Mapped Flow:
5. Specify scan constraints and preview the scan architecture that will result from
applying them.
7. Hand off the design and related files for use by downstream tools; exit.
File Locations
All files for this lab except for designs and libraries are located in the directory
lab8_topdown.
Directory Structure
Lab8_topdown Current working directory
analyzed Intermediate acs_read_hdl files
logs Session log files
unmapped Unmapped protocol
mapped Gate-level netlist
mapped_scan Gate-level scan design netlist
reports DFTC reports
tmax Files for downstream tools
scripts Constraint and run scripts
../ref/rtl/ORCA/vhdl Design files
../ref/db Library files
Instructions
Your goal is to complete and run the first three steps of the Mapped Flow portion of
the DFT Insertion Flow. The three you will modify are for reading the test-ready
design and test protocol, previewing the scan architecture, inserting scan chains and
finally, estimating test coverage.
Unmapped Flow
1read_design.tcl
2create_test_protocol.tcl
3compile_and_save.tcl
Mapped Flow
4read_gates_and_protocol.tcl
5preview_dft.tcl
6insert_dft.tcl
7handoff.tcl
1. Invoke DFTC.
cd lab8_topdown
dc_shell | tee logs/lab8.log
2. Examine and execute the script that performs step 4 of the DFT flow: reading
in the gate-level design and the saved protocol.
s scripts/4read_gate_and_protocol.tcl
3. Check the scan state of the current design using this command:
report_scan_state
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
Note: Step 4 of the DFT flow reads the gate-level design and the test
protocol. The dft_drc command used the saved test protocol for DFT
design rule checking. The test protocol is one set of information and
the scan specifications that may have been used to originally create the
test protocol is another set of information.
report_dft_signal
....................................................................................................
1. Display the default scan architecture that will be implemented for this design.
preview_dft
....................................................................................................
....................................................................................................
....................................................................................................
Question 7. Will scan insertion use existing functional pins as the scan
signals (scan in, scan out for each scan chain) or will it create
new ones (test_si, test_so ports)?
....................................................................................................
2. Display more scan architecture detail about the test clocks used for each scan
chain.
Note: The ORCA design has only 3 clocks in test mode: pclk, sys_clk and
sdr_clk.
....................................................................................................
3. Use another preview_dft option and compare the content of the former
and current preview_dft output.
....................................................................................................
....................................................................................................
.....................................................................................................
4. Try mixing the rising and falling sdr_clk scan flip-flops into the same chain.
Question 10. How many scan chains are previewed now and are they now
balanced?
....................................................................................................
5. Allow mixing of different clock domain scan flip-flops into the same scan
chain.
Question 11. How many scan chains are previewed now and what do you
think the default set_scan_configuration
–chain_count value is?
....................................................................................................
....................................................................................................
Question 13. What is the difference in scan chain length between the
longest and shortest chains now?
....................................................................................................
....................................................................................................
Question 14. Will DFTC insert any lock-up latches into this scan design?
Which chains will include them?
....................................................................................................
....................................................................................................
Note: The functional pins of ORCA to use for scan are specified in the
settings_insert_dft.tcl script.
7. Source that script and use preview_dft to answer the following questions.
s scripts/settings_insert_dft.tcl
preview_dft
Question 15. What are the names of the previewed scan chains now and
what command defined their new names?
Why were the chains given explicit names?
....................................................................................................
....................................................................................................
Question 16. Which pins are used for scan in, scan out and scan enable?
....................................................................................................
.....................................................................................................
One of the commands in the settings_insert_dft.tcl script avoids all the subdesigns
being renamed during the scan insertion process.
....................................................................................................
Note: Use the man pages if needed to find the option to this command that
disables all the gate-level optimization that occur by default during the
last phases of the insert_dft process.
....................................................................................................
1. Apply those two options whose effects will be to speed-up the runtime of the
subsequent insert_dft and to limit the number of changes to the existing
design.
set_dft_insertion_configuration . . .
s scripts/6insert_dft.tcl
Question 19. What is the estimated test coverage for the ORCA scan
design?
....................................................................................................
Note: Actual ATPG runs in TetraMAX obtained about 99% test coverage for
this design. Doing so though required using functional RAM models
and both TetraMAX’s Fast Sequential and Full Sequential engines.
Using DFT techniques to avoid the S30 violation, for example, allows
that very high coverage much easier to obtain by merely using the Fast
Sequential engine.
Question 20. How does this estimate compare to your earlier prediction?
....................................................................................................
Note: When obtaining the estimated fault coverage for a scan inserted
design, dft_drc performs Post-DFT checking and reports the DFT
violations using the same ones that TetraMAX does.
3. Scroll back from the coverage report and answer the following questions.
Question 21. The S category of violations cannot be reported during
Pre-DFT checks, why?
....................................................................................................
Question 22. What does the S22 violation mean and does this explain why
2 Sequential Cells are reported as synchronization elements in
the Sequential Cells Without Violations summary?
....................................................................................................
....................................................................................................
Answers / Solutions
4 scan chains
Named ‘1’, ‘2’, ‘3’, and ‘4’.
No, the longest scan chain has 1074 cells while the shortest
chain has half that many, 512, a very unbalanced scan chain
architecture.
Question 7. Will scan insertion use existing functional pins as the scan
signals (scan in, scan out for each scan chain) or will it
create new ones (test_si, test_so ports)?
set_scan_configuration \
-chain_count 6 -clock_mixing mix_clocks
Question 13. What is the difference in scan chain length between the
longest and shortest chains now?
Only one, with the longest chains being 488 cells long and
the shortest 487.
Question 14. Will DFTC insert any lock-up latches into this scan design?
Which chains will include them?
Yes.
Chain ‘4’ has both pclk and sdr_clk rising-edge flops at time
45 and Chain ‘5’ has both sdr_clk and sys_clk rising-edge
flops at time 45.
Question 15. What are the names of the previewed scan chains now and
what command defined their new names? Why were the
chains given explicit names?
Question 16. Which pins are used for scan in, scan out and scan enable?
set_dft_insertion_configuration
Question 18. Which option to this command will disable gate-level
optimization?
Question 19. What is the estimated test coverage for the ORCA scan
design?
~95%
Question 20. How does this estimate compare to your earlier prediction?
There are no scan chains then, and the S rules are related to
problems with scan chain shifting.
Question 22. What does the S22 violation mean and does this explain
why 2 Sequential Cells are reported as synchronization
elements in the Sequential Cells Without Violations
summary?
S22 warns that ORCA has scan chains that are driven by
more than one test clock. Scan chains chain3 and chain4
have lock-up latches and thus avoid the S22 violation. The
S22 warnings about a negative-edge triggered scan flop in
the sdr_clk domain being stitched directly to a rising-edge
triggered scan flop in the pclk domain.
Learning Objectives
Lab Duration:
30 minutes
Overview
Unmapped Flow:
1. Read the RTL design into DFT.
2. Create and save a test protocol; verify that the design and the test protocol are
compatible.
3. Compile and save the gate-level design; exit.
Mapped Flow:
4. Read the gate-level design and test protocol into DFTC.
5. Specify scan constraints and preview the scan architecture that will result
from applying them.
6. Insert the scan chain.
7. Hand off the design and related files for use by downstream tools; exit.
File Locations
All files for this lab except for designs and libraries are located in the directory
lab9_export.
Directory Structure
Lab9_export Current working directory
analyzed Intermediate acs_read_hdl files
logs Session log files
unmapped Unmapped protocol
mapped Gate-level netlist
mapped_scan Gate-level scan design netlist
reports DFTC reports
tmax Files for downstream tools
scripts Constraint and run scripts
../rtl/ORCA_init/vhdl Design files
../libs Library files
Instructions
Given a mapped design, export from DFTC the files required by downstream tools
such as ATPG and P&R.
UNIX% cd lab9_export
2. Invoke DFTC.
dc_shell
s scripts/4read_gate_and_protocol.tcl
4. Specify scan constraints and preview the scan architecture that will result
from applying them by using the script provided.
s scripts/settings_insert_dft.tcl
preview_dft
....................................................................................................
....................................................................................................
s scripts/6insert_dft.tcl
Question 2. What is the estimated test coverage for the scan design?
....................................................................................................
6. Complete the script that writes out the design and related files to be used by
downstream tools (scripts/7handoff.tcl).
Add to this script:
• The command to save the needed ATPG SPF file (to the ./tmax
directory) that is not currently being saved.
• The command to write out the scan chains to a SCANDEF file (to the
mapped_scan directory).
• The command to check the SCANDEF
unix% vi scripts/7handoff.tcl
s scripts/7handoff.tcl
....................................................................................................
....................................................................................................
The test protocol for preview_dft contains your scan chain in and out
signal declarations.
Question 4. What additional information has DFTC added to the
ScanStructures section now that the protocol is for a scan
inserted design?
....................................................................................................
Question 5. How many scanchains does the SCANDEF file show, and
how many partitions were created (use grep or consult the
check_scan_def report)?
....................................................................................................
8. Exit dc_shell
exit
UNIX% cd tmax
2. Inspect the TetraMAX run script. Ensure that the paths for the scan inserted
netlist and STIL protocol file referenced in the script match the file written out
by DFT Compiler.
unix% vi orca_tmax.tcl
3. Run TetraMAX.
....................................................................................................
....................................................................................................
Answers / Solutions
Over 96 %
Learning Objectives
Lab Duration:
75 minutes
Overview
Lab 10 Tasks
Revise Specification to
Achieve Balanced Chains
File Locations
All files for this lab are located in the directory lab10_hicap.
Directory Structure
Lab10_hicap Current working directory
dc_ilms ILMs with test models for subblocks
mapped ORCA design and its subblocks
mapped_scan Scan-inserted design and subblocks
reports DFT reports
scripts Scan insertion scripts
test_models Test models for subblocks
tmax TetraMAX data
.solutions/scripts Solutions for this lab
Relevant Files
scripts/
bottom_up.tcl Bottom-up scan insertion script.
Calls the following two scripts:
scan_blocks.tcl Inserts scan in to the subblocks
scan_top.tcl Inserts scan in to the top-level
Instructions
During this lab you will perform a top-down and a bottom-up scan insertion flow on
the design ORCA. Some scripts are already provided. You will modify the scripts
for the various tasks.
These scripts contain almost all the DFTC commands you would need to use when
working on a real-world design back in your office. After completing this lab, you
will have practiced the steps needed to improve both the run-time and the capacity
of your scan insertion scripts. When you re-use the scripts back at your office, focus
on the design-specific items (names of clocks, resets, and so forth).
The lab starts with a top-down script since it is easier to understand and provides
reference data (number and length of top-level scan chains, estimated test coverage)
that you can later use to compare the results of the bottom-up scan insertion script.
UNIX% cd lab10_hicap
2. Open the file scripts/top_down.tcl in your favorite editor (vi, emacs, etc.).
The top_down.tcl script is used to insert scan in a top-down fashion on the
ORCA design.
UNIX% vi scripts/top_down.tcl
3. Modify this script to use the RSS features you learned about in lecture.
Compared to the original script in the lab directory, your revised script should:
a. Modify the original design as little as possible
b. Run scan insertion faster
c. Consume less memory
If needed, check the answers section for hints.
Once you are done, save the modified script file.
s scripts/top_down.tcl
....................................................................................................
Note: It is important to balance the scan chains if tester time and the cost of
test are to be reduced.
7. Open the top_down.tcl file again and change it so that you can achieve
balanced top-level scan chains.
8. Remove the first pass of scan design files before improving the scan
architecture.
remove_design -design
....................................................................................................
Question 3. What DFT structure did DFTC have to add to achieve these
balanced scan chains?
....................................................................................................
Note: The ORCA design has only 3 test clocks, but your
real-world design might have many more test clocks. The more test
clocks, the greater the probability for having more of these DFT
structures. If minimizing die area is an important design requirement,
you may need to monitor their number.
10. Determine the number of lockup latches DFTC inserted. DFTC names the
latches using an intuitive naming convention that is good for wildcard
searches.
....................................................................................................
Note: If your design has many lockup latches counting them yourself can
become tedious. Have DFTC count them using:
....................................................................................................
....................................................................................................
Two scripts are used for bottom-up scan insertion, scan_blocks.tcl and scan_top.tcl.
These scripts currently run using full gate-level netlists.
In the subsequent steps you will first run scan_blocks.tcl to insert scan into the
blocks of the ORCA design generating test models for the blocks. Later you will run
the scan_top.tcl to complete the top-level scan chain stitching in ORCA using the
test models created for the blocks instead of the full gate-level netlists.
The ORCA top-level design contains all the I/O pad instantiations, a CLOCK_GEN
block that contains the PLLs and clock multipliers, and an ORCA_TOP block that
serves as the core of the design and contains all the blocks for which you will
perform scan insertion.
The foreach loop in the scan_blocks.tcl script iterates through a TCL list of the
blocks within ORCA_TOP. The loop first reads in the appropriate .ddc file from the
correct directory and then proceeds with block-level scan insertion. The results are
saved at the end of the loop and all design files are removed before proceeding to
the next block.
1. Locate the foreach loop within the scan_blocks.tcl script and modify it to save
the test model for each block in a file separate from the DDC file in the
test_models directory (put these commands in the script immediately before
the command that removes each block).
2. Modify the scan_top.tcl to read in the test models only from the proper
directory (these test models were saved by the scan_blocks.tcl script).
Read the test models first, and then read in the block that contains them,
ORCA_TOP. Make sure the RESET_BLOCK is not a test model.
. . .
Your commands go here
. . .
read_ddc mapped/ORCA.ddc
current_design ORCA
link
. . .
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
Question 9. If lockup latches will be inserted at the end of all block level
scan chains, do you need to insert any lockup latches between
block level chains at the top-level?
....................................................................................................
4. Run the bottom_up.tcl script, which first runs scan_blocks.tcl on the blocks
within ORCA_TOP and then runs scan_top.tcl on the ORCA design.
vi reports/ORCA_preview_dft.rpt
....................................................................................................
6. Use the approach outlined in lecture to revise the block level scan
architectures so the top-level scan chains are better balanced (stop when all
scan chain lengths are within 20 scan cells of each other).
Question 11. Which command and setting produced this better-balanced
top-level scan architecture?
....................................................................................................
Question 12. In the context of a design that contains test models, why can
you NOT use the same method for counting the number of
lockup latches in the design as used in Task 1?
....................................................................................................
....................................................................................................
Note: Since the resulting Verilog gate-level netlists of both the block level
scan insertion and the top-level scan stitching are saved to the same
UNIX directory, you can use UNIX commands to count the lockup
latches.
Note: fgrep searches for fixed string matches and wc –l outputs the
number of matched lines. In this case, that number is equal to the
number of lockup latches.
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
Question 15. How does this compare to the number of lock-up latches
inserted in Task 1 by the top-down script?
....................................................................................................
8. Examine the estimated coverage report for ORCA and answer the following
questions.
Question 16. How does this coverage compare to the estimated coverage
obtained when inserting scan top-down into ORCA?
....................................................................................................
....................................................................................................
Question 17. Why is the estimated coverage obtained using test models not
meaningful?
....................................................................................................
....................................................................................................
Note: In order to obtain a more meaningful estimate for the test coverage, you
must read the entire design into TetraMAX.
9. Run a script to obtain the actual test coverage in TetraMAX and then answer
the following questions.
UNIX% cd tmax
UNIX% tmax –shell run.tmax
Question 18. Why is the total number of faults in TetraMAX much greater
than the number of faults in DFTC?
....................................................................................................
....................................................................................................
Question 19. What test coverage does TetraMAX obtain for ORCA?
....................................................................................................
1. Repeat Task 2 but instead use ILMs with test models attached.
• Modify scripts/ilm_scan_blocks.tcl to generate and save the ILMs.
• Modify scripts/ilm_scan_top.tcl to read in the ILMs.
If you get stuck, check the .solutions directory.
Answers / Solutions
set_dft_insertion_configuration \
–synthesis none \
–preserve_design_name true
Lockup latches.
Question 4. How many lockup latches were added?
2
Question 5. Where in the ORCA hierarchy were they placed?
97.67%
Task 2. Bottom-Up Scan Insertion using Test Models
1. Locate the foreach loop within the scan_blocks.tcl script and modify it to save
the test models only for each block:
2. Modify the scan_top.tcl to read in the test models only from the proper
directory (these test models were saved by the scan_blocks.tcl script.)
Read the test models first, and then read in the block that contains them,
ORCA_TOP.
read_ddc mapped/ORCA_TOP.ddc
change_names –rule verilog
read_ddc mapped/ORCA.ddc
current_design ORCA
link
. . .
No. Some block level scan chains are much longer than
others. This affects the balance of the top-level scan chains;
they are very unbalanced.
Question 11. Which command and setting produced this better-balanced
top-level scan architecture?
In scan_blocks.tcl:
Question 12. In the context of a design that contains test models, why can
you NOT use the same method for counting the number of
lockup latches in the design as used in Task 1?
34
The number of lock-up latches seen will be dependent on
the setting for –max_length. The number provided is for a
setting of “-max_length 100”.
Question 15. How does this compare to the number of lock-up latches
inserted in Task 1 by the top-down script?
There are many more lockup latches, one for each block
level chain.
Question 16. How does this coverage compare to the estimate coverage
obtained when inserting scan top-down into ORCA?
Question 17. Why is the estimated coverage obtained using test models
not meaningful?
TetraMAX has the full gate-level netlist for the entire design
hierarchy. DFTC had the gate-level netlist for ORCA_TOP
and the designs above it (CLOCK_GEN and ORCA); but all
the blocks within ORCA_TOP except for RESET_BLOCK
were test models (empty designs) in DFTC.
Question 19. What test coverage does TetraMAX obtain for ORCA?
98.50%
Learning Objectives
Lab Duration:
45 minutes
Overview
Mapped Flow:
2. Specify scan constraints and preview the scan architecture that will result from
applying them.
6. Hand off the design and related files for use by downstream tools; exit.
File Locations
All files for this lab except for designs and libraries are located in the directory
lab12_dftmax.
Directory Structure
lab12_dftmax Current working directory
logs Session log files
mapped Gate-level netlist
mapped_scan Gate-level scan design netlist
reports DFTC reports
tmax Files for downstream tools
scripts Constraint and run scripts
../ref/rtl/ORCA/vhdl Design files
../ref/db Library files
.solutions Solution scripts
Instructions
Your goal is to complete and run the four steps of the Mapped Flow portion of the
DFT Insertion Flow. The scripts you will modify are for previewing the scan
architecture, inserting scan chains and finally, handing off the needed files.
Mapped Flow
4read_gates_and_protocol.tcl
5preview_dft.tcl
6insert_dft.tcl
7handoff.tcl
1. Invoke DFTC.
cd lab12_dftmax
dc_shell | tee logs/mylab12.log
2. Examine and execute the script that performs step 4 of the DFT flow: reading
in the gate-level design and creating the protocol.
s scripts/4read_gate_and_protocol.tcl
set_scan_configuration \
-clock_mixing mix_clocks -chain_count 2
preview_dft -show scan_summary
Question 1. How many scan chains will be inserted, and how will this
affect the number of tester cycles on the tester?
....................................................................................................
Question 2. What is one way to reduce Test Data Volume and Test Time?
....................................................................................................
Note: Since the design is so small for lab purposes, setting a compression ratio
of 5 is enough to see the benefits.
....................................................................................................
Note: For the class, a Tcl script is provided to display content in a separate
window. Try “v preview_dft -show scan_summary”
....................................................................................................
....................................................................................................
Question 6. Can you share the existing test_mode pin that might be
selecting Test Clocks?
....................................................................................................
Question 7. Which pins are used for scan in, scan out and scan enable?
....................................................................................................
5. Edit the file scripts/settings_insert_dft.tcl again and specify your own top
level Test Mode pin for compression. Then rerun the script.
6. Since a new port was added you need to recreate the test protocol file and
rerun dft_drc.
remove_test_protocol
create_test_protocol –capture_procedure multi_clock
dft_drc
preview_dft –show scan_summary
....................................................................................................
insert_dft
....................................................................................................
Question 10. How many STIL Test Protocol files do you need to write out
with an Adaptive Scan flow?
....................................................................................................
....................................................................................................
current_test_mode Internal_scan
dft_drc
current_test_mode ScanCompression_mode
dft_drc
....................................................................................................
3. Edit the file scripts/7handoff.tcl and add the command to write out the
ScanCompression_mode protocol.
The ScanCompression_mode protocol file should be named
“scancompress.spf” and written to the “tmax” directory.
4. Run the handoff script:
s scripts/7handoff.tcl
Question 13. Look at both test protocol files, do you see a difference?
....................................................................................................
cd tmax
tmax compression.cmd &
....................................................................................................
Answers / Solution
Question 1. How many scan chains will be inserted, and how will this
affect the number of tester cycles on the tester?
2 scan chains. This will make the scan chains longer, which
will affect the number of tester cycles needed per pattern
hence increasing the Test Data Volume and Test Time.
Question 2. What is one way to reduce Test Data Volume?
TM_COMP.
Question 9. What new messages do you see with insert_dft?
Two Test Protocol files, one for normal scan, and one for
adaptive scan.
Question 11. How many netlists are needed?
Only one.
Question 12. What are the differences that you see?
99.56%