Lab Understanding Test Pattern Generation
Lab Understanding Test Pattern Generation
Lab
Understanding Test Pattern Generation
This document contains information that is trade secret and proprietary to Mentor Graphics Corporation or its licensors
and is subject to license terms. No part of this document may be photocopied, reproduced, translated, distributed,
disclosed or provided to third parties without the prior written consent of Mentor Graphics.
This document is for information and instruction purposes. Mentor Graphics 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 Mentor Graphics to determine whether any changes have been
made.
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.
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
Caution
section below.
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.
The environment uses bash and is ready to use for the labs with all needed
environment variables already setup.
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.
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
In this lab you use the create_patterns command to generate the appropriate
pattern types for your design. Next, you use Tessent Visualizer to investigate
fault groupings and coverage. Next, you save test patterns in the following
formats: ASCII and Verilog (parallel, serial, and chain test), and in WGL.
ModelSim will be used to simulate and verify test patterns in a timed simulation
environment. Finally, you will change the timing for simulations and ATE
patterns by editing the timeplate in a test procedure file and writing patterns using
the new timeplate.
Objectives
Upon completing this lab, you should be able to:
Use one command to create test pattern types for any circuit
Setup Instructions
1. Change to the $ATPG_LABS/Lab7/Exercise1 directory.
shell> cd $ATPG_LABS/Lab7/Exercise1
-replace
What are some of the warning messages displayed in the session transcript
area? ________________________________________________________
_____________________________________________________________
Clocks are very important for testing purposes, and identifying them
properly is important. What warning message is in the transcript about
ramclk? ______________________________________________________
_____________________________________________________________
ANALYSIS> report_drc_rules C8
If further investigation is wanted, you also can view the DRC violation in
Tessent Visualizer by entering the following command at the ANALYSIS
prompt:
ANALYSIS> analyze_drc_violation C8-1
This automatically loads the violation into the Flat Schematic window in
Tessent Visualizer for further examination.
Open the Tessent Shell Reference Manual in order to find more information
about the C8 and C9 clock rule violations. What impact, if any, do these
violations have on coverage? _____________________________________
Continue reading as time allows in order to learn how you might resolve a
C8 or C9 DRC violation.
Since the C8 violations do not affect pattern generation or coverage, you will
move forward to create patterns.
Click on C9 violation, in the left pane, you will see that the C9-1 violation is
the only violation appearing in the right pane for type C9, double click on it,
this will open the flat schematic window analyzing that violation.
8. Generate patterns. Note that since you have not defined a fault list,
create_patterns adds all faults. You can enter commands in the
Transcript window in Tessent Visualizer or in the shell window.
ANALYSIS> create_patterns
Coverage/Effectiveness # Faults
test_coverage
fault_coverage
# test_patterns
# basic patterns
# clock_seq_patterns
# mult_load_patterns
# simulated_patterns
CPU_time (secs)
At the end of pattern generation, the statistics report is generated, Once you
are in system mode ANALYSIS, you can issue the report_statistics
command.
1. Open the Instance Browser tab. This will display the listing of instances
and modules in the design.
To view instances below this top module, click on it with your RMB, from
the popup menu select “Show as Parent in Instance Browser”, this will
show all instances below this top module
2. From the Settings menu, select the Gate Report option, check the Fault
Status option and click OK – this will an extra column with total faults
added to the instance window
3. Now you can add the fault classifications to the display. You can add
either specific classifications, or all classifications.
From the Columns and Filter Editors button on the top left corner
of the Instance Browser, expand Fault Statistics:
You can select the specific fault specification that you need to add, like the
DS and UO faults, make sure that all items checked below are checked on
your Columns and Filters Editor, Click OK:
a. Select the heading “AU” and while holding down the left mouse
button, drag the header so it is positioned to the right of the UO
column. You may have to “drop” this column and scroll to the left
in order to be able to place it where you want.
Notice that fault coverage and test coverage numbers are reported both as
maximums and averages, make your selections as shown below in the
following figure, then click OK:
ii. Next look at the column heading called Test Coverage. Scroll
down the window. Which model or models has less than 75%
coverage (Check both columns)? ___________, ____________.
The following steps illustrate how to save the flat model and the test patterns
generated in the first part of this exercise. You will save in three formats: ASCII
for reuse and debug, Verilog for validation simulations, and WGL, a common
ATE format. Start with the parallel patterns first, then save the serial patterns.
ASCII test patterns are useful for reuse, debugging, and diagnostics. By
default, the write_patterns command saves test patterns in ASCII. This
format contains test pattern data in a text-based commented format that also
includes information such as settings and test procedure information.
Also note that the default pattern format is parallel, so using the -parallel
argument is not necessary, but useful to document in the logfile if you need
to debug any issues.
4. Next, save the patterns to parallel WGL format with the following
characteristics:
5. Save the patterns for a chain test only, in serial Verilog format with the
following characteristics:
Chain test patterns check scan chain integrity. This test loads a repeating
pattern of 0011 into the chains, performs a non-clocked capture cycle, and
then unloads the scan chains. You may have noticed by default the chain test
is written when you write patterns.
6. This time, save the patterns in serial Verilog format with the following
characteristics:
Setting the number of patterns to sample per pattern type to five, reduces the
run time for the simulation.
Setup Instructions
1. Move into the results directory where you just wrote the Verilog test
benches and other pattern sets.
$ cd results
2. Open ModelSim.
shell> vsim
3. In the Library tab, expand the work directory and double-click on the
cpu_top_cpu_top_chaintest_serial_v_ctl testbench as shown to load it
into the simulator:
for errors between the simulated and expected pattern values. This may take
a while to run.
Click No when you are asked ‘Are you sure you want to finish?’ in the
Finish Vsim dialog box until you have a chance to answer the following
questions.
4. After checking all the messages in the ModelSim transcript, leave the
simulator open so you can test the parallel Verilog patterns.
Next, simulate and verify the parallel Verilog patterns. Remember that this uses
all the patterns but does not shift them in and out of the scan chain.
1. The parallel testbench is already compiled (remember that the netlist and
library are already compiled from the last run.) Go back to the library tab.
from start to finish. ModelSim is checking for errors between the simulated
and expected pattern values. This may take a few minutes, depending upon
the operating system you use.
Do not choose Yes in the Finish Vsim dialog box until you have a chance to
answer the following questions.
ModelSim simulated and verified that your parallel Verilog patterns do not
have simulation mismatches.
Now you simulate and verify the serial Verilog patterns. Recall that the number
of patterns to sample per pattern was set to five. In a serial simulation you
simulate not only the load_unload/shift functions, but also the timing associated
with the more complex loading and clocking schemes. Simulation and
verification processing time is greatly reduced compared to performing a serial
simulation on the complete pattern set (but it is still pretty high).
These patterns may take longer to simulate, so if you are running out of time,
you can leave the lab at the previous step. The process is the same as the two
Note previous simulations.
1. Remember that the netlist and library are already compiled from the first
run. Click the Library tab to go back to the Library window.
ModelSim is checking for errors between the simulated and expected pattern
values.
ModelSim simulated and verified that your serial Verilog patterns do not
contain simulation mismatches. After you are finished with examining the
results, you may quit ModelSim.
Setup Instructions
1. Log in to your workstation if you are not already logged in.
2. Change to the $ATPG_LABS/Lab7/Exercise3 directory.
shell> cd $ATPG_LABS/Lab7/Exercise3
Using the commands that you’ve used previously, start Tessent Shell, create a
logfile and run the dofile.
Test procedure files define scan operations and the timing that will be applied
when you write patterns.
When you setup your Tessent Shell environment for a project, you need to
create your test procedure files for the test environment your product will be
tested in. This includes the tester timing information.
There may be times that you get simulation or tester mismatches due to the
timeplate information being incorrect. To fix this, you do not need to recreate
patterns, you only need to apply a new timeplate as you write the patterns.
2. Copy the existing timeplate and name the new procedure gen_tp2.
1. Save the flat model using the command you’ve used in earlier labs.
2. Save the ASCII parallel test patterns to a file with the following
characteristics:
3. Look at the transcript window. What DRC messages are you getting?
_____________________ _____________________________________
These labs were qualified using Tessent 2020.1 and ModelSim 2020.2, if
other Tessent versions were used, results contained in tables in these labs
Note may differ slightly from those shown in this Lab Answers section.
Exercise 1
Step 4
What are some of the warning messages displayed in the session transcript
area?
Warning: Rule FN1 violation occurs 5 times
Warning: Rule FN4 violation occurs 1487 times
Warning: 1 PO(s) are connected to a clock line. (C8)
Warning: 1 POs are connected to a clock line gated by scan cell that
uses same clock. (C9)
Warning: 7 read lines not forced off when read controls are off. (A7)
Step 5
The C8 and C9 clock rule violations. What impact, if any, do these
violations have on coverage?
C8: does not impact coverage (The rule violation occurs when a primary
output is in the clock cone.)
C9: Failure to satisfy this rule may result in a small loss in test coverage
because it may introduce sequential effects into the generated clock
patterns (Data captured by any clock with a direct path (through
combinational logic only) to a primary output must not affect the direct
path to a primary output of that same clock.)
Step 9
Table 7-1: Test Coverage Effectiveness Statistics
Coverage/Effectiveness # Faults
test_coverage 99.43%
fault_coverage 94.07%
# test_patterns 316
# basic patterns 77
# clock_seq_patterns 227
# mult_load_patterns 12
# simulated_patterns 322
Step 5
Look at the column heading called Fault Coverage. Which components
have less than 90% coverage (Check both columns)?
and02, ao21, ao221, dff, nor03, picdram
Next look at the column heading called Test Coverage. Scroll down the
window. Which model or models has less than 75% coverage?
nor03, picdram
Step 6
How many patterns were written? 15/316
Exercise 2
Step 3
How many nanoseconds does the simulation run for? 29842 ns
Are there errors? No
Step 2
What test is done first? Chain test
Step 3
What test is done first? Chain test
How many nanoseconds does the simulation run for? 343562 ns
Are there any errors? No
How do you know this? Transcript says: No error between simulated and
expected patterns
Exercise 3 (Optional)
Step 2
What commands are run in this dofile?
set_fault_sampling 1
check_design_rules
create_patterns
Step 3
Look at the transcript window. What DRC messages are you getting?
W14 warnings - # 4, Procedures being replaced/ updates timing