Lab Configuring Scan Chains Test Logic
Lab Configuring Scan Chains Test Logic
© 2021 Siemens
This material contains trade secrets or otherwise confidential information owned by Siemens Industry
Software Inc. or its affiliates (collectively, "SISW"), or its licensors. Access to and use of this information
is strictly limited as set forth in Customer's applicable agreement with SISW. This material may not be
copied, distributed, or otherwise disclosed outside of Customer's facilities without the express written
permission of SISW, and may not be used in any way not expressly authorized by SISW.
This document is for information and instruction purposes. SISW reserves the right to make changes in
specifications and other information contained in this publication without prior notice, and the reader
should, in all cases, consult SISW to determine whether any changes have been made. SISW disclaims
all warranties with respect to this document including, without limitation, the implied warranties of
merchantability, fitness for a particular purpose, and non-infringement of intellectual property.
The terms and conditions governing the sale and licensing of SISW products are set forth in written
agreements between SISW and its customers. SISW’s End User License Agreement may be viewed
at: www.plm.automation.siemens.com/global/en/legal/online-terms/index.html.
TRADEMARKS: The trademarks, logos, and service marks ("Marks") used herein are the property of
Siemens or other parties. No one is permitted to use these Marks without the prior written consent of
Siemens or the owner of the Marks, as applicable. The use herein of third party Marks is not an attempt
to indicate Siemens as a source of a product, but is intended to indicate a product from, or associated
with, a particular third party. A list of Siemens' trademarks may be viewed at:
www.plm.automation.siemens.com/global/en/legal/trademarks.html. The registered trademark Linux® is
used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds, owner of the mark on
a world-wide basis.
NOTES:.........................................................................................................................................26
Before you Begin
If this is the first time you are starting a session for this VM, the atpg_data directory will not be in the
home directory and you will need to download and extract it using the following instructions.
1. Double click on the Desktop icon Download_lab_data, . This launches a web browser.
3. In the resultant window, select the Download button, enable the Save File button, then select the
OK button to download the file.
Move the file in the Downloads directory to the home directory. If you are using the terminal
(Applications>Favorites>Terminal) you can use the following command:
mv ./Downloads/tessent_atpg_data_v2020.1_20200611.tgz .
4. In a terminal window, extract the files from the compressed tar file using the command:
You should now have a directory named atpg_data in your $HOME directory. That directory contains all
the files you need to perform the exercises, in this learning path.
Introduction
The exercises in this lab provide experience using Tessent Scan to insert full scan, create internal scan
chains, balance scan chains with lockup latches, and write out a scan-inserted netlist and ATPG setup
files.
Objectives
Upon completing this lab, you should be able to:
6. Define clocks.
SETUP> analyze_control_signals -auto_fix
The default scan configurations are used for this exercise, so we are finished defining the
design and are ready to go to the next stage, analysis mode, where scan/test circuitry is
identified and inserted.
When you exit SETUP mode, DFT tools automatically run DRC. You should not encounter any
DRC failures in this run.
ANALYSIS> report_scan_elements
ANALYSIS> set_scan_insertion_options \
-port_index_start_value 1 –single_clock_edge_chains on
ANALYSIS> set_insertion_options \
-module_uniquification_suffix _scan#
Here we indicate to use separate scan chains for different clock edges. Review the Tessent
Shell Reference Manual for the details and options for these two commands.
10. Define a single scan mode and how many chains to create. Then analyze the scan chains that will
be created.
ANALYSIS> add_scan_mode unwrapped –chain_count 1
ANALYSIS> analyze_scan_chains
Create Scan-Inserted Netlist and ATPG Setup Files
11. Perform test synthesis and setup the scan circuitry.
The next step is to insert 1 scan chain into the scan logic.
ANALYSIS> insert_test_logic
A scan-inserted netlist is created. Note that this takes you to the Insertion system mode.
o ex1_scan.dofile — dofile
The dofile and test procedure file are used with Tessent FastScan ™ to do the design setup before
creating test patterns. If you want to verify the scan insertion that just happened you can set the
system mode to Setup and run the verification dofile like this:
INSERTION> set_system_mode setup
SETUP> dofile results/ex1_scan_verify_scan_modes.dofile
ANALYSIS> exit -d
• Connect existing internal pins as scan inputs and outputs for scan chains
• Set up new and existing scan pins (internal and external) and insert test logic as shown in Figure 2-
1.
Setup Instructions
1. Log in to your workstation if you are not already logged in.
4. Set the correct context and get the design loaded into the tool.
SETUP> set_context dft –scan
SETUP> read_verilog design/ex2_design.v
SETUP> read_cell_library ../../libs/adk.atpg
SETUP> set_current_design
8. Define a single scan mode and how many chains to create. Also, specify which design pins to
connect to the scan inputs and outputs. Then analyze the scan chains that will be created.
ANALYSIS> add_scan_mode unwrapped –chain_count 2 \
-si_connections {{/d[10]} {/d[0]}} \
-so_connections {{/q[15]} {/q[0]}}
ANALYSIS> analyze_scan_chains
9. After you have defined the scan chains, the next step is to insert them into the design.
ANALYSIS> insert_test_logic
A scan-inserted netlist is created. Note that this takes you to the Insertion system mode.
11. View the scan cells and chains you inserted with the Report Scan Cells command.
INSERTION> report_scan_cells
Why are there only 2 cells in scan chain 2?
____________________________________________________________________________
____________________________________________________________________________
_____
13. Save a test procedure ATPG setup file with a base name of results/ex2_scan (no file
extension)
INSERTION > write_atpg_setup results/ex2_scan -replace
The following files are created:
o ex2_scan.v — Verilog netlist
o ex2_scan.dofile — dofile
o ex2_scan.testproc — test procedure file
o ex2_scan_verify_scan_modes.dofile — verification dofile
You have created a scan inserted netlist. The next stage is to generate the test patterns that are
used with the netlist (which you do not do for this exercise.)
Option to Save the Completed Files to the Tessent Shell Data Base
The traditional method of using Tessent Scan that you have just used in this lab exercise has the user
specify the file names and locations of the completed files that are written to disk. In this exercise files
were written into the ./results directory. There is a newer option starting with tool version 2016.4 where you
can specify to use the TSDB, or Tessent Shell Data Base structure, to store and use the files. The TSDB
details are found in a chapter of the Tessent Shell Reference Manual.
This second command and option inserts the test logic and automatically creates the TSDB directory and
writes the files into it. If you are interested, invoke Tessent Shell and execute the dofile
./solutions/insert_scan_tsdb.do, then examine the results in the tool created directory
tsdb_outdir/dft_inserted_designs/counter16_gate.dft_inserted_design. You’ll see it contains the scan
inserted netlist file, a scan definition file (.scandef), and the tcd file that can be used for the ATPG pattern
creation setup. The tcd file does what the scan dofile and testproc file do in the traditional method when
used with Tessent FastScan to define the clocks and scan logic.
Note: This is not a complete post-insertion diagram. Similar to what you saw in exercise 2, there will be
muxes inserted at the scan_out of both chains in this version of the design.
2. Invoke Tessent Shell and set the context for scan insertion.
3. Read Verilog netlist, ATPG cell library and set design level you are working on. Get the clocks
defined.
4. Identify a latch and an inverter from the ATPG cell library for use as test structures.
5. You will also add additional test logic to control the "reset" control signal in this design.
8. Insert the test structures, allowing for scan balancing and using two clocks for a single chain.
ANALYSIS> insert_test_logic
INSERTION> report_scan_chains
chain1: __________
chain2: __________
11. Save the scan inserted netlist and ATPG setup files as in previous exercises.
These labs were qualified using Tessent 2020.1 and ModelSim 2020.2,
if other Tessent versions were used, results contained in tables in these
Note labs may differ slightly from those shown in this Lab Answers section.
Lab 2
Exercise 1
Setup Instructions
Step 5
• What command would you use to hold a pin to a constant value? add_input_constraints
<pin_name> [C0|C1]
Step 8
Exercise 2
• Why are there only 2 cells in scan chain 2? Because clk 2 is controlling only 2 scannable
elements and the –single_clock_domain_chains option was set to ON, which restricts
a scan chain to a single clock domain.
Exercise 3
“analyze_scan_chains”
Step 9
• chain1: 9
• chain2: 8
Step 10
Instance module
----------------------------------------- --------------
Counter16/tessent_persistent_cell_buf_extso1_i buf02
Counter16/tessent_persistent_cell_buf_extso10_i buf02
Counter16/ts_lockup_latchn_clkc0_intno16_i nlatch
Counter16/tessent_persistent_cell_buf_intsi17_i buf02
Counter16/tessent_persistent_cell_buf_intsi18_i buf02
Counter16/ts_mux_sea0_atsource17__intno17_i mux21
Counter16/ts_mux_sea0_atsource18__intno18_i mux21