Lab2 Block Level SSN Insertion On Processor Core
Lab2 Block Level SSN Insertion On Processor Core
© 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:.........................................................................................................................................31
If this is the first time you are starting a session for this VM, the ssn_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.
4. 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_ssn_data_v2021.2_20210907.tar.gz .
5. In a terminal window, extract the files from the compressed tar file using the command:
You should now have a directory named ssn_data in your Home directory. That directory contains all the
files you need to perform the exercises, in this learning path.
$SSN_LABS is an environment variable set up under the home directory that points to the training data
directory. If it is not already set up, you can execute SETENV SSN_LABS $HOME/ssn_data at your Linux
prompt to create it.
Objectives
Upon completing this lab, you should be able to:
• Report bits per packet for patterns generated for the processor_core
Introduction
In the general SSN workflow, you perform a bottom-up DFT insertion for each physical block followed by
DFT insertion at the parent level. You continue this bottom-up flow until you have reached the top-level of
the design.
This lab is designed as demonstrated in the following figure, we have a simple chip which is an RTL
design, having three wrapped cores:
• One processor_core
TestKompress EDT logic will also be created for the top-level. You can see that we have some pipeline
stages in each one of the physical blocks, as well as at the input and the output of the SSN datapath.
For the SSN architecture, we have one single SSH in each physical block with an SSN bus width of 2 bits,
with SSN pipeline stage nodes at the chip interface to ensure timing. There’s also a receiver pipeline at the
first SSN node from the primary input pads and an output pipeline at the last SSN node before the primary
output pads.
The following figure shows a block-level workflow used to process a child physical block when you are
using SSN. If you have any memories to test in that block, then you need to perform the first DFT insertion
pass, otherwise, you can ignore this step.
As highlighted in the figure, you insert SSN into the design during the second DFT insertion pass and in
this same step, you add a second smaller EDT implementation in the design for the wrapper chains during
the external test mode. The new Tessent logic created is described in RTL Verilog.
After that, you use a 3rd party application (non-Tessent) to produce the synthesized netlist and then use
Tessent for the scan insertion step. For this lab and the upcoming ones, the synthesized netlist is provided
for you since the lab environment does not include a synthesis tool to use. In your real work environment,
you might do scan chain stitching as part of the synthesis process. Hence the decision box in the diagram.
After scan chains are inserted, you will perform the ICL Based Patterns Verification step, which uses the
automation of create_patterns_specification / process_patterns_specfication for
specifying and creating the ICLNetwork and Continuity patterns, and as a final step, you will generate the
ATPG patterns.
In this lab, we will be implementing this workflow on the processor_core, and we provide the
gps_baseband core steps if you want to run them optionally.
This lab exercise guides you through the Tessent MemoryBIST flow where you setup your design, then
use default settings to implement and validate memory BIST.
All of the required libraries (Tessent cell, Verilog, Memory) are located in a common directory
$SSN_LABS/libs/library.
Instructions
Change to the $SSN_LABS/Lab2/Exercise1 directory.
$ cd $SSN_LABS/Lab2/Exercise1
Notice that all the following commands have already been added to the script
in the following path solutions/run_mbist_insertion. To run the script properly,
Note make sure you are in the Exercise1 directory then
execute ./solutions/run_mbist_insertion
For this lab, all the Tessent cell libraries are stored in a single file.
SETUP> read_cell_library \
../../libs/library/standard_cells/tessent/adk.tcelllib
Specify the location of the Tessent Shell Data Base (TSDB) directory.
Read in the Verilog memory model to load the design into the tool.
The final step in loading the design and libraries is to elaborate the design using
set_current_design.
Now that the design is loaded and elaborated, the next step is to specify the requirements for
MemoryBIST.
By specifying the design level, Tessent MemoryBIST will know what type of IJTAG and MemoryBIST
IP to insert. TAP controllers and BISR controllers are inserted at the top, or chip level. In a
hierarchical design, the chip architect defines physical blocks, (modules that will be synthesized) and
sub-blocks (modules that are included as part of the physical blocks). The module you are working on
is a physical block in this exercise.
Specify that you will be inserting memory BIST into this physical block. Specifying -memory_test
on is equivalent to setting the three options -memory_bist, -memory_bisr_chains, and -
memory_bisr_controller to auto, this is a desirable setting.
For memory BIST to operate, a clock needs to be supplied. Identify the free-running clock that is a
primary input of this physical block that will be used for memory test.
The next step for specifying requirements is to run DRCs by executing the command
check_design_rules.
SETUP> check_design_rules
As various specifications are created, an optional variable name can be associated with them with the
TCL ‘set’ command as shown above. When you use the report configuration data command you may
specify a specification name or report all configurations.
The next step is to create and insert the IP into the design netlist.
ANALYSIS> process_dft_specification
This command also creates the Tessent Shell database (TSDB) if it doesn’t already exist, where all the
information required to implement this block is stored.
Note that the system mode changes to the INSERTION mode after the command completes.
INSERTION> extract_icl
To create the patterns and testbenches, you must process the PatternsSpecification.
SETUP> process_patterns_specification
SETUP> set_simulation_library_sources \
-v ../../libs/library/standard_cells/verilog/adk.v \
-v ../../libs/library/memories/*.v
Validate the IJTAG and MBIST insertion by running the testbench simulations.
SETUP> run_testbench_simulations
SETUP> exit
When the tool creates the SSH, EDT, and OCC elements with a single invocation of
the process_dft_specification command, the tool automates the connections between the SSH, EDT, and
OCC instances. Let's follow this procedure:
• Both prefixed and bussed scan input and output pins can be used. For bussed pins, the buses
must be ordered either ascending or descending (not randomly ordered).
• Scan chains must have dedicated input/output pins. This is the default operation for the
insert_test_logic command in Tessent Scan.
Instructions
1. Change to the $SSN_LABS/Lab2/Exercise2 directory.
$ cd $SSN_LABS/Lab2/Exercise2
Notice that all the following commands have already been added to the script
in the following path: solutions/run_ssh_edt_occ_insertion; to run the script
properly, make sure you are in the Exercise2 directory then run ./solutions/
Note run_ssh_edt_occ_insertion
3. Set the context to insert DFT into an RTL-level design. Note that the design_id is changed for this
step to rtl2. This file will be used in filenames in the TSDB.
SETUP> read_cell_library \
../../libs/library/standard_cells/tessent/adk.tcelllib
6. Load design files from the TSDB directory that correspond to the rtl1 design id.
7. Read in the memory Verilog models to load them into the tool.
8. The final step in loading the design and libraries is to elaborate the design using
set_current_design.
9. Now add static DFT signals that include global DFT control, logic test control, and scan mode signals,
these DFT signals are typically controlled by a Test Data Register that is part of the IJTAG network.
a. Add ltest_en which is the logic test control signal that is used to enable the logic test mode.
b. Add memory_bypass_en which is the logic test control signal that is used to enable the isolation
around the memories, also it is used to test memories with multi-load ATPG patterns.
c. Add tck_occ_en, which is a global DFT control signal that is used to control the multiplexer used
to inject TCK at the base of the clock trees.
d. Add the DFT signals used for the hierarchical DFT implementation.
SETUP> report_dft_signals
Specify the requirements to be checked during the design rule check, here you will specify the logic
test.
The next step for specifying requirements is to run DRCs by executing the command
check_design_rules.
SETUP> check_design_rules
After the design passes DRCs with no errors reported, the next step is to create IJTAG host nodes for
the EDT, OCC, and SSN wrappers.
As various specifications are created a specific name can be associated with them. When you use
the report configuration data command you may specify a specification name or report all
configurations.
Run the dofile that contains the wrappers having all the specifications for your specific design
requirements.
Question 1: How many EDT controllers are inserted? What are they?
_______________________________________________________________
The next step is to generate and insert the IP into the design netlist. Then review the specification.
ANALYSIS> process_dft_specification
INSERTION> report_config_data $spec
Extract the ICL netlist description and enable the –create_ijtag_graybox switch to generate
the IJTAG graybox during ICL extraction.
SETUP> write_design_import_script \
processor_core.dc_design_load_script \
-use_relative_path_to ../Exercise3 –replace
SETUP> process_patterns_specification
SETUP> set_simulation_library_sources \
-v ../../libs/library/standard_cells/verilog/adk.v \
-v ../../libs/library/memories/*.v
Question 2: What are the two types of patterns created to verify the SSN datapath?
__________________________________________________________________
SETUP> run_testbench_simulations
SETUP> check_testbench_simulations -report_status
ANALYSIS> exit
$ SSN_LABS/Lab2/Exercise2/solutions/processor_core.dc_synth_script
$ cd $SSN_LABS/Lab2/Exercise3
$ ls -ls
Examine the .timing_options script provided for this step. This script specifies the TCK period and the
set_load_unload_timing_options values.
Using any text editor, review the synthesized design file created for you to be used in subsequent
steps.
$ vi processor_core_synthesized.vg
When SSN is present, the tool connects wrapper scan chains to the second smaller EDT controller added
during exercise 2.
More information on the Tessent Shell commands used during this exercise can be found under the
Command Dictionary chapters found in the Tessent Shell Reference Manual.
The commands, with in-line comments, to run the scan insertion step are
also available in an executable dofile within the solutions folder for this
exercise. To run the script properly, make sure you are in the Exercise4
Note directory then run ./solutions/run_scan_insertion
$ cd $SSN_LABS/Lab2/Exercise4
SETUP> read_cell_library \
../../libs/library/standard_cells/tessent/adk.tcelllib
SETUP> read_verilog \
../Exercise3/processor_core_synthesized.vg
More information about the read_design command and its options are
available in the Command Dictionary in the Tessent Shell Reference
Manual.
Load design files from the TSDB directory that corresponds to the rtl2 design id.
Report all the settings implied to the static DFT signals added.
SETUP> report_static_dft_signal_settings
The pre-registered DFT Signals are by default available for use without
issuing the add_dft_signals command.
SETUP> check_design_rules
Report the current set of clocks and confirm that the OCC clock control registers are reported as
scan segments.
ANALYSIS> report_clocks
ANALYSIS> report_scan_segment
ANALYSIS> report_dft_signals
ANALYSIS> analyze_wrapper_cells
ANALYSIS> report_wrapper_cells -verbose
Create a scan mode and specify the EDT instance to connect the scan chains to and assign it to its
intended scan mode.
Analyze the scan chains and review the different scan modes and chains before stitching the chains.
ANALYSIS> analyze_scan_chains
ANALYSIS> report_scan_chains
Insert scan chains and save reports regarding the scan chains and scan cells.
ANALYSIS> insert_test_logic
INSERTION> report_scan_chains
INSERTION> report_scan_cells > scan_cells.list
ANALYSIS> exit
You will resimulate the MemoryBIST, ICL verification, and SSN continuity patterns after synthesis to
ensure the ICL network is fully functional and able to be reliably used during ATPG and Scan retargeting
setup.
$ cd $SSN_LABS/Lab2/Exercise5
SETUP> set_simulation_library_sources \
-v ../../libs/library/standard_cells/verilog/adk.v\
-v ../../libs/library/memories/*.v
SETUP> run_testbench_simulations
SETUP> check_testbench_simulations -report_status
SETUP> exit
$ cd $SSN_LABS/Lab2/Exercise6
SETUP> read_cell_library \
../../libs/library/standard_cells/tessent/adk.tcelllib
Specify the current mode using a unique name different than add_scan_mode, then bring in the
desired scan mode configuration.
SETUP> check_design_rules
ANALYSIS> create_patterns
ANALYSIS> report_statistics –detail
Store TCD, flat_model, fault list, and patDB format files in the TSDB directory.
ANALYSIS> write_patterns \
patterns/processor_core_int_edt_mode_stuck_parallel.v \
-verilog -replace -parameter_list \
{SIM_COMPARE_SUMMARY 1 SIM_KEEP_PATH 1} \
-pattern_set scan
ANALYSIS> write_patterns \
patterns/processor_core_int_edt_mode_stuck_ssh_loop.v \
-verilog -serial -replace -parameter_list \
{SIM_COMPARE_SUMMARY 1 SIM_KEEP_PATH 1} \
-pattern_set ssn_loopback
ANALYSIS> exit
Notice that all the previous commands had already been added to the script in
the following path solutions/run_internal_stuck; to run the script properly make
Note sure you are in the Exercise6 directory then run ./solutions/run_internal_stuck
You will perform the same as the previous step but now you will generate ATPG patterns for the transition
fault model instead of the stuck-at fault.
Generate patterns for the transition fault model, run the run_internal_transition script.
$ ./run_internal_transition
In this step, you will simulate the testbench patterns to confirm that the SSN network can successfully
deliver packetized data to the SSH. We do this by first simulating the parallel load patterns, once these are
clean, simulate the serial loopback patterns, followed by 1 serial chain pattern and 1 serial scan pattern.
Review the run_sims script using any text editor, notice that the sequence of patterns to be simulated
is repeated twice, for stuck-at and transition patterns.
$ ./run_sims
Introduction
In the general SSN Workflow, you perform a bottom-up DFT insertion for each physical block followed by
DFT insertion at the parent level. You continue this bottom-up flow until you have reached the top-level of
the design.
The gps_baseband cores do not contain any memories, so we will skip the first DFT insertion pass.
When the tool creates the SSH, EDT, and OCC elements at the same time with a single invocation of
the process_dft_specification command, the tool automates the connections between the SSH, EDT, and
OCC instances. Let's follow this procedure:
• Both prefixed and bussed scan input and output pins can be used. For bussed pins, the buses
must be ordered either ascending or descending (not randomly ordered).
• Scan chains must have dedicated input/output pins. This is the default operation for the
insert_test_logic command in Tessent Scan.
Instructions
Go to Exercise7/Step1 directory in Lab2 and study the files used for this step.
$ cd $SSN_LABS/Lab2/Exercise7/Step1
$ ls -ls
Review the run_ssh_edt_occ_insertion dofile. You will use this dofile to insert the SSH, EDT, and
OCC into your design and generate the ICL patterns and SSN continuity patterns. Make sure you
understand all the steps in this dofile, attempt the following questions.
Question 1: How many EDT controllers are inserted? What are they?
________________________________________________________
Question 2: What are the two types of patterns created to verify the SSN datapath?
________________________________________________________
________________________________________________________
$ ./run_ssh_edt_occ_insertion
You will not perform synthesis on the block in this lab, this step is already done for you.
$SSN_LABS/Lab2/Exercise7/solutions/gps_baseband.dc_synth_script
$ cd $SSN_LABS/Lab2/Exercise7/Step2
$ ls -ls
Examine the timing_options script provided for this step. This script specifies the TCK period and the
other set_load_unload_timing_options values.
Using any text editor, review the synthesized design created for you to be used in subsequent steps:
$ vi gps_baseband_synthesized.vg
$ cd $SSN_LABS/Lab2/Exercise7/Step3
All needed commands are added to the run_scan_insertion dofile. Using any text editor, review this file and
notice the following:
• The design rule check is performed on each scan mode and the graybox model is created for the
external mode.
$ ./run_scan_insertion
Resimulating the ICL verification patterns after synthesis ensures the ICL network is fully functional and
able to be reliably used during the ATPG and Scan retargeting setup.
When using SSN, it is important to also reverify the SSN continuity patterns after synthesis before we try to
use it for ATPG and Scan retargeting.
$ cd $SSN_LABS/Lab2/Exercise7/Step4
Review the create_post_synthesis_icl_verification_patterns script using any text editor, notice that the
script creates and verifies the ICL based IJTAG patterns, and creates the SSN ICL-based continuity
patterns.
$ ./create_post_synthesis_icl_verification_patterns
The process for generating ATPG Patterns in the SSN flow is similar to the process used
without SSN.
Go to the Step5 directory.
$ cd $SSN_LABS/Lab2/Exercise7/Step5
Review the run_internal_stuck script and the run_internal_transition script using any text editor,
notice the following:
a. The first script creates stuck-at fault patterns, while the second creates transition fault patterns.
$ ./run_internal_stuck
$ ./run_internal_transition
Simulate Patterns
In this step, you will simulate the ATPG patterns to confirm that the SSN network can successfully deliver
packetized data to the SSH. We do this by first simulating the parallel load patterns, once these are clean,
simulate the serial loopback patterns, followed by 1 serial chain pattern and 1 serial scan pattern.
Review the run_sims script using any text editor, notice that the sequence of patterns to be simulated
is repeated twice, for stuck-at and transition patterns.
$ ./run_sims
Lab 2
Exercise 2
How many EDT controllers are inserted? What are they?
What are the two types of patterns created to verify the SSN datapath?
Exercise 6
The total relevant test coverage: 97.55%
Exercise 7
Step 1
How many EDT controllers are inserted? What are they?
What are the two types of patterns created to verify the SSN datapath?
create_patterns_specifications
Step 5
The total relevant test coverage: 98.65%