Lab2.1 - Tessent - TestKompress - Integration - Flows - EX1 1
Lab2.1 - Tessent - TestKompress - Integration - Flows - EX1 1
Lab 2.1
Tessent TestKompress Integration Flows
Post-Synthesis External Logic Flow
The terms and conditions governing the sale and licensing of Mentor Graphics products are set forth in
written agreements between Mentor Graphics and its customers. No representation or other affirmation
of fact contained in this publication shall be deemed to be a warranty or give rise to any liability of Mentor
Graphics whatsoever.
MENTOR GRAPHICS MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE.
MENTOR GRAPHICS SHALL NOT BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL, OR
CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS)
ARISING OUT OF OR RELATED TO THIS PUBLICATION OR THE INFORMATION CONTAINED IN IT,
EVEN IF MENTOR GRAPHICS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
U.S. GOVERNMENT LICENSE RIGHTS: The software and documentation were developed entirely at
private expense and are commercial computer software and commercial computer software
documentation within the meaning of the applicable acquisition regulations. Accordingly, pursuant to
FAR 48 CFR 12.212 and DFARS 48 CFR 227.7202, use, duplication and disclosure by or for the U.S.
Government or a U.S. Government subcontractor is subject solely to the terms and conditions set forth
in the license agreement provided with the software, except for provisions which are contrary to
applicable mandatory federal laws.
TRADEMARKS: The trademarks, logos and service marks ("Marks") used herein are the property of
Mentor Graphics Corporation or other parties. No one is permitted to use these Marks without the prior
written consent of Mentor Graphics or the owner of the Mark, as applicable. The use herein of a third-
party Mark is not an attempt to indicate Mentor Graphics as a source of a product, but is intended to
indicate a product from, or associated with, a particular third party. A current list of Mentor Graphics’
trademarks may be viewed at: www.mentor.com/trademarks.
End-User License Agreement: You can print a copy of the End-User License Agreement from:
www.mentor.com/eula.
Telephone: 503.685.7000
Website: www.mentor.com
SupportNet: supportnet.mentor.com/
Tessent TestKompress 2
Table of Contents
Before you Begin ...............................................................................................................................4
Lab 2.1 Tessent TestKompress Integration Flows – Post-Synthesis External Flow .................................6
Exercise 1: Post Synthesis External Logic Creation .................................................................................. 8
Tessent TestKompress 3
Before you Begin
If this is the first time you are launching this VM (Virtual Machine), you must download and extract
the lab data as described in the "Obtaining Lab Data section below.
Caution
Whenever you are using the VM for lab exercises and are finished with your session, please use the
"Disconnect" feature of the Desktop Viewer before the VM times out to preserve the data from one
session to the next. Failure to do so will remove the VM, and its contents.
If the VM was removed, you will be presented with a new VM requiring you to follow the download
and extract process. This allows you to "refresh" the lab data so you can go through the labs again
with a new database.
If this is the first time you are starting a session for this VM, the tk_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_tk_data_v2019.1_20190826.tgz .
4. In a terminal window, extract the files from the compressed tar file using the command:
Tessent TestKompress 4
You should now have a directory named tk_data in your $HOME directory. That directory contains all
the files you need to perform the exercises, in this learning path.
Tessent TestKompress 5
Lab 2.1
Tessent TestKompress Integration
Flows – Post-Synthesis External Flow
This lab introduces the TestKompress external post-synthesis logic creation flow.
In this lab, you start with a gate-level, non-scan netlist, insert scan chains using Tessent Scan, create
Tessent TestKompress (EDT) IP, and then generate and verify test patterns for both compression and
(optional) bypass modes.
Notice that this exercise has its own subdirectory and common directories are used for netlists,
generated files, and transcripts.
Introduction
Tessent TestKompress 6
Design
In this lab, you use a Verilog gate level netlist for the Microchip PIC 16CCC5X micro controller. You go
through the design flow from scan insertion to simulation of compressed (EDT) test patterns.
Compression Results
Compression is described in using two terms The compression ratio is equal to
<number of external scan channels> : <number of internal scan chains> . The data compression is
calculated using the results of report_scan_volume for non-compressed patterns, and dividing that by
the results of report_scan_volume for the compressed pattern set. The design used for this lab is very
small; therefore, the compression will be relatively small.
Tessent TestKompress 7
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
Tessent TestKompress 8
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
be performing the testing. However, the designers choose the number of scan chains. Therefore, scan
insertion is considered to be part of the compressed pattern flow. The following limitations exist for the
generation of scan chains:
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.
Scan chain outputs cannot be shared with functional output pins for Tessent TestKompress. By default,
Tessent Scan creates new input and output pins for scan chains. During scan insertion, you will define
the number of scan chains to be created. During EDT IP generation, you will specify the number of scan
channels.
Instructions
Review the Tessent Scan dofile, and then run it on the gate-level netlist and insert 5 scan chains.
1. Go to the 1_insert_scan directory for lab 2.1 and study the files used for this exercise.
$ cd $TK_TRAINING/Lab2.1/Exercise1/1_insert_scan
$ ls -al
2. Review the dofile for Tessent Scan shown in Figure 2.1-2. You will use this dofile to insert the scan
chains. Make sure you understand all the settings in this dofile.
Tessent TestKompress 9
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
Figure 2.1-2.
3. Review the invocation script used to invoke Tessent Scan shown in Figure 2.1-3. Notice how the
files are organized for this lab.
4. Issue the following command at the shell command line prompt to invoke Tessent Scan, run the
pre-generated dofile, and insert scan chains.
$ ./insert_scan
5. Examine the logfile and verify the netlist, dofile, and test procedure files were written.
Tessent TestKompress 10
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
The logic created in this step includes the decompressor, compactor, bypass logic, and a top-level
wrapper. The wrapper adds one level of hierarchy to the design. The new top-level includes
instantiations of the EDT IP and the original design. To create the EDT IP in this flow, the scan inserted
core netlist is used. If this is the chip top-level, the EDT IP mist be created before I/O pads are added to
the design.
The set_edt_options command, which configures the EDT circuitry, has several options. For this
basic run, the only option used is -Channels 1, which specifies one scan channel. The following
defaults are used for the rest of the other options:
The EDT IP is generated using the write_edt_files command, eleven files are generated (see list
below). The files contain the EDT IP described in Verilog or VHDL RTL, as well as a connectivity and a
black box representation of the core, dofiles, and test procedures file that will be used later in the flow.
The tool also generates the ICL and PDL files even if you did not specify the –ijtag option. The TCD file
that contains the description of the generated EDT IP is also generated.
Tessent TestKompress 11
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
At this point in the flow, you can choose to get an estimate of test coverage and data volume for this
given configuration. This can be repeated with different configurations to experiment with coverage and
data volume. For situations where you may want to investigate the effects of changing the number of
chains and channels, compression analyzer can be utilized. We will discuss compression analyzer in
detail in another chapter.
Instructions
Invoke Tessent Shell on the scan-inserted netlist (5 scan chains), set the context to dft -edt and
create EDT IP with one scan channel.
2. First, review the dofile edt_ip_creation.do. Just like in the previous step, where you inserted scan,
the dofile contains all information needed to set up scan channels and parameters for EDT IP,
generate EDT IP, and create preliminary patterns.
All Tessent DFT tools are command-driven. You enter commands one of two ways: at the tool’s
command prompt, or in a script called a dofile. Dofiles can have extensions such as .do, .tcl, or
.dofile. Once you are familiar with Tessent Shell and Tessent TestKompress (EDT) commands,
you can place the commands you normally use in a dofile to automate the process and save
time.
In this first exercise, you use dofiles to complete the basic external logic location flow.
Tessent TestKompress 12
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
When Tessent Shell is invoked it is in setup mode (as indicated by the SETUP prompt if you are entering
commands interactively). The first command that is entered, either via dofile, or interactively is to set
the context. Until you set the context, you can not do anything, including reading in design files and
libraries. Since the commands you use in this exercise are in the dofile, you do not see the various
system modes and prompts; nevertheless the tool goes through the various system modes to create the
EDT hardware.
Tessent TestKompress 13
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
To insert EDT IP, the context is set to dft -edt. The dft mode tells the tool going to be “designing”
something, in this case, the EDT hardware. (You may have noticed in the first step, the context was dft
-scan. This indicated you were designing scan chains,)
Once the context is set you read in the design using read_verilog command and ATPG cell library
files using the read_cell_library command.
The next command that is used is set_current_design. This command elaborates the design. If
no module is specifically designated, the tool determines the top-level module in the design. If more
than one top-level is found, the tool presents a list to you and you must choose a top-level by reissuing
the command along with the name of the top-level module. All subsequent commands are applied to
the “current_design” whether it was determined or specified until the current design is specified by
another set_current_design.
Notice that this dofile invokes another dofile, atpg.dofile. This file was generated in the previous step,
when you inserted scan and generated ATPG setup files.
Once the atpg.dofile file is invoked, the command tessent_scan_setup is used to execute the
Tcl procedures from the dofile.
The dofile continues by setting up the EDT logic with one scan channel. Take a look at the different
options for the set_edt_options command in the Tessent Shell Reference Manual,
The command and argument set_edt_options -channels 1 configures the EDT logic with
one channel. EDT Options are set before running DRCs and entering the ANALYSIS mode.
Next command is report_edt_pins. Look up this command and report what it does:
____________________________________________________________
Next, check_design_rules runs DRC, and if there are no errors you leave SETUP mode. When
creating EDT IP, the tool uses the same DRC rules as other Mentor Graphics DFT tools in addition to the
EDT-specific K rules or F rules.
The next command creates the EDT logic based on your specifications:
As stated previously, you do not need to create patterns but may choose to do so in order to get an
estimate of coverage. The dofile does this with the create_patterns command.
Tessent TestKompress 14
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
After the tool has created patterns, the report_scan_volume command is executed, which
reports the volume of scan data used in the pattern set. If you do not understand any of the commands,
look them up in the Tessent Shell Reference Manual or ask your instructor.
What are the names of the pins the report_edt_pins command reported?
______________________ ,______________________, ______________________,
_____________________, ______________________
Tessent TestKompress 15
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
The DRC reports a K13 violation. What is a K13 violation? (The answer can be found in the Tessent
Shell Reference Manual in the chapter called “Design Rule Checking”.
___________________________________________________________
___________________________________________________________
Since the core level scan chain pins will not be connected to the top-level wrapper, scan input pins
are set to __________ and scan output pins are __________. This is done so that the patterns that
are generated in this step, and the reported coverage does not give credit for fault sites that can
only be controlled or observed by the scan chain input and output pins. (These pins will not be
available in the pattern generation phase since they are connected directly to the EDT logic.)
5. When DRC has finished running, configuration details of the EDT logic are reported by the
report_edt_configurations command. This command lists EDT configurations,
including the number of channels and chains, pin names, size of the decompressor, and so on.
7. Review the files created as part of the generation of the EDT logic. By changing to the ../results
directory.
$ cd ../results
Tessent TestKompress 16
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
Figure 2.1-6 illustrates the contents of the new top-level netlist created_edt_top.v. This netlist
contains the design module, and edt_top that includes the original core and the EDT logic.
During EDT IP creation, you can generate test patterns to assess the coverage. The patterns that
will be used for manufacturing test and pattern verification are generated after the EDT IP is
Tessent TestKompress 17
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
synthesized. For pattern generation, the script uses the same commands
(create_patterns)that is used for Tessent FastScan.
create_patterns
report_scan_volume
9. The script ends by exiting Tessent TestKompress.
exit -f
If you are adding I/O pads, they should be synthesized together with the Tessent TestKompress logic
before the final test patterns are generated. The design used in this exercise, however, does not have
I/O pads.
For this design, the synthesized RAM model is not available. Therefore, the design is synthesized without
the RAM. For ATPG and Tessent TestKompress, the ATPG model is used. For Verilog simulation, you will
use the RTL model of the RAM.
Instructions
This step discusses the generation of the synthesized netlist:
created_edt_top_gate.v
1. Although you do not synthesize the design in this step, you should understand what files are used
in synthesis and how they interact.
$ cd $TK_TRAINING/Lab2.1/Exercise1/results
2. Examine the synthesis script created_dc_script.scr generated by Tessent TestKompress. Verify that
the synthesized created_edt_top_gate.v netlist is copied into the ../design directory.
Tessent TestKompress 18
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
For the pattern generation, the EDT IP will be configured via information stored in the EDT created
dofile. This configuration information should never be edited.
Compared to when you generated test patterns using Tessent FastScan, there are certain differences in
tool setup. For the pattern generation, you operate the existing Tessent TestKompress circuitry. This is
done by exercising two control signals, edt_clock and edt_update.
Prior to each scan load, the Tessent TestKompress circuitry will be reset. This is done by pulsing the
edt_clock while edt_update is high. During shifting, edt_clock should be pulsed together with the scan
clock. In Figure 2.1-8. Control Signals for Test Pattern GenerationFigure 2.1-8, both scan_enable and
edt_update are shown as 0 during the capture cycle. These two signals can have any value during the
capture cycle; they do not have to be constrained. edt_clock, on the other hand, needs to be 0 during
the capture cycle. The operation of these signals is described in the test procedure load_unload / shift
procedures.
Tessent TestKompress 19
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
Tessent TestKompress 20
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
The following differences can be found in the test procedure files and dofiles that were created by
Tessent Scan and Tessent TestKompress
Tessent TestKompress 21
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
Defines that edt_update is active in the load_unload procedure and edt_clock is pulsed in the
load_unload and shift procedures.
The load_unload procedure is set up to initialize the EDT circuitry and apply shift a number of
times corresponding to the longest scan chain + initialization cycles. The number of
initialization cycles is reported by the report_edt_configurations command.
The shift procedure is updated to include pulsing the edt_clock signal and deactivate the
edt_update signal.
The dofiles
The edt_clock signal needs to be defined as a clock and constrained to the off-state (0). The
constraint is necessary in order to avoid the pulsing of this signal during the capture cycle.
The chains are now connected to the internal nodes of the design and not primary inputs and
outputs. Therefore a different scan chain definition than what was used during the logic
creation phase is implemented. The -internal option with the add_scan_chains
command defines the scan chains as internal chains (as opposed to chains connected to PIs
and POs).
After test patterns are created, you will validate both parallel and serial patterns in a Verilog simulator.
Instructions
In this step, you will use Tessent TestKompress on the synthesized top-level netlist and use the dofile
that was automatically generated during logic creation to set up the circuitry, then generate and save
test patterns.
Tessent TestKompress 22
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
$ cd $TK_TRAINING/Lab2.1/Exercise1/4_edt_pattern
4. Enter the following command to invoke Tessent Shell:
$ tessent -shell -log ../logfiles/edt_pattern_gen.log \
-replace
5. Set the context to create scan patterns, read in the Verilog netlist and the cell library files, and set
the current design to the default.
SETUP> check_design_rules
ANALYSIS> report_edt_configurations
Verify that no DRC violations occur. Pay special attention to the Tessent TestKompress DRC
checks. Once you enter ANALYSIS mode, report the EDT configuration as well.
Tessent TestKompress 23
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
Verify that high test coverage is achieved. The command report_scan_volume provides
reference numbers when analyzing the achieved compression.
10. Save test patterns for simulation. Write the flat model for use in debugging simulation
mismatches and for use with Tessent Diagnosis. Save all patterns in parallel format and Sample
two patterns of each pattern type for serial simulation.
ANALYSIS> exit
Tessent TestKompress 24
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
This is an optional step for the generic Tessent TestKompress flow. However, by default bypass mode is
included in the Tessent TestKompress circuitry to allow access to the scan chains if there are
manufacturing defects associated with the EDT IP. When bypass mode is implemented, patterns that
exercise this mode should be generated and verified. You also can use bypass mode patterns for the
following:
As additional hints for debugging: Patterns can be generated and simulated to verify that non-
Tessent TestKompress patterns simulate without problems.
This run is like any Tessent FastScan run and does not have any special settings. However, to be able to
compare simulation mismatches etc., all settings (pattern types, constraints, etc.) should be identical to
those used when generating compressed patterns. Tessent TestKompress automatically generates a test
procedure file and dofile to set up the Tessent TestKompress circuitry for this step.
Instructions
Invoke Tessent Shell on the synthesized top-level netlist and use the dofile generated during logic
creation to set up the circuitry for bypass, then generate and save bypass test patterns.
Tessent Shell will process the dofile and understand that these patterns
will be generated in bypass mode, not EDT.
Note
Notice the difference and similarities to the files generated for Tessent TestKompress pattern
generation.
$ cat ../results/created_bypass.dofile
$ cat ../results/created_edt.dofile
$ cat ../results/created_bypass.testproc
$ cat ../results/created_edt.testproc
Tessent TestKompress 25
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
Tessent TestKompress 26
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
5. Define the scan chain and read the test procedure file and define clocks. Remember, in bypass
mode, the EDT IP will not be involved in pattern generation.
Use the exact same pattern generation sequence as you did for Tessent TestKompress to create
basic patterns with dynamic compression. For comparison purposes, add faults only on the core
of the design and disregard the EDT circuitry:
ANALYSIS> create_patterns
ANALYSIS> report_scan_volume
Save the test patterns in different formats so you can simulate all of them. Save all patterns in
parallel format and a few in serial format. For the serial patterns, use only a few patterns.
Rather than selecting the first few patterns, have Tessent TestKompress sample two patterns of
each pattern type in the pattern set.
ANALYSIS> write_patterns \
../results/patterns_bypass.ascii -replace
ANALYSIS> write_flat_model \
../results/patterns_bypass_flatmodel.flt -
replace
Tessent TestKompress 27
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
ANALYSIS> write_patterns \
../results/patterns_bypass_p.v -verilog \
-parallel –param tk.param -replace
ANALYSIS> set_pattern_filtering –sample_per_type 2
ANALYSIS> write_patterns \
../results/patterns_bypass_s.v –verilog \
-serial -param tk.param -replace
ANALYSIS> exit
Instructions
You use the ModelSim simulator, but any other Verilog simulator can be used. The test benches
generated by Tessent TestKompress are tool independent.
Go to the directory 6_pattern_sim and study the files in this directory. The directory contains
scripts for pattern simulation.
$ cd $TK_TRAINING/Lab2.1/Exercise1/6_pattern_sim
2. Examine the invocation script and use it to compile the four test benches and the Verilog netlist
and library:
$ ./run_vlog_all
3. Simulate the test patterns.
After the test benches, the netlist, and the library are compiled, the patterns can be simulated
using the invocation script for vsim. Notice that four different logfiles are saved, so that you can
verify later that no mismatches occurred in any of the test benches.
Tessent TestKompress 28
Tessent TestKompress Integration Flows
Post Synthesis External Logic Creation
Notice that the simulator is invoked from the generated directory. The -c switch instructs the
simulator to run in non-GUI mode.
4. Execute the invocation script and verify that no simulation mismatches were reported:
$ ./run_vsim_all
Congratulations! You have successfully finished your first Tessent TestKompress integration
flow.
Tessent TestKompress 29
Tessent TestKompress – Lab Answers
Lab 2.1
-si_port_format edt_si%d
-so_port_format edt_so%d
The index placeholder "%d" gets substituted by the chain index, so the port names
created will be edt_si1, edt_si2, etc.
134
127
26
11
Tessent TestKompress 30
Tessent TestKompress – Lab Answers
It displays the names of all EDT channel and control pins and whether the pin signals are
inverted between the chip input pin and the EDT logic.
Step 2
Q. What are the names of the pins the report_edt_pins command reported?
This rule check reports all pins that will be added to the EDT top-level wrapper in
order to implement the EDT hardware
Q. Since the core level scan chain pins will not be connected to the top-level wrapper, scan
input pins are set to ……. and scan output pins are …….
TIE-X , masked
Step 3
10
Tessent TestKompress 31
Tessent TestKompress – Lab Answers
Step 4
5 (chain 1 – chain 5)
The chains are connected to the internal nodes of the design and not primary inputs
and outputs. The -internal option with the add_scan_chains command
defines the scan chains as internal chains (as opposed to chains connected to PIs and
POs).
This constraint is needed in order to avoid the pulsing of this clock during the capture
procedure.
Modifying the EDT settings may lead to DRC violations and invalid patterns as there is
inconsistency between the EDT settings and EDT logic.
Step 2
This will disable bypass mode and create patterns with the compression logic.
Tessent TestKompress 32
Tessent TestKompress – Lab Answers
Step 9
Tessent TestKompress 33