Eetop - CN Atpg GD
Eetop - CN Atpg GD
This document contains information that is proprietary to Mentor Graphics Corporation. The original recipient of this
document may duplicate this document in whole or in part for internal business purposes only, provided that this entire
notice appears in all copies. In duplicating any part of this document, the recipient agrees to make every reasonable
effort to prevent the unauthorized use and distribution of the proprietary information.
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.
Chapter 1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
What is Design-for-Test?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
DFT Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Top-Down Design Flow with DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Chapter 2
Understanding Scan and ATPG Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Understanding Scan Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Internal Scan Circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Scan Design Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Understanding Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Understanding Wrapper Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Understanding Test Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Test Structure Insertion with Tessent Scan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Understanding ATPG. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
The ATPG Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Mentor Graphics ATPG Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Scan Sequential ATPG with the ATPG Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Understanding Test Types and Fault Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Test Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Fault Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
User-Defined Fault Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Multiple Detect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Embedded Multiple Detect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Fault Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Fault Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Testability Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Chapter 3
Understanding Common Tool Terminology and Concepts . . . . . . . . . . . . . . . . . . . . . . . . 63
Scan Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Scan Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Master Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Slave Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Shadow Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Copy Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Extra Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Scan Chains. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Scan Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Scan Clocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Scan Architectures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Mux-DFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Clocked-Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
LSSD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Test Procedure Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Model Flattening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Understanding Design Object Naming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
The Flattening Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Simulation Primitives of the Flattened Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Learning Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Equivalence Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Logic Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Implied Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Forbidden Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Dominance Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
ATPG Design Rules Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
General Rules Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Procedure Rules Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Bus Mutual Exclusivity Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Scan Chain Tracing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Shadow Latch Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Data Rules Checking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Transparent Latch Identification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Clock Rules Checking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
RAM Rules Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Bus Keeper Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Extra Rules Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Scanability Rules Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Constrained/Forbidden/Block Value Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Chapter 4
Understanding Testability Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Synchronous Circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Synchronous Design Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Asynchronous Circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Scannability Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Scannability Checking of Latches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Support for Special Testability Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Feedback Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Structural Combinational Loops and Loop-Cutting Methods . . . . . . . . . . . . . . . . . . . . . . 90
Structural Sequential Loops and Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Redundant Logic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Asynchronous Sets and Resets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Gated Clocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Tri-State Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Non-Scan Cell Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Clock Dividers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Pulse Generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
JTAG-Based Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Chapter 5
Inserting Internal Scan
and Test Circuitry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
The Tessent Scan Process Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Tessent Scan Inputs and Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Test Structures Supported by Tessent Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Invoking Tessent Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Preparing for Test Structure Insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Selecting the Scan Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Defining Scan Cell and Scan Output Mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Enabling Test Logic Insertion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Specifying Clock Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Specifying Existing Scan Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Handling Existing Boundary Scan Circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Changing the System Mode (Running Rules Checking) . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Setting Up a Basic Scan Insertion Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Setting Up for Wrapper Chain Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Manually Specifying Control and Observe Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Manually Including and Excluding Cells for Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Reporting Scannability Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Automatic Recognition of Existing Shift Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
The Identification Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Reporting Identification Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Inserting Test Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Setting Up for Internal Scan Insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Naming Scan Input and Output Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Buffering Test Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Running the Insertion Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Merging Scan Chains with Different Shift Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Saving the New Design and ATPG Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Writing the Netlist. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Writing the Test Procedure File and Dofile for ATPG. . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Running Rules Checking on the New Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Exiting Tessent Scan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Inserting Scan Block-by-Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Verilog Flow Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Chapter 6
Generating Test Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
ATPG Basic Tool Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
ATPG Tool Inputs and Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Understanding the ATPG Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Performing Basic Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Invoking the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Setting the System Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Chapter 7
Multiprocessing for ATPG and Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Definition of Multiprocessing Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Using Multiprocessing to Reduce Runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Multiprocessing Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Procedures for Multiprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Overview Procedure for Using Multiprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Troubleshooting SSH Environment and Passphrase Errors . . . . . . . . . . . . . . . . . . . . . . . . 303
Disabling Multithreading Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Adding Threads to the Master. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Adding Processors in Manual Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Adding Processors in Grid Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Deleting Processors Added in Manual Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Deleting Processors Added in Grid Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Chapter 8
Scan Pattern Retargeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Tools and Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Scan Pattern Retargeting Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Understanding Core-Level Pattern Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Clocking Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
The Core Description File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Understanding Scan Pattern Retargeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Scan Pattern Retargeting Without a Netlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Generating Patterns at the Core Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Retargeting Patterns in Internal Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Retargeting Patterns Without a Top-Level Netlist. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Generating Patterns in External Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Retargeting Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Chapter 9
Test Pattern Formatting and Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Test Pattern Timing Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Timing Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
General Timing Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Generating a Procedure File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Defining and Modifying Timeplates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Saving Timing Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Features of the Formatter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Pattern Formatting Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Saving Patterns in Basic Test Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Saving in ASIC Vendor Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Chapter 10
Test Pattern File Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
ASCII File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Header_Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Setup_Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Functional_Chain_Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Scan_Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Scan_Cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
BIST Pattern File Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Setup_Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Scan_Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Chapter 11
Power-Aware DRC and ATPG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Power-Aware Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Assumptions and Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Multiple Power Mode Test Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Power-Aware ATPG for Traditional Fault Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
Chapter 12
Testing Low-Power Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Low-Power Testing Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Assumptions and Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Low-Power CPF/UPF Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Test Insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Low-Power Test Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Scan Insertion with Tessent Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Power-Aware Design Rule Checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Low-Power DRCs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Low-Power DRC Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Power State-Aware ATPG. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
Power Domain Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
Low-Power Cell Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Chapter 13
MTFI File Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
MTFI Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
MTFI File Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
MTFI Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Support of Fault Classes and Sub-Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Support of Stuck and Transition Fault Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Support of N-Detect Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Support of Different Fault Types in the Same File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Support for Hierarchical Fault Accounting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Chapter 14
Graybox Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
What is a Graybox? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Graybox Process Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Example dofile for Creating a Graybox Netlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
Generating Graybox Netlist for EDT Logic Inserted Blocks . . . . . . . . . . . . . . . . . . . . . . . 401
Appendix A
Clock Gaters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Basic Clock Gater Cell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Two Types of Embedding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Ideal Case (Type-A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Potential DRC Violator (Type-B). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
Cascaded Clock Gaters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Appendix B
Debugging State Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
Understanding State Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
Displaying the State Stability Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
State Stability Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
State Stability Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
Appendix C
Running Tessent Shell as a Batch Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
Commands and Variables for the dofile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
Command Line Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Scheduling a Batch Job for Execution Later. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
Appendix D
Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Mentor Graphics Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Index
Third-Party Information
End-User License Agreement
List of Tables
This manual gives an overview of ASIC/IC Design-for-Test (DFT) strategies and shows the use
of Mentor Graphics ASIC/IC DFT products as part of typical DFT design processes. This
manual discusses the Tessent products that use Scan and ATPG technology:
For information about contexts in Tessent Shell, refer to “Contexts and System Modes” in the
Tessent Shell User’s Manual. For information about any of the commands mentioned in this
manual, refer to the Tessent Shell Reference Manual.
What is Design-for-Test?
Testability is a design attribute that measures how easy it is to create a program to
comprehensively test a manufactured design’s quality. Traditionally, design and test processes
were kept separate, with test considered only at the end of the design cycle. But in contemporary
design flows, test merges with design much earlier in the process, creating what is called a
design-for-test (DFT) process flow. Testable circuitry is both controllable and observable. In a
testable design, setting specific values on the primary inputs results in values on the primary
outputs that indicate whether or not the internal circuitry works properly. To ensure maximum
design testability, designers must employ special DFT techniques at specific stages in the
development process.
DFT Strategies
At the highest level, there are two main approaches to DFT: ad hoc and structured. The
following subsections discuss these DFT strategies.
Ad Hoc DFT
Ad hoc DFT implies using good design practices to enhance a design's testability without
making major changes to the design style. Some ad hoc techniques include:
Structured DFT
Structured DFT provides a more systematic and automatic approach to enhancing design
testability. Structured DFT’s goal is to increase the controllability and observability of a circuit.
Various methods exist for accomplishing this. The most common is the scan design technique,
which modifies the internal sequential circuitry of the design. You can also use the Built-in
Self-Test (BIST) method, which inserts a device’s testing function within the device itself.
Another method is boundary scan, which increases board testability by adding circuitry to a
chip. “Understanding Scan and ATPG Basics” describes these methods in detail.
As Figure 1-1 shows, the first task in any design flow is creating the initial RTL-level design,
through whatever means you choose. In the Mentor Graphics environment, you may choose to
create a high-level Verilog description using ModelSim® or a schematic using Design
Architect®. You then verify the design’s functionality by performing a functional simulation,
using ModelSim or another vendor's Verilog simulator.
At this point in the flow you are ready to insert internal scan circuitry into your design using
Tessent Scan.. You may then want to re-verify the timing because you added scan circuitry.
Once you are sure the design is functioning as desired, you can generate test patterns. You can
use the ATPG tool to generate a test pattern set in the appropriate format.
Now you should verify that the design and patterns still function correctly with the proper
timing information applied. You can use ModelSim or some other simulator to achieve this
goal. You may then have to perform a few additional steps required by your ASIC vendor
before handing the design off for manufacture and testing.
Note
It is important for you to check with your vendor early on in your design process for
specific requirements and restrictions that may affect your DFT strategies. For example,
the vendor's test equipment may only be able to handle single scan chains (see page 21),
have memory limitations, or have special timing requirements that affect the way you
generate scan circuitry and test patterns.
ModelSim
Create Initial
Text Editor
Design
Design Architect®
1011
Insert/Verify
Built-in Self Test
Circuitry
P/F
Insert/Verify
Boundary Scan
Circuitry
Re-verify Timing
(optional)
Hand off
to Vendor
Before you begin the testing process, you must first have an understanding of certain testing
concepts. Once you understand these concepts, you can determine the best test strategy for your
particular design. Figure 2-1 shows the concepts this section discusses.
Scan circuitry facilitates test generation and can reduce external tester usage. There are two
main types of scan circuitry: internal scan and boundary scan. Internal scan (also referred to as
scan design) is the internal modification of your design’s circuitry to increase its testability. A
detailed discussion of internal scan begins in “Internal Scan Circuitry.”
While scan design modifies circuitry within the original design, boundary scan adds scan
circuitry around the periphery of the design to make internal circuitry on a chip accessible via a
standard board interface. The added circuitry enhances board testability of the chip, the chip I/O
pads, and the interconnections of the chip to other board circuitry.
The design shown in Figure 2-2 contains both combinational and sequential portions. Before
adding scan, the design had three inputs, A, B, and C, and two outputs, OUT1 and OUT2. This
“Before Scan” version is difficult to initialize to a known state, making it difficult to both
control the internal circuitry and observe its behavior using the primary inputs and outputs of
the design.
Before Scan
A
Combinational Logic OUT1
B
D Q D Q D Q
CLK
After Scan
A
Combinational Logic OUT1
B
sc_out
D Q D Q D Q
sc_in
sci sci sci
sen sen sen
CLK
sc_en
After adding scan circuitry, the design has two additional inputs, sc_in and sc_en, and one
additional output, sc_out. Scan memory elements replace the original memory elements so that
when shifting is enabled (the sc_en line is active), scan data is read in from the sc_in line.
1. Enable the scan operation to allow shifting (to initialize scan cells).
2. After loading the scan cells, hold the scan clocks off and then apply stimulus to the
primary inputs.
Understanding Scan
Scan is a scan design methodology that replaces all memory elements in the design with their
scannable equivalents and then stitches (connects) them into scan chains. The idea is to control
and observe the values in all the design’s storage elements so you can make the sequential
circuit’s test generation and fault simulation tasks as simple as those of a combinational circuit.
Scan Output
Scan Input
The black rectangles in Figure 2-3 represent scan elements. The line connecting them is the
scan path. Because this is a scan design, all storage elements were converted and connected in
the scan path. The rounded boxes represent combinational portions of the circuit.
For information on implementing a scan strategy for your design, refer to “Test Structures
Supported by Tessent Scan” on page 118.
Scan Benefits
The following are benefits of employing a scan strategy:
• Ease of use.
Using scan methodology, you can insert both scan circuitry and run ATPG without the
aid of a test engineer.
• Assured quality.
Scan assures quality because parts containing such circuitry can be tested thoroughly
during chip manufacture. If your end products are going to be used in market segments
that demand high quality, such as aircraft or medical electronics—and you can afford
the added circuitry—then you should take advantage of the scan methodology.
Wrapper chains add controllability and observability to the design via a hierarchical wrapper
scan chain. A wrapper chain is a series of scan cells connected around the boundary of a design
partition that is accessible at the design level. The wrapper chain improves both test coverage
and run time by converting sequential elements to scan cells at inputs (outputs) that have low
controllability (observability) from outside the block.
The architecture of wrapper chains is illustrated in the following two figures. Figure 2-4 shows
a design with three partitions, A, B, and C.
Design
Partition B
Design Design
Primary Primary
Inputs Partition A
Outputs
Partition C
The bold lines in Figure 2-4 indicate inputs and outputs of partition A that are not directly
controllable or observable from the design level. Because these lines are not directly accessible
at the design level, the circuitry controlled by these pins can cause testability problems for the
design.
Figure 2-5 shows how adding wrapper chain structures to partition A increases the
controllability and observability (testability) of partition A from the design level.
Note
Only the first elements that are directly connected to the uncontrollable (unobservable)
primary inputs (primary outputs) become part of the wrapper chain.
Design-Level
Partition A Scan Out
Design-Level Pin Added
Scan In
Pin Added
Uncontrollable
Inputs
Unobservable
Outputs
The wrapper chain consists of two types of elements: sequential elements connected directly to
uncontrolled primary inputs of the partition, and sequential elements connected directly to
unobservable (or masked) outputs of the partition. The partition also acquires two design-level
pins, scan in and scan out, to give direct access to the previously uncontrollable or unobservable
circuitry.
You can also use wrapper chains in conjunction with scan structures. Sequential elements not
eligible for wrapper chains become candidates for internal scan.
For information on implementing a scan strategy for your design, refer to “Setting Up for
Wrapper Chain Identification” on page 127.
VCC
Fault Effects 1
Blocked From 1
Observation Uncontrollable
Circuitry
In this example, one input of an OR gate is tied to a 1. This blocks the ability to propagate
through this path any fault effects in circuitry feeding the other input. Thus, the other input must
become a test point to improve observation. The tied input also causes a constant 1 at the output
of the OR gate. This means any circuitry downstream from that output is uncontrollable. The
pin at the output of the gate becomes a test point to improve controllability. Once identification
of these points occurs, added circuitry can improve the controllability and observability
problems.
PO
VCC
Fault Effects 1
can now be 1 Circuitry can
Observed MUX now be
controlled
PI
Test_Mode
At the observability test point, an added primary output provides direct observation of the signal
value. At the controllability test point, an added MUX controlled by a test_mode signal and
primary input controls the value fed to the associated circuitry.
This is just one example of how test point circuitry can increase design testability. Refer to
“Manually Specifying Control and Observe Points” on page 128 for information on identifying
test points and inserting test point circuitry.
Test point circuitry is similar to test logic circuitry. For more information on test logic, refer to
“Enabling Test Logic Insertion” on page 120.
• Verilog format.
Reads and writes a Verilog gate-level netlist.
• Multiple scan types.
Supports insertion of three different scan types, or methodologies: mux-DFF, clocked-
scan, and LSSD.
• Multiple test structures.
Supports identification and insertion of scan (both sequential ATPG-based and scan
sequential procedure-based), wrapper chains, and test points.
• Scannability checking.
Provides powerful scannability checking/reporting capabilities for sequential elements
in the design.
• Design rules checking.
Performs design rules checking to ensure scan setup and operation are correct—before
scan is actually inserted. This rules checking also guarantees that the scan insertion done
by Tessent Scan produces results that function properly in an ATPG tool.
• Interface to ATPG tools.
Automatically generates information for the ATPG tools on how to operate the scan
circuitry Tessent Scan creates.
• Optimal partial scan selection.
Provides optimal partial scan analysis and insertion capabilities.
• Flexible scan configurations.
Allows flexibility in the scan stitching process, such as stitching scan cells in fixed or
random order, creating either single- or multiple-scan chains, and using multiple clocks
on a single-scan chain.
• Test logic.
Provides capabilities for inserting test logic circuitry on uncontrollable set, reset, clock,
tri-state enable, and RAM read/write control lines.
• User specified pins.
Allows user-specified pin names for test and other I/O pins.
• Multiple model levels.
Handles gate-level, as well as gate/transistor-level models.
• Online help.
Provides online help for every command along with online manuals.
For information about using Tessent Scan to insert scan circuitry into your design, refer to
“Inserting Internal Scan and Test Circuitry” on page 115.
Understanding ATPG
ATPG stands for Automatic Test Pattern Generation. Test patterns, sometimes called test
vectors, are sets of 1s and 0s placed on primary input pins during the manufacturing test process
to determine if the chip is functioning properly. When the test pattern is applied, the Automatic
Test Equipment (ATE) determines if the circuit is free from manufacturing defects by
comparing the fault-free output—which is also contained in the test pattern—with the actual
output measured by the ATE.
This section only discusses the generation of test patterns. “Fault Classes” on page 53 discusses
the fault simulation process. The two most typical methods for pattern generation are random
and deterministic. Additionally, the ATPG tools can fault simulate patterns from an external set
and place those patterns detecting faults in a test set. The following subsections discuss each of
these methods.
More specifically, the tool assigns a set of values to control points that force the fault site to the
state opposite the fault-free state, so there is a detectable difference between the fault value and
the fault-free value. The tool must then find a way to propagate this difference to a point where
it can observe the fault effect. To satisfy the conditions necessary to create a test pattern, the test
generation process makes intelligent decisions on how best to place a desired value on a gate. If
a conflict prevents the placing of those values on the gate, the tool refines those decisions as it
attempts to find a successful test pattern.
If the tool exhausts all possible choices without finding a successful test pattern, it must perform
further analysis before classifying the fault. Faults requiring this analysis include redundant,
ATPG-untestable, and possible-detected-untestable categories (see page 53 for more
information on fault classes). Identifying these fault types is an important by-product of
deterministic test generation and is critical to achieving high test coverage. For example, if a
fault is proven redundant, the tool may safely mark it as untestable. Otherwise, it is classified as
a potentially detectable fault and counts as an untested fault when calculating test coverage.
• Maximize test coverage by minimizing the impact of X’s caused by false and multicycle
paths
• Identify testability problems early using comprehensive design rule checking
• Reduce test validation time with automatic simulation mismatch debugging
• Ensure shorter time to market with integration into all design flows and foundry support
• Have extensive fault model support, including stuck-at, IDDQ, transition, path delay and
bridge
• Have on-chip PLL support for accurate at-speed test
• Automate testing small embedded memories and cores with scan
• Supported in the Tessent SoCScan hierarchical silicon test environment
For more information about ATPG functionality, refer to the Tessent Shell Reference Manual.
Functional
Defects circuitry opens
circuitry shorts
At-Speed
IDDQ Defects
Defects bridges
CMOS stuck-on slow transistors
CMOS stuck-open
Each of these defects has an associated detection strategy. The following subsection discusses
the three main types of test strategies.
Test Types
Figure 2-8 shows three main categories of defects and their associated test types: functional,
IDDQ, and at-speed. Functional testing checks the logic levels of output pins for a “0” and “1”
response. IDDQ testing measures the current going through the circuit devices. At-speed testing
checks the amount of time it takes for a device to change logic states. The following subsections
discuss each of these test types in more detail.
Functional Test
Functional test continues to be the most widely-accepted test type. Functional test typically
consists of user-generated test patterns, simulation patterns, and ATPG patterns.
Functional testing uses logic levels at the device input pins to detect the most common
manufacturing process-caused problem, static defects (for example, open, short, stuck-on, and
stuck-open conditions). Functional testing applies a pattern of 1s and 0s to the input pins of a
circuit and then measures the logical results at the output pins. In general, a defect produces a
logical value at the outputs different from the expected output value.
IDDQ Test
IDDQ testing measures quiescent power supply current rather than pin voltage, detecting device
failures not easily detected by functional testing—such as CMOS transistor stuck-on faults or
adjacent bridging faults. IDDQ testing equipment applies a set of patterns to the design, lets the
current settle, then measures for excessive current draw. Devices that draw excessive current
may have internal manufacturing defects.
Because IDDQ tests do not have to propagate values to output pins, the set of test vectors for
detecting and measuring a high percentage of faults may be very compact. The ATPG tool
efficiently creates this compact test vector set.
In addition, IDDQ testing detects some static faults, tests reliability, and reduces the number of
required burn-in tests. You can increase your overall test coverage by augmenting functional
testing with IDDQ testing.
• Every-vector
This methodology monitors the power-supply current for every vector in a functional or
stuck-at fault test set. Unfortunately, this method is relatively slow—on the order of 10-
100 milliseconds per measurement—making it impractical in a manufacturing
environment.
• Supplemental
This methodology bypasses the timing limitation by using a smaller set of IDDQ
measurement test vectors (typically generated automatically) to augment the existing
test set.
• Selective
This methodology intelligently chooses a small set of test vectors from the existing
sequence of test vectors to measure current.
The ATPG tool supports both supplemental and selective IDDQ test methodologies.
Three test vector types serve to further classify IDDQ test methodologies:
• Ideal
Ideal IDDQ test vectors produce a nearly zero quiescent power supply current during
testing of a good device. Most methodologies expect such a result.
• Non-ideal
Non-ideal IDDQ test vectors produce a small, deterministic quiescent power supply
current in a good circuit.
• Illegal
If the test vector cannot produce an accurate current component estimate for a good
device, it is an illegal IDDQ test vector. You should never perform IDDQ testing with
illegal IDDQ test vectors.
IDDQ testing classifies CMOS circuits based on the quiescent-current-producing circuitry
contained inside as follows:
• Fully static
Fully static CMOS circuits consume close to zero IDDQ current for all circuit states.
Such circuits do not have pullup or pull-down resistors, and there can be one and only
one active driver at a time in tri-state buses. For such circuits, you can use any vector for
ideal IDDQ current measurement.
• Resistive
Resistive CMOS circuits can have pullup/pull-down resistors and tristate buses that
generate high IDDQ current in a good circuit.
• Dynamic
Dynamic CMOS circuits have macros (library cells or library primitives) that generate
high IDDQ current in some states. Diffused RAM macros belong to this category.
Some designs have a low current mode, which makes the circuit behave like a fully static
circuit. This behavior makes it easier to generate ideal IDDQ tests for these circuits.
The ATPG tool currently supports only the ideal IDDQ test methodology for fully static,
resistive, and some dynamic CMOS circuits. The tools can also perform IDDQ checks during
ATPG to ensure the vectors they produce meet the ideal requirements. For information on
creating IDDQ test sets, refer to “Creating an IDDQ Test Set”.
At-Speed Test
Timing failures can occur when a circuit operates correctly at a slow clock rate, and then fails
when run at the normal system speed. Delay variations exist in the chip due to statistical
variations in the manufacturing process, resulting in defects such as partially conducting
transistors and resistive bridges.
The purpose of at-speed testing is to detect these types of problems. At-speed testing runs the
test patterns through the circuit at the normal system clock speed.
Fault Modeling
Fault models are a means of abstractly representing manufacturing defects in the logical model
of your design. Each type of testing—functional, IDDQ, and at-speed—targets a different set of
defects.
Fault Locations
By default, faults reside at the inputs and outputs of library models. However, faults can instead
reside at the inputs and outputs of gates within library models if you turn internal faulting on.
Figure 2-9 shows the fault sites for both cases.
To locate a fault site, you need a unique, hierarchical instance pathname plus the pin name.
You can also use Verilog ‘celldefine statements to extend cell boundaries beyond library
models. Using this technique has several implications:
• The default fault population changes. By default, all fault locations are at library
boundary pins. However, when the library boundary moves from the ATPG library level
up to the `celldefine level, the fault locations and fault population change as a result.
• The flattened model can be different because the logic inside `celldefine module might
be optimized to reduce the flattened model size.
• Hierarchical instance/pin names inside `celldefine module are not treated as legal
instance/pin names.
Fault Collapsing
A circuit can contain a significant number of faults that behave identically to other faults. That
is, the test may identify a fault, but may not be able to distinguish it from another fault. In this
case, the faults are said to be equivalent, and the fault identification process reduces the faults to
one equivalent fault in a process known as fault collapsing. For performance reasons, early in
the fault identification process the ATPG tool singles out a member of the set of equivalent
faults and use this “representative” fault in subsequent algorithms. Also for performance
reasons, these applications only evaluate the one equivalent fault, or collapsed fault, during
fault simulation and test pattern generation. The tools retain information on both collapsed and
uncollapsed faults, however, so they can still make fault reports and test coverage calculations.
a
c
b
Possible Errors: 6
“a” s-a-1, “a” s-a-0
“b” s-a-1, “b” s-a-0
“c” s-a-1, “c” s-a-0
For a single-output, n-input gate, there are 2(n+1) possible stuck-at errors. In this case, with
n=2, six stuck-at errors are possible.
The ATPG tool uses the following fault collapsing rules for the single stuck-at model:
with different circuit configurations and get a quick indication of how much control you have
over your circuit nodes.
The ATPG tool uses the following fault collapsing rules for the toggle fault model:
• Buffer - a fault on the input is equivalent to the same fault value at the output.
• Inverter - a fault on the input is equivalent to the opposite fault value at the output.
• Net between single output pin and multiple input pin - all faults of the same value are
equivalent.
The ATPG tool supports the pseudo stuck-at fault model for IDDQ testing. Testing detects a
pseudo stuck-at model at a node if the fault is excited and propagated to the output of a cell
(library model instance or primitive). Because library models can be hierarchical, fault
modeling occurs at different levels of detail.
The pseudo stuck-at fault model detects all defects found by transistor-based fault models—if
used at a sufficiently low level. The pseudo stuck-at fault model also detects several other types
of defects that the traditional stuck-at fault model cannot detect, such as some adjacent bridging
defects and CMOS transistor stuck-on conditions.
The benefit of using the pseudo stuck-at fault model is that it lets you obtain high defect
coverage using IDDQ testing, without having to generate accurate transistor-level models for all
library components.
The transistor leakage fault model is another fault model commonly used for IDDQ testing.
This fault model models each transistor as a four terminal device, with six associated faults. The
six faults for an NMOS transistor include G-S, G-D, D-S, G-SS, D-SS, and S-SS (where G, D,
S, and SS are the gate, drain, source, and substrate, respectively).
You can only use the transistor level fault model on gate-level designs if each of the library
models contains detailed transistor level information. Pseudo stuck-at faults on gate-level
models equate to the corresponding transistor leakage faults for all primitive gates and fanout-
free combinational primitives. Thus, without the detailed transistor-level information, you
should use the pseudo stuck-at fault model as a convenient and accurate way to model faults in
a gate-level design for IDDQ testing.
Figure 2-11 shows the IDDQ testing process using the pseudo stuck-at fault model.
IDD
VSS
The pseudo stuck-at model detects internal transistor shorts, as well as “hard” stuck-ats (a node
actually shorted to VDD or GND), using the principle that current flows when you try to drive
two connected nodes to different values. While stuck-at fault models require propagation of the
fault effects to a primary output, pseudo stuck-at fault models allow fault detection at the output
of primitive gates or library cells.
IDDQ testing detects output pseudo stuck-at faults if the primitive or library cell output pin goes
to the opposite value. Likewise, IDDQ testing detects input pseudo stuck-at faults when the
input pin has the opposite value of the fault and the fault effect propagates to the output of the
primitive or library cell.
By combining IDDQ testing with traditional stuck-at fault testing, you can greatly improve the
overall test coverage of your design. However, because it is costly and impractical to monitor
current for every vector in the test set, you can supplement an existing stuck-at test set with a
compact set of test vectors for measuring IDDQ. This set of IDDQ vectors can either be
generated automatically or intelligently chosen from an existing set of test vectors. Refer to
section “Creating an IDDQ Test Set” on page 190 for information.
The fault collapsing rule for the pseudo stuck-at fault model is as follows: for faults associated
with a single cell, pseudo stuck-at faults are considered equivalent if the corresponding stuck-at
faults are equivalent.
set_transition_holdpi — Freezes all primary inputs values other than clocks and RAM
controls during multiple cycles of pattern generation.
sites (net pairs) extracted from the design. You can load the bridge sites from a bridge definition
file or from the Calibre query server output file. For more information, see “Net Pair
Identification with Calibre for Bridge Fault Test Patterns” on page 195.
This model uses a 4-Way Dominant fault model that works by driving one net (dominant) to a
logic value and ensuring that the other net (follower) can be driven to the opposite value.
Let sig_A and sig_B be two nets in the design. If sig_A and sig_B are bridged together, the
following faulty relationships exist:
Figure 2-12 demonstrates the at-speed testing process using the transition fault model. In this
example, the process could be testing for a slow-to-rise or slow-to-fall fault on any of the pins of
the AND gate.
4) Measure Primary
Output Value
2) Apply Transition
Propagation Vector
A transition fault requires two test vectors for detection: an initialization vector and a transition
propagation vector. The initialization vector propagates the initial transition value to the fault
site. The transition vector, which is identical to the stuck-at fault pattern, propagates the final
transition value to the fault site. To detect the fault, the tool applies proper at-speed timing
relative to the second vector, and measures the propagated effect at an external observation
point.
The tool uses the following fault collapsing rules for the transition fault model:
• Buffer - a fault on the input is equivalent to the same fault value at the output.
• Inverter - a fault on the input is equivalent to the opposite fault value at the output.
• Net between single output pin and single input pin - all faults of the same value are
equivalent.
set_fault_type — Specifies the fault model for which the tool develops or selects ATPG
patterns. The transition option for this command specifies the tool to develop or select ATPG
patterns for the transition fault model.
For more information on generating transition test sets, refer to “Creating a Transition Delay
Test Set” on page 201.
Path topology and edge type identify path delay faults. The path topology describes a user-
specified path from beginning, or launch point, through a combinational path to the end, or
capture point. The launch point is either a primary input or a state element. The capture point is
either a primary output or a state element. State elements used for launch or capture points are
either scan elements or non-scan elements that qualify for clock-sequential handling. A path
definition file defines the paths for which you want patterns generated.
The edge type defines the type of transition placed on the launch point that you want to detect at
the capture point. A “0” indicates a rising edge type, which is consistent with the slow-to-rise
transition fault and is similar to a temporary stuck-at-0 fault. A “1” indicates a falling edge type,
which is consistent with the slow-to-fall transition fault and is similar to a temporary stuck-at-1
fault.
The ATPG tool targets multiple path delay faults for each pattern it generates. Within the
(ASCII) test pattern set, patterns that detect path delay faults include comments after the pattern
statement identifying the path fault, type of detection, time and point of launch event, time and
point of capture event, and the observation point. Information about which paths were detected
by each pattern is also included.
For more information on generating path delay test sets, refer to “Creating a Path Delay Test
Set” on page 215.
You can use user-defined fault models (UDFMs) to define custom fault models. UDFMs extend
the natively-supported fault models (primarily stuck-at and transition) by adding combinational
or sequential constraints on other pins/nets. These custom models enable you to generate
specific test patterns for process-related defects like intra-cell bridges or any other kind of
defect that requires additional constraints. You can also use UDFMs to define required
conditions in an additional fault model to reduce the need for functional test patterns.
Restrictions
The following restrictions apply to UDFMs:
• Separation of static and delay fault models. Both fault types cannot be handled together
in one pattern generation step. The definitions must be handled in different pattern
generation runs; this, therefore, leads to multiple pattern sets.
Note
UDFM requires additional memory. The amount of additional memory needed depends
on the number of UDFM definitions and their complexity.
Prerequisites
• Text editor
Procedure
Note
In this procedure, entries added in the current step are shown in bold.
All of the additional statements you use to define all fault models will be contained
within the curly brackets of this statement.
2. Add the UDFM version number statement next.
UDFM {
version : 1;
}
3. Add the UdfmType keyword to the ASCII file under the version number statement to
create a fault model name.
UDFM {
version : 1; // Syntax version ensures future compatibility
UdfmType ("udfm_fault_model") {
}
}
4. Specify the type of object you want to attach the fault to using the Cell, Module, and
Instance keywords. For more information on these keywords, see “UDFM Keywords.”
UDFM {
version : 1;
UdfmType ("udfm_fault_model") {
Cell ("MUX21") {
}
}
}
5. Define a unique fault model name using the Fault keyword. You can define multiple
faults.
UDFM {
version : 1;
UdfmType ("udfm_fault_model") {
Cell ("MUX21") {
Fault ("myFlt-D0") {
}
}
}
}
6. Define how the defect can be tested using the Test, StaticFault or Delay Fault, and
Conditions keywords. Notice that the following example also shows how to use the
conditions statement for a single assignment or a list of assignments. See “UDFM
Keywords” for the complete list of keywords.
UDFM {
version : 1;
UdfmType ("udfm_fault_model") {
Cell ("MUX21") {
Fault ("myFlt-N1-Z") {
Test {
StaticFault {"Z" : 1;}
Conditions {"D0" : 0; "D1" : 0; "S" : 0;}
}
Test {
StaticFault {"Z" : 0;}
Conditions {"D0" : 0; "D1" : 1; "S" : 0;}
}
}
}
}
}
UDFM test pattern generation for static fault models is similar to test pattern generation for
stuck-at faults. As a result, most ATPG settings for stuck-at faults can be used for UDFM faults.
However, because UDFM fault definitions must be imported, the following commands will
work slightly differently than they do for stuck-at fault.
Prerequisites
• UDFM file that contains fault definitions.
Procedure
1. Set the fault type to UDFM using the set_fault_type command with the UDFM option:
set_fault_type udfm
Note
When you change the fault type, the current fault list and internal test pattern set are
deleted.
2. Load the fault definitions from a specified UDFM file into your current tool session
using the read_fault_sites command:
read_fault_sites <filename>.udfm
3. Create the internal fault list using all of the fault definitions from the UDFM file with the
add_faults command:
add_faults -All
Related Topics
set_fault_type
Multiple Detect
The basic idea of multiple detect (n-detect) is to randomly target each fault multiple times. By
changing the way the fault is targeted and the other values in the pattern set, the potential to
detect a bridge increases. This approach starts with a standard stuck-at or transition pattern set.
Each fault is graded for multiple detect. Additional ATPG is then performed and patterns
created targeting the faults that have lower than the multiple detect target threshold.
The following shows the statistics report that is automatically produced when multiple detection
or embedded multiple detect is enabled:
Statistics Report
Transition Faults
---------------------------------------------------------------
Fault Classes #faults
(total)
---------------------------- ---------------------------------
FU (full) 1114
-------------------------- ---------------------------------
DS (det_simulation) 1039 (93.27%)
UU (unused) 30 ( 2.69%)
TI (tied) 4 ( 0.36%)
RE (redundant) 3 ( 0.27%)
AU (atpg_untestable) 38 ( 3.41%)
---------------------------------------------------------------
Coverage
--------------------------
test_coverage 96.47%
fault_coverage 93.27%
atpg_effectiveness 100.00%
---------------------------------------------------------------
#test_patterns 130
#clock_sequential_patterns 130
#simulated_patterns 256
CPU_time (secs) 0.5
---------------------------------------------------------------
Multiple Detection Statistics
---------------------------------------------------------------
The report includes the BCE value and the number of faults with various detects less than the
target detection value.
When performing ATPG, the tool tries to detect as many previously undetected faults in parallel
within the same pattern as possible. However, even though ATPG maximizes the number of
previously undetected faults detected per pattern, only a small percentage of scan cells will have
specific values necessary for the detection. These specified bits need to be loaded in scan cells
for that pattern are referred to as the test cube. The remaining scan cells that are not filled with
test cube values are randomly filled for fortuitous detection of untargeted faults. EMD uses the
same ATPG starting point to produce a test cube but then determines if there are some faults
that previously had a low number of detections. For these faults, EMD will put additional scan
cell values added to the test cube to improve multiple detection on top of the new detection
pattern.
EMD will have a multiple detection that is better than normal ATPG but might not be as high a
BCE as n-detect with additional patterns could produce. In a design containing EDT circuitry,
the amount of detection will be dependent on the how aggressive the compression is. The more
aggressive (higher) compression, the lower the encoding capacity and the fewer test cube bits
can be specified per pattern. If a design is targeting 200x compression then the available test
cube bits might be mostly filled up for many of the patterns with values for the undetected fault
detection. As a result, the additional EMD multiple detection might not be significantly higher
than BCE for the standard pattern set.
Standard multiple detect will have a cost of additional patterns but will also have a higher
multiple detection than EMD. How much difference between EMD and multiple detect will be
dependent on the particular design’s pattern set and the level of compression used1.
• -Guaranteed_atpg_detection — Sets the multiple detect target for each fault. ATPG
will try to target each fault the specified number of times. ATPG does not guarantee that
the fault will be detected in a completely different path but randomly changes the way it
excites and propagates the fault. In addition, the random fill is different so values around
the target fault are likely to be randomly different than previous detections.
• -Desired_atpg_detections — Sets the EMD target. Users often set this target to 5 or a
value in that range.
• -Simulation_drop_limit — This is the accuracy of the BCE calculation. In general,
there is no reason to change this value from the default of 10. This means that the BCE
simulations stop once a fault is learned to be detected 10 times. A fault multiple detected
10 times will have a BCE and statistical chance of detecting a defect of 1 – 1/2e10 or
.99902. Which is only a 0.0009% inaccuracy which is slightly conservative but
insignificant.
Logic BIST
Logic BIST has a natural very high multiple detection. The faults that are detected with logic
BIST would often have multiple detection well above 10. This is in part due to the very large
number of patterns typically used for logic BIST. In addition, many of the hard to detect areas of
a circuit are made randomly testable and easier to produce high multiple detect coverage with
test logic inserted during logic BIST.
1. J. Geuzebroek, et al., “Embedded Multi-Detect ATPG and Its Effect on the Detection of Unmodeled
Defects”, Proceedings IEEE Int. Test Conference, 2007
Fault Detection
Figure 2-13 shows the basic fault detection process.
Apply Stimulus
Actual Good
Circuit Circuit
Compare
Response
N
Difference? Repeat for
Next Stimulus
Y
Fault
Detected
Faults detection works by comparing the response of a known-good version of the circuit to that
of the actual circuit, for a given stimulus set. A fault exists if there is any difference in the
responses. You then repeat the process for each stimulus set.
x1 s-a-0
x2
y1
y2
x3
Figure 2-14 has a stuck-at-0 on line y1 as the target fault. The x1, x2, and x3 signals are the
primary inputs, and y2 is the primary output. The path sensitization procedure for this example
follows:
1. Find an input value that sets the fault site to the opposite of the desired value. In this
case, the process needs to determine the input values necessary at x1 and/or x2 that set
y1 to a 1, since the target fault is s-a-0. Setting x1 (or x2) to a 0 properly sets y1 to a 1.
2. Select a path to propagate the response of the fault site to a primary output. In this case,
the fault response propagates to primary output y2.
3. Specify the input values (in addition to those specified in step 1) to enable detection at
the primary output. In this case, in order to detect the fault at y1, the x3 input must be set
to a 1.
Fault Classes
The tool categorizes faults into fault classes, based on how the faults were detected or why they
could not be detected. Each fault class has a unique name and two character class code. When
reporting faults, the tool uses either the class name or the class code to identify the fault class to
which the fault belongs.
Note
The tools may classify a fault in different categories, depending on the selected fault type.
Untestable (UT)
Untestable (UT) faults are faults for which no pattern can exist to either detect or possible-detect
them. Untestable faults cannot cause functional failures, so the tools exclude them when
calculating test coverage. Because the tools acquire some knowledge of faults prior to ATPG,
they classify certain unused, tied, or blocked faults before ATPG runs. When ATPG runs, it
immediately places these faults in the appropriate categories. However, redundant fault
detection requires further analysis.
• Unused (UU)
The unused fault class includes all faults on circuitry unconnected to any circuit
observation point and faults on floating primary outputs. For information about UU fault
sub-classes, refer to Table 2-3 on page 60. Figure 2-15 shows the site of an unused fault.
D Q
Master
CLK Latch QB
s-a-1/s-a-0
• Tied (TI)
The tied fault class includes faults on gates where the point of the fault is tied to a value
identical to the fault stuck value. The tied circuitry could be due to:
o Tied signals
o AND and OR gates with complementary inputs
o Exclusive-OR gates with common inputs
o Line holds due to primary input pins held at a constant logic value during test by
CT0 or CT1 pin constraints you applied with the add_input_constraints command
Note
The tools do not use line holds set by the “add_input_constraints -C0” (or C1) command
to determine tied circuitry. C0 and C1 pin constraints (as distinct from CT0 and CT1
constraints) result in ATPG_untestable (AU) faults, not tied faults. For more information,
refer to the add_input_constraints command.
A B C D
s-a-0
GND
Because tied values propagate, the tied circuitry at A causes tied faults at A, B, C, and D.
• Blocked (BL)
The blocked fault class includes faults on circuitry for which tied logic blocks all paths
to an observable point. The tied circuitry could be due to:
o Tied signals
o AND and OR gates with complementary inputs
o Exclusive-OR gates with common inputs
o Line holds due to primary input pins held at a constant logic value during test by
CT0 or CT1 pin constraints you applied with the add_input_constraints command.
Note
The tools do not use line holds set by the “add_input_constraints -C0” (or C1) command
to determine tied circuitry. C0 and C1 pin constraints (as distinct from CT0 and CT1
constraints) result in ATPG_untestable (AU) faults, not blocked faults. For more
information, refer to the add_input_constraints command.
This class also includes faults on selector lines of multiplexers that have identical data
lines. Figure 2-17 shows the site of a blocked fault.
s-a-0
GND
Note
Tied faults and blocked faults can be equivalent faults.
• Redundant (RE)
The redundant fault class includes faults the test generator considers undetectable. After
the test pattern generator exhausts all patterns, it performs a special analysis to verify
that the fault is undetectable under any conditions. Figure 2-18 shows the site of a
redundant fault.
F
GND
In this circuit, signal G always has the value of 1, no matter what the values of A, B, and
C. If D is stuck at 1, this fault is undetectable because the value of G can never change,
regardless of the value at D.
Testable (TE)
Testable (TE) faults are all those faults that cannot be proven untestable. The testable fault
classes include:
• Detected (DT)
The detected fault class includes all faults that the ATPG process identifies as detected.
The detected fault class contains two groups:
o det_simulation (DS) - faults detected when the tool performs fault simulation.
o det_implication (DI) - faults detected when the tool performs learning analysis.
The det_implication group normally includes faults in the scan path circuitry, as well
as faults that propagate ungated to the shift clock input of scan cells. The scan chain
functional test, which detects a binary difference at an observation point, guarantees
detection of these faults. the tool also classifies scan enable stuck-in-system-mode
faults on the multiplexer select line of mux-DFFs as DI.
The tool provides the update_implication_detections command, which lets you
specify additional types of faults for this category. Refer to the
update_implication_detections command description in the Tessent Shell Reference
Manual.
For path delay testing, the detected fault class includes two other groups:
o det_robust (DR) - robust detected faults.
o det_functional (DF) - functionally detected faults.
For detailed information on the path delay groups, refer to “Path Delay Fault Detection”
on page 216.
• Posdet (PD)
The posdet, or possible-detected fault class includes all faults that fault simulation
identifies as possible-detected but not hard detected. A possible-detected fault results
from a good-machine simulation observing 0 or 1 and the faulty machine observing X.
A hard-detected fault results from binary (not X) differences between the good and
faulty machine simulations. The posdet class contains two groups:
o posdet_testable (PT) - potentially detectable posdet faults. PT faults result when the
tool cannot prove the 0/X or 1/X difference is the only possible outcome. A higher
abort limit may reduce the number of these faults.
o posdet_untestable (PU) - proven ATPG_untestable during pattern generation and
hard undetectable posdet faults. Typically, faults may be classified as PU during
ATPG or when the “compress_patterns -reset_au” command is used.
By default, the calculations give 50% credit for posdet faults. You can adjust the credit
percentage with the set_possible_credit command.
• ATPG_untestable (AU)
The ATPG_untestable fault class includes all faults for which the test generator is
unable to find a pattern to create a test, and yet cannot prove the fault redundant.
Note
During multiple detect ATPG, the AU fault count changes only at the beginning of each
ATPG loop rather than during the loop. This is normal behavior when using NCPs
(named capture procedures) for ATPG. The tool updates AU faults after going through all
the NCPs at the end of the loop.
• Undetected (UD)
The undetected fault class includes undetected faults that cannot be proven untestable or
ATPG_untestable. The undetected class contains groups:
o uncontrolled (UC) - undetected faults, which during pattern simulation, never
achieve the value at the point of the fault required for fault detection—that is, they
are uncontrollable.
o unobserved (UO) - faults whose effects do not propagate to an observable point.
All testable faults prior to ATPG are put in the UC category. Faults that remain UC or
UO after ATPG are aborted, which means that a higher abort limit may reduce the
number of UC or UO faults.
Note
Uncontrolled and unobserved faults can be equivalent faults. If a fault is both
uncontrolled and unobserved, it is categorized as UC.
For any given level of the hierarchy, the tool assigns a fault to one—and only one—class. If the
tool can place a fault in more than one class of the same level, the tool places the fault in the
class that occurs first in the list of fault classes.
Fault Sub-classes
Some fault classes also have sub-classes. Fault sub-classes can be either predefined sub-classes
or user-defined sub-classes.
• DI, AU, UD, and UU fault classes — Contain a set of pre-defined sub-classes that
further classify the fault. The predefined fault sub-classes for DI, AU, UD, and UU
faults are listed in Table 2-3.
• DI and AU fault classes — Can contain user-defined sub-classes. The user-defined sub-
class is a sub-class you create by grouping a set of faults into one sub-class and
assigning a name to the group. For more information on these fault classes, see
“Testable (TE)”.
Fault Reporting
When reporting faults with the report_faults command, the tool identifies each fault by three
ordered fields:
• fault value (0 for stuck-at-0 or “slow-to-rise” transition faults; 1 for stuck-at-1 or “slow-
to-fall” transition faults)
• two-character fault class code
• pin pathname of the fault site
If the tools report uncollapsed faults, they display faults of a collapsed fault group together, with
the representative fault first followed by the other members (with EQ fault codes).
Testability Calculations
Given the fault classes explained in the previous sections, the tool makes the following
calculations:
• Test Coverage
Test coverage, which is a measure of test quality, is the percentage of faults detected
from among all testable faults. Typically, this is the number of most concern when you
consider the testability of your design.
The tool calculates test coverage using the formula:
#DT + (#PD * posdet_credit)
——————————————————————————— x 100
#testable
In this formula, posdet_credit is the user-selectable detection credit (the default is 50%)
given to possible detected faults with the set_possible_credit command.
• Fault Coverage
Fault coverage consists of the percentage of faults detected from among all faults that
the test pattern set tests—treating untestable faults the same as undetected faults.
The tool calculates fault coverage using the formula:
#DT + (#PD * posdet_credit)
——————————————————————————— x 100
#full
• ATPG Effectiveness
ATPG effectiveness measures the ATPG tool’s ability to either create a test for a fault,
or prove that a test cannot be created for the fault under the restrictions placed on the
tool.
The tool calculates ATPG effectiveness using the formula:
#DT + #UT + #AU + #PU +(#PT *posdet_credit)
——————————————————————————————————————————— x 100
#full
Now that you understand the basic ideas behind DFT, scan design, and ATPG, you can
concentrate on the Mentor Graphics DFT tools and how they operate. Tessent Scan and the
ATPG tools not only work toward a common goal (to improve test coverage), they also share
common terminology, internal processes, and other tool concepts, such as how to view the
design and the scan circuitry. Figure 3-1 shows the range of subjects common to these tools.
The following subsections discuss common terminology and concepts associated with scan
insertion and ATPG using Tessent Scan and ATPG tools.
Scan Terminology
This section introduces the scan terminology common to Tessent Scan and the ATPG tools.
Scan Cells
A scan cell is the fundamental, independently-accessible unit of scan circuitry, serving both as a
control and observation point for ATPG and fault simulation. You can think of a scan cell as a
black box composed of an input, an output, and a procedure specifying how data gets from the
input to the output. The circuitry inside the black box is not important as long as the specified
procedure shifts data from input to output properly.
Because scan cell operation depends on an external procedure, scan cells are tightly linked to
the notion of test procedure files. “Test Procedure Files” on page 71 discusses test procedure
files in detail. Figure 3-2 illustrates the black box concept of a scan cell and its reliance on a test
procedure.
Figure 3-3 gives one example of a scan cell implementation (for the mux-DFF scan type).
MUX
data
mux-DFF
data D1 Q sc_out
sc_in D2
sc_en EN
clk CK Q'
Each memory element may have a set and/or reset line in addition to clock-data ports. The
ATPG process controls the scan cell by placing either normal or inverted data into its memory
elements. The scan cell observation point is the memory element at the output of the scan cell.
Other memory elements can also be observable, but may require a procedure for propagating
their values to the scan cell’s output. The following subsections describe the different memory
elements a scan cell may contain.
Master Element
The master element, the primary memory element of a scan cell, captures data directly from the
output of the previous scan cell. Each scan cell must contain one and only one master element.
For example, Figure 3-3 shows a mux-DFF scan cell, which contains only a master element.
However, scan cells can contain memory elements in addition to the master. Figures 3-4
through 3-7 illustrate examples of master elements in a variety of other scan cells.
The shift procedure in the test procedure file controls the master element. If the scan cell
contains no additional independently-clocked memory elements in the scan path, this procedure
also observes the master. If the scan cell contains additional memory elements, you may need to
define a separate observation procedure (called master_observe) for propagating the master
element’s value to the output of the scan cell.
Slave Element
The slave element, an independently-clocked scan cell memory element, resides in the scan
chain path. It cannot capture data directly from the previous scan cell. When used, it stores the
output of the scan cell. The shift procedure both controls and observes the slave element. The
value of the slave may be inverted relative to the master element. Figure 3-4 shows a slave
element within a scan cell.
Bclk
Aclk Q
sc_in
sys_clk Latch Slave
data Element
Master Latch sc_out
Element
In the example of Figure 3-4, Aclk controls scan data input. Activating Aclk, with sys_clk
(which controls system data) held off, shifts scan data into the scan cell. Activating Bclk
propagates scan data to the output.
Shadow Element
The shadow element, either dependently- or independently-clocked, resides outside the scan
chain path. It can be inside or outside of a scan cell. Figure 3-5 gives an example of a scan cell
with a dependently-clocked, non-observable shadow element with a non-inverted value.
Shadow
Master FF Element
Element
clk
data FF sc_out
MUX
sc_in S
sc_en
Figure 3-6 shows a similar example where the shadow element is independently-clocked.
sys_clk Shadow
Master FF Element
Element
clk
data FF sc_out
MUX
sc_in S
sc_en
You load a data value into the dependently-clocked shadow element with the shift procedure. If
the shadow element is independently clocked, you use a separate procedure called
shadow_control to load it. You can optionally make a shadow observable using the
shadow_observe procedure. A scan cell may contain multiple shadows but only one may be
observable, because the tools allow only one shadow_observe procedure. A shadow element’s
value may be the inverse of the master’s value.
The definition of a shadow element is based on the shadow having the same (or inverse) value
as the master element it shadows. A variety of interconnections of the master and shadow will
accomplish this. In Figure 3-5, the shadow’s data input is connected to the master’s data input,
and both FFs are triggered by the same clock edge. The definition would also be met if the
shadow’s data input was connected to the master’s output and the shadow was triggered on the
trailing edge, the master on the leading edge, of the same clock.
Copy Element
The copy element is a memory element that lies in the scan chain path and can contain the same
(or inverted) data as the associated master or slave element in the scan cell. Figure 3-7 gives an
example of a copy element within a scan cell in which a master element provides data to the
copy.
clk
FF sc_out
Master
Element
data FF
MUX Copy
sc_in S Element
sc_en
The clock pulse that captures data into the copy’s associated scan cell element also captures data
into the copy. Data transfers from the associated scan cell element to the copy element in the
second half of the same clock cycle.
During the shift procedure, a copy contains the same data as that in its associated memory
element. However, during system data capture, some types of scan cells allow copy elements to
capture different data. When the copy’s value differs from its associated element, the copy
becomes the observation point of the scan cell. When the copy holds the same data as its
associated element, the associated element becomes the observation point.
Extra Element
The extra element is an additional, independently-clocked memory element of a scan cell. An
extra element is any element that lies in the scan chain path between the master and slave
elements. The shift procedure controls data capture into the extra elements. These elements are
not observable. Scan cells can contain multiple extras. Extras can contain inverted data with
respect to the master element.
Scan Chains
A scan chain is a set of serially linked scan cells. Each scan chain contains an external input pin
and an external output pin that provide access to the scan cells. Figure 3-8 shows a scan chain,
with scan input “sc_in” and scan output “sc_out”.
sc_in 0
N-1 N-2 N-3
clk sc_out
sc_en
data
The scan chain length (N) is the number of scan cells within the scan chain. By convention, the
scan cell closest to the external output pin is number 0, its predecessor is number 1, and so on.
Because the numbering starts at 0, the number for the scan cell connected to the external input
pin is equal to the scan chain length minus one (N-1).
Scan Groups
A scan chain group is a set of scan chains that operate in parallel and share a common test
procedure file. The test procedure file defines how to access the scan cells in all of the scan
chains of the group. Normally, all of a circuit’s scan chains operate in parallel and are thus in a
single scan chain group.
sci1 0
N-1 N-2 N-3
clk sco1
sc_en
sci2 0
N-1 N-2 N-3
sco2
You may have two clocks, A and B, each of which clocks different scan chains. You often can
clock, and therefore operate, the A and B chains concurrently, as shown in Figure 3-9.
However, if two chains share a single scan input pin, these chains cannot be operated in parallel.
Regardless of operation, all defined scan chains in a circuit must be associated with a scan
group. A scan group is a concept used by Mentor Graphics DFT and ATPG tools.
Scan groups are a way to group scan chains based on operation. All scan chains in a group must
be able to operate in parallel, which is normal for scan chains in a circuit. However when scan
chains cannot operate in parallel, such as in the example above (sharing a common scan input
pin), the operation of each must be specified separately. This means the scan chains belong to
different scan groups.
Scan Clocks
Scan clocks are external pins capable of capturing values into scan cell elements. Scan clocks
include set and reset lines, as well as traditional clocks. Any pin defined as a clock can act as a
capture clock during ATPG. Figure 3-10 shows a scan cell whose scan clock signals are shown
in bold.
D1 CLR
D2 Q1
Q2
CK1 Q1'
CK2 Q2'
In addition to capturing data into scan cells, scan clocks, in their off state, ensure that the cells
hold their data. Design rule checks ensure that clocks perform both functions. A clock’s off-
state is the primary input value that results in a scan element’s clock input being at its inactive
state (for latches) or state prior to a capturing transition (for edge-triggered devices). In the case
of Figure 3-10, the off-state for the CLR signal is 1, and the off-states for CK1 and CK2 are
both 0.
Scan Architectures
You can choose from a number of different scan types, or scan architectures. Tessent Scan
supports the insertion of mux-DFF (mux-scan), clocked-scan, and LSSD architectures.
Additionally, Tessent Scan supports all standard scan types, or combinations thereof, in designs
containing pre-existing scan circuitry. You can use the set_scan_type command (see page 119)
to specify the type of scan architecture you want inserted in your design.
Each scan style provides different benefits. Mux-DFF or clocked-scan are generally the best
choice for designs with edge-triggered flip-flops. Additionally, clocked-scan ensures data hold
for non-scan cells during scan loading. LSSD is most effective on latch-based designs.
The following subsections detail the mux-DFF, clocked-scan, and LSSD architectures.
Mux-DFF
A mux-DFF cell contains a single D flip-flop with a multiplexed input line that allows selection
of either normal system data or scan data. Figure 3-11 shows the replacement of an original
design flip-flop with mux-DFF circuitry.
Original Replaced by
Flip-flop mux-DFF Scan Cell
data
D MUX
Q D Q sc_out
sc_in S
(Q)
CLK sc_en DFF
clk CLK
In normal operation (sc_en = 0), system data passes through the multiplexer to the D input of
the flip-flop, and then to the output Q. In scan mode (sc_en = 1), scan input data (sc_in) passes
to the flip-flop, and then to the scan output (sc_out).
Clocked-Scan
The clocked-scan architecture is very similar to the mux-DFF architecture, but uses a dedicated
test clock to shift in scan data instead of a multiplexer. Figure 3-12 shows an original design
flip-flop replaced with clocked-scan circuitry.
Original Replaced by
Flip-flop Clocked-Scan Cell
data D
D sc_in
Q Q sc_out
sc_clk (Q)
CLK
sys_clk CLK
In normal operation, the system clock (sys_clk) clocks system data (data) into the circuit and
through to the output (Q). In scan mode, the scan clock (sc_clk) clocks scan input data (sc_in)
into the circuit and through to the output (sc_out).
LSSD
LSSD, or Level-Sensitive Scan Design, uses three independent clocks to capture data into the
two polarity hold latches contained within the cell. Figure 3-13 shows the replacement of an
original design latch with LSSD circuitry.
Original Replaced by
Latch LSSD Scan Cell
data D Q Q
D Q sys_clk clk
sc_in Master
Latch Latch D Q sc_out
Aclk
Slave
clk Latch
Bclk
In normal mode, the master latch captures system data (data) using the system clock (sys_clk)
and sends it to the normal system output (Q). In test mode, the two clocks (Aclk and Bclk)
trigger the shifting of test data through both master and slave latches to the scan output (sc_out).
There are several varieties of the LSSD architecture, including single latch, double latch, and
clocked LSSD.
If your design contains scan circuitry, the ATPG tool requires a test procedure file. You must
create one before running ATPG.
For more information about the test procedure file format, see “Test Procedure File” in the
Tessent Shell User’s Manual, which describes the syntax and rules of test procedure files, give
examples for the various types of scan architectures, and outline the checking that determines
whether the circuitry is operating correctly.
Model Flattening
To work properly, the ATPG tool and Tessent Scan must use their own internal representations
of the design. The tools create these internal design models by flattening the model and
replacing the design cells in the netlist (described in the library) with their own primitives. The
tools flatten the model when you initially attempt to exit setup mode, just prior to design rules
checking. The ATPG tool also provide the create_flat_model command, which allows flattening
of the design model while still in setup mode.
If a flattened model already exists when you exit setup mode, the tools will only reflatten the
model if you have since issued commands that would affect the internal representation of the
design. For example, adding or deleting primary inputs, tying signals, and changing the internal
faulting strategy are changes that affect the design model. With these types of changes, the tool
must re-create or re-flatten the design model. If the model is undisturbed, the tool keeps the
original flattened model and does not attempt to reflatten.
For a list of the specific Tessent Scan commands that cause flattening, refer to the
set_system_mode description in the Tessent Shell Reference Manual.
/Top
A
AOI1 AND1
B A Z
C Y B
D AOI
E
Figure 3-15 shows this same design once it has been flattened.
Pin Pathname
/Top/AOI1/B
/Top/AOI1
B
/Top/AND1
C /Top/AOI1 A
Z
Y B
/Top/AOI1
D
E
After flattening, only naming preserves the design hierarchy; that is, the flattened netlist
maintains the hierarchy through instance naming. Figures 3-14 and 3-15 show this hierarchy
preservation. /Top is the name of the hierarchy’s top level. The simulation primitives (two AND
gates and a NOR gate) represent the flattened instance AOI1 within /Top. Each of these
flattened gates retains the original design hierarchy in its naming—in this case, /Top/AOI1.
The tools identify pins from the original instances by hierarchical pathnames as well. For
example, /Top/AOI1/B in the flattened design specifies input pin B of instance AOI1. This
naming distinguishes it from input pin B of instance AND1, which has the pathname
/Top/AND1/B. By default, pins introduced by the flattening process remain unnamed and are not
valid fault sites. If you request gate reporting on one of the flattened gates, the NOR gate for
example, you will see a system-defined pin name shown in quotes. If you want internal faulting
in your library cells, you must specify internal pin names within the library model. The
flattening process then retains these pin names.
You should be aware that in some cases, the design flattening process can appear to introduce
new gates into the design. For example, flattening decomposes a DFF gate into a DFF
simulation primitive, the Q and Q’ outputs require buffer and inverter gates, respectively. If
your design wires together multiple drivers, flattening would add wire gates or bus gates.
Bidirectional pins are another special case that requires additional gates in the flattened
representation.
• PI, PO - primary inputs are gates with no inputs and a single output, while primary
outputs are gates with a single input and no fanout.
• BUF - a single-input gate that passes the values 0, 1, or X through to the output.
• FB_BUF - a single-input gate, similar to the BUF gate, that provides a one iteration
delay in the data evaluation phase of a simulation. The tools use the FB_BUF gate to
break some combinational loops and provide more optimistic behavior than when TIEX
gates are used.
Note
There can be one or more loops in a feedback path. In analysis mode, you can display the
loops with the report_loops command. In setup mode, use report_feedback_paths.
The default loop handling is simulation-based, with the tools using the FB_BUF to
break the combinational loops. In setup mode, you can change the default with the
set_loop_handling command. Be aware that changes to loop handling will have an
impact during the flattening process.
• ZVAL - a single-input gate that acts as a buffer unless Z is the input value. When a Z is
the input value, the output is an X. You can modify this behavior with the
set_z_handling command.
• INV - a single-input gate whose output value is the opposite of the input value. The INV
gate cannot accept a Z input value.
• AND, NAND - multiple-input gates (two to four) that act as standard AND and NAND
gates.
• OR, NOR - multiple-input (two to four) gates that act as standard OR and NOR gates.
• XOR, XNOR - 2-input gates that act as XOR and XNOR gates, except that when either
input is an X, the output is an X.
• MUX - a 2x1 mux gate whose pins are order dependent, as shown in Figure 3-16.
sel
d1 MUX out
d2
The sel input is the first defined pin, followed by the first data input and then the second
data input. When sel=0, the output is d1. When sel=1, the output is d2.
• LA, DFF - state elements, whose order dependent inputs include set, reset, and
clock/data pairs, as shown in Figure 3-17.
set
reset
C1 out
D1
C2
D2
Set and reset lines are always level sensitive, active high signals. DFF clock ports are
edge-triggered while LA clock ports are level sensitive. When set=1, out=1. When
reset=1, out=0. When a clock is active (for example C1=1), the output reflects its
associated data line value (D1). If multiple clocks are active and the data they are trying
to place on the output differs, the output becomes an X.
• TLA, STLA, STFF - special types of learned gates that act as, and pass the design rule
checks for, transparent latch, sequential transparent latch, or sequential transparent flip-
flop. These gates propagate values without holding state.
• TIE0, TIE1, TIEX, TIEZ - zero-input, single-output gates that represent the effect of a
signal tied to ground or power, or a pin or state element constrained to a specific value
(0,1,X, or Z). The rules checker may also determine that state elements exhibit tied
behavior and replace them with the appropriate tie gates.
• TSD, TSH - a 2-input gate that acts as a tri-state™ driver, as shown in Figure 3-18.
en
TSD out
d
When en=1, out=d. When en=0, out=Z. The data line, d, cannot be a Z. The ATPG tool
uses the TSD gate for the same purpose.
• SW, NMOS - a 2-input gate that acts like a tri-state driver but can also propagate a Z
from input to output. The ATPG tool uses the SW gate uses the NMOS gate for the same
purpose.
• BUS - a multiple-input (up to four) gate whose drivers must include at least one TSD or
SW gate. If you bus more than four tri-state drivers together, the tool creates cascaded
BUS gates. The last bus gate in the cascade is considered the dominant bus gate.
• WIRE - a multiple-input gate that differs from a bus in that none of its drivers are tri-
statable.
• PBUS, SWBUS - a 2-input pull bus gate, for use when you combine strong bus and
weak bus signals together, as shown in Figure 3-19.
(strong)
BUS
(weak) PBUS ZVAL
TIE0
The strong value always goes to the output, unless the value is a Z, in which case the
weak value propagates to the output. These gates model pull-up and pull-down resistors.
The ATPG tool uses the PBUS gate.
• ZHOLD - a single-input buskeeper gate (see page 83 for more information on
buskeepers) associated with a tri-state network that exhibits sequential behavior. If the
input is a binary value, the gate acts as a buffer. If the input value is a Z, the output
depends on the gate’s hold capability. There are three ZHOLD gate types, each with a
different hold capability:
o ZHOLD0 - When the input is a Z, the output is a 0 if its previous state was 0. If its
previous state was a 1, the output is a Z.
o ZHOLD1 - When the input is a Z, the output is a 1 if its previous state was a 1. If its
previous state was a 0, the output is a Z.
o ZHOLD0,1 - When the input is a Z, the output is a 0 if its previous state was a 0, or
the output is a 1 if its previous state was a 1.
In all three cases, if the previous value is unknown, the output is X.
• RAM, ROM- multiple-input gates that model the effects of RAM and ROM in the
circuit. RAM and ROM differ from other gates in that they have multiple outputs.
• OUT - gates that convert the outputs of multiple output gates (such as RAM and ROM
simulation gates) to a single output.
Learning Analysis
After design flattening, the ATPG tool performs extensive analysis on the design to learn
behavior that may be useful for intelligent decision making in later processes, such as fault
simulation and ATPG. You have the ability to turn learning analysis off, which may be
desirable if you do not want to perform ATPG during the session. For more information on
turning learning analysis off, refer to the set_static_learning description in the Tessent Shell
Reference Manual.
The ATPG tools perform static learning only once—after flattening. Because pin and ATPG
constraints can change the behavior of the design, static learning does not consider these
constraints. Static learning involves gate-by-gate local simulation to determine information
about the design. The following subsections describe the types of analysis performed during
static learning.
Equivalence Relationships
During this analysis, simulation traces back from the inputs of a multiple-input gate through a
limited number of gates to identify points in the circuit that always have the same values in the
good machine. Figure 3-20 shows an example of two of these equivalence points within some
circuitry.
Equivalence
Points
Logic Behavior
During logic behavior analysis, simulation determines a circuit’s functional behavior. For
example, Figure 3-21 shows some circuitry that, according to the analysis, acts as an inverter.
If the analysis process yields no information for a particular category, it does not issue the
corresponding message.
Implied Relationships
This type of analysis consists of contrapositive relation learning, or learning implications, to
determine that one value implies another. This learning analysis simulates nearly every gate in
the design, attempting to learn every relationship possible. Figure 3-22 shows the implied
learning the analysis derives from a piece of circuitry.
Forbidden Relationships
During forbidden relationship analysis, which is restricted to bus gates, simulation determines
that one gate cannot be at a certain value if another gate is at a certain value. Figure 3-23 shows
an example of such behavior.
0
1 TSD
TSD Tie 1
Tie 1 1 Z
1 0
BUS BUS
0 Z 1 0
TSD TSD
Tie 0 Tie 0
A 1 at each output would be forbidden
Dominance Relationships
During dominance relationship analysis, simulation determines which gates are dominators. If
all the fanouts of a gate go to a second gate, the second gate is the dominator of the first.
Figure 3-24 shows an example of this relationship.
Gate B is
B Dominator
A of Gate A
1
TSD 0
0
1 BUS
1
1 TSD
Many designs contain buses, but good design practices usually prevent bus contention. As a
check, the learning analysis for buses determines if a contention condition can occur within the
given circuitry. Once learning determines that contention cannot occur, none of the later
processes, such as ATPG, ever check for the condition.
Buses in a Z-state network can be classified as dominant or non-dominant and strong or weak.
Weak buses and pull buses are allowed to have contention. Thus the process only analyzes
strong, dominant buses, examining all drivers of these gates and performing full ATPG analysis
of all combinations of two drivers being forced to opposite values. Figure 3-26 demonstrates
this process on a simple bus system.
E1
D1 TSD
BUS
E2
TSD
D2
Analysis tries:
E1=1, E2=1, D1=0, D2=1
E1=1, E2=1, D1=1, D2=0
If ATPG analysis determines that either of the two conditions shown can be met, the bus fails
bus mutual-exclusivity checking. Likewise, if the analysis proves the condition is never
possible, the bus passes these checks. A third possibility is that the analysis aborts before it
completes trying all of the possibilities. In this circuit, there are only two drivers, so ATPG
analysis need try only two combinations. However, as the number of drivers increases, the
ATPG analysis effort grows significantly.
You should resolve bus mutual-exclusivity before ATPG. Extra rules E4, E7, E9, E10, E11,
E12, and E13 perform bus analysis and contention checking. Refer to “Extra Rules” in the
Tessent Shell Reference Manual for more information on these bus checking rules.
Trace rules violations are either errors or warnings, and for most rules you cannot change the
handling. The “Scan Chain Trace Rules” section in the Tessent Shell Reference Manual
describes the trace rules in detail.
If the circuitry allows, you can also make a shadow an observation point by writing a
shadow_observe test procedure. The section entitled “Shadow Element” on page 65 discusses
shadows in more detail.
The DRC process identifies shadow latches under the following conditions:
Between the PI force and PO measure, the tool constrains all pins and sets all clocks off. Thus,
for a latch to qualify as transparent, the analysis must determine that it can be turned on when
clocks are off and pins are constrained. TLA simulation gates, which rank as combinational,
represent transparent latches.
Tri-State
Device
BUS ZHOLD
Tri-State
Device
Rules checking determines the values of ZHOLD gates when clocks are off, pin constraints are
set, and the gates are connected to clock, write, and read lines. ZHOLD gates connected to
clock, write, and read lines do not retain values unless the clock off-states and constrained pins
result in binary values.
During rules checking, if a design contains ZHOLD gates, messages indicate when ZHOLD
checking begins, the number and type of ZHOLD gates, the number of ZHOLD gates connected
to clock, write, and read lines, and the number of ZHOLD gates set to a binary value during the
clock off-state condition.
Note
Only the ATPG tool requires this type of analysis, because of the way it “flattens” or
simulates a number of events in a single operation.
For information on the bus_keeper model attribute, refer to “Attributes” in the Tessent Cell
Library Manual.
change their handling, except for the S3 rule. For more information, refer to “Scanability Rules
(S Rules)” in the Tessent Shell Reference Manual.
Figure 3-28 gives an example of a tie value gate that constrains some surrounding circuitry.
0
PI 0
(TIE0)
Resulting Constrained
Constrained Value Value
Figure 3-29 gives an example of a tied gate, and the resulting forbidden values of the
surrounding circuitry.
1
0,1
TIEX
Resulting Forbidden
Forbidden Values
Value
Figure 3-30 gives an example of a tied gate that blocks fault effects in the surrounding circuitry.
Output Always X
Tied Value
Testability naturally varies from design to design. Some features and design styles make a
design difficult, if not impossible, to test, while others enhance a design's testability.
Figure 4-1shows the testability issues this section discusses.
Understand
Tool Concepts
1. Synchronous Circuitry
2. Asynchronous Circuitry
Understand
Testability Issues 3. Scannability Checking
4. Support for Special Testability Cases
Insert/Verify
BS Circuitry
The following subsections discuss these design features and describe their effect on the design's
testability.
Synchronous Circuitry
Using synchronous design practices, you can help ensure that your design will be both testable
and manufacturable. In the past, designers used asynchronous design techniques with TTL and
small PAL-based circuits. Today, however, designers can no longer use those techniques
because the organization of most gate arrays and FPGAs necessitates the use of synchronous
logic in their design.
A synchronous circuit operates properly and predictably in all modes of operation, from static
DC up to the maximum clock rate. Inputs to the circuit do not cause the circuit to assume
unknown states. And regardless of the relationship between the clock and input signals, the
circuit avoids improper operation.
Truly synchronous designs are inherently testable designs. You can implement many scan
strategies, and run the ATPG process with greater success, if you use synchronous design
techniques. Moreover, you can create most designs following these practices with no loss of
speed or functionality.
Asynchronous Circuitry
A small percentage of designs need some asynchronous circuitry due to the nature of the
system. Because asynchronous circuitry is often very difficult to test, you should place the
asynchronous portions of your design in one block and isolate it from the rest of the circuitry. In
this way, you can still utilize DFT techniques on the synchronous portions of your design.
Scannability Checking
Tessent Scan performs the scannability checking process on a design’s sequential elements. For
the tool to insert scan circuitry into a design, it must replace existing sequential elements with
their scannable equivalents. Before beginning substitution, the original sequential elements in
the design must pass scannability checks; that is, the tool determines if it can convert sequential
elements to scan elements without additional circuit modifications. Scannable sequential
elements pass the following checks:
1. When all clocks are off, all clock inputs (including set and reset inputs) of the sequential
element must be in their inactive state (initial state of a capturing transition). This
prevents disturbance of the scan chain data before application of the test pattern at the
primary input. If the sequential element does not pass this check, its scan values could
become unstable when the test tool applies primary input values. This checking is a
modification of rule C1. For more information on this rule, refer to “C1” in the Tessent
Shell Reference Manual.
2. Each clock input (not including set and reset inputs) of the sequential element must be
capable of capturing data when a single clock primary input goes active while all other
clocks are inactive. This rule ensures that this particular storage element can capture
system data. If the sequential element does not meet this rule, some loss of test coverage
could result. This checking is a modification of rule C7. For more information on this
rule, refer to “C7” in the Tessent Shell Reference Manual.
When a sequential element passes these checks, it becomes a scan candidate, meaning that
Tessent Scan can insert its scan equivalent into the scan chain. However, even if the element
fails to pass one of these checks, it may still be possible to convert the element to scan. In many
cases, you can add additional logic, called test logic, to the design to remedy the situation. For
more information on test logic, refer to “Enabling Test Logic Insertion” on page 120.
Note
If TIE0 and TIE1 nonscan cells are scannable, they are considered for scan. However, if
these cells are used to hold off sets and resets of other cells so that another cell can be
scannable, you must use the add_nonscan_instances command to make them nonscan.
Feedback Loops
Designs containing loop circuitry have inherent testability problems. A structural loop exists
when a design contains a portion of circuitry whose output, in some manner, feeds back to one
of its inputs. A structural combinational loop occurs when the feedback loop, the path from the
output back to the input, passes through only combinational logic. A structural sequential loop
occurs when the feedback path passes through one or more sequential elements.
The ATPG tool and Tessent Scan all provide some common loop analysis and handling.
However, loop treatment can vary depending on the tool. The following subsections discuss the
treatment of structural combinational and structural sequential loops.
ABC P
0 0 0 0
0 0 1 1
A 0 1 0 0
0 1 1 0
B 1 0 0 0
C P 1 0 1 X
1 1 0 0
1 1 1 0
The flattening process, which each tool runs as it attempts to exit setup mode, identifies and
cuts, or breaks, all structural combinational loops. The tools classify and cut each loop using the
appropriate methods for each category.
The following list presents the loop classifications, as well as the loop-cutting methods
established for each. The order of the categories presented indicates the least to most pessimistic
loop cutting solutions.
1. Constant value
This loop cutting method involves those loops blocked by tied logic or pin constraints.
After the initial loop identification, the tools simulate TIE0/TIE1 gates and constrained
inputs. Loops containing constant value gates as a result of this simulation, fall into this
category.
Figure 4-3 shows a loop with a constrained primary input value that blocks the loop’s
feedback effects.
Combinational
Logic
C0 PI 0
0
These types of loops lend themselves to the simplest and least pessimistic breaking
procedures. For this class of loops, the tool inserts a TIE-X gate at a non-constrained
input (which lies in the feedback path) of the constant value gate, as Figure 4-4 shows.
Combinational
Logic
TIEX
C0 PI 0
0
This loop cutting technique yields good circuit simulation that always matches the actual
circuit behavior, and thus, the tools employ this technique whenever possible. The tools
can use this loop cutting method for blocked loops containing AND, OR, NAND, and
NOR gates, as well as MUX gates with constrained select lines and tri-state drivers with
constrained enable lines.
2. Single gate with “multiple fanout”
This loop cutting method involves loops containing only a single gate with multiple
fanout.
Figure 4-2 on page 90 shows the circuitry and truth table for a single multiple-fanout
loop. For this class of loops, the tool cuts the loop by inserting a TIE-X gate at one of the
fanouts of this “multiple fanout gate” that lie in the loop path, as Figure 4-5 shows.
ABC P
TIEX
0 0 0 0
0 0 1 1
0 1 0 0
A 0 1 1 0
1 0 0 0
B 1 0 1 X
C P 1 1 0 0
1 1 1 0
P
Q
A
R AB PQR
B
0 0 0 0 1
0 1 XX X
1 0 0 1 0
1 1 0 1 0
Figure 4-7 shows how TIE-X insertion would add some pessimism to the simulation at
output P.
X
P
1
Q
A 1 1 0
R AB PQR
B 1 X 0 0 0 0 1
X 0 1 XX X
0 1 0 0 1 0
TIEX
X 1 1 X 1 0
Ambiguity added
by TIE-X Insertion
The loop breaking technique proves beneficial in many cases. Figure 4-8 provides a
more accurate simulation model than the direct TIE-X insertion approach.
A 1 1 0
R AB PQR
B 1 X 0 0 0 0 1
0 1 XX X
X 1 0 0 1 0
1 1 0 1 0
TIEX 1 1
Q
1 Ambiguity
0 0 removed by
P duplication
0
technique
However, it also has some drawbacks. While less pessimistic than the other approaches
(except breaking constant value loops), the gate duplication process can still introduce
some pessimism into the simulation model.
Additionally, this technique can prove costly in terms of gate count as the loop size
increases. Also, the tools cannot use this method on complex or coupled loops—those
loops that connect with other loops (because gate duplication may create loops as well).
4. Coupling loops
The tools use this technique to break loops when two or more loops share a common
gate. This method involves inserting a TIE-X gate at the input of one of the components
within a loop. The process selects the cut point carefully to ensure the TIE-X gate cuts as
many of the coupled loops as possible.
For example, assume the SR latch shown in Figure 4-6 was part of a larger, more
complex, loop coupling network. In this case, loop circuitry duplication would turn into
an iterative process that would never converge. So, the tools would have to cut the loop
as shown in Figure 4-9.
A Modified
P
Truth Table
AB PQ
0 0 1 1
B Q 0 1 1 X
1 0 0 1
1 1 X X
TIEX
The modified truth table shown in Figure 4-9 demonstrates that this method yields the
most pessimistic simulation results of all the loop-cutting methods. Because this is the
most pessimistic solution to the loop cutting problem, the tools only use this technique
when they cannot use any of the previous methods.
A learning process identifies feedback networks after flattening, and an iterative simulation is
used in the feedback network. For an iterative simulation, the ATPG tool inserts FB_BUF gates
to break the combinational loops.
The ATPG tool also has the ability to insert TIE-X gates to break the combinational loops. The
gate duplication option reduces the impact that a TIE-X gate places on the circuit to break
combinational loops. By default, this duplication switch is off.
Note
The set_loop_handling command replaces functionality previously available by the Set
Loop Duplication command.
You can report on loops using the report_loops or the report_feedback_paths commands. While
both involved with loop reporting, these commands behave somewhat differently. Refer to the
Tessent Shell Reference Manual for details. You can write all identified structural
combinational loops to a file using the write_loops command.
You can use the loop information Tessent Scan provides to handle each loop in the most
desirable way. For example, assuming you wanted to improve the test coverage for a coupling
loop, you could use the add_control_points/add_observe_points commands within Tessent Scan
to insert a test point to control or observe values at a certain location within the loop.
RST
D Q
Flip-flop
Note
The tools model RAM and ROM gates as combinational gates, and thus, they consider
loops involving only combinational gates and RAMs (or ROMs) as combinational loops–
not sequential loops.
The following sections provide tool-specific issues regarding sequential loop handling.
Within the ATPG tool, sequential loops typically trigger C3 and C4 design rules violations.
When one sequential element (a source gate) feeds a value to another sequential element (a sink
gate), the tool simulates old data at the sink. You can change this simulation method using the
set_capture_handling command. For more information on the C3 and C4 rules, refer to “Clock
Rules” in the Tessent Shell Reference Manual. For more information about the
set_capture_handling command, refer to its description in the Tessent Shell Reference Manual.
Redundant Logic
In most cases, you should avoid using redundant logic because a circuit with redundant logic
poses testability problems. First, classifying redundant faults takes a great deal of analysis
effort. Additionally, redundant faults, by their nature, are untestable and therefore lower your
fault coverage. Figure 2-18 on page 56 gives an example of redundant circuitry.
Some circuitry requires redundant logic; for example, circuitry to eliminate race conditions or
circuitry which builds high reliability into the design. In these cases, you should add test points
to remove redundancy during the testing process.
Figure 4-11 shows a situation with an asynchronous reset line and the test logic added to control
the asynchronous reset line.
B B
D Q D Q
Clk Clk
R R
A A
RST RST Q
D Q D
Clk Clk
test_mode
In this example, Tessent Scan adds an OR gate that uses the test_mode (not scan_enable) signal
to keep the reset of flip-flop B inactive during the testing process. You would then constrain the
test_mode signal to be a 1, so flip-flop B could never be reset during testing. To insert this type
of test logic, you can use the Tessent Scan command set_test_logic (see page 120 for more
information).
Tessent Scan also allows you to specify an initialization sequence in the test procedure file to
avoid the use of this additional test logic. For additional information, refer to the
add_scan_groups description in the Tessent Shell Reference Manual.
Gated Clocks
Primary inputs typically cannot control the gated clock signals of sequential devices. In order to
make some of these sequential elements scannable, you may need to add test logic to modify
their clock circuitry.
For example, Figure 4-12 shows an example of a clock that requires some test logic to control it
during test mode.
D Q
D Q Clk
Clk
D Q
D Q Clk
Clk
test_clock
test_mode
In this example, Tessent Scan makes the element scannable by adding a test clock, for both scan
loading/unloading and data capture, and multiplexing it with the original clock signal. It also
adds a signal called test_mode to control the added multiplexer. The test_mode signal differs
from the scan_mode or scan_enable signals in that it is active during the entire duration of the
test—not just during scan chain loading/unloading. To add this type of test logic into your
design, you can use the set_test_logic and set_scan_insertion commands. For more information
about these commands, refer to pages 120 and 137, respectively.
Tri-State Devices
Tri-state™ buses are another testability challenge. Faults on tri-state bus enables can cause one
of two problems: bus contention, which means there is more than one active driver, or bus float,
which means there is no active driver. Either of these conditions can cause unpredictable logic
values on the bus, which allows the enable line fault to go undetected. Figure 4-13 shows a tri-
state bus with bus contention caused by a stuck-at-1 fault.
Tessent Scan can add gating logic that turns off the tri-state devices during scan chain shifting.
The tool gates the tri-state device enable lines with the scan_enable signal so they are inactive
and thus prevent bus contention during scan data shifting. To insert this type of gating logic, you
can use the Tessent Scan command set_tristate_gating (see page 120 for more information).
In addition, the ATPG tool lets you specify the fault effect of bus contention on tri-state nets.
This capability increases the testability of the enable line of the tri-state drivers. Refer to the
set_net_dominance description in the Tessent Shell Reference Manual for details.
• TIEX — In this category, the ATPG tool considers the output of a flip-flop or latch to
always be an X value during test. This condition may prevent the detection of a number
of faults.
• TIE0 — In this category, the ATPG tool considers the output of a flip-flop or latch to
always be a 0 value during test. This condition may prevent the detection of a number of
faults.
• TIE1 — In this category, the ATPG tool considers the output of a flip-flop or latch to
always be a 1 value during test. This condition may prevent the detection of a number of
faults.
• Transparent (combinational) — In this category, the non-scan cell is a latch, and the
latch behaves transparently. When a latch behaves transparently, it acts, in effect, as a
buffer—passing the data input value to the data output. The TLA simulation gate models
this behavior. Figure 4-14 shows the point at which the latch must exhibit transparent
behavior.
For more information on the transparent latch checking procedure, refer to “D6” in the
Tessent Shell Reference Manual.
• Sequential transparent — Sequential transparency extends the notion of transparency
to include non-scan elements that can be forced to behave transparently at the same
point in which natural transparency occurs. In this case, the non-scan element can be
either a flip-flop, a latch, or a RAM read port. A non-scan cell behaves as sequentially
transparent if, given a sequence of events, it can capture a value and pass this value to its
output, without disturbing critical scan cells.
Sequential transparent handling of non-scan cells lets you describe the events that place
the non-scan cell in transparent mode. You do this by specifying a procedure, called
seq_transparent, in your test procedure file. This procedure contains the events
necessary to create transparent behavior of the non-scan cell(s). After the tool loads the
scan chain, forces the primary inputs, and forces all clocks off, the seq_transparent
procedure pulses the clocks of all the non-scan cells or performs other specified events
to pass data through the cell “transparently”.
Figure 4-15 shows an example of a scan design with a non-scan element that is a
candidate for sequential transparency.
clock2
SI SO
Seq_trans Procedure
------------------------
scan Region 1 DFF Region 2 scan force clock2 0 0;
cell1 cell2 force clock2 1 1;
force clock2 0 2;
restore_pis;
PIs/scan cells PIs/scan cells
The DFF shown in Figure 4-15 behaves sequentially transparent when the tool pulses its
clock input, clock2. The sequential transparent procedure shows the events that enable
transparent behavior.
Note
To be compatible with combinational ATPG, the value on the data input line of the non-
scan cell must have combinational behavior, as depicted by the combinational Region 1.
Also, the output of the state element, in order to be useful for ATPG, must propagate to
an observable point.
Also, the notion of sequential transparency supports the design practice of using a cell
called a transparent slave. A transparent slave is a non-scan latch that uses the slave
clock to capture its data. Additionally, you can define and use up to 32 different,
uniquely-named seq_transparent procedures in your test procedure file to handle the
various types of non-scan cell circuitry in your design.
Rules checking determines if non-scan cells qualify for sequential transparency via these
procedures. Specifically, the cells must satisfy rules P5, P6, P41, P44, P45, P46, D3, and
D9. For more information on these rules, refer to “Design Rule Checking” in the Tessent
Shell Reference Manual. Clock rules checking treats sequential transparent elements the
same as scan cells.
Limitations of sequential transparent cell handling include the following:
o Impaired ability to detect AC defects (transition fault type causes sequential
transparent elements to appear as tie-X gates).
o Cannot make non-scan cells clocked by scan cells sequentially transparent without
condition statements.
o Limited usability of the sequential transparent procedure if applying it disturbs the
scan cells (contents of scan cells change during the seq_transparent procedure).
o Feedback paths to non-scan cells, unless broken by scan cells, prevent treating the
non-scan cells as sequentially transparent.
• Clock sequential — If a non-scan cell obeys the standard scan clock rules—that is, if
the cell holds its value with all clocks off—the tool treats it as a clock sequential cell. In
this case, after the tool loads the scan chains, it forces the primary inputs and pulses the
clock/write/read lines multiple times (based on the sequential depth of the non-scan
cells) to set up the conditions for a test. A normal observe cycle then follows.
Figure 4-16 shows a clock sequential scan pattern.
When DRC performs scan cell checking, it also checks non-scan cells. When the
checking process completes, the rules checker issues a message indicating the number of
non-scan cells that qualify for clock sequential handling.
You instruct the tool to use clock sequential handling by selecting the -Sequential option
to the set_pattern_type command. During test generation, the tool generates test patterns
for target faults by first attempting combinational, and then RAM sequential techniques.
If unsuccessful with these techniques, the tool performs clock sequential test generation
if you specify a non-zero sequential depth.
Note
Setting the -Sequential switch to either 0 (the default) or 1 results in patterns with a
maximum sequential depth of one, but the tool creates clock sequential patterns only if
the setting is 1 or higher.
To report on clock sequential cells, you use the report_nonscan_cells command. For
more information on setting up and reporting on clock sequential test generation, refer to
the set_pattern_type and report_nonscan_cells descriptions in the Tessent Shell
Reference Manual.
Limitations of clock sequential non-scan cell handling include:
o The maximum allowable sequential depth is 255 (a typical depth would range from 2
to 5).
o Copy and shadow cells cannot behave sequentially.
o The tool cannot detect faults on clock/set/reset lines.
o You cannot use the read-only mode of RAM testing with clock sequential pattern
generation.
o The tool simulates cells that capture data on a trailing clock edge (when data changes
on the leading edge) using the original values on the data inputs.
o Non-scan cells that maintain a constant value after load_unload simulation are
treated as tied latches.
o This type of testing has high memory and performance costs.
Clock Dividers
Some designs contain uncontrollable clock circuitry; that is, internally-generated signals that
can clock, set, or reset flip-flops. If these signals remain uncontrollable, Tessent Scan will not
consider the sequential elements controlled by these signals “scannable”. And consequently,
they could disturb sequential elements during scan shifting. Thus, the system cannot convert
these elements to scan.
Figure 4-17 shows an example of a sequential element (B) driven by a clock divider signal and
with the appropriate circuitry added to control the divided clock signal.
DATA
DATA D Q
D Q
B B
D Q
D Q'
Q Q' A
A CLK Q'
CLK Q' TST_CLK
TST_EN
Tessent Scan can assist you in modifying your circuit for maximum controllability (and thus,
maximum scannability of sequential elements) by inserting special circuitry, called test logic, at
these nodes when necessary. Tessent Scan typically gates the uncontrollable circuitry with chip-
level test pins. In the case of uncontrollable clocks, Tessent Scan adds a MUX controlled by the
test_clk and test_en signals.
For more information on test logic, refer to “Enabling Test Logic Insertion” on page 120.
Pulse Generators
A pulse generator is circuitry that creates a pulse at its output when active. Figure 4-18 gives an
example of pulse generator circuitry.
A
A
C B
B C
When designers use this circuitry in clock paths, there is no way to create a stable on state.
Without a stable on state, the fault simulator and test generator have no way to capture data into
the scan cells. Pulse generators also find use in write control circuitry, a use that impedes RAM
testing.
By default, the ATPG tool identifies the reconvergent pulse generator sink (PGS) gates, or
simply “pulse generators”, during the learning process. For the tools to provide support, a
“pulse generator” must satisfy the following requirements:
• The “pulse generator” gate must have a connection (at C in Figure 4-18) to a clock input
of a memory element or a write line of a RAM.
• The “pulse generator” gate must be an AND, NAND, OR, or NOR gate.
• Two inputs of the “pulse generator” gate must come from one reconvergent source gate.
• The two reconvergent paths may only contain inverters and buffers.
• There must be an inversion difference in the two reconvergent paths.
• The two paths must have different lengths (propagation times).
• In the long path, the inverter or buffer that connects to the “pulse generator” input must
only go to gates of the same gate type as shown in (a) in Figure 4-19. A fanout to gates
of different types as in (b) in the figure is not supported. The tools model this input gate
as tied to the non-controlling value of the “pulse generator” gate (TIE1 for AND and
NAND gates, TIE0 for OR and NOR gates).
Figure 4-19. Long Path Input Gate Must Go to Gates of the Same Type
(a) Supported: (b) Not Supported:
A A
C C
B B
The ATPG tool provides two commands that deal with pulse generators: set_pulse_generators,
which controls the identification of the “pulse generator” gates, and report_pulse_generators,
which displays the list of “pulse generator” gates. Refer to the Tessent Shell Reference Manual
for information about the set_pulse_generators and report_pulse_generators commands.
Additionally, rules checking includes some checking for “pulse generator” gates. Specifically,
Trace rules #16 and #17 check to ensure proper usage of “pulse generator” gates. Refer to
“T16” and “T17” in the Tessent Shell Reference Manual for more details on these rules.
The ATPG tool supports pulse generators with multiple timed outputs. For detailed information
about this support, refer to “Pulse Generators with User Defined Timing” in the Tessent Cell
Library User’s Manual.
JTAG-Based Circuits
Boundary scan circuitry, as defined by IEEE standard 1149.1, can result in a complex
environment for the internal scan structure and the ATPG process. The two main issues with
boundary scan circuitry are 1) connecting the boundary scan circuitry with the internal scan
circuitry, and 2) ensuring that the boundary scan circuitry is set up properly during ATPG.
The ATPG tool does not test the internals of the RAM/ROM, although MacroTest (separately
licensed but available in the ATPG tool) lets you create tests for small memories such as register
files by converting a functional test sequence or algorithm into a sequence of scan tests. For
large memories, built-in test structures within the chip itself are the best methods of testing the
internal RAM or ROM.
However, the ATPG tool needs to model the behavior of the RAM/ROM so that tests can be
generated for the logic on either side of the embedded memory. This allows the tool to generate
tests for the circuitry around the RAM/ROM, as well as the read and write controls, data lines,
and address lines of the RAM/ROM unit itself.
Figure 4-20 shows a typical configuration for a circuit containing embedded RAM.
L L
O CONTROL O
G D G
I E I
C DATA POs
PIs C OUT C
ADDR O RAM
B D B and SLs
and SLs L E L
O R O
DATA IN C
C
K K
A B
ATPG must be able to operate the illustrated RAM to observe faults in logic block A, as well as
to control the values in logic block B to test faults located there. The ATPG tool has unique
strategies for operating the RAMs.
RAM/ROM Support
The tool treats a ROM as a strictly combinational gate. Once a ROM is initialized, it is a simple
task to generate tests because the contents of the ROM do not change. Testing RAM however, is
more of a challenge, because of the sequential behavior of writing data to and reading data from
the RAM.
The tool supports the following strategies for propagating fault effects through the RAM:
• Read-only mode — The tool assumes the RAM is initialized prior to scan test and this
initialization must not change during scan. This assumption allows the tool to treat a
RAM as a ROM. As such, there is no requirement to write to the RAM prior to reading,
so the test pattern only performs a read operation. Important considerations for read-
only mode test patterns are as follows:
o The read-only testing mode of RAM only tests for faults on data out and read
address lines, just as it would for a ROM. The tool does not test the write port I/O.
o To use read-only mode, the circuit must pass rules A1 and A6.
o Values placed on the RAM are limited to initialized values.
o Random patterns can be useful for all RAM configurations.
o You must define initial values and assume responsibility that those values are
successfully placed on the correct RAM memory cells. The tool does not perform
any audit to verify this is correct, nor will the patterns reflect what needs to be done
for this to occur.
o Because the tester may require excessive time to fully initialize the RAM, it is
allowed to do a partial initialization.
• Pass-through mode — The tool has two separate pass-through testing modes:
o Static pass-through — To detect faults on data input lines, you must write a known
value into some address, read that value from the address, and propagate the effect to
an observation point. In this situation, the tool handles RAM transparently, similar to
the handling of a transparent latch. This requires several simultaneous operations.
The write and read operations are both active and thus writing to and reading from
the same address. While this is a typical RAM operation, it allows testing faults on
the data input and data output lines. It is not adequate for testing faults on read and
write address lines.
o Dynamic pass-through — This testing technique is similar to static pass-through
testing except one pulse of the write clock performs both the write and read
operation (if the write and read control lines are complementary). While static pass-
through testing is comparable to transparent latch handling, dynamic pass-through
testing compares to sequential transparent testing.
• Sequential RAM test mode — This is the recommended approach to RAM testing.
While the previous testing modes provide techniques for detecting some faults, they
treat the RAM operations as combinational. Thus, they are generally inadequate for
generating tests for circuits with embedded RAM. In contrast, this testing mode tries to
separately model all events necessary to test a RAM, which requires modeling
sequential behavior. This enables testing of faults that require detection of multiple
pulses of the write control lines. These faults include RAM address and write control
lines.
RAM sequential testing requires its own specialized pattern type. RAM sequential
patterns consist of one scan pattern with multiple scan chain loads. A typical RAM
sequential pattern contains the events shown in Figure 4-21.
Note
For RAM sequential testing, the RAM’s read_enable/write_enable control(s) can be
generated internally. However, the RAM’s read/write clock should be generated from a
PI. This ensures RAM sequencing is synchronized with the RAM sequential patterns.
In this example of an address line test, assume that the MSB address line is stuck at 0.
The first write would write data into an address whose MSB is 0 to match the faulty
value, such as 0000. The second write operation would write different data into a
different address (the one obtained by complementing the faulty bit). For this example, it
would write into 1000. The read operation then reads from the first address, 0000. If the
highest order address bit is stuck-at-0, the 2nd write would have overwritten the original
data at address 0, and faulty circuitry data would be read from that address in the 3rd
step.
Another technique that may be useful for detecting faults in circuits with embedded RAM is
clock sequential test generation. It is a more flexible technique, which effectively detects faults
associated with RAM. “Clock Sequential Patterns” on page 154 discusses clock sequential test
generation in more detail.
If the clock that captures the data from the RAM is the same clock which is used for reading, the
tool issues a C6 clock rules violation. This indicates that you must set the clock timing so that
the scan cell can successfully capture the newly read data.
If the clock that captures the data from the RAM is not the same clock that is used for reading,
you will likely need to turn on multiple clocks to detect faults. The default
“set_clock_restriction On” command is conservative, so the tool will not allow these patterns,
resulting in a loss in test coverage. If you issue the “set_clock_restriction Off” command, the
tool allows these patterns, but there is a risk of inaccurate simulation results because the
simulator does not propagate captured data effects.
• You can define a pin as both a write control line and a clock if the off-states are the same
value. the tool then displays a warning message indicating that a common write control
and clock has been defined.
• The rules checker issues a C3 clock rule violation if a clock can propagate to a write line
of a RAM, and the corresponding address or data-in lines are connected to scan latches
which has a connection to the same clock.
• The rules checker issues a C3 clock rule violation if a clock can propagate to a read line
of a RAM, and the corresponding address lines are connected to scan latches which has
a connection to the same clock.
• The rules checker issues a C3 clock rule violation if a clock can capture data into a scan
latch that comes from a RAM read port that has input connectivity to latches which has a
connection to the same clock.
• If you set the simulation mode to Ram_sequential, the rules checker will not issue an A2
RAM rule violation if a clock is connected to a write input of a RAM. Any clock
connection to any other input (including the read lines) will continue to be a violation.
• If a RAM write line is connected to a clock, you cannot use the dynamic pass through
test mode.
• Patterns which use a common clock and write control for writing into a RAM will be in
the form of ram_sequential patterns. This requires you to set the simulation mode to
Ram_sequential.
• If you change the value of a common write control and clock line during a test
procedure, you must hold all write, set, and reset inputs of a RAM off. The tool
considers failure to satisfy this condition as an A6 RAM rule violation and disqualifies
the RAM from being tested using read_only and ram_sequential patterns.
patterns, you must also define these control lines so it can effectively write patterns for testing
RAM. And similar to clocks, you must define these signals in setup mode, prior to rules
checking. The commands in Table 4-1 support the testing of designs with RAM and/or ROM.
• The checker reads the RAM/ROM initialization files and checks them for errors. If you
selected random value initialization, the tool gives random values to all RAM and ROM
gates without an initialized file. If there are no initialized RAMs, you cannot use the
read-only test mode. If any ROM is not initialized, an error condition occurs. A ROM
must have an initialization file but it may contain all Xs. Refer to the read_modelfile
description in the Tessent Shell Reference Manual for details on initialization of
RAM/ROM.
• The RAM/ROM instance name given must contain a single RAM or ROM gate. If no
RAM or ROM gate exists in the specified instance, an error condition occurs.
• If you define write control lines and there are no RAM gates in the circuit, an error
condition occurs. To correct this error, delete the write control lines.
• When the write control lines are off, the RAM set and reset inputs must be off and the
write enable inputs of all write ports must be off. You cannot use RAMs that fail this
rule in read-only test mode. If any RAM fails this check, you cannot use dynamic pass-
through. If you defined an initialization file for a RAM that failed this check, an error
condition occurs. To correct this error, properly define all write control lines or use
lineholds (pin constraints).
• A RAM gate must not propagate to another RAM gate. If any RAM fails this check, you
cannot use dynamic pass-through.
• A defined scan clock must not propagate directly (unbroken by scan or non-scan cells)
to a RAM gate. If any RAM fails this check, you cannot use dynamic pass-through.
• The tool checks the write and read control lines for connectivity to the address and data
inputs of all RAM gates. It gives a warning message for all occurrences and if
connectivity fails, there is a risk of race conditions for all pass-through patterns.
• A RAM that uses the edge-triggered attribute must also have the read_off attribute set to
hold. Failure to satisfy this condition results in an error condition when the design
flattening process is complete.
• If the RAM rules checking identifies at least one RAM that the tool can test in read-only
mode, it sets the RAM test mode to read-only. Otherwise, if the RAM rules checking
passes all checks, it sets the RAM test mode to dynamic pass-through. If it cannot set the
RAM test mode to read-only or dynamic pass-through, it sets the test mode to static
pass-through.
• A RAM with the read_off attribute set to hold must pass Design Rule A7 (when read
control lines are off, place read inputs at 0). The tool treats RAMs that fail this rule as:
o a TIE-X gate, if the read lines are edge-triggered.
o a read_off value of X, if the read lines are not edge-triggered.
• The read inputs of RAMs that have the read_off attribute set to hold must be at 0 during
all times of all test procedures, except the test_setup procedure.
• The read control lines must be off at time 0 of the load_unload procedure.
• A clock cone stops at read ports of RAMs that have the read_off attribute set to hold,
and the effect cone propagates from its outputs.
For more information on the RAM rules checking process, refer to “RAM Rules” in the Tessent
Shell Reference Manual.
Incomplete Designs
The ATPG tool and Tessent Scan can iread incomplete Verilog designs due to their ability to
generate black boxes. The Verilog parser can blackbox any instantiated module or instance that
is not defined in either the ATPG library or the design netlist. The tool issues a warning
message for each blackboxed module similar to the following:
If the tool instantiates an undefined module, it generates a module declaration based on the
instantiation. If ports are connected by name, the tool uses those port names in the generated
module. If ports are connected by position, the parser generates the port names. Calculating port
directions is problematic and must be done by looking at the other pins on the net connected to
the given instance pin. For each instance pin, if the connected net has a non-Z-producing driver,
the tool considers the generated module port an input, otherwise the port is an output. The tool
never generates inout ports since they cannot be inferred from the other pins on the net.
Modules that are automatically blackboxed default to driving X on their outputs. Faults that
propagate to the black box inputs are classified as ATPG_untestable (AU). To change the
output values driven, refer to the add_black_box description in the Tessent Shell Reference
Manual.
Figure 5-1 shows the process of inserting scan and other test circuitry with Tessent Scan or
Tessent Shell operating in dft -scan context.
From
Synthesis
DFT Synthesized
Library Netlist
Setup
Mode Set Up Circuit and
Tool Information
Analysis
Mode N
Pass Troubleshoot
Checks? Problem
Y
Identify
Test Structures
Insert
Test Structures Test
Procedure
File
Netlist with Save Design and
Test ATPG Information
Structures
Dofile
To ATPG
You start with a DFT library and a synthesized design netlist. The library is the same one that
the ATPG tool uses. “Tessent Scan Inputs and Outputs” on page 117 describes the netlist
formats you can use with Tessent Scan. The design netlist you use as input may be an individual
block of the design, or the entire design.
After invoking the tool, your first task is to set up information about the design—this includes
both circuit information and information about the test structures you want to insert. “Preparing
for Test Structure Insertion” on page 119 describes the procedure for this task. The next task
after setup is to run rules checking and testability analysis, and debug any violations that you
encounter. “Changing the System Mode (Running Rules Checking)” on page 126 documents
the procedure for this task.
Note
To catch design violations early in the design process, you should run and debug design
rules on each block as it is synthesized.
After successfully completing rules checking, you will be in the analysis system mode. At this
point, if you have any existing scan you want to remove, you can do so. “Handling Existing
Boundary Scan Circuitry” on page 126 describes the procedure for doing this. You can then set
up specific information about the scan or other testability circuitry you want added and identify
which sequential elements you want converted to scan. “Setting Up a Basic Scan Insertion Run”
on page 127 describes the procedure for accomplishing this. Finally, with these tasks
completed, you can insert the desired test structures into your design. “Inserting Test
Structures” on page 135 describes the procedure for this insertion.
Circuit
Setup
Design (Dofile) Library
Test
Tessent Scan Procedure
File
ATPG
Design Setup
(Dofile)
and to select components for added test logic circuitry. The tool uses the library to
translate the design data into a flat, gate-level simulation model on which it runs its
internal processes.
• Test Procedure File — This file defines the stimulus for shifting scan data through the
defined scan chains. This input is only necessary on designs containing preexisting scan
circuitry or requiring test setup patterns.
Tessent Scan produces the following outputs:
• Design (Netlist) — This netlist contains the original design modified with the inserted
test structures. The output netlist format is gate-level Verilog.
• ATPG Setup (Dofile and Test Procedure File) — The tool can automatically create a
dofile and test procedure file that you can supply to the ATPG tool. These files contain
the circuit setup information that you specified to the tool as well as information on the
test structures that the tool inserted into the design. The tool creates these files for you
when you issue the write_atpg_setup command.
Note
The timeplate in the test procedure file defines a generic waveform for all of the clocks in
the design (including set and reset signals that were defined using the add_clocks
command) and not just for those clocks that are required for scan chain shifting.
However, the generated shift procedure only pulses clocks that drive scan cells. Internal
clock nets that can be mapped to a top level pin (by tracing a sensitized path) are not
included in the dofile and test procedure file, but internal clocks that cannot be traced
(such as PLL outputs) are included.
• Test Procedure File — When you issue the write_atpg_setup command, the tool writes
a simple test procedure file for the scan circuitry it inserted into the design. You use this
file with the downstream ATPG tool.
The following list briefly describes the test structures the tool supports:
• Scan — A flow where the tool converts all sequential elements that pass scannability
checking into scan cells. “Understanding Scan” on page 24 discusses the full scan style.
• Wrapper chains — A flow where the tool identifies sequential elements that interact
with input and output pins. These memory elements are converted into scan chains, and
the remaining sequential elements are not affected. For more information, see
“Understanding Wrapper Chains” on page 25.
• Scan and/or Wrapper — A flow where the tool converts into scan cells those
sequential elements that interact with primary input and output pins, and then stitches
the scan cells into dedicated wrapper chains. The tool converts the remaining sequential
elements into scan cells and stitches them into separate chains, which are called core
chains.
• Test points — A flow where the tool inserts control and observe points at user specified
locations. “Understanding Test Points” on page 27 discusses the test points method.
Tessent Scan provides the ability to insert test points at user specified locations. If both scan and
test points are enabled during an identification run, the tool performs scan identification
followed by test point identification.
% tessent -shell
The tool invokes in setup mode, ready for you to begin loading or working on your design. You
use this setup mode to define the circuit and scan data which is the next step in the process.
You have the option to customize the scan cell and the cell’s scan output mapping behavior.
You can change the mapping for an individual instance, all instances under a hierarchical
instance, all instances in all occurrences of a module in the design, or all occurrences of the
model in the entire design, using the set_cell_model_mapping command.
For example, you can map the fd1 nonscan model to the fd1s scan model for all occurrences of
the model in the design by entering:
The following example maps the fd1 nonscan model to the fd1s scan model for all matching
instances in the “counter” module and for all occurrences of that module in the design:
Additionally, you can change the scan output pin of the scan model in the same manner as the
scan cell. Within the scan_definition section of the model, the scan_out attribute defines which
pin is used as the scan output pin. During the scan stitching process, the tool selects the output
pin based on the lowest fanout count of each of the possible pins. If you have a preference as to
which pin to use for a particular model or instance, you can also issue the
set_cell_model_mapping command to define that pin.
For example, if you want to use “qn” instead of “q” for all occurrences of the fd1s scan model in
the design, enter:
Test logic provides a useful solution to a variety of common problems. First, some designs
contain uncontrollable clock circuitry; that is, internally-generated signals that can clock, set, or
reset flip-flops. If these signals remain uncontrollable, the tool will not consider the sequential
elements controlled by these signals scannable. Second, you might want to prevent bus
contention caused by tri-state devices during scan shifting.
Tessent Scan can assist you in modifying your circuit for maximum controllability (and thus,
maximum scannability of sequential elements) and bus contention prevention by inserting test
logic circuitry at these nodes when necessary.
Note
Tessent Scan does not attempt to add test logic to user-defined non-scan instances or
models; that is, those specified by the add_nonscan_instances or the
add_nonscan_models commands.
Tessent Scan typically gates the uncontrollable circuitry with a chip-level test pin. Figure 5-4
shows an example of test logic circuitry.
Before After
Uncontrollable Clock Added Test Logic
Test_en
You can specify which signals to insert test logic on with the set_test_logic.
You can add test logic to all uncontrollable (set, reset, clock, or RAM write control) signals
during the scan insertion process. By default, Tessent Scan does not add test logic. You must
explicitly enable the use of test logic with this command.
In adding the test logic circuitry, the tool performs some basic optimizations in order to reduce
the overall amount of test logic needed. For example, if the reset line to several flip-flops is a
common internally-generated signal, the tool gates it at its source before it fans out to all the
flip-flops.
Note
You must turn the appropriate test logic on if you want the tool to consider latches as scan
candidates. Refer to “D6” in the Tessent Shell Reference Manual for more information on
scan insertion with latches.
If your design uses bidirectional pins as scan I/Os, the tool controls the scan direction for the
bidirectional pins for correct shift operation.
This can be specified with set_bidi_gating. If the enable signal of the bidirectional pin is
controlled by a primary input pin, then the tool adds a “force” statement for the enable pin in the
new load_unload procedure to enable/disable the correct direction. Otherwise, the tool inserts
gating logic to control the enable line. The gate added to the bidirectional enable line is either a
2-input AND or OR. By default, no bidirectional gating is inserted and you must make sure that
the inserted scan chains function properly by sensitizing the enable lines of any bidirectional
ports in the scan path.
There are four possible cases between the scan direction and the active values of a tri-state
driver, as shown in Table 5-1. The second input of the gate is controlled from the scan_enable
signal, which might be inverted. You will need to specify AND and OR models through the
cell_type keyword in the ATPG library or use the add_cell_models command.
If you enable the gating of bidirectional pins, the tool controls all bidirectional pins. The
bidirectional pins not used as scan I/Os are put into input mode (Z state) during scan shifting by
either “force” statements in the new load_unload procedure or by using gating logic.
The tool adds a “force Z” statement in the test procedure file for the output of the bidirectional
pin if it is used as scan output pin. This ensures that the bus is not driven by the tristate drivers
of both bidirectional pin and the tester at the same time.
Note
Tessent Scan treats any Verilog module enclosed in `celldefine / `endcelldefine
directives as a library cell and prevents any logic changes to these modules.
In some cases, inserting test logic requires the addition of multiple test clocks. Analysis run
during DRC determines how many test clocks the tool needs to insert. The report_scan_chains
command reports the test clock pins used in the scan chains.
With this command, you must specify the off-state for pins you add to the clock list. The off-
state is the state in which clock inputs of latches are inactive. For edge-triggered devices, the off
state is the clock value prior to the clock’s capturing transition.
For example, you might have two system clocks, called “clk1” and “clk2”, whose off-states are
0 and a global reset line called “rst_l” whose off-state is 1 in your circuit. You can specify these
as clock lines as follows:
You can specify multiple clock pins with the same command if they have the same off-state.
You must define clock pins prior to entering analysis mode. Otherwise, none of the non-scan
sequential elements will successfully pass through scannability checks. Although you can still
enter analysis mode without specifying the clocks, the tool will not be able to convert elements
that the unspecified clocks control.
Note
If you are unsure of the clocks within a design, you can use the analyze_control_signals
command to identify and then define all the clocks. It also defines the other control
signals in the design.
Note
If you are performing block-by-block scan synthesis, you should refer to “Inserting Scan
Block-by-Block” on page 143.
If your design contains existing scan chains that you want to use, you must specify this
information to the tool while you are in setup mode; that is, before design rules checking. If you
do not specify existing scan circuitry, the tool treats all the scan cells as non-scan cells and
performs non-scan cell checks on them to determine if they are scan candidates.
• Remove the existing scan chain(s) from the design and reverse the scan insertion
process. the tool will replace the scan cells with their non-scan equivalent cells. The
design can then be treated as you would any other new design to which you want to add
scan circuitry. This technique is often used when re-stitching scan cells based on
placement and routing results.
• Add additional scan chains based on the non-scan cells while leaving the original scan
chains intact.
• Stitch together existing scan cells that were previously unstitched.
The remainder of this section includes details related to these methodologies.
For example, you can specify a group name of “group1” controlled by the test procedure file
“group1.test_proc” as follows:
For information on creating test procedure files, refer to “Test Procedure Files” on page 71.
You need to specify the scan chain name, the scan group to which it belongs, and the primary
input and output pins of the scan chain. For example, assume your design has two existing scan
chains, “chain1” and “chain2”, that are part of “group1”. The scan input and output pins of
chain1 are “sc_in1” and “sc_out1”, and the scan input and output pins of chain2 are “sc_in2”
and “sc_out2”, respectively. You can specify this information as follows:
Additionally, defining these existing scan cells prevents the tool from performing possibly
undesirable default actions, such as scan cell mapping and generation of unnecessary mux gates.
1. Declare the “data_in = <port_name>” in the scan_definition section of the scan cell’s
model in the ATPG library.
If you have a hierarchy of scan cell definitions, where one library cell can have another
library cell as its scan version, using the data_in declaration in a model causes the tool to
consider that model as the end of the scan definition hierarchy, so that no mapping of
instances of that model will occur.
Note
It is not recommended that you create a hierarchy of scan cell model definitions. If, for
instance, your data_in declaration is in the scan_definitions section of the third model in
the definitions hierarchy, but the tool encounters an instance of the first model in the
hierarchy, it will replace the first model with the second model in the hierarchy, not the
desired third model. If you have such a hierarchy, you can use the
set_cell_model_mapping command to point to the desired model.
set_cell_model_mapping overrides the mapping defined in the library model.
2. The scan enable port of the instance of the cell model must be either dangling or tied (0
or 1) or pre-connected to a global scan enable pin(s). In addition, the scan input port
must be dangling or tied or connected to the cell’s scan output port as a self loop or a self
loop with (multiple) buffers or inverters.
Dangling implies that there are no connected fan-ins from other pins except tied pins or
tied nets. To identify an existing (global) scan enable, use the set_scan_insertion
command.
Issue the set_scan_insertion command before the insert_test_logic command.
If you use criteria (a) as the means of preventing scan cell mapping, the tool also checks the
scan enable and scan in ports. If either one is driven by system logic, then the tool inserts a new
mux gate before the data input and uses it as a mux in front of the preexisting scan cell. (This is
only for mux-DFF scan; this mux is not inserted for LSSD or clocked_scan types of scan.)
If you use a combination of criteria (a) and (b), or just criteria (b), as the means of preventing
scan cell mapping, the tool will not insert a mux gate before the data input.
Once the tool can identify existing scan cells, they can be stitched into scan chains in the normal
scan insertion process.
Terminology and Concepts” on page 63 explains these processes in detail. If you are finished
with all the setup you need to perform, you can change the system mode by entering the
set_system_mode command as follows:
If an error occurs during the rules checking process, the application remains in setup mode,
where you must correct the error. You can clearly identify and easily resolve the cause of many
errors. Other errors, such as those associated with proper clock definitions and test procedure
files, can be more complex. “Troubleshooting Rules Violations” in the Tessent Shell Reference
Manual discusses the procedure for debugging rules violations. You can also use
DFTVisualizer to visually investigate the causes of DRC violations. For more information, refer
to “DFTVisualizer” in the Tessent Shell User’s Manual.
The actual netlist processing is triggered by the insert_test_logic command. The default
operation of the insert_test_logic command is to perform scan substitution and stitching.
In INTEST mode, all inputs to submodules are controllable using the wrapper scan chains and
all outputs are observable through the wrapper scan chains. This provides the ability to
independently generate a complete set of ATPG patterns for submodules.
In EXTEST mode, all outputs from submodules are controllable using the wrapper scan chains
and all inputs are observable through the wrapper scan chains. This provides the ability to
test/optimize the logic surrounding the submodules at the top-level without requiring internal
visibility into the submodules (i.e. core scan chains are not needed).
The scan cells comprising the wrapper scan chains are identified using the set_wrapper_chains
and set_registered_io commands. The wrapper scan chains are actually stitched when the
insert_test_logic command is issued.
To ensure that masked primary outputs drive inactive values during the testing of other
partitions, you can specify that the primary outputs hold a 0 or 1 value during test mode. Special
cells called output hold-0 or output hold-1 wrapper cells serve this purpose. By default, the tool
uses regular output wrapper cells.
When using this command, the tp_pin_pathname argument specifies the pin pathname of the
location where you want to add a control or observe point. If the location is to be a control point,
you specify the Control argument with the name of the model to insert (which you define with
add_cell_models or the cell_type attribute in the library description) and pin(s) to which you
want to connect the added gate.
If the location is to be an observe point, you must specify the primary output in which to
connect the observe point. You can also specify whether to add a scan cell at the control or
observe point.
The following locations in the design are possible candidates for placing control or observe test
points:
• Any site in the fanout cone of a declared clock (defined with the add_clocks command).
• The outputs of scanned latches or flip-flops.
• The internal gates of library cells. Only gates driving the top library boundary can have
test points.
• Notest points which are set using the add_notest_points command.
• The outputs of primitives that can be tri-state.
• The primary inputs for control or observation points.
• The primary outputs for observation points. A primary output driver which also fans out
to internal logic could have a control point added, if needed.
• No control points at unobservable sites.
• No observation points at uncontrollable sites.
In many cases, a sequential element may not have a scan equivalent of the currently selected
scan type. For example, a cell may have an equivalent mux-DFF scan cell but not an equivalent
LSSD scan cell. If you set the scan type to LSSD, Tessent Scan places these models in the non-
scan model list. However, if you change the scan type to mux-DFF, Tessent Scan updates the
non-scan model list, in this case removing the models from the non-scan model list.
For example, you can specify that I$155/I$117 and /I$155/I$37 are sequential instances you do
not want converted to scan cells by specifying:
Another method of eliminating some components from consideration for scan cell conversion is
to specify that certain models should not be converted to scan. To exclude all instances of a
particular model type, you can use the add_nonscan_models command.
For example, the following command would exclude all instances of the dff_3 and dff_4
components from scan cell conversion.
Note
Tessent Scan automatically treats sequential models without scan equivalents as non-scan
models, adding them to the nonscan model list.
To include particular instances in the scan identification process, use the add_scan_instances
command. This command lets you specify individual instances, hierarchical instances (for
which all lower-level instances are converted to scan), or control signals (for which all instances
controlled by the signals are converted to scan).
For example, the following command ensures the conversion of instances /I$145/I$116 and
/I$145/I$138 to scan cells when Tessent Scan inserts scan circuitry.
To include all instances of a particular model type for conversion to scan, use the
add_scan_models command. For example, the following command ensures the conversion of
all instances of the component models dff_1 and dff_2 to scan cells when Tessent Scan inserts
scan circuitry.
When you perform a report_dft_check command there is typically a large number of nonscan
instances displayed, as shown in the sample report in Figure 5-5.
The fields at the end of each line in the nonscan instance report provide additional information
regarding the classification of a sequential instance. Using the instance /I_266 (highlighted in
maroon), the “Clock” statement indicates a problem with the clock input of the sequential
instance. In this case, when the tool does a trace back of the clock, the signal doesn’t trace back
to a defined clock. The message indicates that the signal traced connects to the clock input of
this non-scan instance, and doesn’t trace back to a primary input defined as a clock. If several
nodes are listed (similarly for “Reset” and “Set), it means that the line is connected to several
endpoints (sequential instances or primary inputs).
This “Clock # 1 F /I_266/clk” issue can be resolved by either defining the specified input as a
clock or allowing Tessent Scan to add a test clock for this instance.
This approach has several potential benefits such as the reduction of scan cells in the design,
and therefore fewer scan path muxes, and the better locality of scan path connections due to the
preservation of functional connections.
The following sections describe the process by which Tessent Scan identifies and converts scan
cells.
The identification occurs when switching to analysis mode, after DRC rule checking is
completed, as indicated in the following transcript.
// ----------------------------------------------------------------------
// Begin shift register identification process for 9971 sequential
// instances.
// ----------------------------------------------------------------------
// Number of shift register flops recorded for scan insertion: 3798
// (38.09%)
// Number of shift registers recorded for scan insertion: 696
// Longest shift register has 15 flops.
// Shortest shift register has 2 flops.
// Potential number of nonscan flops to be converted to scan cells: 696
// Potential number of scan cells to be converted to nonscan flops: 25
1. Flip-flops that constitute a shift register reside under the same hierarchical instance.
2. Flip-flops that constitute a shift register use the same clock signal.
3. Multiple clock edges are allowed in the shift register structure as long as no lockup cells
are required (no TE-LE transitions occur). When lockup cells are required (as in LE-TE
transitions), the tool breaks the shift register at this location.
4. Both nonscan and scan flip-flops are considered for identification. However, every
nonscan flip-flop should have a mapping scan flip-flop model in the ATPG library and
every scan flip-flop should have a mapping nonscan flip-flop model in the ATPG
library. In addition, a scan flip-flop should satisfy the following requirements:
o Its scan input pin is not functionally driven (either dangling or tied to a constant, or
looped back from Q/QB output).
o Its scan enable pin is not functionally driven, and is tied to a constant signal to
sensitize the data input pin of the sequential cell such that this input is preserved as
the shift path. The scan enable pin is not considered functionally driven if a global
scan enable pin (defined using set_scan_insertion -SEN) is the driver.
5. Shift registers with multiple branches are identified such that each branch is a separate
shift register. The flip-flops on the trunk are included in one of the branches.
6. Shift registers with sequential feedback loops are identified such that the first cell of the
shift register is determined by the tool either randomly or based on the availability of the
scan cell in the loop.
1. The first flip-flop is replaced with the equivalent scan flip-flop. If the first flip-flop is
originally a scan flip-flop, it is preserved as is.
2. All remaining flip-flops are preserved as nonscan. If they are originally scan flip-flops,
they are converted into nonscan flip-flops.
After performing the scan chain insertion, the report_shift_registers command may list fewer
and shorter shift registers than what were originally identified by switching to DFT mode. The
following lists the main reasons why originally identified shift registers can be modified by the
scan chain stitching.
1. All scan cell candidates are sorted based on clock, edge, and hierarchy before stitching.
The sorting process preserves the cells of the shift registers in exactly the same order as
they are functionally connected. Sorted scan cell candidates are then distributed over
scan chains. When placing a shift register into a scan chain, it may be cut to a desired
length to satisfy the specified/calculated scan chain length.
2. The first or the last cell in a shift register may be removed from the shift register if it is
positioned to be at the clock transition between the cells in the scan chain, or positioned
to be the first or last cell in the scan chain. These modifications are performed to move
shift register cells from the START and STOP declarations in a scanDEF file that will be
generated with a write_scan_order command. It is unlikely that the first or the last cell in
a shift register will be positioned to be the first or last cell in the scan chain, as the tool
when distributing scan cells to chains tries to avoid placing shift registers at the
beginning or tail of a scan chain. This is likely to happen only when the percentage of
shift registers are very high in the design compared to floating flops, and the tool doesn’t
have a choice to place any other potential scan cell other than a shift register at the
beginning/end of a chain.
The stitching of the flip-flops inside a shift register structure is skipped but the following
connections are performed:
• Length
• Hierarchical path where the shift register flip-flops reside
• First and last flip-flop instance name unless the -verbose switch is specified in which
case all flip-flops in the shift registers are reported
Scan cells can also be reported by the report_scan_cells command after the insert_test_logic
command is executed. If any shift registers are identified in the netlist, a column is added to the
report. The column contains a tool-assigned shift register ID number and a cell number that
indicates the order in which the flip-flops are originally connected in the shift register
structures.
During the identification process, a number of messages may be issued about the identified
structures.
To identify the dedicated and shared wrapper cells, you can use the analyze_wrapper_cells
command.
Note
If you want to start the selection process anew each time, you must use the reset_state
command to clear the existing scan candidate list.
This command lists the total number of sequential instances, user-defined non-scan instances,
user-defined scan instances, system-identified scan instances, scannable instances with test
logic, and the scan instances in preexisting chains identified by the rules checker.
port name that matches an existing port of the design, the existing port is used as the scan port.
If the specified port name does not exist, Tessent Scan creates a new port with the specified
name. If you use an existing, connected output port, Tessent Scan also inserts a mux at the
output to select data from either the scan chain or the design, depending on the value of the scan
enable signals.
To give scan ports specific names (other than those created by default), you can use the
add_scan_pins command.
You must specify the scan chain name, the scan input pin, and the scan output pin. Additionally,
you may specify the name of the scan chain clock. For existing pins, you can specify top module
pins or pins of lower level instances.
After the scan cells are partitioned and grouped into potential scan chains (before scan chain
insertion occurs) Tessent Scan considers some conditions in assigning scan pins to scan chains:
1. Whether the potential scan chain has all or some of the scan cells driven by the specified
clock (add_scan_pins -Clock). If yes, then the scan chain is assigned to the specified
scan input and output pins.
2. Whether the output of the scan candidate is directly connected to a declared output pin.
If yes, then the scan input and output pins are assigned to the scan chain containing the
scan cell candidate.
3. Any scan chains not assigned to scan input/output pins using conditions 1 and 2 are
assigned based on the order in which you declared the scan input/output pins using the
add_scan_pins command.
If a fixed-order file is specified along with the -Fixed option in the insert_test_logic command,
conditions 1 and 2 are ignored and the chain_id in the fixed-order file is then sorted in
increasing order. The chain with the smallest chain_id receives the first specified scan
input/output pins. The chain with the second smallest chain_id receives the second specified
scan input/output pins, and so on. If you did not specify enough scan input/output pins for all
scan chains, then Tessent Scan creates new scan input/output pins for the remaining scan chains.
For information on the format of the fixed-order file, refer to the insert_test_logic description in
the Tessent Shell Reference Manual.
Note
If Tessent Scan adds more than one test clock, it names the first test clock the specified or
default <name> and names subsequent test clocks based on this name plus a unique
number.
The -Muxed and -Disabled switches specify whether Tessent Scan uses an AND gate or MUX
gate when performing the gating. If you specify the -Disabled option, then for gating purposes
Tessent Scan ANDs the test enable signal with the set and reset to disable these inputs of
flip-flops. If you specify the -Muxed option, then for muxing purposes Tessent Scan uses any
set and reset pins defined as clocks to multiplex with the original signal. You can specify the
-Muxed and -Disabled switches for individual pins by successively issuing the
set_scan_insertion command.
If Tessent Scan writes out a test procedure file, it places the scan enable at 1 (0) if you specify
-Active High (Low).
Note
If the test enable and scan enable have different active values, you must specify their
active values using different commands. Set the test enable active value using the
set_scan_insertion command. Set the scan enable active value using the set_scan_enable
command.
After setting up for internal scan insertion, refer to “Running the Insertion Process” on page 138
to complete insertion of the internal scan circuitry.
During test logic insertion, Tessent Scan attaches the non-scan head register’s output to the
beginning of the scan chain, performs scan replacement on the tail register, and then attaches the
scan tail register’s input to the end of the scan chain. If there is no scan replacement in the
ATPG library for the tail register, a MUX is added to include the tail DFF into the scan chain.
Note
No design rule checks are performed from the scan_in pin to the output of the head
register and from the output of the tail register to the scan_out pin. You are responsible
for making those paths transparent for scan shifting.
Note
Tessent Scan does not determine the associated top-level pins that are required to be
identified for the add_scan_chains command. You are responsible for adding this
information to the dofile that Tessent Scan creates using the write_atpg_setup command.
You must also provide the pin constraints that cause the correct behavior of the head and
tail registers.
You can specify head and tail registration of a scan chain via the add_scan_pins command. You
need to specify the head register output pin as the scan input pin, and the tail register input pin
as the scan output pin, along with the -Registered switch.
When you issue this command for scan insertion (assuming appropriate prior setup), the tool
converts all identified scannable memory elements to scan elements and then stitches them into
one or more scan chains. If you select wrapper chains for insertion, the tool converts the non-
scan cells identified for wrapper chains to wrapper cells and stitches them into scan chains
separate from internal scan chains.
The scan circuitry insertion process may differ depending on whether you insert scan cells and
connect them up front, or insert and connect them after layout data is available. the tool allows
you to insert scan using both methods.
The insert_test_logic command has a number of different options, most of which apply
primarily to internal scan insertion.
• If you are using specific cell ordering, you can specify a filename of user-identified
instances (in either a fixed or random order) for the stitching order.
• The -Max_length option lets you specify a maximum length to the chains.
• The -NOlimit switch allows an unlimited chain length.
• The -NUmber option lets you specify the number of scan chains for the design.
• The -Clock switch lets you choose whether to merge two or more clocks on a single
chain.
• The -Edge switch lets you choose whether to merge stable high clocks with stable low
clocks on chains.
The subsection that follows, “Merging Scan Chains with Different Shift Clocks“,
discusses some of the issues surrounding merging chains with different clocks.
• The -COnnect option lets you specify whether to connect the scan cells and scan-
specific pins (scan_in, scan_enable, scan_clock, etc.) to the scan chain (which is the
default mode), or just replace the scan candidates with scan equivalent cells. If you want
to use layout data, you should replace scan cells (using the -connect off switch), perform
layout, obtain a placement order file, and then connect the chain in the appropriate order
(using the -filename filename -fixed options). This option is affected by the settings in
the set_test_logic command. The other options to the -COnnect switch specify how to
handle the input/output scan pins when not stitching the scan cells into a chain.
• The -Scan, -Test_point, and -Ram switches let you turn scan insertion, test point
insertion and RAM gating on or off.
• The -Verilog switch causes the tool to insert buffer instances, rather than use the
“assign” statement, for scan output pins that also fan out as functional outputs.
If you do not specify any options, the tool stitches the identified instances into default scan
chain configurations.
Note
Because the design is significantly changed by the action of this command, the original
flattened, gate-level simulation model created when you entered the analysis system
mode is deleted.
Note
You can use clock groups to minimize the lockup cell insertion. the tool places the scan
cells with shift clocks from different clock groups in separate scan chains. Lockup latches
are then inserted only between the cells with different shift clocks in the same clock
group. For more information, refer to the add_clock_groups description in the Tessent
Shell Reference Manual.
Use this procedure to merge scan cells with different shift clocks.
Procedure
1. Define latch and inverter library models to use for lockup cells. For example:
add_cell_models dlat1a -type dlat enable data -active high|Low
add_cell_models inv01 -type inv
The cell type for the latch must be either a DLAT or DFF and the active edge specified
must reflect the overall inversion of the clock pin inside the model.
The inverter is used along with the lockup cell model, when necessary, for correct
lockup cell insertion. The inverter model can also be defined with cell_type attribute in
the model definition.
For more information, see the add_cell_models description in the Tessent Shell
Reference Manual.
2. Set the tool to insert lockup cells. For example:
set_lockup_cell on -type dlat
You can also use a DFF model for a lockup cell, in which case you need to define a DFF
model using the Add Cell Model and use “-type dff” switch for the set_lockup_cell
command.
For more information, see the set_lockup_cell description in the Tessent Shell Reference
Manual.
Note
You can also specify the exact lockup cell locations in scan chains using a cell order file
that specifies the stitching order of scan cells in scan chains. For more information, see
the insert_test_logic description in the Tessent Shell Reference Manual.
Figure 5-6 illustrates lockup cell insertion. The extra inverter on the clock line of the
lockup cell provides a half a cycle delay to ensure synchronization of the clock domains.
Before After
d o d o d o
d o d o si si
si si SC LL SC
SC SC clka clk clk clk
clka clk clk
clkb clkb
Examples
The following example defines two different groups of clocks, identifies a latch model and
inverter model to use for lockup cells, enables lockup cell insertion, and performs the insertions.
The -Clock Merge option combines the scan cells associated with each of the specified clock
groups into a scan chain when the test logic is inserted.
add_clocks 0 clk1 clk2 clk3
add_clocks 1 clk4 clk5 clk6
add_clock_groups group1 clk1 clk2 clk3
add_clock_groups group2 clk4 clk5 clk6
add_cell_models dff04 -type dff clk data
add_cell_models inv -type inv
set_lockup_cell on -type dff
insert_test_logic -scan on -clock merge
The tool creates two scan chains, one for each clock group and inserts lockup cells between the
clock domains of the same clock group, {clk1, clk2, clk3} or {clk4, clk5, clk6}.
• delete_clock_groups — Deletes the specified clock groups.
• Tessent Scan is not intended for use as a robust netlist translation tool. Thus, you should
always write out the netlist in the same format in which you read the original design.
• If a design contains only one instantiation of a module, and the tool modifies the
instance by adding test structures, the instantiation retains the original module name.
• When the tool identically modifies two or more instances of the same module, all
modified instances retain the original module name. This generally occurs for scan
designs.
• If a design contains multiple instantiations of a module, and the tool modifies them
differently, the tool derives new names for each instance based on the original module
name.
• Tessent Scan assigns “net” as the prefix for new net names and “uu” as the prefix for
new instance names. It then compares new names with existing names (in a case-
insensitive manner) to check for naming conflicts. If it encounters naming conflicts, it
changes the new name by appending an index number.
information on the new test procedure file format, see “Test Procedure File” in the Tessent Shell
User’s Manual.
For example, if the tool adds a single scan chain and writes out an ATPG setup file named
scan_design.dofile, enter something like the following:
Using block-by-block scan insertion, the tool inserts scan (referred to as “sub-chains”) into
blocks A, B, and C, prior to insertion in the Top module. When A, B, and C already contain
scan, inserting scan into the Top module is equivalent to inserting any scan necessary at the top
level, and then connecting the existing scan circuitry in A, B, and C at the top level.
b. Insert scan.
Set up the circuit, run rules checking, insert the desired scan circuitry.
c. Write out scan-inserted netlist.
Write the scan-inserted netlist to a new filename, such as a_scan.hdl. The new
module interface may differ, for example:
A(a_i, a_o, sc_i, sc_o, sc_en)
Figure 5-8 shows a schematic view of the design with scan connected in the Top
module.
all.hdl
TOP
top_i Combinational Logic
b_i c_i
a_i
sc_out sc_out sc_out
sc_in A sc_in B sc_in C sc_out
a_o sc_en b_o sc_en c_o
sc_en
Figure 6-1 shows the process for generating test patterns for your design.
This section discusses each of the tasks outlined in Figure 6-1. You use the ATPG tool (and
possibly ModelSim, depending on your test strategy) to perform these tasks.
Design
Flattened? Y
N
create_flat_model
Pass
Checks? N
Analysis Mode
Fault
Add/Read Fault
Fault List File
File
Read/Simulate Create
Patterns Patterns
Patterns
Save
Patterns Patterns
The following list describes the basic process for using the ATPG tool:
1. Invoke Tessent Shell using the “tessent -shell” command. Set the context to
“patterns -scan” using the set_context command, which allows you to access ATPG
functionality.
2. The ATPG tool requires a structural (gate-level) design netlist and a DFT library, which
you accomplish with the read_cell_library and read_verilog commands, respectively.
“ATPG Tool Inputs and Outputs” on page 150 describes which netlist formats you can
use with the ATPG tool. Every element in the netlist must have an equivalent
description in the specified DFT library. The “Design Library” section in the Tessent
Cell Library Manual gives information on the DFT library. The tool reads in the library
and the netlist, parsing and checking each.
3. After reading the library and netlist, the tool goes into setup mode. Within setup mode,
you perform several tasks, using commands either interactively or through the use of a
dofile. You can set up information about the design and the design’s scan circuitry.
“Setting Up Design and Tool Behavior” on page 157 documents this setup procedure.
Within setup mode, you can also specify information that influences simulation model
creation during the design flattening phase.
4. After performing all the desired setup, you can exit setup mode, which triggers a number
of operations. If this is the first attempt to exit setup mode, the tool creates a flattened
design model. This model may already exist if a previous attempt to exit setup mode
failed or you used the create_flat_model command. “Model Flattening” on page 72
provides more details about design flattening.
5. Next, the tool performs extensive learning analysis on this model. “Learning Analysis”
on page 77 explains learning analysis in more detail.
6. Once the tool creates a flattened model and learns its behavior, it begins design rules
checking. The “Design Rule Checking” section in the Tessent Shell Reference Manual
gives a full discussion of the design rules.
7. Once the design passes rules checking, the tool enters analysis mode, where you can
perform simulation on a pattern set for the design. For more information, refer to
“Good-Machine Simulation” on page 172 and “Fault Simulation” on page 170.
8. At this point, you may want to create patterns. You can also perform some additional
setup steps, such as adding the fault list. “Setting Up the Fault Information for ATPG”
on page 173 details this procedure. You can then run ATPG on the fault list. During the
ATPG run, the tool also performs fault simulation to verify that the generated patterns
detect the targeted faults.
In either case (full or partial scan), you can run ATPG under different constraints, or
augment the test vector set with additional test patterns, to achieve higher test coverage.
“Performing ATPG” on page 177 covers this subject.
After generating a test set with the ATPG tool, you should apply timing information to
the patterns and verify the design and patterns before handing them off to the vendor.
“Verifying Test Patterns” on page 281 documents this operation.
Test
Design Procedure ATPG
Netlist File Library
ATPG
Info.
Files
• Design — The supported design data format is gate-level Verilog. Other inputs also
include 1) a cell model from the design library and 2) a previously-saved, flattened
model.
• Test Procedure File — This file defines the operation of the scan circuitry in your
design. You can generate this file by hand, or Tessent Scan can create this file
automatically when you issue the command write_atpg_setup.
• Library — The design library contains descriptions of all the cells used in the design.
The tool uses the library to translate the design data into a flat, gate-level simulation
model for use by the fault simulator and test generator.
• Fault List — The tool can read in an external fault list. The tool uses this list of faults
and their current status as a starting point for test generation.
• Test Patterns — The tool can read in externally generated test patterns and use those
patterns as the source of patterns to be simulated.
• Test Patterns — The tool generates files containing test patterns. They can generate
these patterns in a number of different simulator and ASIC vendor formats. “Test
Pattern Formatting and Timing” on page 331 discusses the test pattern formats in more
detail.
• ATPG Information Files — These consist of a set of files containing information from
the ATPG session. For example, you can specify creation of a log file for the session.
• Fault List — This is an ASCII-readable file that contains internal fault information in
the standard Mentor Graphics fault format.
Note
ATPG constraints and circuitry that can have bus contention are not optimal conditions
for random pattern generation. If you specify ATPG constraints, The tool does not
perform random pattern generation.
During this process, the tool identifies and removes redundant faults from the fault list. After it
creates enough patterns for a fault simulation pass, it displays a message that indicates the
number of redundant faults, the number of ATPG untestable faults, and the number of aborted
faults that the test generator identifies. The tool then once again invokes the fault simulator,
removing all detected faults from the fault list and placing the effective patterns in the test set.
The tool then selects another set of patterns and iterates through this process until no faults
remain in the current fault list, except those aborted during test generation (that is, those in the
UC or UO categories).
The most commonly used test cycle contains the events: force_pi, measure_po,
capture_clock_on, and capture_clock_off. The test vectors used to read or write into RAMs
contain the events force_pi, ram_clock_on, and ram_clock_off. You can associate real times
with each event via the timing file.
Because the ATPG tool is optimized for use with scan designs, the basic scan pattern contains
the events from which the tool derives all other pattern types.
Clock PO Patterns
Figure 6-4 shows that in some designs, a clock signal may go to a primary output through some
combinational logic.
Comb.
Logic
Clock Primary
Outputs
...
LA LA
The tool considers any pattern that measures a PO with connectivity to a clock, regardless of
whether or not the clock is active, a clock PO pattern. A normal scan pattern has all clocks off
during the force of the primary inputs and the measure of the primary outputs. However, in the
clocked primary output situation, if the clock is off, a condition necessary to test a fault within
this circuitry might not be met and the fault may go undetected. In this case, in order to detect
the fault, the pattern must turn the clock on during the force and measure. This does not happen
in the basic scan pattern. The tool allows this within a clock PO pattern, to observe primary
outputs connected to clocks.
clock PO pattern. If you do not want the tool to generate clock PO patterns, you can turn off the
capability as follows:
A depth of zero indicates combinational circuitry. A depth greater than one indicates limited
sequential circuitry. You should, however, be careful of the depth you specify. You should start
off using the lowest sequential depth and analyzing the run results. You can perform several
runs, if necessary, increasing the sequential depth each time. Although the maximum allowable
depth limit is 255, you should typically limit the value you specify to five or less, for
performance reasons.
• take advantage of a design’s non-scan sequential cells that are capable of retaining their
state through a scan load operation
• test through a RAM/ROM
You enable the multiple load capability by using “-multiple_load on” with the set_pattern_type
command and setting the sequential depth to some number greater than one. When you activate
this capability, you allow the tool to include a scan load before any pattern cycle.
Note
An exception is at-speed sequences in named capture procedures. A load may not occur
between the at-speed launch and capture cycles. For more information, see the
description of the “load” cycle type in “Defining Internal and External Modes” on
page 227.
Generally, multiple load patterns require a sequential depth for every functional mode clock
pulsed. A minimum sequential depth of 4 is required to enable the tool to create the multiple
cycle patterns necessary for RAM testing. The patterns are very similar to RAM sequential
patterns, but for many designs will give better coverage than RAM sequential patterns. This
method also supports certain tool features (MacroTest, dynamic compression, split-capture
cycle, clock-off simulation) not supported by RAM sequential patterns.
Conversely, if the fault on the highest order bit of the address line is a stuck-at-0 fault, you
would want to write the initial data, D, to location 0000. You would then write different data,
D’, to location 1000. If a stuck-at-0 fault were present on the highest address bit, the faulty
machine would overwrite location 0000 with the value D’. Next, you would attempt to read
from address location 0000. With the stuck-at-0 fault on the address line, you would read D’.
You can instruct the tool to generate RAM sequential patterns by issuing the set_pattern_type
command as follows:
For latches that do not behave transparently, a user-defined procedure can force some of them to
behave transparently between the primary input force and primary output measure. A test
procedure, which is called seq_transparent, defines the appropriate conditions necessary to
force transparent behavior of some latches. The events in sequential transparent patterns
include:
% tessent -shell
From the tool’s perspective, a bidi consists of several gates and includes an input port and an
output port. You can use the commands, report_primary_inputs and report_primary_outputs, to
view PIs and POs. Pins that are listed by both commands are bidirectional pins.
Certain other PI-specific and PO-specific commands accept a bidi pinname argument, and
enable you to act on just the applicable port functionality (input or output) of the bidi. For
example, you can use the delete_primary_inputs command with a bidirectional pin argument to
remove the input port of the bidi from the design interface. From then on, the tool will treat that
pin as a PO. You can use the delete_primary_outputs command similarly to delete the output
port of a bidi from the design interface, so the tool treats that bidi as a PI.
Note
Altering the design’s interface will result in generated patterns that are different than
those the tool would generate for the original interface. It also prevents verification of the
saved patterns using the original netlist interface. If you want to be able to verify saved
patterns by performing simulation using the original netlist interface, you must use the
commands described in the following subsections instead of the
delete_primary_inputs/outputs commands.
SETUP> report_primary_inputs
SYSTEM: /clk
SYSTEM: /rst
SYSTEM: /scan_in
SYSTEM: /scan_en
SYSTEM: /my_en
SYSTEM: /my_inout[2]
SYSTEM: /my_inout[1]
SYSTEM: /my_inout[0]
SETUP> report_primary_outputs
SYSTEM: /x_out[4]
SYSTEM: /x_out[3]
SYSTEM: /x_out[2]
SYSTEM: /x_out[1]
SYSTEM: /x_out[0]
SYSTEM: /my_inout[2]
SYSTEM: /my_inout[1]
SYSTEM: /my_inout[0]
Pins listed in the output of both commands (shown in bold font) are pins the tool will treat as
bidis during test generation. To force the tool to treat a bidi as a PI or PO, you can remove the
definition of the unwanted input or output port. The following example removes the input port
definition, then reports the PIs and POs. You can see the tool now only reports the bidis as POs,
which reflects how those pins will be treated during ATPG:
SETUP> report_primary_outputs
SYSTEM: /x_out[4]
SYSTEM: /x_out[3]
SYSTEM: /x_out[2]
SYSTEM: /x_out[1]
SYSTEM: /x_out[0]
SYSTEM: /my_inout[2]
SYSTEM: /my_inout[1]
SYSTEM: /my_inout[0]
Because the preceding approach alters the design’s interface within the tool, it may not be
acceptable in all cases. Another approach, explained earlier, is to have the tool treat a bidi as a
PI or PO during ATPG only, without altering the design interface. To obtain PO treatment for a
bidi, constrain the input part of the bidi to the high impedance state. The following command
does this for the /my_inout[0] bidi:
To have the tool treat a bidi as a PI during ATPG only, direct the tool to mask (ignore) the
output part of the bidi. The following example does this for the /my_inout[0] and /my_inout[1]
pins:
The “TIEX” in the output of “report_output_masks” indicates the two pins are now tied to X,
which blocks their observability and prevents the tool from using them during ATPG.
This command assigns a fixed value to every named floating net or pin in every module of the
circuit under test.
You can specify one or more primary input pin pathnames to be constrained to one of the
following formats: constant 0 (C0), constant 1 (C1), high impedance (CZ), or unknown (CX).
Note
The tool places faults they can only detect through masked outputs in the AU category—
not the UO category.
For a slow pad, the simulation of the I/O pad changes so that the value propagated into the
internal logic is X whenever the primary input is not driven. This causes an X to be captured for
all observation points dependent on the loopback value.
• delete_input_constraints — Resets the specified I/O pin back to the default simulation
mode.
• report_input_constraints — Displays all I/O pins marked as slow.
of reconvergence structure. For more comprehensive pulse generator support, use the
_pulse_generator primitive—see “Pulse Generators with User Defined Timing” in the
Tessent Cell Library Manual for complete information.
By default, contention checking is on, as are the switches -Warning and -Bus, causing the tool
to check tri-state driver buses and issue a warning if bus contention occurs during simulation.
For more information on the different contention checking options, refer to the
set_contention_check description in the Tessent Shell Reference Manual.
To display the current status of contention checking, use the report_environment command.
The three choices for bus contention fault effect are And, Or, and Wire (unknown behavior),
Wire being the default. The Wire option means that any different binary value results in an X
state. The truth tables for each type of bus contention fault effect are shown on the references
pages for the set_net_dominance description in the Tessent Shell Reference Manual.
On the other hand, if you have a net with multiple non-tri-state drivers, you may want to specify
this type of net’s output value when its drivers have different values. Using the
set_net_resolution command, you can set the net’s behavior to And, Or, or Wire (unknown
behavior). The default Wire option requires all inputs to be at the same state to create a known
output value. Some loss of test coverage can result unless the behavior is set to And (wired-and)
or Or (wired-or). To set the multi-driver net behavior, at the setup mode prompt, you use the
set_net_resolution command.
The default for the ATPG tool is to treat a Z state as an X state. If you want to account for Z
state values during simulation, you can issue the set_z_handling command.
Internal Z handling specifies how to treat the high impedance state when the tri-state network
feeds internal logic gates. External handling specifies how to treat the high impedance state at
the circuit primary outputs. The ability of the tester normally determines this behavior.
To set the internal or external Z handling, use the set_z_handling command at the setup mode
prompt.
For internal tri-state driver nets, you can specify the treatment of high impedance as a 0 state, a
1 state, and an unknown state.
Note
This command is not necessary if the circuit model already reflects the existence of a pull
gate on the tri-state net.
For example, to specify that the tester does not measure high impedance, enter the following:
For external tri-state nets, you can also specify that the tool measures high impedance as a 0
state and distinguished from a 1 state (0), measures high impedance as a 1 state and
distinguished from a 0 state (1), measures high impedance as unique and distinguishable from
both a 1 and 0 state (Z).
For example, the tool lets you turn the learning process off or change the amount of effort put
into the analysis. You can accomplish this for combinational logic using the set_static_learning
command.
By default, static learning is on and the simulation activity limit is 1000. This number ensures a
good trade-off between analysis effort and process time. If you want the ATPG tool to perform
maximum circuit learning, you should set the activity limit to the number of gates in the design.
By default, state transition graph extraction is on. For more information on the learning process,
refer to “Learning Analysis” on page 77.
For example, examine the design of Figure 6-5. It shows a design fragment which fails the C3
rules check.
1
d d
0
Q1 Q2
(source) (sink)
To allow greater flexibility of capture handling for these types of situations, the tool provides
some commands that alter the default simulation behavior. The set_split_capture_cycle
command, for example, effects whether or not the tool updates simulation data between clock
edges. When set to “on”, the tool is able to determine correct capture values for trailing edge
and level-sensitive state elements despite C3 and C4 violations. If you get these violations, issue
the set_split_capture_cycle ON command.
You can select modified capture handling for level sensitive or trailing edge gates. For these
types of gates, you select whether you want simulation to use old data, new data, or X values.
The set_capture_handling command changes the data capture handling globally for all the
specified types of gates that fail C3 and C4. If you want to selectively change capture handling,
you can use the add_capture_handling command.
You can specify the type of data to capture, whether the specified gate(s) is a source or sink
point, and the gates or objects (identified by ID number, pin names, instance names, or cell
model names) for which to apply the special capture handling.
Note
When you change capture handling to simulate new data, the tool only performs new data
simulation for one additional level of circuitry. That is, sink gates capture new values
from their sources. However, if the sources are also sinks that are set to capture new data,
the tool does not simulate this effect.
With transient detection off, DRC simulation treats all events on state elements as valid.
Because the simulator is a zero delay simulator, it is possible for DRC to simulate zero-width
monostable circuits with ideal behavior, which is rarely matched in silicon. The tool treats the
resulting zero-width output pulse from the monostable circuit as a valid clocking event for other
state elements. Thus, state elements change state although their clock lines show no clocking
event.
With transient detection on, the tool sets state elements to a value of X if the zero-width event
causes a change of state in the state elements. This is the default behavior upon invocation of the
tool.
You must specify the off-state for pins you add to the clock list. The off-state is the state in
which clock inputs of latches are inactive. For edge-triggered devices, the off-state is the clock
value prior to the clock’s capturing transition. You add clock pins to the list by using the
add_clocks command.
You can constrain a clock pin to its off-state to suppress its usage as a capture clock during the
ATPG process. The constrained value must be the same as the clock off-state, otherwise an
error occurs. If you add an equivalence pin to the clock list, all of its defined equivalent pins are
also automatically added to the clock list.
Note
Scan chains of a scan group can share a common scan input pin, but this condition
requires that both scan chains contain the same data after loading.
Note
If you choose to turn off the clock restriction, you should verify the generated pattern set
using a timing simulator—to ensure there are no timing errors.
You identify a scan cell by either a pin pathname or a scan chain name plus the cell’s position in
the scan chain.
If you specify the pin pathname, it must be the name of an output pin directly connected
(through only buffers and inverters) to a scan memory element. In this case, the tool sets the
scan memory element to a value such that the pin is at the constrained value. An error condition
occurs if the pin pathname does not resolve to a scan memory element.
If you identify the scan cell by chain and position, the scan chain must be a currently-defined
scan chain and the position is a valid scan cell position number. The scan cell closest to the
scan-out pin is in position 0. The tool constrains the scan cell’s MASTER memory element to
the selected value. If there are inverters between the MASTER element and the scan cell output,
they may invert the output’s value.
You can specify that the listed pin pathnames, or all the pins on the boundary and inside the
named instances, are not allowed to have faults included in the fault list.
The ATPG tool performs model flattening, learning analysis, and rules checking when you try
to exit setup mode. Each of these processes is explained in detail in “Understanding Common
Tool Terminology and Concepts” on page 63. To change from setup to one of the other system
modes, you enter the set_system_mode command.
Note
The ATPG tool does not require the Drc mode because it uses the same internal design
model for all of its processes.
The “Troubleshooting Rules Violations” section in the Tessent Shell Reference Manual
discusses some procedures for debugging rules violations. The Debug window of
DFTVisualizer is especially useful for analyzing and debugging certain rules violations. The
“Attributes and DFTVisualizer” section in the Tessent User’s Manual discusses DFTVisualizer
in detail.
Fault Simulation
The following subsections discuss the procedures for setting up and running fault simulation
using the ATPG tool.
If you wish to change the fault type to toggle, pseudo stuck-at (IDDQ), transition, path delay, or
bridge, you can issue the set_fault_type command.
Whenever you change the fault type, the application deletes the current fault list and current
internal pattern set.
Typically, you would create this list using all faults as follows:
“Setting Up the Fault Information for ATPG” on page 173 provides more information on
creating the fault list and specifying other fault information.
Note
You may notice a slight drop in test coverage when using an external pattern set as
compared to using generated patterns. This is an artificial drop.
The ATPG tool can perform simulation with a select number of random patterns. Refer to the
Tessent Shell Reference Manual for additional information about these application-specific
simulate_patterns command options.
Refer to “Writing Faults to an External File” on page 175 or the write_faults description in the
Tessent Shell Reference Manual for command option details.
To read the faults back in for ATPG, go to analysis mode (using set_system_mode) and enter
the read_faults command.
The add_lists command specifies which pins you want reported. The set_list_file command
specifies the name of the file in which to place simulation values for the selected pins. The
default behavior is to write pin values to standard output.
Good-Machine Simulation
Given a test vector, you use good machine simulation to predict the logic values in the good
(fault-free) circuit at all the circuit outputs. The following subsections discuss the procedures
for running good simulation on existing hand- or ATPG-generated pattern sets using the ATPG
tool.
The add_lists command specifies which pins to report. The set_list_file command specifies the
name of the file in which you want to place simulation values for the selected pins.
If you prefer to perform interactive debugging, you can use the simulate_patterns and
report_gates commands to examine internal pin values.
In this example, the delete_faults command with the -untestable switch removes faults from the
fault list that are untestable using random patterns.
After the simulation run, you can display the undetected faults with the report_faults command.
Some of the undetected faults may be redundant. You can run ATPG on the undetected faults to
identify those that are redundant.
After the application identifies all the faults, it implements a process of structural equivalence
fault collapsing from the original uncollapsed fault list. From this point on, the application
works on the collapsed fault list. The results, however, are reported for both the uncollapsed and
collapsed fault lists. Executing any command that changes the fault list causes the tool to
discard all patterns in the current internal test pattern set due to the probable introduction of
inconsistencies. Also, whenever you re-enter setup mode, it deletes all faults from the current
fault list. The following subsections describe how to create a fault list and define fault related
information.
For example, assuming your circuit passes rules checking with no violations, you can exit the
setup system mode and enter the analysis system mode as follows:
If you wish to change the fault type to toggle, pseudo stuck-at (IDDQ), transition, or path delay,
you can issue the set_fault_type command.
Whenever you change the fault type, the application deletes the current fault list and current
internal pattern set.
If you do not want all possible faults in the list, you can use other options of the add_faults
command to restrict the added faults. You can also specify no-faulted instances to limit placing
faults in the list. You flag instances as “Nofault” while in setup mode. For more information,
refer to “Adding Nofault Settings” on page 169.
When the tool first generates the fault list, it classifies all faults as uncontrolled (UC).
• delete_faults — Deletes the specified faults from the current fault list.
• report_faults — Displays the specified types of faults.
You must enter either a list of object names (pin pathnames or instance names) or use the -All
switch to indicate the pins whose faults you want added to the fault list. You can use the -Stuck-
at switch to indicate which stuck faults on the selected pins you want added to the list. If you do
not use the Stuck-at switch, the tool adds both stuck-at-0 and stuck-at-1 faults. The tool initially
places faults added to a fault list in the undetected-uncontrolled (UC) fault class.
The applications support external fault files in the 3, 4, or 6 column formats. The only data they
use from the external file is the first column (stuck-at value) and the last column (pin
pathname), unless you use the -Restore option.
The -Retain option causes the application to retain the fault class (second column of
information) from the external fault list. The -Delete option deletes all faults in the specified file
from the internal faults list. The -DELETE_Equivalent option, in the ATPG tool, deletes from
the internal fault list all faults listed in the file, as well as all their equivalent faults.
Note
In the ATPG tool, the filename specified cannot have fault information lines with
comments appended to the end of the lines or fault information lines greater than five
columns. The tool will not recognize the line properly and will not add the fault on that
line to the fault list.
You must specify a percentage (between 1 and 100) of the total faults you want processed.
The selected credit may be any positive integer less than or equal to 100, the default being 50%.
Performing ATPG
Obtaining the optimal test set in the least amount of time is a desirable goal. Figure 6-6 outlines
how to most effectively meet this goal.
Set Up for
ATPG
Create Patterns
N
Coverage Adjust
Good? ATPG Approach
Write Patterns
The first step in the process is to perform any special setup you may want for ATPG. This
includes such things as setting limits on the pattern creation process itself. The second step is to
create patterns with default settings (see page 185). This is a very fast way to determine how
close you are to your testability goals. You may even obtain the test coverage you desire from
your very first run. However, if your test coverage is not at the required level, you may have to
troubleshoot the reasons for the inadequate coverage and create additional patterns using other
approaches (see page 185).
If the initial patterns are unsatisfactory, then run the create_patterns command a second time. If,
however, you are still unable to create a satisfactory pattern set, then use the set_pattern_type
command in conjunction with the create_patterns command using the following sequence:
A reasonable practice is creating patterns using these two commands with the sequential depth
set to 2. This is described in more detail in “Creating Patterns with Default Settings” on
page 185.
During deterministic pattern generation, only the restricted values on the constrained circuitry
are allowed. Unlike pin and scan cell constraints, which are only available in setup mode, you
can define ATPG constraints in any system mode after design flattening. If you want to set
ATPG constraints prior to performing design rules checking, you must first create a flattened
model of the design using the create_flat_model command.
ATPG constraints are useful when you know something about the way the circuit behaves that
you want the ATPG process to examine. For example, the design may have a portion of
circuitry that behaves like a bus system; that is, only one of various inputs may be on, or
selected, at a time. Using ATPG constraints, combined with a defined ATPG function, you can
specify this information to the ATPG tool. ATPG functions place artificial Boolean
relationships on circuitry within your design. After defining the functionality of a portion of
circuitry with an ATPG function, you can then constrain the value of the function as desired
with an ATPG constraint. This is more useful than just constraining a point in a design to a
specific value.
To define ATPG functions, use the add_atpg_functions command. When using this command,
you specify a name, a function type, and an object to which the function applies.
You can specify ATPG constraints with the add_atpg_constraints command. When using this
command, you specify a value, an object, a location, and a type.
Test generation considers all current constraints. However, design rules checking considers only
static constraints. You can only add or delete static constraints in setup mode. Design rules
checking generally does not consider dynamic constraints, but there are some exceptions
detailed in the set_drc_handling command reference description (see the Atpg_analysis and
ATPGC options). You can add or delete dynamic constraints at any time during the session. By
default, ATPG constraints are dynamic.
Figure 6-7 and the following commands give an example of how you use ATPG constraints and
functions together.
0
/u1
/u2 0 contention-
/u5 free
1
/u3
0
/u4
The circuitry of Figure 6-7 includes four gates whose outputs are the inputs of a fifth gate.
Assume you know that only one of the four inputs to gate /u5 can be on at a time, such as would
be true of four tri-state enables to a bus gate whose output must be contention-free. You can
specify this using the following commands:
These commands specify that the “select1” function applies to gates /u1, /u2, /u3, and /u4 and
the output of the select1 function should always be a 1. Deterministic pattern generation must
ensure these conditions are met. The conditions causing this constraint to be true are shown in
Table 6-1. When this constraint is true, gate /u5 will be contention-free.
Given the defined function and ATPG constraint you placed on the circuitry, the ATPG tool
only generates patterns using the values shown in Table 6-1.
Typically, if you have defined ATPG constraints, the tools do not perform random pattern
generation during ATPG. However, using the ATPG tool you can perform random pattern
simulation using simulate_patterns command. In this situation, the tool rejects patterns during
fault simulation that do not meet the currently-defined ATPG constraints.
Note that the port can only be an input or inout port on a top-level module, and the only
allowable values are “power” and “ground.” Also, the port cannot be an IJTAG port in the ICL
file, if present. And you cannot change the “function” attribute after reading in the flat model.
Setting the value to “power” has the effect of adding an input constraint of CT1 on that port; and
setting the value to “ground” has the effect of adding an input constraint of CT0 on that port.
The only way to remove these inferred constraints is by using the reset_attribute_value
command. That is, the delete_input_constraints and delete_pin_constraints commands do not
work in this situation.
After specifying the power and ground ports, you can write patterns that exclude those ports
using the “write_patterns -parameter_list” command. Also, the parameter file has a keyword
ALL_EXCLUDE_POWER_GROUND that allows you to control whether power and ground
ports are excluded from tester pattern file formats, such as STIL and WGL. For more
information, refer to the ALL_EXCLUDE_POWER_GROUND keyword description in the
“Parameter File Format and Keywords” section of the Tessent Shell User’s Manual.
Figure 6-9 explains how the simulation kernel models waveforms with DFFs and latches.
latch_a 1. The first frame of the CLK input forces the latch to output its init
value of 1 on the Q pin.
100 2. The second frame of the CLK input forces the level-sensitive CLK
D 100
010 Q ON, the latch evaluates its D input and outputs Q=0 for the second
CLK
frame.
3. The third frame of the CLK input forces the CLK OFF, the latch
latch
performs no evaluation and holds state Q=0 for the third frame.
flop_b (TE) 1. The first frame of the CLK input forces the DFF to output its init
value of 1 on the Q pin.
100 110 2. The second frame of the CLK input forces the CLK OFF, the DFF
D Q
101 001 holds state and outputs Q=1 for the second frame.
CLK QB
3. The third frame of the CLK input forces the CLK ON due to the
0➜1 edge, the DFF evaluates the third frame of its D input and
dff
outputs Q=0.
Note
Before you save a flattened version of your design, ensure you have specified all
necessary settings accurately. Some design information, such as that related to hierarchy,
is lost when you flatten the design. Consequently, commands that require this information
do not operate with the flattened netlist. Some settings, once incorporated in the flattened
netlist, cannot be changed (for example, a tied constraint you apply to a primary input
pin).
When you reinvoke the tool, you use this flattened netlist by specifying the “-flat” switch. The
tool reinvokes in the same mode (setup or analysis) the tool was in when you saved the flattened
model.
You flatten your design with the tool using one of the following methods depending on the
tool’s current mode:
• analysis mode — The tool automatically creates the flat model when you change from
setup to analysis mode using the set_system_mode command. After model flattening,
you save the flattened design using the write_flat_model command.
• setup mode — You can manually create a flattened model in setup mode using the
create_flat_model command. After model flattening, you save the flattened design using
the write_flat_model command.
You can read a flat model into the tool in setup mode using the read_flat_model command.
An advantage of using a flattened netlist rather a regular netlist, is that you save memory and
have room for more patterns.
Example Checkpointing
Suppose a large design takes several days for the ATPG tool to process. You do not want to
restart pattern creation from the beginning if a system failure ends ATPG one day after it
begins. The following dofile segment defines a checkpoint interval of 90 minutes and enables
checkpointing.
If you need to perform a continuation run, invoking on a flattened model can be much faster
than reflattening the netlist (see “Using a Flattened Model to Save Time and Memory” on
page 182 for more information). After the tool loads the design, but before you continue the
interrupted run, be sure to set all the same constraints you used in the interrupted run. The next
dofile segment uses checkpoint data to resume the interrupted run:
After it executes the above commands, the tool should be at the same fault grade and number of
patterns as when it last saved checkpoint data during the interrupted run. To complete the
pattern creation process, you can now use the create_patterns command as described in the next
section.
ANALYSIS> create_patterns
Review the transcript for any command or setting changes the tool suggests and implement
those that will help you achieve your test goals. Refer to the create_patterns command
description in the Tessent Shell Reference Manual for more information.
If the design has multiple clocks or non-scan sequential elements, consider issuing the
following command before “create_patterns”:
If the results do not meet your requirements, consider increasing the -sequential setting to 3, or
as high as 4. The set_pattern_type command reference page provides details on the use of this
command and can help you decide if you need it. Also, you can use the
report_sequential_fault_depth command to quickly assess the upper limits of coverage possible
under optimal test conditions for various sequential depths. This command displays an estimate
of the maximum test coverage possible at different sequential depth settings.
If the first pattern creation run gives inadequate coverage, refer to “Approaches for Improving
ATPG Efficiency” on page 185. To analyze the results if pattern creation fails, use the
analyze_atpg_constraints command and the analyze_restrictions command.
A high number of faults in the ATPG_untestable (AU) or PU fault categories indicates the
problem lies with tool constraints. PU faults are a type of possible-detected, or Posdet (PD),
fault. A high number of UC and UO faults, which are both Undetected (UD) faults, indicates the
problem lies with abort conditions. If you are unfamiliar with these fault categories, refer to
“Fault Classes” on page 53.
When trying to establish the cause of low test coverage, you should examine the messages the
tool prints during the deterministic test generation phase. These messages can alert you to what
might be wrong with respect to Redundant (RE) faults, ATPG_untestable (AU) faults, and
aborts. If you do not like the progress of the run, you can terminate the process with CTRL-C.
If a high number of aborted faults (UC or UO) appears to cause the problem, you can set the
abort limit to a higher number, or modify some command defaults to change the way the
application makes decisions. The number of aborted faults is high if reclassifying them as
Detected (DT) or Posdet (PD) would result in a meaningful improvement in test coverage. In
the tool’s coverage calculation (see “Testability Calculations” on page 61), these reclassified
faults would increase the numerator of the formula. You can quickly estimate how much
improvement would be possible using the formula and the fault statistics from your ATPG run.
The following subsections discuss several ways to handle aborted faults.
Note
Changing the abort limit is not always a viable solution for a low coverage problem. The
tool cannot detect ATPG_untestable (AU) faults, the most common cause of low test
coverage, even with an increased abort limit. Sometimes you may need to analyze why a
fault, or set of faults, remain undetected to understand what you can do.
Also, if you have defined several ATPG constraints or have specified set_contention_check On
-Atpg, the tool may not abort because of the fault, but because it cannot satisfy the required
conditions. In either of these cases, you should analyze the buses or ATPG constraints to ensure
the tool can satisfy the specified requirements.
The analyze_fault command runs ATPG on the specified fault, displaying information about the
processing and the end results. The application displays different data depending on the
circumstances. You can optionally display relevant circuitry in DFTVisualizer using the
-Display option. See the analyze_fault description in the Tessent Shell Reference Manual for
more information.
You can also report data from the ATPG run using the report_testability_data command within
the ATPG tool for a specific category of faults. This command displays information about
connectivity surrounding the problem areas. This information can give you some ideas as to
where the problem might lie, such as with RAM or clock PO circuitry. Refer to the
report_testability_data description in the Tessent Shell Reference Manual for more information.
The default for combinational ATPG is 30. The clock sequential abort limit defaults to the limit
set for combinational. Both the report_environment command and a message at the start of
deterministic test generation indicate the combinational and sequential abort limits. If they
differ, the sequential limit follows the combinational abort limit.
The application classifies any faults that remain undetected after reaching the limits as aborted
faults—which it considers undetected faults.
Related Command
report_aborted_faults — Displays and identifies the cause of aborted faults.
Note
The create_patterns command does not use random patterns when generating compressed
patterns.
This facilitates the ATPG process, however, it minimizes random pattern detection. This is not
always desirable, as you typically want generated patterns to randomly detect as many faults as
possible. To maximize random pattern detection, the tool provides the set_decision_order
command to allow flexible selection of control inputs and observe outputs during pattern
generation.
Low-Power ATPG
Low-power ATPG allows you to create test patterns that minimize the amount of switching
activity during test to reduce power consumption. Excessive power consumption can
overwhelm the circuit under test, causing it to malfunction.
Low-power ATPG controls switching activity during scan load/unload and capture as described
in the following topics:
• Low-Power Capture
• Low-Power Shift
Note
Low-power constraints are directly related to the number of test patterns generated in an
application. For example, using stricter low-power constraints results in more test
patterns.
Low-Power Capture
Low-power capture employs the clock gaters in a design to achieve the power target. Clock
gaters controlling untargeted portions of the design are turned off, while clock gaters controlling
targeted portions are turned on.
Power is controlled most effectively in designs that employ clock gaters, and especially
multiple levels of clock gaters (hierarchy), to control a majority of the state elements.
This low-power feature is available using the Capture option of the set_power_control
command.
Low-Power Shift
Low-power shift minimizes the switching activity during shift with a constant fill algorithm
where random values in scan chains are replaced with constant values as they are shifted
through the core; A repeat fill heuristic is used to generate the constant values. This low-power
feature is available in the ATPG tool using the set_power_control command during test pattern
generation.
Prerequisites
• Gate-level netlist with scan chains inserted.
• DFT strategy for your design. A test strategy helps define the most effective testing
process for your design.
Procedure
1. Invoke Tessent Shell:
% tessent -shell my_gate_scan.v -library my_lib.atpg \
-logfile log/atpg_cg.log -replace
Switching during the capture cycle is minimized to 30% and any test patterns that
exceed a 35% rejection threshold are discarded.
7. Turn on low-power shift. For example
Switching during scan chain loading is minimized to 20% and any test patterns that
exceed a 25% rejection threshold are discarded.
8. Create test patterns:
ANALYSIS> create_patterns
Test patterns are generated and the test pattern statistics and power metrics display.
9. Analyze reports, adjust power and test pattern settings until power and test coverage
goals are met. You can use the report_power_metrics command to report the capture
power usage associated with a specific instance or set of modules.
10. Save test patterns. For example:
ANALYSIS> write_patterns ../generated/patterns_edt_p.stil -stil -replace
Related Topics
Low-Power Capture set_power_control
Low-Power Shift
Additionally, the tool supports both selective and supplemental IDDQ test generation. The tool
creates a selective IDDQ test set when it selects a set of IDDQ patterns from a pre-existing set
of patterns originally generated for some purpose other than IDDQ test. The tool creates a
supplemental IDDQ test set when it generates an original set of IDDQ patterns based on the
pseudo stuck-at fault model. Before running either the supplemental or selective IDDQ process,
you must first set the fault type to IDDQ with the set_fault_type command.
During selective or supplemental IDDQ test generation, the tool classifies faults at the inputs of
sequential devices such as scan cells or non-scan cells as Blocked (BL) faults. This is because
the diversity of flip-flop and latch implementations means the pseudo stuck-at fault model
cannot reliably guide ATPG to create a good IDDQ test. In contrast, a simple combinational
logic gate has one common, fully complementary implementation (a NAND gate, for example,
has two parallel pFETs between its output and Vdd and two series nFETs between its output and
Vss), so the tool can more reliably declare pseudo stuck-at faults as detected. The switch level
implementation of a flip-flop varies so greatly that assuming a particular implementation is
highly suspect. The tool therefore takes a pessimistic view and reports coverage lower than it
actually is, because it is unlikely such defects will go undetected for all IDDQ patterns.
Using the ATPG tool, you can either select or generate IDDQ patterns using several user-
specified checks. These checks can help ensure that the IDDQ test vectors do not increase
IDDQ in the good circuit. The following subsections describe IDDQ pattern selection, test
generation, and user-specified checks in more detail.
By default, the ATPG tool places these statements at the end of patterns (cycles) that can
contain IDDQ measurements. You can manually add these statements to patterns (cycles)
within the external pattern set.
When you want to select patterns from an external set, you must specify which patterns can
contain an IDDQ measurement. If the pattern set contains no IDDQ measure statements, you
can specify that the tools assume the tester can make a measurement at the end of each pattern
or cycle. If the pattern set already contains IDDQ measure statements (if you manually added
these statements), you can specify that simulation should only occur for those patterns that
already contain an IDDQ measure statement, or label. To set this measurement information, use
the set_iddq_strobe command.
Additionally, you can set up restrictions that the selection process must abide by when choosing
the best IDDQ patterns. “Specifying Leakage Current Checks” on page 194 discusses these
IDDQ restrictions. To specify the IDDQ pattern selection criteria and run the selection process,
use select_iddq_patterns.
The select_iddq_patterns command fault simulates the current pattern source and determines
the IDDQ patterns that best meet the selection criteria you specify, thus creating an IDDQ test
pattern set. If working from an external pattern source, it reads the external patterns into the
internal pattern set, and places IDDQ measure statements within the selected patterns or cycles
of this test set based on the specified selection criteria.
1. Invoke Tessent Shell, set the context to “patterns -scan,” read in the netlist, set up the
appropriate parameters for ATPG run, pass rules checking, and enter analysis mode.
...
SETUP> set_system_mode analysis
This example assumes you set the fault type to stuck-at, or some fault type other than
IDDQ.
2. Run ATPG.
ANALYSIS> create_patterns
7. Assume IDDQ measurements can occur within each pattern or cycle in the external
pattern set.
ANALYSIS> set_iddq_strobe -all
8. Specify to select the best 15 IDDQ patterns that detect a minimum of 10 IDDQ faults
each.
Note
You could use the set_iddq_checks command prior to the ATPG run to place restrictions
on the selected patterns.
The generated IDDQ pattern set may contain more patterns than you want for IDDQ testing. At
this point, you just set up the IDDQ pattern selection criteria and run the selection process using
the select_iddq_patterns command.
Instead of creating a new fault list, you could load a previously-saved fault list. For
example, you could write the undetected faults from a previous ATPG run and load
them into the current session with read_faults command, using the faults as the basis for
the IDDQ ATPG run.
4. Run ATPG, generating patterns that target the IDDQ faults in the current fault list.
Note
You could use the set_iddq_checks command prior to the ATPG run to place restrictions
on the generated patterns.
ANALYSIS> create_patterns
5. Select the best 15 IDDQ patterns that detect a minimum of 10 IDDQ faults each.
ANALYSIS> select_iddq_patterns -max_measure 15 -threshold 10
Note
You did not need to specify which patterns could contain IDDQ measures with
set_iddq_strobe, as the generated internal pattern source already contains the appropriate
measure statements.
By default, the tool does not perform IDDQ checks. Both ATPG and fault simulation processes
consider the checks you specify.
The remainder of this section covers the specifics of the bridge fault model.
A simplified bridging fault model is adopted by defining the target net pairs as a set of stuck-at
faults. Each of the net pairs targeted by the bridge fault model is classified as dominant or
follower. A dominant net will force the follower net to take the same value as the dominant net
in the faulty circuit when the follower has an opposite logical value than the dominant net.
Let A and B be two gates with output signals sig_A and sig_B. When sig_A and sig_B are
bridged together, four faulty relationships can be defined:
• Gate-level Netlist
• ATPG Library
• Bridge Definition File or Calibre Server output file, here: from_calibre.sites
The following commands are specific to bridging fault ATPG and should be issued once in
analysis mode:
set_fault_type bridge
// FAULT TYPE SET TO 4WAY_DOM
read_fault_sites from_calibre.sites
// ALL BRIDGE NET PAIRS ARE LOADED
add_faults all
// GENERATE A LIST OF FAULTS BASED ON THE LOADED BRIDGE NET PAIRS
create_patterns
// GENERATES PATTERNS
write_patterns bridge_patterns.ascii
exit
The set_fault_type command with the bridge argument is the only specification needed for
generation of patterns that target the 4-Way Dominant fault model. The read_fault_sites
command is used to load the list of net pairs that should be targeted for the bridging fault model.
• Gate-level Netlist
• ATPG Library
• Bridge Definition File or Calibre Server output file, here: from_calibre.sites
The following example shows generation of patterns for bridging faults followed by stuck-at
faults. The following commands should be issued once in analysis mode:
set_fault_type bridge
// fault type set to 4way_dom
read_fault_sites from_calibre.sites
// all bridge net pairs are loaded
create_patterns
// generate a list of faults based on the loaded bridge net pairs,
// then generate patterns
write_patterns bridge_patterns.ascii
set_fault_type stuck
add_faults all
// adds all stuck-at faults
read_patterns bridge_patterns.ascii
// load external patterns and add to internal patterns
simulate_patterns
// simulate bridge patterns for stuck-at faults
report_statistics
set_fault_protection on
// protect stuck-at faults that were detected by bridge patterns
reset_state
// remove bridge patterns that were effective in detecting stuck-at faults
create_patterns
// generate new patterns for remaining faults
write_patterns stuck_patterns.ascii
exit
The next example shows generation of patterns for stuck-at faults followed by bridging faults.
The following commands should be issued once in analysis mode:
set_fault_type stuck
create_patterns
// adds all stuck-at faults and generates patterns
write_patterns stuck_patterns.ascii
set_fault_type bridge
// fault type set to 4way_dom
read_fault_sites from_calibre.sites
// all bridge net pairs are loaded
read_patterns stuck_patterns.ascii
simulate_patterns
// simulate stuck-at patterns for bridge faults
write_faults bridge_faults.detected -class DT
// save detected bridge faults to file
create_patterns
reset_state
// remove stuck-at patterns that were effective in detecting bridge faults
read_faults bridge_faults.detected -retain
// load detected bridge faults and retain detection status
create_patterns
// generate new patterns for remaining undetected bridge faults
write_patterns patterns_bridge.ascii
exit
File Syntax
Normally, you do not modify the generated bridge parameters file. If you do modify this file,
then you must adhere to the following syntax:
File Example
The following example shows the format of the bridge definition file. The keywords used in this
file are case insensitive.
The items DISTANCE, PARALLEL_RUN, WEIGTH, and LAYER are collectively referred to
as attributes of the bridge. For ATPG purposes, these attributes are ignored, and by default not
reported. You have to specify the -attribute option to according commands to see them. The unit
of length used for DISTANCE and PARALLEL_RUN is um (10^-6) meters.
Define Capture
Procedures
(Optional)
Analyze Coverage
Create Patterns
Your process may be different and it may involve multiple iterations through some of the steps,
based on your design and coverage goals. This section describes these two test types in more
detail and how you create them using the ATPG tool. The following topics are covered:
Figure 6-11 illustrates the six potential transition faults for a simple AND gate. These are
comprised of slow-to-rise and slow-to-fall transitions for each of the three terminals. Because a
transition delay test checks the speed at which a device can operate, it requires a two cycle test.
First, all the conditions for the test are set. In the figure, A and B are 0 and 1 respectively. Then
A
Y
B AND
Predetermined
test time
Y Measure/Capture
Launch
Y
Fail
Capture
Launch 0-1 Event
Event PI or 0-1 (measure PO)
(force PI) scan cell AND
X-1
X-0
X-0 NOR
X-0
PO or
X-1 AND scan cell
To detect a transition fault, a typical pattern includes the events in Figure 6-13.
This is a clock sequential pattern, commonly referred to as a broadside pattern. It has basic
timing similar to that shown in Figure 6-14 and is the kind of pattern the ATPG tool attempts to
create by default when the clock-sequential depth (the depth of non-scan sequential elements in
the design) is two or larger. You specify this depth with the set_pattern_type command’s
-Sequential switch. The default setting of this switch upon invocation is 0, so you would need to
change it to at least 2 to enable the tool to create broadside patterns.
Typically, this type of pattern eases restrictions on scan enable timing because of the relatively
large amount of time between the last shift and the launch. After the last shift, the clock is
pulsed at speed for the launch and capture cycles.
clk
scan_en
If it fails to create a broadside pattern, the tool next attempts to generate a pattern that includes
the events shown in Figure 6-15.
In this type of pattern, commonly referred to as a launch off last shift or just launch off shift
pattern, the transition occurs because of the last shift in the load scan chains procedure (event
#2) or the forcing of the primary inputs (event #3). Figure 6-16 shows the basic timing for a
launch that is triggered by the last shift.
clk
scan_en
If your design cannot support this requirement, you can direct the tool not to create launch off
shift patterns by including the -No_shift_launch switch when specifying transition faults with
the set_fault_type command.
Note
Launch off shift patterns require the scan enable signal for mux-scan designs to transition
from shift to capture mode at speed. Therefore, the scan enable must be globally routed
and timed similar to a clock. Also, because launch off shift patterns detect a certain
number of faults in non-functional paths as well as in the scan path, the test coverage
reported is usually higher than for broadside patterns which do not capture faults in non-
functional paths.
The following are example commands you could use at the command line or in a dofile to
generate broadside transition patterns:
To create transition patterns that launch off the last shift, use a sequence of commands similar to
this:
• set_abort_limit — Specifies the abort limit for the test pattern generator.
• set_fault_type — Specifies the fault model for which the tool develops or selects ATPG
patterns.
• set_pattern_type — Specifies the type of test patterns the ATPG simulation run uses.
4. Enter analysis system mode. This triggers the tool’s automatic design flattening and
rules checking processes.
SETUP> set_system_mode analysis
Within the test procedure file, timeplates are the mechanism used to define tester cycles and
specify where all event edges are placed in each cycle. As shown conceptually in Figure 6-14
for broadside testing, slow cycles are used for shifting (load and unload cycles) and fast cycles
for the launch and capture. Figure 6-17 shows the same diagram with example timing added.
clk
scan_en
This diagram now shows 400 nanosecond periods for the slow shift cycles defined in a
timeplate called tp_slow and 40 nanosecond periods for the fast launch and capture cycles
defined in a timeplate called tp_fast.
The following are example timeplates and procedures that would provide the timing shown in
Figure 6-17. For brevity, these excerpts do not comprise a complete test procedure. Normally,
there would be other procedures as well, like setup procedures.
In this example, there are 40 nanoseconds between the launch and capture clocks. If you want to
create this same timing between launch and capture events, but all your clock cycles have the
same period, you can skew the clock pulses within their cycle periods—if your tester can
provide this capability. Figure 6-18 shows how this skewed timing might look.
Launch Capture
clk
scan_en
The following timeplate and procedure excerpts show how skewed launch off shift pattern
events might be managed by timeplate definitions called tp_late and tp_early, in a test
procedure file:
Note
For brevity, these excerpts do not comprise a complete test procedure. The shift
procedure is not shown and normally there would be other procedures as well, like setup
procedures.
By moving the clock pulse later in the period for the load_unload and shift cycles and earlier in
the period for the capture cycle, the 40 nanosecond time period between the launch and capture
clocks is achieved.
• False Path — A path that cannot be sensitized in the functional mode of operation (the
STA tool ignores these paths when determining the timing performance of a circuit).
• Multicycle Path — A path with a signal propagation delay of more than one clock
cycle. Figure 6-19 shows path P1 beginning at flip-flop U1, going through gates G1, G3,
G5, and G6, and ending at flip-flop U5. This path has a total propagation delay longer
than the clock period.
You should evaluate the effect of timing exception paths for any sequential pattern containing
multiple at-speed capture clock pulses, either from the same clock or from different clocks. This
includes the following pattern types:
Figure 6-20 illustrates how setup and hold time exceptions can produce the following timing
exception path violations: Setup Time Violations and Hold Time Violations.
• False paths you manually specify with add_false_paths command using the -hold
switch—see “Manually Specifying False Paths for Hold Time Violation Checks”.
• False paths between two clock domains.
• Multicycle paths with a path multiplier of 0 (zero).
Figure 6-21 illustrates a hold time violation occurring across different clock domains.
Figure 6-21 shows the false paths from the clock domain Clk1 to the clock domain Clk2. In this
figure, when a test pattern has a clock sequence of simultaneously pulsing both Clk1 and Clk2,
there can be a hold time violation from the flip-flop U1 or U2 to the flip-flop U3.
In Figure 6-21, pulsing clocks Clk1 and Clk2 simultaneously places the new value 1 at the D
input of flip-flop U1, creating a rising transition on the flip-flop U1’s Q output. This transition
sensitizes the path from the flip-flop U1 to the flip-flop U3. If the clock Clk2 arrives late at the
flip-flop U3 the new value 0 is captured at the flip-flop U3 instead of the old value 1.
Tip: Before using the write_sdc command, use the PrimeTime transform_exceptions
command to eliminate redundant, overridden or invalid exceptions.
If you can get the information into an SDC file, you can use the read_sdc command to read in
the false path definitions from the file.
The following is an example of the use of this command in a typical command sequence for
creating broadside transition patterns:
If you already have a pattern set for your design and want to see the effect of adding the false
and multicycle path information, the command sequence is slightly different:
As a result of simulating the patterns using the false and multicycle path information, the
patterns read in from the external pattern file will now be stored in the tool’s internal pattern set,
with some capture values in the internal patterns changed to “X”. These changed values
represent masking the tool applied to adjust for false and multicycle path effects. The Xs will
increase the number of undetected faults slightly and lower the test coverage; however, the
patterns will be more correct and will eliminate mismatches related to those capture values.
Note
You can save the patterns that include the false and/or multicycle path information as
usual. For example:
ANALYSIS> write_patterns my_patterns_falsepaths.v -verilog
ANALYSIS> write_patterns my_patterns_falsepaths.ascii -ascii
• all_clocks
• create_clock [-name clock_name]
• create_generated_clock [-name clock name]
• get_clocks
• get_generated_clocks
• get_pins
• get_ports
• set_case_analysis value port_or_pin_list
• set_clock_groups
• set_disable_timing [-from from_pin_name] [-to to_pin_name] cell_pin_list
• set_false_path [-setup] [-hold] [-from from_list] [-to to_list] [-through through_list]
• set_hierarchy_separator
• set_multicycle_path [-setup] [-hold] [-from from_list] [-to to_list]
[-through through_list]
Note
For complete information on these commands and arguments, refer to your SDC
documentation.
To avoid problems extracting the timing exception paths from the SDC specifications, the best
results are obtained when the SDC file is written out by the PrimeTime static timing analysis
(STA) tool. Mentor Graphics highly recommends that within PrimeTime you use the
transform_exceptions command before saving the SDC file. This command removes any
redundant, invalid and overridden path exceptions. Then use the write_sdc command to save the
updated information to a file you can use with read_sdc.
When performing this operation, you must be specific and accurate when specifying false (and
multicycle) paths during the STA process, and to maintain the same accuracy when using the
add_false_paths command.
For example, defining non-specify false path definition with the following command:
add_false_paths -from U3
would result in the propagation of the false path out through the design in an effect cone
encompassing all possible paths from that node. Figure 6-22 shows an illustration of this.
them in an ASCII path definition file you create. You then load the list of paths into the tool.
“The Path Definition File” on page 220 describes how to create and use this file.
Capture
Launch 0-1 Event
Event PI or 0-1 (measure PO)
(force PI) scan cell AND
1-1 1-0
0-0 NOR
1-0
AND PO or
1-1 scan cell
Path delay patterns are a variant of clock-sequential patterns. A typical pattern to detect a path
delay fault includes the following events:
Note
Path delay testing often requires greater depth than for stuck-at fault testing. The
sequential depths that the tool calculates and reports are the minimums for stuck-at
testing.
To get maximum benefit from path delay testing, the launch and capture events must have
accurate timing. The timing for all other events is not critical.
The ATPG tool detects a path delay fault with either a robust test, a non-robust test, or a
functional test. If you save a path delay pattern in ASCII format, the tool includes comments in
the file that indicate which of these three types of detection the pattern uses. Robust detection
occurs when the gating inputs used to sensitize the path are stable from the time of the launch
event to the time of the capture event. Robust detection keeps the gating of the path constant
during fault detection and thus, does not affect the path timing. Because it avoids any possible
reconvergent timing effects, it is the most desirable type of detection and for that reason is the
approach the ATPG tool tries first. The tool, however, cannot use robust detection on many
paths because of its restrictive nature and if it is unable to create a robust test, it will
automatically try to create a non-robust test. The application places faults detected by robust
detection in the DR (det_robust) fault class.
Figure 6-24 gives an example of robust detection for a rising-edge transition within a simple
path. Notice that, due to the circuitry, the gating value at the second OR gate was able to retain
the proper value for detection during the entire time from launch to capture events.
Initial State
Launch Point
Capture Point
1
0 X
AND 1 1
1 OR X
1 0
0 1 0
OR
1
After Transition
Launch Point
Capture Point
0
1 X
AND 0 0
1 0 OR X
1
1
1
1
OR
0
Gating Value Constant
During Transition
Non-robust detection does not require constant values on the gating inputs used to sensitize the
path. It only requires the proper gating values at the time of the capture event. The ATPG tool
places faults detected by non-robust detection in the DS (det_simulation) fault class.
Figure 6-25 gives an example of non-robust detection for a rising-edge transition within a
simple path.
Initial State
Launch Point
Capture Point
1
0X
AND 1 1
1 1 OR X
1
0 1
AND 0
1
After Transition
Launch Point
Capture Point
0
1X
AND 0 0
1 0 OR X
1
1 0
AND 1
1 Gating Value Changed
During Transition
Notice that due to the circuitry, the gating value on the OR gate changed during the 0 to 1
transition placed at the launch point. Thus, the proper gating value was only at the OR gate at
the capture event.
Functional detection further relaxes the requirements on the gating inputs used to sensitize the
path. The gating of the path does not have to be stable as in robust detection, nor does it have to
be sensitizing at the capture event, as required by non-robust detection. Functional detection
requires only that the gating inputs not block propagation of a transition along the path. The tool
places faults detected by functional detection in the det_functional (DF) fault class.
Figure 6-26 gives an example of functional detection for a rising-edge transition within a simple
path. Notice that, due to the circuitry, the gating (off-path) value on the OR gate is neither
stable, nor sensitizing at the time of the capture event. However, the path input transition still
propagates to the path output.
Initial State
Launch Point
Capture Point
0
0X
AND 0 0
1 0 OR X
1
0 1 1 0
AND
1
1
After Transition
Launch Point
Capture Point
1
1 X
AND 1 1
1 1 OR X
1
1 0
AND 0 1
1 1 Gating Value Changed
During Transition
• add_ambiguous_paths — Specifies the number of paths the tool should select when
encountering an ambiguous path.
• analyze_fault — Analyzes a fault, including path delay faults, to determine why it was
not detected.
• delete_fault_sites — Deletes paths from the internal path list.
• read_fault_sites — Loads in a file of path definitions from an external file.
• report_fault_sites — Reports information on paths in the path list.
• report_statistics — Displays simulation statistics, including the number of detected
faults in each fault class.
• set_pathdelay_holdpi — Sets whether non-clock primary inputs can change after the
first pattern force, during ATPG.
• write_fault_sites — Writes information on paths in the path list to an external file.
0-1
PI or 0-1 0-1
scan cell 0-1 PO or
AND scan cell
1 - 1 (tool’s preference) Capture
Launch
Event 0 - 1 (your preference) Event
(force PI) (measure PO)
d To other circuit
elements requiring
a 0-1 transition
A defined path includes a 2-input AND gate with one input on the path, the other
connected to the output of a scan cell. For a robust test, the AND gate’s off-path or
gating input needs a constant 1. The tool, in exercising its preference for a robust test,
would try to create a pattern that achieved this. Suppose however that you wanted the
circuit elements fed by the scan cell to receive a 0-1 transition. You could add a
transition_condition statement to the path definition, specifying a rising transition for
the scan cell. The path capture point maintains a 0-1 transition, so remains testable with
a non-robust test, and you also get the desired transition for the other circuit elements.
• Pin — A required statement that identifies a pin in the path by its full pin pathname. Pin
statements in a path must be ordered from launch point to capture point. A “+” or “-”
after the pin pathname indicates the inversion of the pin with respect to the launch point.
A “+” indicates no inversion (you want a transition identical to the launch transition on
that pin), while a “-” indicates inversion (you want a transition opposite the launch
transition).
Note
If you use “+” or “-” in any pin statement, you must include a “+” for the launch point.
The polarity of the launch transition must always be “+”.
You must specify a minimum of two pin statements, the first being a valid launch point
(primary input or data output of a state element or RAM) and the last being a valid
capture point (primary output, data or clk input of a state element, or data input of a
RAM). The current pin must have a combinational connectivity path to the previous pin
and the edge parity must be consistent with the path circuitry. If a statement violates
either of these conditions, the tool issues an error. If the path has edge or path ambiguity,
it issues a warning.
Paths can include state elements (through data or clock inputs), but you must explicitly
name the data or clock pins in the path. If you do not, the tool does not recognize the
path and issues a corresponding message.
• End — A required statement that signals the completion of data for the current path.
Optionally, following the end statement, you can specify the name of the path. However,
if the name does not match the pathname specified with the path statement, the tool
issues an error.
The following shows the path definition syntax:
PATH <pathname> =
CONDition <pin_pathname> <0|1|Z>;
TRANsition_condition <pin_pathname> <Rising|Falling|Same|Opposite>;
PIN <pin_pathname> [+|-];
PIN <pin_pathname> [+|-];
...
PIN <pin_pathname> [+|-];
END [pathname];
PATH "path0" =
PIN /I$6/Q + ;
PIN /I$35/B0 + ;
PIN /I$35/C0 + ;
PIN /I$1/I$650/IN + ;
PIN /I$1/I$650/OUT - ;
PIN /I$1/I$951/I$1/IN - ;
PIN /I$1/I$951/I$1/OUT + ;
PIN /A_EQ_B + ;
END ;
PATH "path1" =
PIN /I$6/Q + ;
PIN /I$35/B0 + ;
PIN /I$35/C0 + ;
PIN /I$1/I$650/IN + ;
PIN /I$1/I$650/OUT - ;
PIN /I$1/I$684/I1 - ;
PIN /I$1/I$684/OUT - ;
PIN /I$5/D - ;
END ;
PATH "path2" =
PIN /I$5/Q + ;
PIN /I$35/B1 + ;
PIN /I$35/C1 + ;
PIN /I$1/I$649/IN + ;
PIN /I$1/I$649/OUT - ;
PIN /I$1/I$622/I2 - ;
PIN /I$1/I$622/OUT - ;
PIN /A_EQ_B + ;
END ;
PATH "path3" =
PIN /I$5/QB + ;
PIN /I$6/TI + ;
END ;
You use the read_fault_sites command to read in the path definition file. The tool loads the
paths from this file into an internal path list. You can add to this list by adding paths to a new
file and re-issuing the read_fault_sites command with the new filename.
Gate3 Gate5
Gate4
Defined Points
In this example, the defined points are an input of Gate2 and an input of Gate7. Two paths exist
between these points, thus creating path ambiguity. When the ATPG tool encounters this
situation, it issues a warning message and selects a path, typically the first fanout of the
ambiguity. If you want the tool to select more than one path, you can specify this with the
add_ambiguous_paths command.
During path checking, the tool can also encounter edge ambiguity. Edge ambiguity occurs when
a gate along the path has the ability to either keep or invert the path edge, depending on the
value of another input of the gate. Figure 6-29 shows a path with edge ambiguity due to the
XOR gate in the path.
Path Edges
/
Gate XOR
0/1
The XOR gate in this path can act as an inverter or buffer of the input path edge, depending on
the value at its other input. Thus, the edge at the output of the XOR is ambiguous. The path
definition file lets you indicate edge relationships of the defined points in the path. You do this
by specifying a “+” or “-” for each defined point, as was previously described in “The Path
Definition File” on page 220.
6. Enter analysis system mode. This triggers the tool’s automatic design flattening and
rules checking processes.
7. Set the fault type to path delay:
ANALYSIS> set_fault_type path_delay
8. Write a path definition file with all the paths you want to test. “The Path Definition File”
on page 220 describes this file in detail. If you want, you can do this prior to the session.
You can only add faults based on the paths defined in this file.
9. Load the path definition file (assumed for the purpose of illustration to be named
path_file_1):
ANALYSIS> read_fault_sites path_file_1
10. Specify any ambiguous paths you want the tool to add to its internal path list. The
following example specifies to add all ambiguous paths up to a maximum of 4.
ANALYSIS> add_ambiguous_paths -all -max_paths 4
11. Define faults for the paths in the tool’s internal path list:
ANALYSIS> add_faults -all
This adds a rising edge and falling edge fault to the tool’s path delay fault list for each
defined path.
12. Perform an analysis on the specified paths and delete those the analysis proves are un-
sensitizable:
ANALYSIS> delete_fault_sites -unsensitizable_paths
• RAMs Within a Specified Path — A RAM as a launch point is supported only if the
launch point is at the RAM’s output. A RAM as a capture point is supported only if the
capture point is at the RAM’s input.
• Paths Starting at a Combinationally Transparent Latch — A combinationally
transparent latch as a capture point is supported only if the capture point is at the latch’s
input.
• Path Starting and/or Ending at ROM — You should model ROM as a read-only
CRAM primitive (that is, without any _write operation) to enable the tool to support
path delay testing starting and/or ending at ROM.
A named capture procedure is an optional procedure, with a unique name, used to define
explicit clock cycles. Named capture procedures can be used for generating stuck-at, path delay,
and broadside transition patterns, but not launch off shift transition patterns. You can create
named capture procedures using the create_capture_procedures command and then write out the
procedures using the write_procfile command. You can also manually create or edit named
capture procedures using an external editor if needed. For information on manually creating and
editing named capture procedures, see the “Rules for Creating and Editing Named Capture
Procedures” section in the Tessent Shell User’s Manual.
When the test procedure file contains named capture procedures, the ATPG tool generates
patterns that conform to the waveforms described by those procedures. Alternatively, you can
use the set_capture_procedures command to disable a subset of the named capture procedures,
and only the enabled subset is used. For example, you might want to exclude named capture
procedures that are unable to detect certain types of faults during test pattern generation.
You can have multiple named capture procedures within one test procedure file in addition to
the default capture procedure the file typically contains. Each named capture procedure must
reflect clock behavior that the clocking circuitry is actually capable of producing. When you use
a named capture procedure to define a waveform, it is assumed you have expert design
knowledge; the ATPG tool does not verify that the clocking circuitry is capable of delivering
the waveform to the defined internal pins.
The ATPG tool uses either all named capture procedures (the default) or only those named
capture procedures you enable with the set_capture_procedures command. When the test
procedure file does not contain named capture procedures, or you use the “set capture procedure
off -all” command, the tool uses the default capture procedure. However, usually you would not
use the default procedure to generate at-speed tests. The tool does not currently support use of
both named capture procedures and clock procedures in a single ATPG session.
Note
If a DRC error prevents use of a capture procedure, the run will abort.
For more information on named capture procedures, see the “Non-Scan Procedures” section in
the Tessent Shell User’s Manual.
Integrated Circuit
clk1
system clk PLL
PLL clk2
begin_ac
Control
scan_en cntrl Design
Core
scan_clk1
scan_clk2
system_clk
scan_en
begin_ac
scan_clk1
scan_clk2
clk1
clk2
The internal mode is used to describe what happens on the internal side of the on-chip PLL
control logic, while the external mode is used to describe what happens on the external side of
the on-chip PLL. Figure 6-30 shows how this might look. The internal mode uses the internal
clocks (/pll/clk1 & /pll/clk2) and signals while the external mode uses the external clocks
(system_clk) and signals (begin_ac & scan_en). If any external clocks or signals go to both the
PLL and to other internal chip circuitry (scan_en), you need to specify their behavior in both
modes and they need to match, as shown in the following example (timing is from Figure 6-31):
timeplate tp_cap_clk_slow =
force_pi 0;
pulse /pll/clk1 20 20;
pulse /pll/clk2 40 20;
period 80;
end;
timeplate tp_cap_clk_fast =
force_pi 0;
pulse /pll/clk1 10 10;
pulse /pll/clk2 20 10;
period 40;
end;
timeplate tp_ext =
force_pi 0;
measure_po 10;
force begin_ac 60;
pulse system_clk 0 60;
period 120;
end;
mode internal =
cycle slow =
timeplate tp_cap_clk_slow;
force system_clk 0;
force scan_clk1 0;
force scan_clk2 0;
force scan_en 0;
force_pi;
force /pll/clk1 0;
force /pll/clk2 0;
pulse /pll/clk1;
end;
// launch cycle
cycle =
timeplate tp_cap_clk_fast;
pulse /pll/clk2;
end;
// capture cycle
cycle =
timeplate tp_cap_clk_fast;
pulse /pll/clk1;
end;
cycle slow =
timeplate tp_cap_clk_slow;
pulse /pll/clk2;
end;
end;
mode external =
timeplate tp_ext;
cycle =
force system_clk 0;
force scan_clk1 0;
force scan_clk2 0;
force scan_en 0;
force_pi;
force begin_ac 1;
pulse system_clk;
end;
cycle =
force begin_ac 0;
pulse system_clk;
end;
end;
end;
For more information about internal and external modes, see the “Rules for Creating and
Editing Named Capture Procedures” section in the Tessent Shell User’s Manual.
You can use the report_capture_procedures command to display the cyclized procedure
information with annotations that indicate the timing of the cycles and where the at-speed
sequences begin and end. If you want to view the procedures in their unaltered form in the test
procedure file, use the report_procedures command.
After cyclizing the internal mode information, the tool automatically adjusts the sequential
depth to match the number of cycles that resulted from the cyclizing process. Patterns will
automatically reflect any sequential depth adjustment the tool performs.
50 ns 50 ns 50 ns
cycle C cycle A
clk
100 ns 50 ns
cycle A
clk1
clk2
0 ns 50 ns
Tool expands cycle A into 2 cycles internally for simulation.
cycle A cycle B
clk1
clk2
0 ns 50 ns
Note
You may need to manually edit the named capture procedure in the test procedure file to
achieve the functionality you want. For example, you may need to add condition
statements or add external mode definitions. For information on rules to follow when
editing named capture procedures, see the “Rules for Creating and Editing Named
Capture Procedures” section in the Tessent Shell User’s Manual.
For example, when setting up for pattern generation for the example circuit shown in
Figure 6-30, you would issue this command to define the internal clocks:
The two PLL clocks would then be available to the tool’s ATPG engine for pattern generation.
Note
The -Mode_internal switch is also necessary if you want patterns to include internal pin
events specified in scan procedures (test_setup, shift, load_unload).
To obtain pattern sets that can run on a tester, you need to write patterns that contain only the
true primary inputs to the chip. These are the clocks and signals used in the external mode of
any named capture procedures, not the internal mode. To accomplish this, you must use the
-Mode_external switch with the write_patterns command. This switch directs the tool to map
the information contained in the internal mode blocks back to the external signals and clocks
that comprise the I/O of the chip. The -Mode_external switch is the default when saving
patterns in a tester format (for example, WGL) and Verilog format.
Note
The -Mode_external switch ignores internal pin events in scan procedures (test_setup,
shift, load_unload).
Mux-DFF Example
In a full scan design, the vast majority of transition faults are between scan cells (or cell to cell)
in the design. There are also some faults between the PI to cells and cells to the PO. Targeting
these latter faults can be more complicated, mostly because running these test patterns on the
tester can be challenging. For example, the tester performance or timing resolution at regular
I/O pins may not be as good as that for clock pins. This section shows a mux-DFF type scan
design example and covers some of the issues regarding creating transition patterns for the
faults in these three areas.
Figure 6-34 shows a conceptual model of an example chip design. There are two clocks in this
mux-DFF design, which increases the possible number of launch and capture combinations in
creating transition patterns. For example, depending on how the design is actually put together,
there might be faults that require these launch and capture combinations: C1-C1, C2-C2,
C1-C2, and C2-C1. The clocks may be either external or are created by some on-chip clock
generator circuitry or PLL.
“Timing for Transition Delay Tests” on page 206 shows the basic waveforms and partial test
procedure files for creating broadside and launch off shift transition patterns. For this example,
named capture procedures are used to specify the timing and sequence of events. The example
focuses on broadside patterns and shows only some of the possible named capture procedures
that might be used in this kind of design.
scan chain
logic logic
PIs POs
logic
C1
C2
A timing diagram for cell to cell broadside transition faults that are launched by clock C1 and
captured by clock C2 is shown in Figure 6-35.
120 ns 80 ns 40 ns 120 ns
scan_en
scan_clk
C2
C1
shift launch capture load/unload
Following is the capture procedure for a matching test procedure file that uses a named capture
procedure to accomplish the clocking sequence. Other clocking combinations would be handled
with additional named capture procedures that pulse the clocks in the correct sequences.
Be aware that this is just one example and your implementation may vary depending on your
design and tester. For example, if your design can turn off scan_en quickly and have it settle
before the launch clock is pulsed, you may be able to shorten the launch cycle to use a shorter
period; that is, the first cycle in the launch_c1_cap_c2 capture procedure could be switched
from using timeplate tp3 to using timeplate tp2.
Another way to make sure scan enable is turned off well before the launch clock is to add a
cycle to the load_unload procedure right after the “apply shift” line. This cycle would only need
to include the statement, “force scan_en 0;”.
Notice that the launch and capture clocks shown in Figure 6-35 pulse in adjacent cycles. The
tool can also use clocks that pulse in non-adjacent cycles, as shown in Figure 6-36, if the
intervening cycles are at-speed cycles.
120 ns 40 ns 40 ns 40 ns 120 ns
scan_en
3 at-speed cycles
scan_clk
specified by
“launch_capture_pair c3 c3”
C3
C2
Also a valid capture point
shift launch capture load/unload
To define a pair of nonadjacent clocks for the tool to use as the launch clock and capture clock,
include a “launch_capture_pair” statement at the beginning of the named capture procedure.
Multiple “launch_capture_pair” statements are permitted, but the tool will use just one of the
statements for a given fault. Without this statement, the tool defaults to using adjacent clocks.
When its choice of a launch and capture clock is guided by a launch_capture_pair statement, the
tool may use for launch, the clock specified as the launch clock in the statement or another clock
that is pulsed between the launch and capture clocks specified in the statement. The capture
clock, however, will be the one specified in the statement or another clock that has the same
period as the specified capture clock.
If a named capture procedure for example pulses clocks clk1, clk2 and clk3 in that order in each
of three successive at-speed cycles and the launch_capture_pair {clk1, clk3} is defined, the tool
could use either clk1 or clk2 to launch and clk3 to capture. The idea of the launch and capture
pair is that it allows you to specify the capture clock and the farthest launch clock from the
capture clock. In this example, the {clk1, clk3} pair directs the tool to use clk3 to capture and
the farthest launch clock to be clk1. The tool considers it all right for clk2 to launch since if
{clk1, clk3} is at speed, {clk2, clk3} should be at speed as well.
If you want to try to create transition patterns for faults between the scan cells and the primary
outputs, make sure your tester can accurately measure the PO pins with adequate resolution. In
this scenario, the timing looks similar to that shown in Figure 6-35 except that there is no
capture clock. Figure 6-37 shows the timing diagram for these cell to PO patterns.
120 ns 80 ns 40 ns 120 ns
scan_en
scan_clk
C1
shift launch meas. load/unload
PO
Note
You will need a separate named capture procedure for each clock in the design that can
cause a launch event.
What you specify in named capture procedures is what you get. As you can see in the two
preceding named capture procedures (launch_c1_cap_c2 and launch_c1_meas_PO), both
procedures used two cycles, with timeplate tp3 followed by timeplate tp2. The difference is that
in the first case (cell to cell), the second cycle only performed a pulse of C2 while in the second
case (cell to PO), the second cycle performed a measure_po. The key point to remember is that
even though both cycles used the same timeplate, they only used a subset of what was specified
in the timeplate.
To create effective transition patterns for faults between the PI and scan cells, you also may
have restrictions due to tester performance and tolerance. One way to create these patterns can
be found in the example timing diagram in Figure 6-38. The corresponding named capture
procedure is shown after the figure.
120 ns 40 ns 80 ns 120 ns
scan_en
scan_clk
C2
PI
shift setup launch and load/unload
initial capture
value
As before, you would need other named capture procedures for capturing with other clocks in
the design. This example shows the very basic PI to cell situation where you first set up the
initial PI values with a force, then in the next cycle force changed values on the PI and quickly
capture them into the scan cells with a capture clock.
Note
You do not need to perform at-speed testing for all possible faults in the design. You can
eliminate testing things like the boundary scan logic, the memory BIST, and the scan shift
path by using the add_nofaults command.
When a clock control is defined, the clock control bits are included in chain test pattern to turn
off capture clocks when the clock under control has no source clock or when the source clock
defined in the clock under control is a free running clock.
By default in the ATPG tool, one capture cycle will be included in chain test patterns if there is
no free running clock or free running clock drives neither observation points nor buses.
You can manually create clock control definitions or use the stil2mgc tool to generate them
automatically from a STIL Protocol File (SPF) that contains a ClockStructures block.
If the source clock is free-running, the specified capture cycle and the actual capture cycle are
always the same because the source clock pulses in every ATPG cycle as shown in Figure 6-41.
No source clock or an-always-capture clock are considered equivalent to a free-running source
clock.
If the source clock is defined as anything but free running or always capture, the specified
capture cycle is determined by the pulse of the source clock. For example, an internal clock
defined to pulse for cycle 0 may not pulse in cycle 0 but in the cycle that corresponds to the
source clock pulse as shown in Figure 6-41.
Limitations
• Clock control definitions and Named Capture Procedures (NCPs) cannot both be
enabled during test pattern generation. By default, clock control definitions are disabled
when NCPs are enabled.
Note
Test patterns created with NCPs and test patterns created with the clock control
definitions can be fault simulated simultaneously.
Procedure
1. Depending on your application, either:
o Create clock control definitions in your test procedure file.
OR
o Run the stil2mgc tool on an SPF to generate a test procedure file with clock control
definitions. Refer to the stil2mgc description in the Tessent Shell Reference Manual.
For more information, see “Clock Control Definition” in the Tessent Shell User’s
Manual.
2. Invoke Tessent Shell, set the context to “patterns -scan,” read in the netlist, and set up
the appropriate parameters for ATPG run.
3. Load the test procedure file created in step 1 and set up for ATPG. For example:
SETUP> add_scan_groups group1 scan_g1.procfile
SETUP> add_scan_chains chain1 group1 indata2 testout2
SETUP> add_scan_chains chain2 group1 indata4 testout4
SETUP> add_clocks 0 clk1 -internal
The add_scan_groups command loads the specified test procedure file from setup mode.
You can also use the read_procfile command load the test procedure file from analysis
mode. For more information, see “Test Pattern Formatting and Timing.”
4. Exit setup mode and run DRC. For example:
SETUP> set_system_mode analysis
5. Correct any DRC violations. For information on clock control definition DRCs, see
“Procedure Rules (P Rules)” in the Tessent Shell Reference Manual.
Clock control definitions are enabled by default unless there are NCPs enabled in the
test procedure file. If NCPs exist and are enabled, they override clock control
definitions.
6. Report the clock control configurations. For example:
ANALYSIS> report_clock_controls
CLOCK_CONTROL "/top/core/clk1 (3457)" =
SOURCE_CLOCK "/pll_clk (4)";
ATPG_CYCLE 0 =
CONDITION "/ctl_dff2/ (56)" 1;
END;
ATPG_CYCLE 1 =
CONDITION "/ctl_dff1/ (55)" 1;
END;
END;
Note
You can use N-detect for stuck-at and transition patterns. If you use N-detect, replace the
stuck-at and/or transition patterns described in the procedure with the N-detect patterns.
Prerequisites
• A test procedure file must be available. See “Test Procedure File” in the Tessent Shell
User’s Manual.
• A path definition file must be available. See “The Path Definition File” on page 220.
• A bridge definition file must be available. See “Net Pair Identification with Calibre for
Bridge Fault Test Patterns” on page 195.
Procedure
1. Create path delay test patterns for your critical path(s) and save them to a file. Then fault
grade the path delay test patterns for transition fault coverage. Following are example
commands in a dofile.
//-----------------Create path delay patterns--------------------
// Enable two functional pulses (launch and capture).
set_fault_type path_delay
read_fault_sites my_critical_paths
report_fault_sites path0
// Uncomment next 2 lines to display path in DFTVisualizer.
// set_gate_level primitive
// report fault sites path0 -display debug
create_patterns
// Save path delay patterns.
write_patterns pathdelay_pat.bin.gz -binary -replace
//---------------------------------------------------------------
//----------Grade for broadside transition fault coverage--------
// Change the fault model (when you change the fault model, the
// the internal pattern set database is emptied).
set_fault_type transition -no_shift_launch
add_faults -all
// Read the previously saved path delay patterns into the external
// pattern set database; include the -All_patterns switch so the
// patterns are copied to the now empty internal pattern set
// database when they are simulated.
read_patterns pathdelay_pat.bin.gz
// Simulate all the path delay patterns for transition fault
// coverage, copying them into the internal pattern set as they
// are simulated.
simulate_patterns -store_patterns all
report_statistics
//---------------------------------------------------------------
2. Create additional transition test patterns for any remaining transition faults, and add
these test patterns to the original test pattern set. Then fault grade the enlarged test
pattern set for stuck-at fault coverage. Following are example commands in a dofile.
//---------Create add’l transition fault patterns-------
// Create transition patterns that detect the remaining transition
// faults the path delay patterns did not detect during
// simulation.
create_patterns
order_patterns 3 // optimize the pattern set
// Save original path delay patterns and add’l transition patterns.
write_patterns pathdelay_trans_pat.bin.gz -binary -replace
//---------------------------------------------------------------
//----------Grade for stuck-at fault coverage--------------------
set_fault_type stuck
add_faults -all
// Read in previously saved path delay and transition patterns and
// add them to the internal pattern set when they are simulated.
read_patterns pathdelay_trans_pat.bin.gz -all_patterns
simulate_patterns -store_patterns all
report_statistics
//---------------------------------------------------------------
3. Create additional stuck-at test patterns for any remaining stuck-at faults and add them to
the test pattern set. Then fault grade the enlarged test pattern set for bridge fault
coverage. Following are example commands in a dofile.
//----------Create add’l (top-up) stuck-at patterns--------------
create_patterns
order_patterns 3 // optimize the pattern set
// Save original path delay patterns and transition patterns, plus
// the add’l stuck-at patterns.
write_patterns pathdelay_trans_stuck_pat.bin.gz -binary -replace
//---------------------------------------------------------------
//----------Grade for bridge fault coverage--------------------
set_fault_type bridge
read_fault_sites my_fault_definitions
add_faults -all
// Read in previously saved path delay, transition, and stuck-at
// patterns and add them to the internal pattern set
// when they are simulated.
read_patterns pathdelay_trans_stuck_pat.bin.gz
simulate_patterns -store_patterns all
report_statistics
//---------------------------------------------------------------
4. Create additional bridge test patterns for any remaining bridge faults and add these test
patterns to the test pattern set. Following are example commands in a dofile.
//----------Create add’l bridge patterns--------------
create_patterns
order_patterns 3 // optimize the pattern set
// Save original path delay patterns, transition patterns, stuck-at
Slack Calculation
Slack is equal to the margin between the path delay and the clock period. Slack within Small
Delay Fault Model represents the smallest delay defect that can be detected.
Figure 6-42 illustrates slack calculations. Assume there are three paths that can detect a fault.
The paths have a 9.5 ns, 7.5 ns and 7.0 ns delay, respectively. The clock period is 10 ns. The
slacks for the paths are calculated as 0.5 ns, 2.5 ns and 3 ns, respectively. For the longest path,
which has a 0.5 ns slack, the smallest delay defect can be detected is 0.5 ns. Similarly for the
path with 2.5 ns, the smallest detectable delay defect is 2.5 ns. You can detect smaller delay
defects by using a path with a smaller slack. Any path that is longer than the clock period is a
false path.
Delay Test Coverage = (Path Delay that ATPG used)/(Longest Path Delay)*100%
Using the same example paths from Figure 6-42, if ATPG uses path R2, the delay test coverage
is: 7.5 ns / 9.5 ns = 79%. If ATPG used the longest path (R1), the delay test coverage would be
100%.
Undetected faults have a delay test coverage of 0%. DI faults (Detected by Implication) have a
delay test coverage of 100%. Chip-level delay test coverage is calculated by averaging the delay
test coverage values for all faults.
For more information about setting run parameters, see the set_atpg_timing command.
• Negative delay is supported. However, if path delay is a negative number, the tool forces
the delay value to 0 when calculating delay coverage, path delay, and slack, etc.
• Static timing is calculated in a pessimistic way. It does not consider false/multi-cycle
paths.
Prerequisites
• Because timing-aware ATPG is built on transition ATPG technology, you must set up
for Transition ATPG first before starting this procedure. See “Creating a Transition
Delay Test Set.”
• SDF file from static timing analysis.
Procedure
1. Load the timing information from an SDF file using the read_sdf command. For
example:
ANALYSIS> read_sdf top_worst.sdf
If you encounter problems reading the SDF file, see “Errors and Warnings While
Reading SDF Files” on page 251.
2. Define clock information using the set_atpg_timing command. You must define the
clock information for all clocks in the design, even for those not used for ATPG (not
used in a named capture procedure). For example:
ANALYSIS> set_atpg_timing -clock clk_in 36000 18000 18000
ANALYSIS> set_atpg_timing -clock default 36000 18000 18000
If you specify a slack margin for fault dropping, the fault simulation keeps faults for
pattern generation until the threshold is met. During normal transition fault simulation,
faults are dropped as soon as they are detected.
4. Select timing-critical faults using the set_atpg_timing command. For example:
ANALYSIS> set_atpg_timing -timing_critical 90%
6. Report delay_fault test coverage using the report_statistics command. For example:
ANALYSIS> report_statistics
Timing-Aware Example
Figure 6-43 shows a testcase where there are 17 scan flip-flops and 10 combinational gates.
Each gate has 1 ns delay and there is no delay on the scan flip-flops. A slow-to-rise fault is
injected in G4/Y. The test period is 12 ns. The last scan flip-flop (U17) has an OX cell
constraint so that it cannot be used as observation point.
The longest path starts at U1, moving through G1 through G10 and ending at U17. The total
path delay is 10 ns. Because U17 cannot be used as observation point, timing-aware ATPG uses
the path starting at U1, moving through G1 through G9 and ending at U16. The total path delay
is 9 ns.
Therefore static minimum slack is 12 ns - 10 ns = 2 ns, and the best actual slack is 12 ns - 9 ns =
3 ns.
Figure 6-44 shows the dofile used for this example. As you can see in the comments, the dofile
goes through the procedure outlined in “Running Timing-Aware ATPG.”
Figure 6-45 shows the fault statistics report. Timing-aware ATPG used the longest possible
path, which is 9 ns. Static longest path is 10 ns. The delay test coverage is 9 ns / 10 ns = 90%.
Troubleshooting Topics
The following topics describe common issues related to timing-aware ATPG:
You can use the set_atpg_timing command to make a fault list that includes faults with less
slack time than you specified. The fault is put in the fault list if its (Longest delay)/(Test time) is
more than your specified threshold.
For example, assume there are 3 faults and their longest paths are 9.5 ns, 7.5 ns and 6.0 ns
respectively and the test time is 10 ns. The (Longest delay)/(Test time) is calculated 95%, 75%
and 60% respectively. If you set the threshold to 80%, only the first fault is included. If you set
it to 70%, the first and second faults are included.
The following series of commands inject only timing-critical faults with 70% or more.
• Error: Near line N - The destination pin A/B/C is mapped to gate output.
For an interconnect delay, the destination pin has to be a gate input pin. If a gate output pin
is used, the tool issues the error message and ignores the delay.
• Error: Near line N - The pin A/B/C for conditional delay is mapped to gate
output.
The signals used for a condition on a conditional delay must all be gate inputs. If a gate
output is used for the condition, the tool issues the error message and ignores the delay.
For example, there is a component that has two outputs “O1” and “O2”. If a conditional
delay on “O1” is defined by using “O2”, it will produce an error.
• Error: Near line N - Unable to map destination SDF pin.
Ignore INTERCONNECT delay from pin A/B/C to pin D/E/F.
The destination pin “D/E/F” does not have a receiver. It is likely to be a floating net, where
no delay can be added.
• Error: Near line N - Unable to add INTERCONNECT delay from pin "A/B/C" to
pin "D/E/F" even when the pins are treated as hierarchical pin. Ignore
INTERCONNECT delay.
There was an error when mapping the hierarchical source “A/B/C” and/or destination
“D/E/F” to their flattened hierarchical pins. The delay is ignored. Most likely, one or both
hierarchical pins are floating.
• Error: Near line N - The conditional delay expression is not supported.
Ignore the delay.
The delay was ignored because the condition was too complex.
• Error: Near line N - Delay from pin A/B/C (fanin=1) to pin D/E/F has been
defined before. Ignore current IOPATH delay.
Two or more IOPATH delays defined from SDF pin names map to the same flattened gate
pin. The tool will keep the value for the first definition and ignore all the subsequent
duplicates. This error with IOPATH delay is likely an SDF problem. For interconnect delay,
the tool cannot handle multiple definitions. For example, the Verilog path is: /u1/Z -> net1
-> net2 -> /u2/A. If you define the first interconnect delay /u1/Z -> net1, the second net1 ->
net2, and the third net2 -> /u2/A, then all the three interconnect delays are mapped to /u1/Z
-> /u2/A in the gate level. This will cause an error.
• Error: Near line N - There is no combinational path from pin A/B/C
(fanin=3) to pin D/E/F. Ignore current IOPATH delay.
The tool can only handle the IOPATH delay through combinational gates. Delays passing
through state elements cannot be used.
This is due to the conflicting setting for holding PI and masking PO between ATPG and static
timing analysis.
The static timing database is created once, before running ATPG, with the information of
holding PI and/or masking PO, whereas the setting can change for ATPG especially when using
NCP (for example, one NCP has force_pi and the other does not).
A slow-to-rise fault is injected at the input of the inverter (U1). There are two paths to detect it.
One is FF2 through U1 and U2 and the other is FF3 through U1 and U3. In the second path, the
fault is detected as a glitch detection as shown in the waveform.
But in the static analysis (when calculating Tms), this path is blocked because U3/out is
identified as a Tie-0 gate by DRC. Therefore the maximum static delay will be 2 ns (first path).
If the test cycle is 10 ns, the Tms will be 8 ns. And if ATPG uses the second path to detect the
fault, the actual slack will be 7 ns (10-1-2).
You will see the following message during DRC if DRC identifies a Tie-AND or Tie-OR.
add_clocks 0 tck
add_scan_groups group1 proc_fscan
add_scan_chains chain1 group1 tdi tdo
add_input_constraints tms -c0
add_input_constraints trstz -c1
set_capture_clock TCK -atpg
You must define the tck signal as a clock because it captures data. There is one scan group,
group1, which uses the proc_fscan test procedure file (see page 257). There is one scan chain,
chain1, that belongs to the scan group. The input and output of the scan chain are tdi and tdo,
respectively.
The listed pin constraints only constrain the signals to the specified values during ATPG—not
during the test procedures. Thus, the tool constrains tms to a 0 during ATPG (for proper pattern
generation), but not within the test procedures, where the signal transitions the TAP controller
state machine for testing. The basic scan testing process is:
The set_capture_clock TCK -ATPG command defines tck as the capture clock and that the
capture clock must be used for each pattern (as the ATPG tool is able to create patterns where
the capture clock never gets pulsed). This ensures that the Capture-DR state properly transitions
to the Shift-DR state.
Test-Logic
1 -Reset
0 Data Register Instruction
(Scan & Boundary Scan) Register
run-Test/ Select- Select-
0 Idle 1 DR-Scan 1 IR-Scan 1
0 0
Capture-DR Capture-IR
1 1
0 0
Shift-DR 0 Shift-IR 0
1 1
Exit1-DR Exit1-IR
1 1
0 0
Pause-DR 0 Pause-IR 0
1 1
0 0
Exit2-DR Exit2-IR
1 1
Update-DR Update-IR
1 0 1 0
The TMS signal controls the state transitions. The rising edge of the TCK clock captures the
TAP controller inputs. You may find this diagram useful when writing your own test procedure
file or trying to understand the example test procedure file that the next subsection shows.
end;
procedure test_setup =
timeplate tp0;
cycle =
force TMS 1;
force TDI 0;
force TRST 0;
pulse TCK;
end;
cycle =
force TMS 0;
force TRST 1;
pulse TCK;
end;
cycle =
force TMS 1;
pulse TCK;
end;
cycle =
force TMS 1;
pulse TCK;
end;
cycle =
force TMS 0;
pulse TCK;
end;
cycle =
force TMS 0;
pulse TCK;
end;
cycle =
force TMS 0;
pulse TCK;
end;
cycle =
force TMS 0;
pulse TCK;
end;
cycle =
force TMS 0;
pulse TCK;
end;
cycle =
force TMS 1;
force TDI 1;
pulse TCK;
end;
cycle =
force TMS 1;
force TDI 1;
pulse TCK;
end;
cycle =
force TMS 1;
pulse TCK;
end;
cycle =
force TMS 0;
pulse TCK;
end;
cycle =
force TMS 0;
force TEST_MODE 1;
force RESETN 1;
pulse TCK;
end;
end;
procedure shift =
scan_group grp1;
timeplate tp0;
cycle =
force_sci;
measure_sco;
pulse TCK;
end;
end;
procedure load_unload =
scan_group grp1;
timeplate tp0;
cycle =
force TMS 0;
force CLK 0;
end;
apply shift 77;
cycle =
force TMS 1;
end;
apply shift 1;
cycle =
force TMS 1;
pulse TCK;
end;
cycle =
force TMS 1;
pulse TCK;
end;
cycle =
force TMS 0;
pulse TCK;
end;
end;
Upon completion of the test_setup procedure, the tap controller is in the shift-DR state in
preparation for loading the scan chain(s). It is then placed back into the shift-DR state for the
next scan cycle. This is achieved by the following:
• The items that result in the correct behavior are the pin constraint on tms of C1 and the
fact that the capture clock has been specified as TCK.
• At the end of the load_unload procedure, the tool asserts the pin constraint on TMS,
which forces tms to 0.
• The capture clock (TCK) occurs for the cycle and this results in the tap controller
cycling from the run-test-idle to the Select-DR-Scan state.
• The load_unload procedure is again applied. This will start the next load/unloading the
scan chain.
The first procedure in the test procedure file is test_setup. This procedure begins by resetting
the test circuitry by forcing trstz to 0. The next set of actions moves the state machine to the
Shift-IR state to load the instruction register with the internal scan instruction code (1000) for
the MULT_SCAN instruction. This is accomplished by shifting in 3 bits of data (tdi=0 for three
cycles) with tms=0, and the 4th bit (tdi=1 for one cycle) when tms=1 (at the transition to the
Exit1-IR state). The next move is to sequence the TAP to the Shift-DR state to prepare for
internal scan testing.
The second procedure in the test procedure file is shift. This procedure forces the scan inputs,
measures the scan outputs, and pulses the clock. Because the output data transitions on the
falling edge of tck, the measure_sco command at time 0 occurs as tck is falling. The result is a
rules violation unless you increase the period of the shift procedure so tck has adequate time to
transition to 0 before repeating the shift. The load_unload procedure, which is next in the file,
calls the shift procedure.
1 1 0 0
0 0
1 0 1
1 1
0
1 Macro 1
0 Logic 0 0 Logic 1
1 1
0
1 1
0 0
1 0
010001
01110101
01000010
Macro 10011100
10111000
Test Vectors
11110011
(user defined)
Note
You can generate a wide range of pattern sets: From simple patterns that verify basic
functionality, to complex, modified March algorithms that exercise every address
location multiple times. Some embeddings (the logic surrounding the macro) do not
allow arbitrary sequences, however.
Figure 6-49 shows the basic flow for creating scan-based test patterns with MacroTest.
Simulate macro
stand-alone
Setup Mode
set_macrotest_options
(if necessary)
Analysis Mode
Macrotest
write_patterns
Note
The patterns produced by MacroTest cannot be read back into the ATPG tool. This is
because the simulation and assumptions about the original macro patterns are no longer
valid and the original macro patterns are not preserved in the MacroTest patterns.
Tessent Diagnosis, a Mentor Graphics test failure diagnosis tool, also cannot read a
pattern set that includes MacroTest patterns. If Tessent Diagnosis is used in your
manufacturing test flow, save MacroTest patterns separately from your other patterns.
This will enable a test engineer to remove them from the set of patterns applied on ATE
before attempting to read that set into Tessent Diagnosis for diagnosis.
When you run the macrotest command, MacroTest reads your pattern file and begins analyzing
the patterns. For each pattern, the tool searches back from each of the macro’s inputs to find a
scan flip-flop or primary input. Likewise, the tool analyzes observation points for the macro’s
output ports. When it has justified and recorded all macro input values and output values,
MacroTest moves on to the next pattern and repeats the process until it has converted all the
patterns. The default MacroTest effort exhaustively tries to convert all patterns. If successful,
then the set of scan test patterns MacroTest creates will detect any defect inside the macro that
changes any macro output from the expected value.
Note
If you add_faults prior to running MacroTest, the ATPG tool automatically fault
simulates the patterns as they are created. This is time consuming, but is retained for
backward compatibility. It is advised that you generate and save macrotest patterns in a
separate run from normal ATPG and faultsim and that you not issue the add_faults
command in the MacroTest run.
The patterns you supply to MacroTest must be consistent with the macro surroundings
(embedding) to assure success. In addition, the macro must meet certain design requirements.
The following sections detail these requirements, describe how and when to use MacroTest, and
conclude with some examples.
1. The design has at least one combinational observation path for each macro output pin
that requires observation (usually all outputs).
2. All I/O of the RAM/macro block to be controlled or observed are unidirectional.
3. The macro/block can hold its state while the scan chain shifts, if the test patterns require
that the state be held across patterns. This is the case for a March algorithm, for
example.
If you write data to a RAM macro (RAM), for example, then later read the data from the RAM,
typically you will need to use one scan pattern to do the write, and a different scan pattern to do
the read. Each scan pattern has a load/unload that shifts the scan chain, and you must ensure that
the DFT was inserted, if necessary, to allow the scan chain to be shifted without writing into the
RAM. If the shift clock can also cause the RAM to write and there is no way to protect the
RAM, then it is very likely that the RAM contents will be destroyed during shift; the data
written in the early pattern will not be preserved for reading during the latter pattern. Only if it is
truly possible to do a write followed by a read, all in one scan pattern, then you may be able to
use MacroTest even with an unprotected RAM.
Because converting such a multicycle pattern is a sequential ATPG search problem, success is
not guaranteed even if success is possible. Therefore, you should try to convert a few patterns
before you depend on MacroTest to be able to successfully convert a given embedded macro.
This is a good idea even for combinational conversions.
If you intend to convert a sequence of functional cycles to a sequence of scan patterns, you can
insert the DFT to protect the RAM during shift: The RAM should have a write enable that is PI-
controllable throughout test mode to prevent destroying the state of the RAM. This ensures the
tool can create a state inside the macro and retain the state during the scan loading of the next
functional cycle (the next scan pattern after conversion by MacroTest).
The easiest case to identify is where the ATPG tool issues a message saying it can use the RAM
test mode, RAM_SEQUENTIAL. This message occurs because the tool can independently
operate the scan chains and the RAM. The tool can operate the scan chain without changing the
state of the macro as well as operate the macro without changing the state loaded into the scan
chain. This allows the most flexibility for ATPG, but the most DFT also.
However, there are cases where the tool can operate the scan chain without disturbing the
macro, while the opposite is not true. If the scan cells are affected or updated when the macro is
operated (usually because a single clock captures values into the scan chain and is also an input
into the macro), the tool cannot use RAM_SEQUENTIAL mode. Instead, the tool can use a
sequential MacroTest pattern (multiple cycles per scan load), or it can use multiple single cycle
patterns if the user’s patterns keep the write enable or write clock turned off during shift.
For example, suppose a RAM has a write enable that comes from a PI in test mode. This makes
it possible to retain written values in the RAM during shift. However, it also has a single edge-
triggered read control signal (no separate read enable) so the RAM’s outputs change any time
the address lines change followed by a pulse of the read clock/strobe. The read clock is a shared
clock and is also used as the scan clock to shift the scan chains (composed of MUX scan cells).
In this case, it is not possible to load the scan chains without changing the read values on the
output of the macro. For this example, you will need to describe a sequential read operation to
MacroTest. This can be a two-cycle operation. In the first cycle, MacroTest pulses the read
clock. In the second cycle, MacroTest observes and captures the macro outputs into the
downstream scan cells. This works because there is no intervening scan shift to change the
values on the macro’s output pins. If a PI-controllable read enable existed, or if you used a non-
shift clock (clocked scan and LSSD have separate shift and capture clocks), an intervening scan
load could occur between the pulse of the read clock and the capture of the output data. This is
possible because the macro read port does not have to be clocked while shifting the scan chain.
Note
Although the ATPG library has specific higher level collections of models called macros,
MacroTest is not limited to testing these macros. It can test library models and HDL
modules as well.
Here, the term “macro” simply means some block of logic, or even a distributed set of lines that
you want to control and observe. You must provide the input values and expected output values
for the macro. Typically you are given, or must create, a set of tests. You can then simulate
these tests in some time-based simulator, and use the results predicted by that simulator as the
expected outputs of the macro. For memories, you can almost always create both the inputs and
expected outputs without any time-based simulation. For example, you might create a test that
writes a value, V, to each address. It is trivial to predict that when subsequent memory reads
occur, the expected output value will be V.
MacroTest converts these functional patterns to scan patterns that can test the device after it is
embedded in systems (where its inputs and outputs are not directly accessible, and so the tests
cannot be directly applied and observed). For example, a single macro input enable might be the
output of two enables which are ANDed outside the macro. The tests must be converted so that
the inputs of the AND are values which cause the AND’s output to have the correct value at the
single macro enable input (the value specified by the user as the macro input value). MacroTest
converts the tests (provided in a file) and provides the inputs to the macro as specified in the
file, and then observes the outputs of the macro specified in the file. If a particular macro output
is specified as having an expected 0 (or 1) output, and this output is a data input to a MUX
between the macro output and the scan chain, the select input of that MUX must have the
appropriate value to propagate the macro’s output value to the scan chain for observation.
MacroTest automatically selects the path(s) from the macro output(s) to the scan chain(s), and
delivers the values necessary for observation, such as the MUX select input value in the
example above.
Often, each row of a MacroTest file converts to a single 1-system cycle scan test (sometimes
called a basic scan pattern in the ATPG tool). A scan chain load, PI assertion, output measure,
clock pulse, and scan chain unload result for each row of the file if you specify such patterns. To
specify a write with no expected known outputs, specify the values to apply at the inputs to the
device and give X output values (don't care or don't measure). To specify a read with expected
known outputs, specify both the inputs to apply, and the outputs that are expected (as a result of
those and all prior inputs applied in the file so far). For example, an address and read enable
would have specified inputs, whereas the data inputs could be X (don’t care) for a memory read.
Mentor Graphics highly recommends that you not over-specify patterns. It may be impossible,
due to the surrounding logic, to justify all inputs otherwise. For example, if the memory has a
write clock and write enable, and is embedded in a way that the write enable is independent but
the clock is shared with other memories, it is best to turn off the write using the write enable,
and leave the clock X so it can be asserted or de-asserted as needed. If the clock is turned off
instead of the write enable, and the clock is shared with the scan chain, it is not possible to pulse
the shared clock to capture and observe the outputs during a memory read. If instead, the write
enable is shared and the memory has its own clock (not likely, but used for illustration), then it
is best to turn off the write with the clock and leave the shared write enable X.
Realize that although the scan tests produced appear to be independent tests, the tool assumes
that the sequence being converted has dependencies from one cycle to the next. Thus, the scan
patterns have dependencies from one scan test to the next. Because this is atypical, the tool
marks MacroTest patterns as such, and you must save such MacroTest patterns using the
write_patterns command. The MacroTest patterns cannot be reordered or reduced using
compress_patterns; reading back MacroTest patterns is not allowed for that reason. You must
preserve the sequence of MacroTest patterns as a complete, ordered set, all the way to the tester,
if the assumption of cycle-to-cycle dependencies in the original functional sequence is correct.
To illustrate, if you write a value to an address, and then read the value in a subsequent scan
pattern, this will work as long as you preserve the original pattern sequence. If the patterns are
reordered, and the read occurs before the write, the patterns will then mismatch during
simulation or fail on the tester. The reason is that the reordered scan patterns try to read the data
before it has been written. This is untrue of all other ATPG tool patterns. They are independent
and can be reordered (for example, to allow pattern compaction to reduce test set size).
Macrotest patterns are never reordered or reduced, and the number of input patterns directly
determines the number of output patterns.
The definition of the instance/macro is accessed to determine the pin order as defined in the port
list of the definition. MacroTest expects that pin order to be used in the file specifying the I/O
(input and expected output) values for the macro (the tests). For example, the command:
would specify for MacroTest to find the instance “regfile_8”, look up its model definition, and
record the name and position of each pin in the port list. Given that the netlist is written in
Verilog, with the command:
the portlist of regfile_definition_name (not the instance port list “net1, net2, …”) is used to get
the pin names, directions, and the ordering expected in the test file, file_with_tests. If the library
definition is:
model "regfile_definition_name"
("Dout_0", "Dout_1", Addr_0", "Addr_1", "Write_enable", ...)
( input ("Addr_0") () ... output ("Dout_0") () ... )
then MacroTest knows to expect the output value Dout_0 as the first value (character)
mentioned in each row (test) of the file, file_with_tests. The output Dout_1 should be the 2nd
pin, input pin Addr_0 should be the 3rd pin value encountered, etc. If it is inconvenient to use
this ordering, the ordering can be changed at the top of the test file, file_with_tests. This can be
done using the following syntax:
which would cause MacroTest to expect the value for input Addr_0 to be the first value in each
test, followed by the value for input Addr_1, the expected output value for Dout_1, the input
value for Write_enable, and so on.
Note
Only the pin names need be specified, because the instance name “regfile_8” was given
for the macrotest command.
macro_inputs regfile_8/Addr_0regfile_8/Addr_1
macro_outputregfile_8/Dout_1
macro_inputsregfile_8/write_enable
...
end
The above example defines the same macro boundary as was previously defined for regfile_8
using only pin names to illustrate the format. Because the macro is a single instance, this would
not normally be done, because the instance name is repeated for each pin. However, you can use
this entire pathname form to define a distributed macro that covers pieces of different instances.
This more general form of boundary definition allows a macro to be any set of pins at any
level(s) of hierarchy down to the top library model. If you use names which are inside a model
in the library, the pin pathname must exist in the flattened data structures. (In other words, it
must be inside a model where all instances have names, and it must be a fault site, because these
are the requirements for a name inside a model to be preserved in the tool).
This full path/pin name form of “macro boundary” definition is a way to treat any set of
pins/wires in the design as points to be controlled, and any set of pins/wires in the design as
points to be observed. For example, some pin might be defined as a macro_input which is then
given {0,1} values for some patterns, but X for others. In some sense, this “macro input” can be
thought of as a programmable ATPG constraint (see add_atpg_constraints), whose value can be
changed on a pattern by pattern basis. There is no requirement that inputs be connected to
outputs. It would even be possible to define a distributed macro such that the “output” is really
the input to an inverter, and the “input” is really the output of the same inverter. If the user
specified that the input = 0, and the expected output = 1, MacroTest would ensure that the
macro “input” was 0 (so the inverter output is 0, and its input is 1), and would sensitize the input
of the inverter to some scan cell in a scan chain. Although this is indeed strange, it is included to
emphasize the point that full path/pin forms of macro boundary definition are completely
flexible and unrelated to netlist boundaries or connectivity. Any set of connected or disjoint
points can be inputs and/or outputs.
Although rarely done, you can specify for one macro output at a time exactly which of those
reported scan cells is to be used to observe that particular macro output pin. Any subset can be
so specified. For example, if you want to force macro output pin Dout_1 to be observed at one
of its reported observation sites, such as “/top/middle/bottom/ (13125)”, then you can specify
this as follows:
macro_output regfile_8/Dout_1
observe_at13125
Note
There can be only one macro_output statement on the line above the observe_at directive.
Also, you must specify only one observe_at site, which is always associated with the
single macro_output line that precedes it. If a macro_input line immediately precedes the
observe_at line, MacroTest will issue an error message and exit.
The preceding example uses the gate id (number in parentheses in the -Report output) to specify
the scan cell DFF to observe at, but you can also use the instance pathname. Instances inside
models may not have unique names, so the gate id is always an unambiguous way to specify
exactly where to observe. If you use the full name and the name does not exactly match, the tool
selects the closest match from the reported candidate observation sites. The tool also warns you
that an exact match did not occur and specifies the observation site that it selected.
Due to its black box treatment of even modelled RAMs/macros, MacroTest must sometimes get
additional information from you. Macrotest assumes that all macro inputs capture on the leading
edge of any clock that reaches them. So, for a negative pulse, MacroTest assumes that the
leading (falling) edge causes the write into the macro, whereas for a positive pulse, MacroTest
assumes that the leading (rising) edge causes the write. If these assumptions are not true, you
must specify which data or address inputs (if such pins occur) are latched into the macro on a
trailing edge.
Occasionally, a circuit uses leading DFF updates followed by trailing edge writes to the
memory driven by those DFFs. For trailing edge macro inputs, you must indicate that the
leading edge assumption does not hold for any input pin value that must be presented to the
macro for processing on the trailing edge. For a macro which models a RAM with a trailing
edge write, you must specify this fact for the write address and data inputs to the macro which
are associated with the falling edge write. To specify the trailing edge input, you must use a
boundary description which lists the macro’s pins (you cannot use the instance name only
form).
Regardless of whether you use just pin names or full path/pin names, you can replace
“macro_inputs” with “te_macro_inputs” to indicate that the inputs that follow must have their
values available for the trailing edge of the shared clock. This allows MacroTest to ensure that
the values arrive at the macro input in time for the trailing edge, and also that the values are not
overwritten by any leading edge DFF or latch updates. If a leading edge DFF drives the trailing
edge macro input pin, the value needed at the macro input will be obtained from the D input side
of the DFF rather than its Q output. The leading edge will make Q=D at the DFF, and then that
new value will propagate to the macro input and be waiting for the trailing edge to use. Without
the user specification as a trailing edge input, MacroTest would obtain the needed input value
from the Q output of the DFF. This is because MacroTest would assume that the leading edge of
the clock would write to the macro before the leading edge DFF could update and propagate the
new value to the macro input.
It is not necessary to specify leading edge macro inputs because this is the default behavior. It is
also unnecessary to indicate leading or trailing edges for macro outputs. You can control the
cycle in which macro outputs are captured. This ensures that the tool correctly handles any
combination of macro outputs and capturing scan cells as long as all scan cells are of the same
polarity (all leading edge capture/observe or all trailing edge capture/observe).
In the rare case that a particular macro output could be captured into either a leading or a trailing
edge scan cell, you must specify which you prefer by using the -Le_observation_only switch or
-Te_observation_only switch with the macrotest command for that macro. For more
information on these switches, see “Example 3 — Using Leading Edge & Trailing Edge
Observation Only” and the macrotest description in the Tessent Shell Reference Manual.
macro_input clock
te_macro_inputs Addr_0 Addr_1 // TE write address inputs
macro_output Dout_1
...
end
and N denote the actual pulse, not the triggering edge of the macro. It is the embedding that
determines whether a P or N can be produced.
Note
It is the declaration of the PI pin driving the macro input, not any declaration of the macro
input itself, which determines whether a pin can be pulsed in the tool.
Normal observable output values include {L,H}, which are analogous to {0,1}. L represents
output 0, and H represents output 1. You can give X as an output value to indicate Don't
Compare, and F for a Floating output (output Z). Neither a Z nor an X output value will be
observed. Occasionally an output cannot be observed, but must be known in order to prevent
bus contention or to allow observation of some other macro output.
If you provide a file with these characters, a check is done to ensure that an input pin gets an
input value, and an output pin gets an output value. If an “L” is specified in an input pin
position, for example, an error message is issued. This helps detect ordering mismatches
between the port list and the test file. If you prefer to use 0 and 1 for both inputs and outputs,
then use the -No_l_h switch with the macrotest command:
Assuming that the -L_h default is used, the following might be the testfile contents for our
example register file, if the default port list pin order is used.
XX 00 0
XX 00 1
HH 00 0
The example file above has only comments and data; spaces are used to separate the data into
fields for convenience. Each row must have exactly as many value characters as pins mentioned
in the original port list of the definition, or the exact number of pins in the header, if pins were
specified there. Pins can be left off of an instance if macro_inputs and macro_outputs are
specified in the header, so the header names are counted and that count is used unless the
instance name only form of macro boundary definition is used (no header names exist).
To specify less than all pins of an instance, omit the pins from the header when reordering the
pins. The omitted pins are ignored for purposes of MacroTest. If the correct number of values
do not exist on every row, an error occurs and a message is issued.
The following is an example where the address lines are exchanged, and only Dout_0 is to be
tested:
X 00 0
X 00 1
H 00 0
It is not necessary to have all macro_inputs together. You can repeat the direction designators as
necessary:
macro_input write_enable
macro_output Dout_0
macro_inputs Addr_1 Addr_0
macro_outputs Dout_1 ...
...
end
For example, if the write enable line outside the macro is the complement of the read enable line
(perhaps due to a line which drives the read enable directly and also fans out to an inverter
which drives the write enable), and you specify that both the read enable and write enable pins
should be 0 for some test, then MacroTest will be unable to deliver both values. It stops and
reports the line of the test file, as well as the input pins and values that cannot be delivered. If
you change the enable values in the MacroTest patterns file to always be complementary,
MacroTest would then succeed. Alternatively, if you add a MUX to make the enable inputs
independently controllable in test mode and keep the original MacroTest patterns unchanged,
MacroTest would use the MUX to control one of the inputs to succeed at delivering the
complementary values.
Once MacroTest is successful, you should simulate the resulting MacroTest patterns in a time-
based simulator. This verifies that the conversion was correct, and that no timing problems
exist. The tool does not simulate the internals of primitives, and therefore relies on the fact that
the inputs produced the expected outputs given in the test file. This final simulation ensures that
no errors exist due to modeling or simulation details that might differ from one simulator to the
next. Normal ATPG tool considerations hold, and it is suggested that DRC violations be treated
as they would be treated for a stuck-at fault ATPG run.
To prepare to MacroTest an empty (TieX) macro that needs to be driven by a write control (to
allow pulsing of that input pin on the black box), issue the set_macrotest_options command.
This command prevents a G5 DRC violation and allows you to proceed. Also, if a transparent
latch (TLA) on the control side of an empty macro is unobservable due to the macro, the
set_macrotest_options command prevents it from becoming a TieX, as would normally occur.
Once it becomes a TieX, it is not possible for MacroTest to justify macro values back through
the latch. If in doubt, when preparing to MacroTest any black box, issue the
set_macrotest_options command before exiting setup mode. No errors will occur because of
this, even if none of the conditions requiring the command exist.
ATPG commands and options apply within MacroTest, including cell constraints, ATPG
constraints, clock restrictions (it only pulses one clock per cycle), and others. If MacroTest fails
and reports that it aborted, you can use the set_abort_limit command to get MacroTest to work
harder, which may allow MacroTest to succeed. Mentor Graphics recommends that you set a
moderate abort limit for a normal MacroTest run, then increase the limit if MacroTest fails and
issues a message saying that a higher abort limit might help.
ATPG effort should match the simulation checks for bus contention to prevent MacroTest
patterns from being rejected by simulation. Therefore, if you specify set_contention_check On,
you should use the -Atpg option. Normally, if you use set_contention_check Capture_clock,
you should use the -Catpg option instead. Currently, MacroTest does not support the -Catpg
option, so this is not advised. Using the set_decision_order Random is strongly discouraged. It
can mislead the search and diagnosis in MacroTest.
In a MacroTest run, as each row is converted to a test, that test is stored internally (similar to a
normal ATPG run). You can save the patterns to write out the tests in a desired format (perhaps
Verilog to allow simulation and WGL for a tester). The tool supports the same formats for
MacroTest patterns as for patterns generated by a normal ATPG run. However, because
MacroTest patterns cannot be reordered, and because the expected macro output values are not
saved with the patterns, it is not possible to read macrotest patterns back into the ATPG tool.
You should generate Macrotest patterns, then save them in all desired formats.
Note
The macro_output node in the netlist must not be tied to Z (floating).
MacroTest Examples
Example 1 — Basic 1-Cycle Patterns
Verilog Contents:
Note
Vectors are treated as expanded scalars.
Because Dout is declared as “array 7:0”, the string “Dout” in the port list is equivalent to
“Dout<7> Dout<6> Dout<5> Dout<4> Dout<3> Dout<2> Dout<1> Dout<0>”. If the
declaration of Dout had been Dout “array 0:7”, then the string “Dout” would be the reverse of
the above expansion. Vectors are always allowed in the model definitions. Currently, vectors
are not allowed in the macrotest input patterns file, so if you redefine the pin order in the header
of that file, scalars must be used. Either “Dout<7>”, “Dout(7)”, or “Dout[7]” can be used to
match a bit of a vector.
Dofile Contents:
set_system_mode analysis
macrotest mem1 ram_patts2.pat
write_patterns results/pattern2.f -replace
CHAIN_TEST =
pattern = 0;
apply "grp1_load" 0 =
chain "chain1" = "0011001100110011001100";
end;
apply "grp1_unload" 1 =
chain "chain1" = "0011001100110011001100";
end;
end;
SCAN_TEST =
pattern = 0 macrotest ;
apply "grp1_load" 0 =
chain "chain1" = "0110101010000000000000";
end;
force "PI" "001X0XXXXXXXX" 1;
pulse "/scanen_early" 2;
pattern = 1 macrotest ;
apply "grp1_load" 0 =
chain "chain1" = "1000000000000000000000";
end;
force "PI" "001X0XXXXXXXX" 1;
measure "PO" "1" 2;
pulse "/clk" 3;
apply "grp1_unload" 4=
chain "chain1" = "XXXXXXXXXXXXXX10101010";
end;
... skipping some output ...
SCAN_CELLS =
scan_group "grp1" =
scan_chain "chain1" =
scan_cell = 0 MASTER FFFF "/rden_reg/ffdpb0"...
scan_cell = 1 MASTER FFFF "/wren_reg/ffdpb0"...
scan_cell = 2 MASTER FFFF "/datreg1/ffdpb7"...
... skipping some scan cells ...
scan_cell = 20 MASTER FFFF "/doutreg1/ffdpb1"...
scan_cell = 21 MASTER FFFF "/doutreg1/ffdpb0"...
end;
end;
end;
For this example, the RAM is as before, except a single clock is connected to an edge-triggered
read and edge-triggered write pin of the macro to be tested. It is also the clock going to the
MUX scan chain. There is also a separate write enable. As a result, it is possible to write using a
one-cycle pattern, and then to preserve the data written during shift by turning the write enable
off in the shift procedure. However, for this example, a read must be done in two cycles—one to
pulse the RAM’s read enable and make the data come out of the RAM, and another to capture
that data into the scan chain before shifting changes the RAM’s output values. There is no
independent read enable to protect the outputs during shift, so they must be captured before
shifting, necessitating a 2 cycle read/observe.
Note that because the clock is shared, it is important to only specify one of the macro values for
RdClk or WrClk, or to make them consistent. X means “Don’t Care” on macro inputs, so it will
be used to specify one of the two values in all patterns to ensure that any external embedding
can be achieved. It is easier to not over-specify MacroTest patterns, which allows using the
patterns without having to discover the dependencies and change the patterns.
Dofile Contents:
set_system_mode analysis
macrotest mem1 ram_patts2.pat
write_patterns results/pattern2.f -replace
SETUP =
declare input bus "PI" = "/clk", "/Datsel",
"/scanen_early", "/scan_in1", "/scan_en",
.... skipping some declarations ....
CHAIN_TEST =
pattern = 0;
apply "grp1_load" 0 =
chain "chain1" = "0011001100110011001100";
end;
apply "grp1_unload" 1 =
chain "chain1" = "0011001100110011001100";
end;
end;
SCAN_TEST =
pattern = 0 macrotest ;
apply "grp1_load" 0 =
chain "chain1" = "0110101010000000000000";
end;
force "PI" "001X0XXXXXXXX" 1;
pulse "/scanen_early" 2;
measure "PO" "1" 3;
pulse "/clk" 4;
apply "grp1_unload" 5 =
chain "chain1" = "XXXXXXXXXXXXXXXXXXXXXX";
end;
pattern = 1 macrotest ;
apply "grp1_load" 0 =
chain "chain1" = "1000000000000000000000";
end;
force "PI" "001X0XXXXXXXX" 1;
pulse "/clk" 2;
force "PI" "001X0XXXXXXXX" 3;
measure "PO" "1" 4;
pulse "/clk" 5;
apply "grp1_unload" 6=
chain "chain1" = "XXXXXXXXXXXXXX10101010";
end;
... skipping some output ...
read, the values propagate to the scan cells in that same cycle, and then the falling edge of the
clock captures those values in the TE scan cells.
On the other hand, if you invoke MacroTest with the -Le_observation_only switch and indicate
in the MacroTest patterns that the macro’s outputs should be observed in the cycle after pulsing
the read pin on the macro, the rising edge of one cycle would cause the read of the macro, and
then the rising edge on the next cycle would capture into the TE scan cells.
For additional information on the use of these switches, refer to the macrotest description in the
Tessent Shell Reference Manual.
Note
Using the -Start and -End switches will limit file size as well, but the portion of internal
patterns saved will not provide a very reliable indication of pattern characteristics when
simulated. Sampled patterns will more closely approximate the results you would obtain
from the entire pattern set.
If you selected -Verilog as the format in which to save the patterns, the application
automatically creates a test bench that you can use in a timing-based simulator such as
ModelSim to verify that the tool-generated vectors behave as predicted by the ATPG tools.
The tool writes the test patterns out in one or more pattern files and an enhanced Verilog test
bench file that instantiates the top level of the design. These files contain procedures to apply
the test patterns and compare expected output with simulated output.
After compiling the patterns, the scan-inserted netlist, and an appropriate simulation library,
you simulate the patterns in a Verilog simulator. If there are no miscompares between the
ATPG tool’s expected values and the values produced by the simulator, a message reports that
there is “no error between simulated and expected patterns.” If any of the values do not match, a
simulation mismatch has occurred and must be corrected before you can use the patterns on a
tester.
Be sure to simulate parallel patterns and at least a few serial patterns. Parallel patterns simulate
relatively quickly, but do not detect problems that occur when data is shifted through the scan
chains. One such problem, for example, is data shifting through two cells on one clock cycle
due to clock skew. Serial patterns can detect such problems. Another reason to simulate a few
serial patterns is that correct loading of shadow or copy cells depends on shift activity. Because
parallel patterns lack the requisite shift activity to load shadow cells correctly, you may get
simulation mismatches with parallel patterns that disappear when you use serial patterns.
Therefore, always simulate at least the chain test or a few serial patterns in addition to the
parallel patterns.
For a detailed description of the differences between serial and parallel patterns, refer to the first
two subsections under “Pattern Formatting Issues” on page 338. See also “Sampling to Reduce
Serial Loading Simulation Time” on page 340 for information on creating a subset of sampled
serial patterns. Serial patterns take much longer to simulate than parallel patterns (due to the
time required to serially load and unload the scan chains), so typically only a subset of serial
patterns is simulated.
Start
All
Scan Tests Y Timing Violations
Fail?
Library Problems
Parallel
Patterns Fail, DRC Issues
Shadow Cells Y
Serial Pass?
N
If you are viewing this document online, you can click on the links in the figure to see more
complete descriptions of issues often at the root of particular mismatch failures. These issues
are discussed in the following sections:
• Are the mismatches reported on primary outputs (POs), scan cells or both?
Mismatches on scan cells can be related to capture ability and timing problems on the
scan cells. For mismatches on primary outputs, the issue is more likely to be related to
an incorrect value being loaded into the scan cells.
• Are the mismatches reported on just a few or most of the patterns? Mismatches on a
few patterns indicates a problem that is unique to certain patterns, while mismatches on
most patterns indicate a more generalized problem.
• Are the mismatches observed on just a few pins/cells or most pins/cells? Mismatches
on a few pins/cells indicates a problem related to a few specific instances or one part of
the logic, while mismatches on most patterns indicate that something more general is
causing the problem.
• Do both the serial and the parallel test bench fail or just one of them? A problem in
the serial test bench only, indicates that the mismatch is related to shifting of the scan
chains (for example, data shifting through two cells on one clock cycle due to clock
skew). The problem with shadows mentioned in the preceding section, causes the serial
test bench to pass and the parallel test bench to fail.
• Does the chain test fail? As described above, serial pattern failure can be related to
shifting of the scan chain. If this is true, the chain test (which simply shifts data from
scan in to scan out without capturing functional data) also fails.
• Do only certain pattern types fail? If only ram sequential patterns fail, the problem is
most certainly related to the RAMs (for instance incorrect modeling). If only
clock_sequential patterns fail, the problem is probably related to non-scan flip-flops and
latches.
DRC Issues
The DRC violations that are most likely to cause simulation mismatches are:
• C6
• T24
For details on these violations, refer to “Design Rule Checking” in the Tessent Shell Reference
Manual and SupportNet KnowledgeBase TechNotes describing each of these violations. For
most DRC-related violations, you should be able to see mismatches on the same flip-flops
where the DRC violations occurred.
You can avoid mismatches caused by the C6 violation by enabling the set_clock_off_simulation
command.
Shadow Cells
Another common problem is shadow cells. Such cells do not cause DRC violations, but the tool
issues the following message when going into analysis mode:
A shadow flip-flop is a non-scan flip-flop that has the D input connected to the Q output of a
scan flip-flop. Under certain circumstances, such shadow cells are not loaded correctly in the
parallel test bench. If you see the above message, it indicates that you have shadow cells in your
design and that they may be the cause of a reported mismatch. For more information about
shadow cells and simulation mismatches, consult the online SupportNet KnowledgeBase. Refer
to “Mentor Graphics Support” on page 439 for information about SupportNet.
Library Problems
A simulation mismatch can be related to an incorrect library model; for example, if the reset
input of a flip-flop is modeled as active high in the analysis model used by the tool, and as
active low in the Verilog model used by the simulator. The likelihood of such problems depends
on the library. If the library has been used successfully for several other designs, the mismatch
probably is caused by something else. On the other hand, a newly developed, not thoroughly
verified library could easily cause problems. For regular combinational and sequential elements,
this causes mismatches for all patterns, while for instances such as RAMs, mismatches only
occur for a few patterns (such as RAM sequential patterns).
Another library-related issue is the behavior of multi-driven nets and the fault effect of bus
contention on tristate nets. The ATPG tool is conservative by default, so non-equal values on
the inputs to non-tristate multi-driven nets, for example, always results in an X on the net. For
additional information, see the set_net_resolution and set_net_dominance commands.
Timing Violations
Setup and hold violations during simulation of the test bench can indicate timing-related
mismatches. In some cases, you see such violations on the same scan cell that has reported
mismatches; in other cases, the problem might be more complex. For instance, during loading
of a scan cell, you may observe a violation as a mismatch on the cell(s) and PO(s) that the
violating cell propagates to. Another common problem is clock skew. This is discussed in the
section, “Checking for Clock-Skew Problems with Mux-DFF Designs.”
Another common timing related issue is that the timeplate and/or test procedure file has not
expanded. By default, the test procedure and timeplate files have one “time unit” between each
event. When you create test benches using the -Timingfile switch with the write_patterns
command, the time unit expands to 1000 ns in the Verilog test benches. When you use the
default -Procfile switch and a test procedure file with the write_patterns command, each time
unit in the timeplate is translated to 1 ns. This can easily cause mismatches.
Based on the time and scan cell where the mismatch occurred, you can generate waveforms or
dumps that display the values just prior to the mismatch. You can then compare these values to
the values that the tool expected. With this information, you can trace back in the design (in
both the ATPG tool and the simulator) to see where the mismatch originates.
When comparing Verilog simulation data to ATPG tool data, it is helpful to use the
SIM_VECTYPE_SIGNAL keyword in the parameter file. When this keyword is used, the
Verilog test bench will include additional keywords that makes it easier for you to understand
the sequence of events in the test bench, and also how to compare data between the ATPG tool
and the simulator. In the example simulation transcript shown below, a mismatch is reported for
patterns 1 and 6. For pattern 6, the mismatch is reported at time 1170.
Note that the waveforms include the values for the flip-flop with mismatches, as well as the
signals mgcdft_shift, mgc_dft_launch_capture, and _pattern_count. Note that the
_pattern_count variable will increment just prior to the capture procedure. That means that
when _pattern_count variable is 6 and mgcdft_shift is 1, data is shifted out for pattern 6 (and
shifted in for pattern 7). By using these signals as a guide, you can see that the time of the
mismatch is during the shift procedure after pattern 6. Note that the capture for pattern 6 occurs
between time 1080 and 1120, when the mgcdft_launch_capture signal is high.
To see the corresponding data in the ATPG tool, you can use the set_gate_report
<pattern_index> command to see data for pattern 6. The data shown in the ATPG tool
corresponds to the state just before the capture clock pulse. In this example, for pattern 6, the
ATPG tool shows data corresponding to the simulation values just prior to the clock pulse at
time 1100 in the waveform. A detailed example showing this process for a Verilog test bench is
contained in AppNote 3002, available on http://supportnet.mentor.com.
The ATPG simulation mismatch analysis functionality is enhanced to optimize the debugging
of large (100K gates and more) designs and to support all simulators and distributed processing.
Once analysis is complete, DFTVisualizer graphically displays the source of the mismatches for
easy identification.
• Stage 1 — ATPG
• Stage 2 — Verilog test bench simulation
• Stage 3 — Debug test bench generation
• Stage 4 — Debug test bench simulation
• Stage 5 — Mismatch source identification
You can analyze simulation mismatches using the following methods:
• Automatically Analyzing Simulation Mismatches — Using this method, the tool runs
the entire flow, from Stage 1 — ATPG through Stage 5 — Mismatch source
identification using a single command invocation— see Figure 6-52.
• Manually Analyzing Simulation Mismatches — Using this method, you can run
mismatch analysis flow in steps. For example, you correct known issues in your failure
file and, instead of re-running Stage 2 — Verilog test bench simulation, you can proceed
to Stage 3 — Debug test bench generation using the modified failure file.
Both the automatic and manual flows follow the identical stages: the key difference is the
automatic flow runs the entire flow while the manual flow allows you to use the flow in steps.
The following sections cover the simulation mismatch analysis flow in detail.
Note
This procedure does not support debugging MacroTest or chain test patterns.
Stage 1 — ATPG
Generate the flattened model, test patterns, and Verilog test bench (mentor_default.v). The test
patterns must be saved in a format that can be read back into the ATPG tool (binary, ASCII,
STIL, or WGL), and the test bench must be able to generate a failure file.
Note
All generated files are placed in the work_dft_debug directory inside your working
directory. This directory is created if it does not already exist.
Prerequisites
• (Optional) If you are using an external third-party simulator, you must create a script to
invoke, setup, and run the simulator. See “Example 1 External Simulator Script” on
page 296.
• (Optional) If you want to distribute the simulation part of the analysis, you must have
access to a remote server that can be accessed through rsh. For more information, see the
analyze_simulation_mismatches description in the Tessent Shell Reference Manual.
Procedure
Note
All generated files are placed in the work_dft_debug directory inside your working
directory. This directory is created if it does not already exist.
1. Use the ATPG tool to read a design netlist or flat model. For example:
$ tessent -shell
SETUP> set_context patterns -scan
SETUP> read_verilog data/design.v
2. Specify the scan data for the scan cells in the design and switch to analysis system mode.
For example:
SETUP> add_scan_groups ...
SETUP> add_scan_chains ...
SETUP> add_clocks ...
SETUP> set_system_mode analysis
3. Specify the source test patterns for the design. For example:
ANALYSIS> read_patterns pats/testpat.bin
4. If you are using a third-party simulator, specify your simulator invoke script. For
example:
ANALYSIS> set_external_simulator -simulation_script runsim
For more information, see Example 1 External Simulator Script and the
set_external_simulator description in the Tessent Shell Reference Manual.
5. Run the automatic mismatch analysis. For example:
ANALYSIS> analyze_simulation_mismatches -auto -external_patterns
By default, the analysis runs on the local server. To run the simulation portion of the
analysis on a remote server, use the -host option. For example:
ANALYSIS> analyze_simulation_mismatches -auto -external_patterns -host abc_test
are compared with the test patterns and design data to determine the source of simulation
mismatches listed in the failure file.
6. Open DFTVisualizer to view and further debug the mismatches. For example:
ANALYSIS> open_visualizer
7. Click Debug Simulation Mismatches. The Select a Mismatch ID dialog box displays.
8. Select the ID for the mismatch to debug, and click Analyze.
DFTVisualizer displays and highlights overlapping design, simulation, and test pattern
data for the selected simulation mismatch.
Note
In the Debug window, pin names assigned to the value “.” indicate that the VCD debug
test bench did not capture the VCD value for that location. It is not possible to capture
VCD values for every node in the design due to very large file sizes and run time; the test
bench only captures values in the combination cone behind the failure location, which in
most cases provides sufficient information to explain the mismatch.
For a complete list of possible pin name values resulting from simulation mismatches, see
the report_mismatch_sources description in the Tessent Shell Reference Manual.
Tip: Optionally, you can use the report_mismatch_sources command to replace steps 6
through 8 and automatically display the mismatches in DFTVisualizer.
Prerequisites
• (Optional) If you are using an external third-party simulator, you must create a script to
invoke, setup, and run the simulator. See “Example 1 External Simulator Script” on
page 296.
• (Optional) If you want to distribute the simulation part of the analysis, you must have
access to a remote server that can be accessed through rsh. For more information, see the
analyze_simulation_mismatches description in the Tessent Shell Reference Manual.
• A design netlist or flat model and the associated test patterns are available.
• Test patterns must have been verified and mismatches exist.
• In order to generate a failure file for a manually generated test bench, you must set the
“SIM_DIAG_FILE” parameter file keyword to 2 or 1(default) prior to ATPG.
• For a manual simulation, you must set the “_write_DIAG_file” parameter to 1 in the
Verilog test bench to generate the failure file. This is done automatically if you set the
SIM_DIAG_FILE parameter file keyword to 2 prior to ATPG.
Procedure
Note
All generated files are placed in the work_dft_debug directory inside your working
directory. This directory is created if it does not already exist.
1. Use the ATPG tool to read a design netlist or flat model. For example:
$ tessent -shell
SETUP> set_context patterns -scan
SETUP> read_verilog data/design.v
2. Specify the scan data for the scan cells in the design and switch to analysis system mode.
For example:
SETUP> add_scan_groups ...
SETUP> add_scan_chains ...
SETUP> add_clocks ...
SETUP> set_system_mode analysis
3. Specify the source test patterns for the design. For example:
> read_patterns pats/testpat.bin
4. If you are using a third-party simulator, specify your simulator invoke script. For
example:
> set_external_simulator -simulation_script runsim
For more information, see Example 1 External Simulator Script and the
set_external_simulator description in the Tessent Shell Reference Manual.
5. Run the mismatch analysis. For example:
> analyze_simulation_mismatches -external_patterns
By default, the analysis runs on the local server. To run the simulation portion of the
analysis on a remote server, use the -host option. For example:
ANALYSIS> analyze_simulation_mismatches -external_patterns -host abc_test
By default, the analysis compares the specified failure file to the current test pattern
source to verify that both are generated from the same version of the design. If files do
not match, an error displays and the process aborts.
Once the test patterns and failure file pass the verification, a test bench is created
specifically for the mismatches in the failure file and simulated. The simulation results
are compared with the test patterns and design data to determine the source of simulation
mismatches listed in the failure file.
6. Simulate the Verilog test bench using ModelSim or a third-party simulator to create a
failure file—see the set_external_simulator command for details.
You must also create a script to set up and run an external simulator for the subsequent
steps of this procedure.
7. After simulation, perform a simulation mismatch analysis using the
analyze_simulation_mismatches command with the -FAilure_file switch and argument
to generate a test bench for just the failing patterns. For example:
ANALYSIS> analyze_simulation_mismatches -failure_file pat.fs.v.fail
You must use the flattened netlist and test patterns from the initial ATPG session.
This step creates the test bench for just the failing patterns (mentor_default.v_vcdtb.v).
The test bench is set up to output the simulation results to a VCD file.
8. In the same ATPG tool session, simulate the test bench for the failing patterns using the
analyze_simulation_mismatches command with the -TEstbench_for_vcd switch
argument. For example:
ANALYSIS> analyze_simulation_mismatches -testbench_for_vcd mentor_default.v_vcdtb.v
12. Click Debug Simulation Mismatches. The Select a Mismatch ID dialog box displays.
13. Select the ID for the mismatch to debug, and click Analyze.
DFTVisualizer displays and highlights overlapping design, simulation, and test pattern
data for the selected simulation mismatch.
#! /bin/csh -f
vlog ${1} -work my_work
vsim ${2} -c -lib my_work -do "run -all" -sdfmax \
/${2}/design_inst=~/design/good.sdf
If there are simulation mismatches in the first execution of the saved test bench, the
analyze_simulation_mismatches command creates a new version of the test bench for the
analysis. To create a simulation script that modifies this test bench, such as adding fixed force
statements, you must substitute the variable $ENTITY for the test bench name.
To correct this error, use the following Linux/UNIX command in the tool before running the
analyze_simulation_mismatches command:
!chmod +x vsim_scr
Analyzing Patterns
Sometimes, you can find additional information that is difficult to access in the Verilog test
benches in other pattern formats. When comparing different pattern formats, it is useful to know
that the pattern numbering is the same in all formats. In other words, pattern #37 in the ASCII
pattern file corresponds to pattern #37 in the WGL or Verilog format.
Each of the pattern formats is described in detail in the section, “Saving Patterns in Basic Test
Data Formats,” beginning on page 341.
mux
delay setup
MUX MUX
sc_in
DFF DFF
sc_en
clk
clk delay
You can run into problems if the clock delay due to routing, modeled by the buffer, is greater
than the mux delay minus the flip-flop setup time. In this situation, the data does not get
captured correctly from the previous cell in the scan chain and therefore, the scan chain does not
shift data properly.
To detect this problem, you should run both critical timing analysis and functional simulation of
the scan load/unload procedure. You can use ModelSim or another HDL simulator for the
functional simulation, and a static timing analyzer such as SST Velocity for the timing analysis.
Refer to the ModelSim SE/EE User’s Manual or the SST Velocity User’s Manual for details on
performing timing verification.
Introduction
This chapter explains multiprocessing functionality for accelerating ATPG and simulation.
Multiprocessing is a combination of distributed processing and multithreading. Multiprocessing
functionality allows you to create slave processes with multiple threads to efficiently use
additional processors.
Slave processors or threads can be on the machine on which the tool is running or on remote
machines, wherever you can access additional processors on your network. ATPG results
(coverage and patterns) using multiprocessing are the same as without multiprocessing,
regardless of the number of processors.
Multiprocessing Requirements
To enable the tool to establish and maintain communication with multiple processors on
multiple host machines and run slave processing jobs on them, you need to inform the tool of
the network names of available machines (manual specification) or direct the tool to use an
automated job scheduler to select machines for you. The tool supports Load Sharing Function
(LSF), Sun Grid Engine (SGE), or custom job schedulers. The following prerequisites must be
satisfied for whichever you use:
Note
The .rhosts file on host machines must have read permission set for user. Write and
execute permission can optionally be set for user, but must not be set for other and group.
rsh access is not required for the tool to create additional processes on the master
host.
o ssh — This requires that the network allow connection via ssh. To enable use of ssh,
issue a set_multiprocessing_options command within the tool to set the
multiprocessing “remote_shell” variable to ssh. Do this prior to issuing an
add_processors command.
Master and slave machines must be correctly specified in the global DNS name server
for reliable network operation, and you will need to know either the network name or IP
address of each remote machine you plan to use. Consult the System Administrator at
your site for additional information.
• Job Scheduler — You must have available at your site at least one of the following
methods of network job scheduling. Whichever you use, it must allow the master
process (the process started when you invoke the tool) to create slave processes on
different host machines.
o Load Sharing Function (LSF) — To use LSF, ensure your environment supports
use of the LSF scheduler before you invoke the tool. For example, the LSF_BINDIR
environment variable must be set appropriately, in addition to other requirements.
An appropriate setup can often be performed by sourcing a configuration file
supplied with the scheduler installation.
o Sun Grid Engine (SGE) — To use SGE, ensure your environment supports use of
the SGE scheduler before you invoke the tool. For example, the SGE_ROOT
environment variable must be set appropriately, in addition to other requirements.
An appropriate setup can often be performed by sourcing a configuration file
supplied with the scheduler installation.
o Custom Job Scheduling — For the tool to use a custom job scheduler, you need to
inform the tool of the command used at your site to launch the custom job scheduler.
You do this by issuing a set_multiprocessing_options command within the tool to set
the “generic_scheduler” variable to the appropriate site-specific command.
• Job Scheduling Options — You can control certain aspects of the job scheduling
process with the switches you set with the set_multiprocessing_options command. For
complete information about these switches, refer to the set_multiprocessing_options
description in the Tessent Shell Reference Manual.
• Tessent Software Tree Installation — It must be possible to execute the Mentor
Graphics Tessent executables (via fully specified paths) from any new processes.
• Tool Versions — All multiprocessing hosts must run the same version of the tool. This
is not an issue when using a single executable for all slave hosts, but depending on the
installation, may become an issue when the path to the executable points to a different
physical disk location on a slave host than on the master host. The tool installation tree
must be accessible via the same path on all slave hosts.
specifies for the tool to distribute the processing load among any four available LSF
processors and two processors on the machine named “machineB.” Note that with the
default settings there would be one slave with four threads from LSF, and one slave with
two threads from machineB. And without multithreading enabled, there would be four
separate slaves from LSF, and two from machineB.
Note
If there are no slave processes running, the session consumes just one license. However,
when you initiate slave processes using the add_processors command, the tool acquires
additional licenses for these processes, with each additional license allowing up to four
slave processors. The previous example adds six processors, so two additional licenses
would be used.
3. Perform any other tool setups you need for ATPG or fault simulation, then issue the
command to be multiprocessed. The tool displays a message indicating the design is
being sent to slave processors and then let you know when the slave processors start
participating.
The following is a list of related commands:
Error: Cannot change from rsh to ssh in the same tool session
SETUP> report_processors
Error: Cannot change from rsh to ssh in the same tool session.
This error message indicates the set_multiprocessing_options command was not used to set the
remote_shell variable to ssh prior to use of the report_processors or add_processors command.
The SSH functionality checks for the presence of two environment variables,
SSH_AGENT_PID and SSH_AUTH_SOCK, that describe your secure shell session. If not
present, it indicates the required ssh-agent daemon is not running.
To fix this problem, suspend the tool session with Control-Z and run the ssh-agent shell
program. This will start the agent and echo to the screen the required settings for the
environment variables. For example:
ssh-agent
setenv SSH_AUTH_SOCK /tmp/ssh-yXm13171/agent.13171;
setenv SSH_AGENT_PID 13172;
Note
Ensure you remove the trailing semicolons (;) if you copy and past the ssh-agent output
from the shell environment when you resume the tool session.
You can then resume the suspended session and set the environment variables:
This error message indicates the SSH agent is running but has not been told the passphrase to
allow SSH operations.
To fix this problem, suspend the tool session with Control-Z and run the ssh-add shell program:
SETUP> ^Z
Stopped (user)
% ssh-add
Could not open a connection to your authentication agent.
% setenv SSH_AUTH_SOCK /tmp/ssh-yXm13171/agent.13171
% setenv SSH_AGENT_PID 13172
% ssh-add
Enter passphrase for /user/.ssh/id_dsa:
Enter a passphrase:
> add_processors localhost:4 ; # adds 4 threads to the master process for a total thread count of 5
// Note: Using additional processes on master (masterhost)
// Note: Spawning processes:
// 64 bit masterhost (4 processes) x86-64
// Note: 4 slaves synchronized (2 sec).
> report_processors
// hosts threads arch CPU(s) %idle free RAM process size
// --------------- ------- ------ ------------ ----- ----------- -----------
// masterhost (master) 5 x86-64 16 x 2.8 GHz 98% 4971.50 MB 189.45
Note that you can specify the master host by name or IP address.
The following example starts a distributed slave process on the host “odin” that runs with 4 total
threads.
In the following example, the first command starts a distributed slave process on the host “odin”
that runs with 2 threads. The second command increases the number of threads in the slave
process from 2 to 4 rather than starting a new slave with 2 threads.
Note that if you don’t specify a number after the host name, the default is 1.
If you add more threads to a host than it has CPU cores, the command adds the threads but
issues a warning that the maximum number of available CPUs has been exceeded. If you
specify the string “maxcpu” instead of a number, the tool fills up the process with threads until
the number of threads equals the number of processors available to the host. If the host already
uses the maxcpu number of threads, the tool issues a warning that no more processors were
added. (Note that this is true for the master host as well as slave hosts.)
For example:
The “add_processors maxcpu” command always adds “maxcpu” slaves to a host (that is, the
second add_processors command in the example above would always add 16 slaves).
> report_multiprocessing_options
// Multiprocessing options:
// Option Type Value Description
// --------------------------- ------ ----- -------------------------------------
// generic_delete string generic job scheduler delete
// generic_scheduler string generic job scheduler
// license_timeout number 5 # mins to acquire license ( 0: infinite )
// lsf_options string options for LSF job scheduler
// multithreading on/off on turn on/off multithreading flow
// processors_per_grid_request number -1 # processors grouped for one grid request
// (default: 1 for SGE and GENERIC, 4 for LSF requests)
// remote_shell string rsh rsh or ssh remote_shell setting
// result_time_limit float 45 time limit (min) used to detect
// non-responsive slaves.
// scheduler_timeout number 10 # mins for job scheduler
// sge_options string options for SGE job scheduler
> report_processors
// hosts threads arch CPU(s) %idle free RAM process size
// --------------- ------- ------ ------------ ----- ----------- -----------
// localhost (master) 5 x86-64 16 x 2.8 GHz 98% 4971.50 MB 189.45 MB
// odin 16 x86-64 16 x 3.1 GHz 100% 45453.68 MB 168.57 MB
// thor 16 x86-64 16 x 3.1 GHz 93% 37274.62 MB 168.57 MB
// master with 5 threads and 2 slaves with 32 threads running.
Requesting one processor at a time from the grid engine is inefficient in many cases, as the tool
has to request enough memory for a full slave process with every grid request. Therefore, the
tool groups a number of processors together into one grid request for a host with enough
processors and the memory needed by one slave with the specified number of threads.
The threads started are associated with the requested grid resource, and the resource is freed
back to the grid only if all threads are removed. You also have to configure sge_options to have
each request actually receive 4 slots from each request.
Note that for LSF, the processors_per_grid is set to 4, and the requested processors_per_grid is
automatically provided to the LSF scheduler. However, for SGE or the generic scheduler, the
default is set to 1 because bundling of slot requests is site-specific. You have to configure the
options specific to that grid system before using this option on non-LSF grids. For more
information about how to do this, refer to the set_multiprocessing_options description in the
Tessent Shell Reference Manual.
If you don’t specify a number, the command removes all threads and the slave process on the
related host. If you don’t specify a number or a host, the command removes all slaves and their
threads, as well as all additional threads on the master.
If you issue a delete_processors command for the master, the tool has to make sure that the
master is kept running with at least one thread. If a thread is deleted from its process, the process
immediately frees all the related thread data.
# delete 4 threads from brighty, which frees exactly one grid slot
# (since 4 processors were requested with each grid request)
> delete_processors brighty:4
# delete 2 threads on kraken, which does not free any grid resource
> delete_processors kraken:2
# delete everything from kraken, all grid resources (1 request) are freed
> delete_processors kraken
# What is left?
> report_processors
# hosts threads arch CPU(s) %idle free RAM process size
# ----------------------- ------- ------ ------------ ----- ----------- ------------
# localhost (master) 5 x86-64 16 x 2.8 GHz 100% 4655.45 MB 189.70 MB
# brighty 4 x86-64 8 x 2.9 GHz 100% 9461.83 MB 152.66 MB
# joker111 4 x86-64 16 x 2.8 GHz 100% 41892.00 MB 166.05 MB
# master with 5 threads and 2 slaves with 8 threads running.
Overview
This manual describes scan pattern retargeting functionality in the Tessent Shell® tool.
Scan pattern retargeting improves efficiency and productivity by enabling you to generate core-
level test patterns and retarget them for reuse at the top level. Patterns for multiple cores can be
merged and applied simultaneously at the chip level. This capability can be used for cores that
include any configuration the tool supports for ATPG; this includes multiple EDT blocks and/or
uncompressed chains, pipeline stages, low power, and cores with varying shift lengths.
• Design and develop cores in isolation from the rest of the design.
• Generate and verify test patterns of the cores at the core level.
• Generate test patterns for identical cores just once.
• Divide and conquer a large design by testing groups of cores.
• Have pipeline stages and/or inversion between the core boundary and chip level.
• Broadcast stimuli to multiple instances of the same core.
• Merge patterns generated for multiple cores and apply them simultaneously.
• Automatically trace core-level scan pins to the chip level to extract connections,
pipelining, and inversion outside the cores.
• Perform reverse mapping of silicon failures from the chip level to the core level to allow
diagnosis to be performed at the core level.
Caution
You should verify the chip-level patterns through simulation since the tool's DRCs may
not detect every setup error or timing issue.
If you would like to use Tessent Diagnosis to diagnose your retargeted patterns, see section
“Reverse Mapping Top-Level Failures to the Core” in the Tessent Diagnosis User’s Manual.
Scan pattern retargeting and the generation of core-level retargetable patterns must be done
within the Tessent Shell tool. Instructions for invoking Tessent Shell are provided in the
following section.
For complete information on using Tessent Shell, see the Tessent Shell User’s Manual.
2. Retarget core-level test patterns to the chip level. This process is illustrated in
Figure 8-2. For more information, see “Retargeting Patterns in Internal Mode” on
page 322.”
1. Generate patterns for the top-level chip logic only. This process is illustrated in
Figure 8-3. For more information, see “Generating Patterns in External Mode” on
page 324.
During core-level pattern generation, the tool automatically adds X constraints on most input
ports and adds output masks on all output ports so that generated patterns can be mapped to the
chip level for retargeting. Free-running clocks, always-capture clocks, and constrained pins are
not forced to X. The tool also omits internal primary inputs (added with “add_clocks -internal”
or “add_primary_inputs -internal”) since those cut points are for modeling and are usually
controlled by Named Capture Procedures (NCPs) or clock control definitions.
You can exclude additional primary inputs from X constraints; this is necessary if the pins are
controlled by an NCP that models chip-level constraints such as a clock controller located
outside of the core. All inputs must be constrained or controlled (e.g., using all enabled NCPs).
Note
Even scan_enable, like any other input, must either be constrained to 0 or forced using an
NCP.
If a pin is not a free-running or always-capture clock, is not constrained, and is excluded from
isolation constraints (i.e., the tool did not constrain it to X), the create_patterns command
checks that the pin is controlled. If the pin is not controlled, the tool issues an R7 DRC
violation.
Core-level test patterns are saved in ASCII format when using the write_patterns command.
Only patterns saved in ASCII format can be retargeted. You can also use the write_patterns
command, as in the normal ATPG flow, to generate simulation test benches or write the patterns
in other formats.
You can use existing commands to write out core-level fault list and fault detection information.
Caution
When generating the EDT IP, if output channel pipeline stages will be added later, you
must specify “set_edt_pins -change_edge_at_compactor_output trailing_edge” to ensure
that the compactor output changes consistently on the trailing edge of the EDT clock.
Output channel pipeline stages should then start with leading-edge sequential elements.
Clocking Architecture
The scan pattern retargeting functionality imposes the following restrictions on clock
architecture:
• The tool does not perform per-pattern capture cycle mapping. The capture clock
conditions at the core boundary must be identical for every pattern in the pattern set.
• The recommended methodology is to have a programmable clock chopper inside each
core that is programmed by scan cell values. The scan cells used to program the clock
chopper must be inside the core. This provides ATPG with the flexibility to generate the
required clocking sequences yet ensures that the clock conditions at the boundary of the
cores are the same (free-running clocks, or clocks that are pulsed only during setup
and/or shift but constrained off during capture).
• If the clock controller is outside the core, it must have been programmed statically
during test_setup to deliver the same clock sequence during the capture phase of every
pattern. During core-level ATPG, the clocking at the core boundary must be enforced by
defining an NCP. In addition, any unconstrained pins on the core boundary must have
the is_excluded_from_isolation_constraints attribute set; otherwise, the tool will
constrain them to X.
• No support is provided if the clocking on the boundary of the core is different for each
pattern, such as when the capture clocks are programmed using a scan chain outside the
core, or when the capture clocks are driven directly by chip-level pins.
• If you have generated a graybox and want to handle the core as a graybox model, use the
read_verilog command to read the Verilog model that was written out from the graybox
generation step. Although the wrapper scan chains in the graybox model are not needed
for the retargeting mode, feedthroughs are preserved in the graybox model. If
feedthroughs are used for connecting cores to the chip level and blackboxing the cores
would break that path from the core boundary to the top, it is recommended to use the
graybox model.
• If you have the full core netlist in a separate file from the top-level module(s) and just
want to read it in and preserve the boundary but discard the contents, use the
read_verilog <design> -blackbox command. This method can only be used if there are
no feedthroughs or control logic within the core that are needed for the current mode of
operation.
• If you want to read the full design and blackbox specific core instances during design
flattening, use the add_black_box command. This method can only be used if there are
no feedthroughs or control logic within the core that are needed for the current mode of
operation.
You must provide all chip-level test procedures needed for this step including the chip-level
capture procedure, chip-level test_setup procedure, and chip-level load_unload and shift
procedures.
Because the tool automatically initializes channel input pipelining stages before the load of the
first test pattern you do not need to initialize them in the test_setup procedure. Following the
initialization, the tool also ensures that every generated pattern has sufficient trailing zeros
(ones for channels with pad inversion) to set the pipeline stages to zeros/ones after every pattern
is shifted in. You must, however, ensure that the values the tool shifts into the input pipeline
stages at the end of shift are not changed during capture by either constraining the clock used for
the pipeline stages to off or by constraining the channel input pin to zero (or one for inversion)
in the load_unload procedure. For more information on controlling input pipeline stages, see
“Using Pipeline Stages Between Pads and Channel Inputs or Outputs” and “Ensuring Input
Channel Pipelines Hold Their Value During Capture” in the Tessent TestKompress User’s
Manual.
The external_capture procedure has the same syntax as an NCP, except it does not have internal
and external modes. In comparison to an NCP, the external_capture procedure has the following
restrictions:
Prerequisites
• Core-level netlist
• Cell library
Procedure
1. Enable ATPG using the “set_context patterns -scan” command.
2. Read the core-level netlist and cell library.
3. Configure the core for internal mode.
4. Generate all pattern types.
5. Address all test coverage issues.
6. Verify the test patterns (test benches, STA).
7. Write the retargetable core test patterns using the write_patterns command.
8. Write the core fault lists using the write_faults command.
9. Write the core description file using the write_core_description command.
10. Write the flat model for diagnosis using the write_flat_model command.
Prerequisites
• Core description file for each of the core types.
• Retargetable patterns resulting from core-level pattern generation.
• Top-level netlist (with cores optionally blackboxed or grayboxed).
• Top-level test procedures.
Procedure
1. Enable the retargeting of patterns using the “set_context patterns -scan_retargeting”
command.
Note
A full netlist for cores whose patterns are being retargeted is not required. Retargeting
only requires a graybox or blackbox model of the cores to both retarget the patterns and to
generate chip-level serial and parallel simulation test benches.
2. Read the core description file for each of the core types.
3. Bind each core description to the core instances it represents in the design using the
add_core_instances command.
4. Read a dofile and test procedure file to configure core access and to configure the cores
whose patterns are being retargeted into their internal mode.
5. Run DRCs when “set_system_mode analysis” is invoked, including extracting scan
connections from the core instances to the top level and validating the embedding of the
cores.
6. Read in the retargetable patterns for each core type using the read_patterns command.
7. Write the retargeted patterns using the write_patterns command. The tool automatically
performs pin mapping (between core and chip-level) and pattern merging as it writes the
chip-level patterns.
8. Write the top-level core description file. This file includes the core-level core
description information as well as scan connectivity information from the cores to the
top. This information is later used for reverse mapping of silicon failures back to the
core level for diagnosis, or for pattern retargeting without a netlist.
Note
The top-level core description file also enables generation of top-level patterns without a
netlist. For more information, see “Retargeting of Patterns at the Chip Level Without a
Netlist.”
Chip-level patterns cannot be read back into Tessent Shell since the internal clocking
information is lost. However this is not needed since diagnosis is done at the core-level. The
generated simulation test bench can be simulated for validation. In addition, the design
objective of this functionality is to eliminate the need to load the full design into the tool.
Prerequisites
• Top-level core description file.
• Retargetable patterns resulting from core-level pattern generation.
Procedure
1. Enable the retargeting of patterns using the “set_context patterns -scan_retargeting”
command.
2. Read the top-level core description file using the read_core_descriptions command. In
the absence of a netlist, the tool recreates what is needed for the design using this file.
3. Change to analysis mode using “set_system_mode analysis”. This command
automatically sets the current design, adds the cores, sets pin constraints, and provides
any other information needed for the design.
4. Read in the retargetable patterns for each core type using the read_patterns command.
5. Specify the generic capture window using the
“set_external_capture_options -capture_procedure <external_capture_proc_name>”
command.
6. Report core instances using the report_core_instances command.
7. Retarget and merge patterns as they are written out with respect to the chip-level
boundary using the write_patterns command.
Prerequisites
• Complete top-level netlist or top-level netlist with cores grayboxed.
• Core-level fault lists.
• Top-level dofile.
• Top-level test procedure file.
Procedure
1. Enable the generation of patterns using the “set_context patterns -scan” command.
2. Read a complete top-level netlist, or one where each core is replaced by a light-weight
graybox model, and the cell library.
3. Read the core-level fault lists from each core’s internal mode pattern set. If the netlist is
not complete due to the use of the graybox models, add the -graybox switch to the
“read_faults fault_file -instance instances -merge” command.
4. Read a dofile and test procedure file to configure cores to external mode.
5. Run DRCs when “set_system_mode analysis” is invoked.
6. Create patterns for testing interconnect and top-level glue logic.
7. Write the generated patterns using the write_patterns command.
8. Report the full chip test coverage.
Retargeting Example
This example demonstrates the retargeting use model based on the design shown in Figure 8-4.
The design has three cores of two types: two identical instances of the CPU core and one
instance of the NB core. TOP is the chip level of the design. In the example, the input is
broadcast to identical core instances.
# Specify to generate patterns that are retargetable for the internal mode
# of the core. Because the mode name was not specified, the default is the
# same as the mode type “internal”.
set_current_mode -type internal
# Specify pins the tool should not constrain to X because they will be
# explicitly controlled by a Named Capture Procedure that models a
# chip-level clock controller driving core-level clocks
set_attribute_value {clk1 clk2} \
-name is_excluded_from_isolation_constraints
# Add commands to set up design for ATPG. To avoid coverage loss due to
# auto isolation constraints on scan_enable signals, constrain scan_enable
# signals to a non-X state
...
add_input_constraint input_scan_enable -C1
add_input_constraint output_scan_enable -C0
add_input_constraint core_scan_enable -C0
# Specify to generate patterns that are retargetable for the internal mode
# of the core. Because the mode name was not specified, the default is the
# same as the mode type “internal”.
set_current_mode -type internal
...
# Read all netlists and the current design. You can replace the core
# netlists with graybox models, or blackbox them to reduce memory usage
# and run time. You can blackbox them using the read_verilog -blackbox,
# or add_black_box commands.
read_verilog TOP.v
read_verilog CPU.v -blackbox
read_verilog NB.v -blackbox
set_current_design TOP
# Report core instances, then retarget and merge patterns as they are
# written out with respect to the chip-level boundary
report_core_instances
write_patterns TOP_stuck.stil -stil -replace
Limitations
The limitations of the scan pattern retargeting functionality are listed here.
• DRCs exist to validate that the design setup at the top level is consistent with the setup
that was used for core-level ATPG. But this validation is not complete. For example, the
capture cycle clocking is not validated. Consequently, you should perform chip-level
serial simulation of a small number of scan patterns to verify the setup is correct.
• Core-level ATPG has limited flat model support. You can save a flat model in analysis
mode for performing diagnosis or rerunning ATPG with that same configuration, but
you must perform the initial design setup (setup mode) and design rule checking on a
Verilog design and not a flat model. Note, you cannot access the
is_excluded_from_isolation_constraints port attribute when running on a flat model.
• During the retargeting phase, flat models are not supported. A Verilog design must be
read in. A flat model cannot be read in or written out because it lacks information
necessary for retargeting
• Scan pattern retargeting does not support multiple scan groups.
• When generating retargetable core-level patterns, native launch-off-shift is not
supported. Native launch-off-shift is one of two methods for generating launch-off-shift
patterns.
Native launch-off-shift — With this method, the transition tested is triggered by the last
shift applied by the shift procedure. The capture occurs when ATPG generates a single
cycle test. This method is not supported. When generating retargetable patterns for the
transition fault type, launch-off-shift will be automatically disabled as if you had
invoked the “set_fault_type transition” command with the
“-no_shift_launch” option.
Pseudo launch-off-shift — This method, which is supported, is modeled within the
capture cycles of ATPG. The patterns typically include two cycles. During the first
capture cycle, the design is kept in shift mode. During the second cycle, the scan enable
is de-asserted and the capture is performed. This method is more commonly used
because it allows the tool to perform shift and capture at-speed using PLL clocks.
• The shadow_control, shadow_observe, and master_observe procedures are not
supported. You should not use these procedures during core-level ATPG or in the top-
level test procedure file.
Figure 9-1 shows a basic process flow for defining test pattern timing.
Test
Procedure Internal Test
File Pattern Set
ATPG Flow
Tester Format
Patterns
with Timing
While the ATPG process itself does not require test procedure files to contain real timing
information, automatic test equipment (ATE) and some simulators do require this information.
Therefore, you must modify the test procedure files you use for ATPG to include real timing
information. “General Timing Issues” on page 333 discusses how you add timing information
to existing test procedures.
After creating real timing for the test procedures, you are ready to save the patterns. You use the
write_patterns command with the proper format to create a test pattern set with timing
information. For more information, refer to “Saving Timing Patterns” on page 338.
Test procedures contain groups of statements that define scan-related events. See “Test
Procedure File” on the Tessent Shell User’s Manual.
Timing Terminology
The following list defines some timing-related terms:
• Non-return Timing — Primary inputs that change, at most, once during a test cycle.
• Offset — The timeframe in a test cycle in which pin values change.
• Period — The duration of pin timing—one or more test cycles.
• Return Timing — Primary inputs, typically clocks, that pulse high or low during every
test cycle. Return timing indicates that the pin starts at one logic level, changes, and
returns to the original logic level before the cycle ends.
• Suppressible Return Timing — Primary inputs that can exhibit return timing during a
test cycle, although not necessarily.
Within a test cycle, a device under test must abide by the following restrictions:
• At most, each non-clock input pin changes once in a test cycle. However, different input
pins can change at different times.
• Each clock input pin is at its off-state at both the start and end of a test cycle.
• At most, each clock input pin changes twice in a test cycle. However, different clock
pins can change at different times.
• Each output pin has only one expected value during a test cycle. However, the
equipment can measure different output pin values at different times.
• A bidirectional pin acts as either an input or an output, but not both, during a single test
cycle.
To avoid adverse timing problems, the following timing requirements satisfy some ATE timing
constraints:
• Unused Outputs — By default, test procedures without measure events (all procedures
except shift) strobe unused outputs at a time of cycle/2, and end the strobe at 3*cycle/4.
The shift procedure strobes unused outputs at the same time as the scan output pin.
• Unused Inputs — By default, all unused input pins in a test procedure have a force
offset of 0.
• Unused Clock Pins — By default, unused clock pins in a test procedure have an offset
of cycle/4 and a width of cycle/2, where cycle is the duration of each cycle in the test
procedure.
• Pattern Loading and Unloading — During the load_unload procedure, when one
pattern loads, the result from the previous pattern unloads. When the tool loads the first
pattern, the unload values are X. After the tool loads the last pattern, it loads a pattern of
X’s so it can simultaneously unload the values resulting from the final pattern.
• Events Between Loading and Unloading (“patterns -scan” context only) — If other
events occur between the current unloading and the next loading, in order to load and
unload the scan chain simultaneously, The tool performs the events in the following
order:
a. Observe Procedure Only — The tool performs the observe procedure before
loading and unloading.
b. Initial Force Only — The tool performs the initial force before loading and
unloading.
c. Both Observe Procedure and Initial Force — The tool performs the observe
procedures followed by the initial force before loading and unloading.
1. Use the write_procfile -Full command and switch to generate a complete procedure file.
2. Examine the procedure file, modify timeplates with new timing if necessary.
3. Use the read_procfile command to load in the revised procedure file.
4. Issue the write_patterns command.
The “Test Procedure File” section of the Tessent Shell User’s Manual gives an in depth
description of how to create a procedure file.
There are three ways to load existing procedure file information into the tool:
• If you specify a new procedure file on the write_patterns command line, the timing
information in that procedure file will be used for that write_patterns command only,
and then the previous information will be restored.
After you have used the write_procfile -Full command and switch to generate a procedure file,
you can examine the procedure file, modifying timeplates with new timing if necessary. Any
timing changes to the existing TimePlates, cannot change the event order of the timeplate used
for scan procedures. The times may change, but the event order must be maintained.
In the following example, there are two events happening at time 20, and both are listed as event
4. These may be skewed, but they may not interfere with any other event. The events must stay
in the order listed in the comments:
force_pi 0; // event 1
bidi_force_pi 12; // event 3
measure_po 31; // event 7
bidi_measure_po 32; // event 8
force InPin 9; // event 2
measure OutPin 35; // event 9
pulse Clk1 20 5; // event 4 & 5 respectively
pulse Clk2 20 10; // event 4 & 6 respectively
period 50; // no events but all events
// have to happen in period
[set_statement ...]
[alias_definition]
timeplate_definition [timeplate_definition]
procedure_definition [procedure_definition]
The timeplate definition describes a single tester cycle and specifies where in that cycle all
event edges are placed. You must define all timeplates before they are referenced. A procedure
file must have at least one timeplate definition. The timeplate definition has the following
format:
timeplate timeplate_name =
timeplate_statement
[timeplate_statement ...]
period time;
end;
The following list contains available timeplate_statement statements. The timeplate definition
should contain at least the force_pi and measure_po statements.
Note
You are not required to include pulse statements for the clocks. But if you do not “pulse”
a clock, the tool uses two cycles to pulse it, resulting in larger patterns.
timeplate_statement:
offstate pin_name off_state;
force_pi time;
bidi_force_pi time;
measure_po time;
bidi_measure_po time;
force pin_name time;
measure pin_name time;
pulse pin_name time width;
Note
This force time overrides the force time specified in force_pi for this specific pin.
• measure pin_name time — A literal and double string that specifies the measure time
for a specific named pin.
Note
This measure time overrides the measure time specified in measure_po for this specific
pin.
• pulse pin_name time width — A literal and triple string that specifies the pulse timing
for a specific named clock pin. The time value specifies the leading edge of the clock
pulse and the width value specifies the width of the clock pulse. This statement can only
reference pins that have been declared as clocks by the add_clocks command or pins that
have an offstate specified by the “offstate” statement. The sum of the time and width
must be less than the period.
• period time — A literal and string pair that defines the period of a tester cycle. This
statement ensures that the cycle contains sufficient time, after the last force event, for the
circuit to stabilize. The time you specify should be greater than or equal to the final
event time.
Example 1
timeplate tp1 =
force_pi 0;
pulse T 30 30;
pulse R 30 30;
measure_po 90;
period 100;
end;
Example 2
The following example shows a shift procedure that pulses b_clk with an off-state value of 0.
The timeplate tp_shift defines the off-state for pin b_clk. The b_clk pin is not declared as a
clock in the ATPG tool.
timeplate tp_shift =
offstate b_clk 0;
force_pi 0;
measure_po 10;
pulse clk 50 30;
pulse b_clk 140 50;
period 200;
end;
procedure shift =
timeplate tp_shift;
cycle =
force_sci;
measure_sco;
pulse clk;
pulse b_clk;
end;
end;
• Generating basic test pattern data formats. text, Verilog, and WGL (ASCII and binary).
• Generating ASIC Vendor test data formats: TDL 91, FTDL-E, MITDL, and TSTL2.
• Supporting parallel load of scan cells (in Verilog format).
• Reading in external input patterns and output responses, and directly translating to one
of the formats.
• Reading in external input patterns, performing good or faulty machine simulation to
generate output responses, and then translating to any of the formats.
• Writing out just a subset of patterns in any test data format.
• Facilitating failure analysis by having the test data files cross-reference information
between tester cycle numbers and pattern numbers.
• Supporting differential scan input pins for each simulation data format.
The primary advantage of simulating serial loading is that it emulates how patterns are loaded
on the tester. You thus obtain a very realistic indication of circuit operation. The disadvantage is
that for each pattern, you must clock the scan chain registers at least as many times as you have
scan cells in the longest chain. For large designs, simulating serial loading takes an extremely
long time to process a full set of patterns.
The primary advantage of simulating parallel loading of the scan chains is it greatly reduces
simulation time compared to serial loading. You can directly (in parallel) load the simulation
model with the necessary test pattern values because you have access, in the simulator, to
internal nodes in the design. Parallel loading makes it practical for you to perform timing
simulations for the entire pattern set in a reasonable time using popular simulators like
ModelSim that utilize the Verilog format.
After the parallel load, you apply the shift procedure a few times (depending on the number of
scan cells in the longest subchain, but usually only once) to load the scan-in value into the sub-
chains. Simulating the shift procedure only a few times can dramatically improve timing
simulation performance. You can then observe the scan-out value at the scan output pin of each
sub-chain.
Parallel loading ensures that all memory elements in the scan sub-chains achieve the same states
as when serially loaded. Also, this technique is independent of the scan design style or type of
scan cells the design uses. Moreover, when writing patterns using parallel loading, you do not
have to specify the mapping of the memory elements in a sub-chain between the timing
simulator and Tessent Shell. This method does not constrain library model development for
scan cells.
Note
When your design contains at least one stable-high scan cell, the shift procedure period
must exceed the shift clock off time. If the shift procedure period is less than or equal to
the shift clock off time, you may encounter timing violations during simulation. The test
pattern formatter checks for this condition and issues an appropriate error message when
it encounters a violation.
For example, the test pattern timing checker would issue an error message when reading in the
following shift procedure and its corresponding timeplate:
timeplate gen_tp1 =
force_pi 0;
measure_po 100;
pulse CLK 200 100;
period 300; // Period same as shift clock off time
end;
procedure shift =
scan_group grp1;
timeplate gen_tp1;
cycle =
force_sci;
measure_sco;
pulse CLK; // Force shift clock on and off
end;
end;
// Error: There is at least one stable high scan cell in the design. The
shift procedure period must be greater than the shift clock off time to
avoid simulation timing violations.
timeplate gen_tp1 =
force_pi 0;
measure_po 100;
pulse CLK 200 100;
period 400; // Period greater than shift clock off time
end;
Note
Using the -Start and -End switches limits file size as well, but the portion of internal
patterns saved does not provide a very reliable indication of pattern characteristics when
simulated. Sampled patterns more closely approximate the results you would obtain from
the entire pattern set.
After performing initial verification with parallel loading, you can use a sampled pattern set for
simulating series loading until you are satisfied test coverage is reasonably close to desired
specification. Then, perform a series loading simulation with the unsampled pattern set only
once, as your last verification step.
Note
The set_pattern_filtering command serves a similar purpose to the -Sample switch of the
write_patterns command. The set_pattern_filtering command creates a temporary set of
sampled patterns within the tool.
Several test pattern data formats support IDDQ testing. There are special IDDQ measurement
constructs in TDL 91 (Texas Instruments), MITDL (Mitsubishi), TSTL2 (Toshiba), and FTDL-
E (Fujitsu). The tools add these constructs to the test data files. All other formats (WGL and
Verilog) represent these statements as comments.
Text Format
This is the default format that the tool generates when you run the write_patterns command. The
tool can read back in this format in addition to WGL, STIL, and binary format.
This format contains test pattern data in a text-based parallel format, along with pattern
boundary specifications. The main pattern block calls the appropriate test procedures, while the
header contains test coverage statistics and the necessary environment variable settings. This
format also contains each of the scan test procedures, as well as information about each scan
memory element in the design.
To create a basic text format file, enter the following at the application command line:
The formatter writes the complete test data to the file named filename.
For more information on the write_patterns command and its options, refer to the write_patterns
description in the Tessent Shell Reference Manual.
Note
This pattern format does not contain explicit timing information. For more information
about this test pattern format, refer to “Test Pattern File Formats” on page 349.
Often, the first cycle in a test set must perform certain tasks. The first test cycle in all test data
formats turns off the clocks at all clock pins, drives Z on all bidirectional pins, drives an X on all
other input pins, and disables measurement at any primary output pins.
The test pattern set can contain two main parts: the chain test block, to detect faults in the scan
chain, and the scan test or cycle test block, to detect other system faults.
The test procedure file applies each event in a test procedure at the specified time. Each test
procedure corresponds to one or more test cycles. Each test procedure can have a test cycle with
a different timing definition. By default, all events use a timescale of 1 ns.
Note
If you specify a capture clock with the set_capture_clock command, the test pattern
formatter does not produce the chain test block. For example, the formatter does not
produce a chain test block for IEEE 1149.1 devices in which you specify a capture clock
during tool setup.
Each event has a sequence number within the test cycle. The sequence number’s default time
scale is 1 ns.
Unloading of the scan chains for the current pattern occurs concurrently with the loading of scan
chains for the next pattern. Therefore the last pattern in the test set contains an extra application
of the load_unload sequence.
More complex scan styles (for example, like LSSD) use master_observe and skewed_load
procedures in the pattern. For designs with sequential controllers, like boundary scan designs,
each test procedure may have several test cycles in it to operate the sequential scan controller.
Some pattern types (for example, RAM sequential and clock sequential types) are more
complex than the basic patterns. RAM sequential patterns involve multiple loads of the scan
chains and multiple applications of the RAM write clock. Clock sequential patterns involve
multiple capture cycles after loading the scan chains. Another special type of pattern is the
clock_po pattern. In these patterns, clocks may be held active throughout the test cycle and
without applying capture clocks.
If the test data format supports only a single timing definition, the tool cannot save both
clock_po and non-clock_po patterns in one pattern set. This is so because the tester cannot
reproduce one clock waveform that meets the requirements of both types of patterns. Each
pattern type (combinational, clock_po, ram_sequential, and clock_sequential) can have a
separate timing definition.
General Considerations
During a test procedure, you may leave many pins unspecified. Unspecified primary input pins
retain their previous state.
Note
If you run ATPG after setting pin constraints, you should also ensure that you set these
pins to their constrained states at the end of the test_setup procedure. The
add_pin_constraints command constrains pins for the non-scan cycles, not the test
procedures. If you do not properly constrain the pins within the test_setup procedure, the
tool does it for you, internally adding the extra force events after the test_setup
procedure. This increases the period of the test_setup procedure by one time unit. This
increased period can conflict with the test cycle period, potentially forcing you to re-run
ATPG with the modified test procedure file.
All test data formats contain comment lines that indicate the beginning of each test block and
each test pattern. You can use these comments to correlate the test data in the text format with
other test data formats.
These comment lines also contain the cycle count and the loop count, which help correlate tester
pattern data with the original test pattern data. The cycle count represents the number of test
cycles, with the shift sequence counted as one cycle. The loop count represents the number of
all test cycles, including the shift cycles. The cycle count is useful if the tester has a separate
memory buffer for scan patterns, otherwise the loop count is more relevant.
Note
The cycle count and loop count contain information for all test cycles—including the test
cycles corresponding to test procedures. You can use this information to correlate tester
failures to a pattern for fault diagnosis.
Binary
This format contains test pattern data in a binary parallel format, which is the only format (other
than text format) that the tool can read. A file generated in this format contains the same
information as text format, but uses a condensed form. You should use this format for archival
purposes or when storing intermediate results for very large designs.
The tool writes the complete test data to the file named filename.
For more information about the write_patterns command and its options, refer to the
write_patterns description in the Tessent Shell Reference Manual.
Verilog
This format contains test pattern data and timing information in a text-based format readable by
both the Verilog and Verifault simulators. This format also supports both serial and parallel
loading of scan cells. The Verilog format supports all Tessent Shell timing definitions, because
Verilog stimulus is a sequence of timed events.
To generate a basic Verilog format test pattern file, use the following arguments with the
write_patterns command:
The Verilog pattern file contains procedures to apply the test patterns, compare expected output
with simulated output, and print out a report containing information about failing comparisons.
The tools write all patterns and comparison functions into one main file (filename), while
writing the primary output names in another file (filename.po.name). If you choose parallel
loading, they also write the names of the scan output pins of each scan sub-chain of each scan
chain in separate files (for example, filename.chain1.name). This allows the tools to report
output pins that have discrepancies between the expected and simulated outputs. You can
enhance the Verilog testbench with Standard Delay Format (SDF) back annotation.
For more information on the write_patterns command and its options, refer to the write_patterns
description in the Tessent Shell Reference Manual.
Some test data flows verify patterns by translating WGL to stimulus and response files for use
by the chip foundry’s golden simulator. Sometimes this translation process uses its own parallel
loading scheme, called memory-to-memory mapping, for scan simulation. In this scheme, each
scan memory element in the ATPG model must have the same name as the corresponding
memory element in the simulation model. Due to the limitations of this parallel loading scheme,
you should ensure the following:
1) there is only one scan cell for each DFT library model (also called a scan subchain), 2) the
hierarchical scan cell names in the netlist and DFT library match those of the golden simulator
(because the scan cell names in the ATPG model appear in the scan section of the parallel WGL
output), and 3) the scan-in and scan-out pin names of all scan cells are the same.
To generate a basic WGL format test pattern file, use the following arguments with the
write_patterns command:
For more information about the write_patterns command and its options, refer to the
write_patterns description in the Tessent Shell Reference Manual.
For more information on the WGL format, contact Integrated Measurement Systems, Inc.
For more information about the write_patterns command and its options, refer to the
write_patterns description in the Tessent Shell Reference Manual.
All the ASIC vendor data formats are text-based and load data into scan cells in a parallel
manner. Also, ASIC vendors usually impose several restrictions on pattern timing. Most ASIC
vendor pattern formats support only a single timing definition. Refer to your ASIC vendor for
test pattern formatting and other requirements.
The following subsections briefly describe the ASIC vendor pattern formats.
TI TDL 91
This format contains test pattern data in a text-based format.
The tool supports features of TDL 91 version 3.0 and of TDL 91 version 6.0. The version 3.0
format supports multiple scan chains, but allows only a single timing definition for all test
cycles. Thus, all test cycles must use the timing of the main capture cycle. TI’s ASIC division
imposes the additional restriction that comparison should always be done at the end of a tester
cycle.
To generate a basic TI TDL 91 format test pattern file, use the following arguments with the
write_patterns command:
The formatter writes the complete test data to the file filename. It also writes the chain test to
another file (filename.chain) for separate use during the TI ASIC flow.
For more information about the write_patterns command and its options, refer to the
write_patterns description in the Tessent Shell Reference Manual.
Fujitsu FTDL-E
This format contains test pattern data in a text-based format. The FTDL-E format splits test data
into patterns that measure 1 or 0 values, and patterns that measure Z values. The test patterns
divide into test blocks that each contain 64K tester cycles.
To generate a basic FTDL-E format test pattern file, use the following arguments with the
write_patterns command:
The formatter writes the complete test data to the file named filename.fjtdl.func. If the test
pattern set contains IDDQ measurements, the formatter creates a separate DC parametric test
block in a file named filename.ftjtl.dc.
For more information about the write_patterns command and its options, refer to the
write_patterns description in the Tessent Shell Reference Manual.
Mitsubishi TDL
This format contains test pattern data in a text-based format. To generate a basic Mitsubishi Test
Description Language (TDL) format test pattern file, use the following arguments with the
write_patterns command:
The formatter represents all scan data in a parallel format. It writes the test data into two files:
the program file (filename.td0), which contains all pin definitions, timing definitions, and scan
chain definitions; and the test data file (filename.td1), which contains the actual test vector data
in a parallel format.
For more information about the write_patterns command and its options, refer to the
write_patterns description in the Tessent Shell Reference Manual.
Toshiba TSTL2
This format contains only test pattern data in a text-based format. The test pattern data files
contain timing information. This format supports multiple scan chains, but allows only a single
timing definition for all test cycles. TSTL2 represents all scan data in a parallel format.
To generate a basic Toshiba TSTL2 format test pattern file, use the following arguments with
the write_patterns command:
The formatter writes the complete test data to the file named filename. For more information
about the write_patterns command and its options, refer to the write_patterns description in the
Tessent Shell Reference Manual.
Header_Data
The header_data section contains the general information, or comments, associated with the test
patterns. This is an optional section that requires a double slash (//) at the beginning of each line
in this section. The data printed may be in the following format:
// model_build_version - the version of the model build program that was used to create
the scan model.
// design_name - the design name of the circuit to be tested.
// date - the date in which the scan model creation was performed.
// statistics - the test coverage, the number of faults for each fault class, and the total
number of test patterns.
// settings - the description of the environment in which the ATPG is performed.
// messages - any warning messages about bus contention, pins held, equivalent pins,
clock rules, and so on are noted.
Setup_Data
The setup_data section contains the definition of the scan structure and general test procedures
that will be referenced in the description of the test patterns.
Note
Additional formats are added to the setup_data section for BIST patterns. For information
on these formats, see “BIST Pattern File Format” on page 357”.
SETUP =
<setup information>
END;
CLOCK “clock_name1” =
OFF_STATE = <off_state_value>;
PULSE_WIDTH = <pulse_width_value>;
END;
CLOCK “clock_name2” =
OFF_STATE = <off_state_value>;
PULSE_WIDTH = <pulse_width_value>;
END;
This defines the list of clocks that are contained in the circuit. The clock data will include the
clock name enclosed in double quotes, the off-state value, and the pulse width value. For edge-
triggered scan cells, the off-state is the value that places the initial state of the capturing
transition at the clock input of the scan cell.
WRITE_CONTROL “primary_input_name” =
OFF_STATE = <off_state_value>;
PULSE_WIDTH = <pulse_width_value>;
END;
This defines the list of write control lines that are contained in the circuit. The write control line
will include the primary input name enclosed in double quotes, the off-state value, and the pulse
width value. If there are multiple write control lines, they must be pulsed at the same time.
This is an optional procedure that can be used to set nonscan memory elements to a constant
state for both ATPG and the load/unload process. It is applied once at the beginning of the test
pattern set. This procedure may only include force commands.
SCAN_GROUP “scan_group_name1” =
<scan_group_information>
END;
SCAN_GROUP “scan_group_name2” =
<scan_group_information>
END;
....
....
This defines each scan chain group that is contained in the circuit. A scan chain group is a set of
scan chains that are loaded and unloaded in parallel. The scan group name will be enclosed in
double quotes and each scan group will have its own independent scan group section. Within a
scan group section, there is information associated with that scan group, such as scan chain
definitions and procedures.
SCAN_CHAIN “scan_chain_name1” =
SCAN_IN = “scan_in_pin”;
SCAN_OUT = “scan_out_pin”;
LENGTH = <length_of_scan_chain>;
END;
SCAN_CHAIN “scan_chain_name2” =
SCAN_IN = “scan_in_pin”;
SCAN_OUT = “scan_out_pin”;
LENGTH = <length_of_scan_chain>;
END;
....
....
The scan chain definition defines the data associated with a scan chain in the circuit. If there are
multiple scan chains within one scan group, each scan chain will have its own independent scan
chain definition. The scan chain name will be enclosed in double quotes. The scan-in pin will be
the name of the primary input scan-in pin enclosed in double quotes. The scan-out pin will be
the name of the primary output scan-out pin enclosed in double quotes. The length of the scan
chain will be the number of scan cells in the scan chain.
The type of procedures may include shift procedure, load and unload procedure, shadow-control
procedure, master-observe procedure, shadow-observe procedure, and skew-load procedure.
The list of events may be any combination of the following commands:
This command is used to force a value (0,1, X, or Z) on a selected primary input pin at a given
time. The time values must not be lower than previous time values for that procedure. The time
for each procedure begins again at time 0. The primary input pin will be enclosed in double
quotes.
This command indicates the selected procedure name is to be applied the selected number of
times beginning at the selected time. The scan group procedure name will be enclosed in double
quotes. This command may only be used inside the load and unload procedures.
This command indicates the time in the shift procedure that values are to be placed on the scan
chain inputs. The scan chain name will be enclosed in double quotes.
This command indicates the time in the shift procedure that values are to be measured on the
scan chain outputs. The scan chain name will be enclosed in double quotes.
Functional_Chain_Test
The functional_chain_test section contains a definition of a functional scan chain test for all
scan chains in the circuit to be tested. For each scan chain group, the scan chain test will include
a load of alternating double zeros and double ones (00110011...) followed by an unload of those
values for all scan chains of the group. The format is as follows:
CHAIN_TEST =
APPLY “test_setup” <value> <time>;
PATTERN = <number>;
APPLY “scan_group_load_name” <time> =
CHAIN “scan_chain_name1” = “values....”;
CHAIN “scan_chain_name2” = “values....”;
....
....
END;
APPLY “scan_group_unload_name” <time> =
CHAIN “scan_chain_name1” = “values....”;
CHAIN “scan_chain_name2” = “values....”;
....
....
END;
END;
The optional “test_setup” line is applied at the beginning of the functional chain test pattern if
there is a test_setup procedure in the Setup_Data section. The number for the pattern is a zero-
based pattern number where a functional scan chain test for all scan chains in the circuit is to be
tested. The scan group load and unload name and the scan chain name will be enclosed in
double quotes. The values to load and unload the scan chain will be enclosed in double quotes.
During the loading of the scan chains, each value of the corresponding scan chain will be placed
at its scan chain input pin. The shift procedure will shift the value through the scan chain and
continue shifting the next value until all values for all the scan chains have been loaded. Since
the number of shifts is determined by the length of the longest scan chain, X’s (don’t care) are
placed at the beginning of the shorter scan chains. This will ensure that all the values of the scan
chains will be loaded properly.
During the unloading of the scan chains, each value of the corresponding scan chain will be
measured at its scan chain output pin. The shift procedure will shift the value out of the scan
chain and continue shifting the next value until all values for all the scan chains have been
unloaded. Again, since the number of shifts is determined by the length of the longest scan
chain, X’s (don’t measure) are placed at the end of the shorter scan chains. This will ensure that
all the values of the scan chains will be unloaded properly.
CHAIN_TEST =
APPLY “test_setup” 1 0;
PATTERN = 0;
APPLY “g1_load” 0 =
CHAIN “c2” = “XXXXXXXXX0011001100110011001100”;
CHAIN “c1” = “XXXXXXXXXXXXX001100110011001100”;
CHAIN “c0” = “0011001100110011001100110011001”;
END;
APPLY “g1_unload” 1 =
CHAIN “c2” = “0011001100110011001100XXXXXXXXX”;
CHAIN “c1” = “001100110011001100XXXXXXXXXXXXX”;
CHAIN “c0” = “0011001100110011001100110011001”
END;
END;
Scan_Test
The scan_test section contains the definition of the scan test patterns that were created by
Tessent Shell. A scan pattern will normally include the following:
SCAN_TEST =
PATTERN = <number>;
FORCE “PI” “primary_input_values” <time>;
APPLY “scan_group_load_name” <time> =
CHAIN “scan_chain_name1” = “values....”;
CHAIN “scan_chain_name2” = “values....”;
....
....
END;
FORCE “PI” “primary_input_values” <time>;
MEASURE “PO” “primary_output_values” <time>;
PULSE “capture_clock_name1” <time>;
PULSE “capture_clock_name2” <time>;
APPLY “scan_group_unload_name” <time> =
CHAIN “scan_chain_name1” = “values....”;
CHAIN “scan_chain_name2” = “values....”;
....
....
END;
....
....
....
END;
The number of the pattern represents the pattern number in which the scan chain is loaded,
values are placed and measured, any capture clock is pulsed, and the scan chain is unloaded.
The pattern number is zero-based and must start with zero. An additional force statement will be
applied at the beginning of each test pattern, if transition faults are used. The scan group load
and unload names and the scan chain names will be enclosed by double quotes. All the time
values for a pattern must not be lower than the previous time values in that pattern. The values
to load and unload the scan chain will be enclosed in double quotes. Refer to the
“Functional_Chain_Test” section on how the loading and unloading of the scan chain operates.
The primary input values will be in the order of a one-to-one correspondence with the primary
inputs defined in the setup section. The primary output values will also be in the order of a one-
to-one correspondence with the primary outputs defined in the setup section.
If there is a test_setup procedure in the Setup_Data section, the first event, which is applying the
test_setup procedure, must occur before the first pattern is applied:
If there are any write control lines, they will be pulsed after the values have been applied at the
primary inputs:
If there are capture clocks, then they will be pulsed at the same selected time, after the values
have been measured at the primary outputs. Any scan clock may be used to capture the data into
the scan cells that become observed.
Scan patterns will reference the appropriate test procedures to define how to control and observe
the scan cells. If the contents of a master is to be placed into the output of its scan cell where it
may be observed by applying the unload operation, the master_observe procedure must be
applied before the unloading of the scan chains:
If the contents of a shadow is to be placed into the output of its scan cell where it may be
observed by applying the unload operation, the shadow_observe procedure must be applied
before the unloading of the scan chains:
If the master and slave of a scan cell are to be at different values for detection, the skew_load
procedure must be applied after the scan chains are loaded:
Each scan pattern will have the property that it is independent of all other scan patterns. The
normal scan pattern will contain the following events:
Although the load and unload operations are given separately, it is highly recommended that the
load be performed simultaneously with the unload of the preceding pattern when applying the
patterns at the tester.
For observation of primary outputs connected to clocks, there will be an additional kind of scan
pattern that contains the following events:
Scan_Cell
The scan_cell section contains the definition of the scan cells used in the circuit. The scan cell
data will be in the following format:
SCAN_CELLS =
SCAN_GROUP “group_name1” =
SCAN-CHAIN “chain_name1” =
SCAN_CELL = <cellid> <type> <sciinv> <scoinv>
<relsciinv> <relscoinv> <instance_name>
<model_name> <input_pin> <output_pin>;
....
END;
SCAN_CHAIN “chain_name2” =
SCAN_CELL = <cellid> <type> <sciinv> <scoinv>
<relsciinv> <relscoinv> <instance_name>
<model_name> <input_pin> <output_pin>;
....
END;
....
END;
....
END;
The fields for the scan cell memory elements are the following:
• cellid - A number that identifies the position of the scan cell in the scan chain. The
number 0 indicates the scan cell closest to the scan-out pin.
• type - The type of scan memory element. The type may be MASTER, SLAVE,
SHADOW, OBS_SHADOW, COPY, or EXTRA.
• sciinv - Inversion of the library input pin of the scan cell relative to the scan chain input
pin. The value may be T (inversion) or F (no inversion).
• scoinv - Inversion of the library output pin of the scan cell relative to the scan chain
output pin. The value may be T (inversion) or F (no inversion).
• relsciinv - Inversion of the memory element relative to the library input pin of the scan
cell. The value may be T (inversion) or F (no inversion).
• relscoinv - Inversion of the memory element relative to the library output pin of the scan
cell. The value may be T (inversion) or F (no inversion).
• instance_name - The top level boundary instance name of the memory element in the
scan cell.
• model_name - The internal instance pathname of the memory element in the scan cell
(if used - blank otherwise).
• input_pin - The library input pin of the scan cell (if it exists, blank otherwise).
• output_pin - The library output pin of the scan cell (if it exists, blank otherwise).
Example Circuit
Figure 10-1 illustrates the scan cell elements in a typical scan circuit.
Boundary (set up
in model definition)
scan_in scan_out
In Out
relsciinv relscoinv
Setup_Data
The setup_data section for BIST contains a subsection that defines the BIST pattern-specific
configuration. This subsection includes a file version identifier and definitions for signature
registers (prpg_register and misr_register) in the BIST pattern.
A BIST-specific statement is used to identify that the following configuration is BIST pattern-
specific. The BIST-specific statement has the following format:
A version tag is used to indicate the BIST pattern version. The version tag has the following
format:
BIST_ASCII_PATTERN_FILE_SUBVERSION
Here is an example of a BIST pattern-specific statement combined with a version tag statement:
A pattern_internal_view switch that indicates whether the BIST pattern internal view is written
to the pattern file; its possible values are “ON” or “OFF”. If the switch is set to on, as shown in
the following example, BIST patterns are included in the pattern file. For information about
pattern format types, refer to the LBISTArchitect Reference Manual.
pattern_internal_view = “on”
The prpg_register and misr_register identifiers define signature registers such as PRPG and
MISR in the BIST pattern. The signature register statements use the following format:
prpg_register “decomp1” =
length = 22;
type = PRPG;
init_value = “0000000000000000000000”;
end;
prpg_register “decomp2” =
length = 12;
type = PRPG;
init_value = “000000000000”;
end;
prpg_register “prpg1” =
length = 16;
type = PRPG;
init_value = “0000000000000000”;
end;
prpg_register “prpg2” =
length = 16;
type = PRPG;
init_value = “0000000000000000”;
end;
misr_register “misr1” =
length = 32;
type = MISR;
init_value = “11111111111111111111111111111111”;
end;
misr_register “misr2” =
length = 24;
type = MISR;
init_value = “111111111111111111111111”;
end;
Scan_Test
Each BIST pattern includes one lfsm_snapshot statement. Within the pattern statement, the
keyword pre_load, pre_unload, or post_unload is followed by a register name to indicate when
the snapshot for the register is to be taken. The keywords are applied as follows:
• Given the pre_load value of PRPG registers, the loading data for each BIST pattern can
be computed.
• Given the pre_unload value of MISR registers, the MISR registers after unload can be
computed and thus verified.
pattern = 0;
lfsm_snapshot =
pre_load “decomp1” = “0000000000000000000000”;
pre_load “decomp2” = “000000000000”;
pre_load “prpg1” = “1111111111111111”;
pre_load “prpg2” = “1111111111111111”;
pre_unload “misr1” = “11111111111111111111111111111111”;
pre_unload “misr2” = “111111111111111111111111”;
post_unload “misr1” = “11111111110001111110111111101111”;
post_unload “misr2” = “111111110000000011111111”;
end;
apply “grp1_load” 0 =
...
end;
apply “grp1_unload” 3 =
...
end;
This chapter describes the power-aware DRC and ATPG flow for use with the ATPG tool, and
contains the following sections:
• Power-Aware Overview
o Assumptions and Limitations
o Multiple Power Mode Test Flow
o Power-Aware ATPG for Traditional Fault Models
• CPF and UPF Parser
• Power-Aware ATPG Procedure
• Power-Aware Flow Examples
Power-Aware Overview
The electronics industry has adopted low-power features in major aspects of the design
continuum. In response, EDA venders and major semiconductor companies have defined the
commonly-used power data standard formats to describe the power requirements: UPF and
CPF. Tessent Shell supports the following versions of the UPF and CPF formats:
The tool’s low-power functionality provides you with a method to do the following:
• Provide DRC’s to trace the active power mode and ensure that the scan operation works
under the current power configuration.
• Provide capability to generate test for the traditional fault models while aware of the
power mode configuration.
• Circuit hierarchy is preserved in the CPF or UPF file and is the same as the netlist. Note
that for modular EDT design, the module hierarchy that includes EDT logic needs to be
preserved, otherwise the tool may not be able to associate an EDT block with a power
domain. Consequently, some power DRC rules related to EDT logic may not be
performed.
• The power-aware DRC rules and reporting are based on the loaded power data (UPF or
CPF). The DRC rules do not include testing that crosses different power modes.
Additionally, the DRC rules do not cover the testing of the shutoff power domain such
as the retention cells testing.
Note
For the purpose of DRC, you must load to load a UPF/CPF file in the SETUP mode.
When loading a UPF/CPF file in a non-SETUP mode, the tool does not perform V DRC
until you switch the tool from the SETUP mode to a non-SETUP mode.
Pattern Generation
ATPG generates patterns only for the current power mode. If there are different power modes
which enable the identical power domains (just in different voltage configuration), then the
pattern set can be reused by loading the pattern file and performing fault grading. Reuse of the
pattern set is at your discretion.
Despite the pattern reuse, you should still write one test_setup procedure for every power mode
to be tested, and perform DRC check for each power mode to ensure the scan chains can operate
properly in the power mode. In addition, a new pattern set should be stored to reflect the
updated test_setup for the corresponding power mode. Finally, when writing out patterns after
ATPG, the tool should also save the current power mode information (as a comment) to the
pattern file for the user’s reference.
A low-power DRC is performed before ATPG to check if the active power mode can be
disturbed and the analysis result is used by ATPG to determine if any additional ATPG effort is
needed to keep the static power mode. This is similar to E10 rule for the bus contention check
which is used by ATPG to enable the extra justification to prevent the bus contention. If the
circuit contains the power mode that powers on all power domains (called ALL_ON state), you
can use this state for the traditional fault models. An ALL_ON state allows the circuit to be
tested for logic faults in one test set run. In addition, this state also allows the tool to perform
DRC for entire circuit in this run.
Power Partitioning
If the circuit needs to partition with partial power domains powered in a given time, then you
must perform multiple ATPG runs; specifically, each run with its procedure file and the scan
configuration. You must ensure that every power domain is covered by at least one run.
Additionally, the chip- level test coverage can be computed manually from each separate run.
In the case of multiple power partition flow, the always on power domain, the faults may be
targeted multiple times. To reduce the creation of patterns for same faults in the always-on
domains, you can use the following command:
This explicitly removes the faults in always_on domain if the faults have been targeted by other
run.
The other way to avoid creation of duplicated patterns is to load the previous generated fault list
(using read_faults –merge) so that the detected faults by previous runs will not be re-targeted
again.
The power data in UPF or CPF format should be applied to the tool so the low-power rules (see
“Power-Aware Rules (V Rules)”) can be checked and the circuit can be simulated according to
the active power mode.
In general, you perform the following steps with the power-aware ATPG flow, either directly
from the command line or scripted in a dofile:
1. Invoke the Tessent Shell, set the context the “patterns -scan,” and read in the low-power
design. For example:
SETUP> read_verilog low-power_design.v
At this point, the tool performs the DRC checks. See “Power-Aware Rules (V Rules) in
the Tessent Shell Reference Manual.
5. Add faults using the applicable power-aware switch to the add_faults command. For
example:
SETUP> add_faults -on_domains
6. Optionally write the faults to a fault list for multiple power-aware test methodologies—
see “Multiple Power Mode Test Flow.” For example:
SETUP> write_faults on_domain_fault_list.txt
• report_faults
• report_power_data
Table 11-2. Example Design With Four Power domains and Power Modes
Power Domains
Power Modes CPU MEM1 CTL Radio test_setup file
active Active Active ON Tx,Rx test_setup_active
standby Idle Sleep ON Rx test_setup_standby
idle Sleep Sleep ON Rx test_setup_idle
sleep Sleep Sleep OFF Off N/A
chain1
scan chains chain2 chain3 chain4 none
• test_setup_active
• test_setup_standby
• test_setup_idle
The main test procedure file, which contains the rest of procedures, uses an include statement to
include the test_setup for the power mode to be tested. For example, using the following include
statement:
# include test_setup_active”
The recommended flow is to test the power mode with all power domains active first, if such
power mode exists (power mode “active” in Table 11-2). This allows the tool to view all scan
chains and check the “Power-Aware Rules (V Rules)” rules crossing all power domains. Note
that when testing different power modes, the scan chains need to be defined accordingly to
prevent DRC violations. For example when testing “standby” mode where “MEM1” power
domain is off, chain3 should not be defined, otherwise it is a V8 DRC violation.
See ““Power-Aware Rules (V Rules)” in the Tessent Shell Reference Manual for a complete
discussion.
Example 2
In this example, the design contains the following:
To test the design, you must perform the following multiple tool runs:
This updates the fault status of faults in D2 but discard faults in D3 as they are not
power on faults. See the read_faults command for more information.
e. Create patterns and write patterns.
f. Write faults to a file named flist_S2.txt using the write_faults command.
g. Write isolation faults to a file named flist_S2_iso.txt using write_faults –isolation to
save for later use.
h. Write level-shifter faults to a file named flist_S2_ls.txt using
write_faults –level_shifter to save for later use.
After run 2, you can calculate the entire fault coverage by loading multiple fault lists into the
tool. You do this by using the read_faults –POwer_check OFF command and switch as shown
in the following steps:
This chapter describes the low-power scan insertion and ATPG flow for use with Tessent Scan
and the ATPG tool, and contains the following sections:
1. Specify low-power data specifications in the CPF/UPF file. See “Low-Power CPF/UPF
Parameters”.
2. Insert scan cells and EDT logic in the design. See “Test Insertion”.
3. Validate low-power data, scan, and EDT logic. See “Power-Aware Design Rule
Checks”.
4. Generate power domain-aware test patterns. See “Power State-Aware ATPG”.
5. Test low-power design components.
• Tessent Scan does not write or update CPF/UPF files. Tessent Scan assumes that
everything that belongs to a power domain is explicitly listed in the UPF/CPF file.
Because of this assumption, you must make the following changes to the UPF/CPF file
after the scan insertion step and before ATPG:
o Add any inserted input wrapper cells to the correct power domain in the CPF/UPF
file.
o Explicitly define all isolation cells and their control signals, and level shifters in the
CPF/UPF file. Tessent Scan checks for their presence but does not add them. For
more information, see “Scan Insertion with Tessent Scan.”
If you are a member of Si2, you can access complete information about CPF standards at the
following URL:
https://www.si2.org/openeda.si2.org/project/showfiles.php?group_id=51
You can purchase complete information on UPF standards at the following URL:
http://www.techstreet.com/standards/ieee/1801_2009?product_id=1744966
In the CPF/UPF file, you must specify power domains and information related to the power
domains, power states (modes) of the design, and isolation cells and control signals. You can
use the commands listed in Table 12-1 to specify this information.
Test Insertion
Test insertion includes scan substitution and stitching. You can insert scan chains on a power
domain basis. Alternately, you can group test logic based on power states. Figure 12-1 show an
example of chains inserted on a power domain basis. Note, no scan chains span the power
domains because the tool does not insert scan across power domains.
5. If wrapper cells are enabled, scan chain partitioning will be affected. Refer to
“Managing Wrapper Cells with Power Domains” for more information.
6. Report the scan partitions created based on the power domain information in the
CPF/UPF file:
> report_scan_partitions -all
-------------------------------------------------------------------------
ScanPartitionName TotalNumCells/ScannableCells Members
-------------------------------------------------------------------------
PD_interleaver 16693/16693 i0 [instance]
PD_mem_ctrl 12/12 mc0 [instance]
default_scan_partition 9/9 <all_remaining_cells>
-------------------------------------------------------------------------
7. Specify scan chains based on maximum scan chain length or scan chain number using
the set_power_domain command:
set_power_domain {{Power_domain_name… | -All [-EDT]}
[-Number_of_chains integer | -Max_length integer]}
For example:
> set_power_domain PD_interleaver -number 65
> set_power_domain PD_mem_ctrl -max_length 6
Any scan flip-flop not specified by the set_power_domain command is added to the
default top-level power domain.
8. Insert the test structures into the design netlist using the insert_test_logic command.
9. Report the design statistics using the report_statistics command.
10. Write out the netlist and ATPG setup.
You can use Tessent Scan to do both scan cell substitution and scan stitching. By loading the
low-power CPF or UPF file for the design before beginning the scan insertion and stitching
process, the power domain information can be used to guide the scan partitioning process.
Tessent Scan does not insert scan across power domains.
You can explicitly specify the number and length of scan chains in each power domain of the
design using the set_power_domain command. If you do not use set_power_domain, Tessent
Scan adopts the default settings based on the following command/options settings:
Note
Because Tessent Scan does not function with a concept of power mode or power state,
chain balancing does not occur during low-power scan insertion.
During scan insertion, the tool does not generate a design that is clean in terms of power
domains. Tessent Scan creates a design that is functionally correct in the context of power
domains but it does not insert isolation cells or level shifters when routing global signals across
power domains. You will need to add these objects themselves using a synthesis or physical
implementation tool and then manually add them to the CPF/UPF file.
For more information on isolation cells and level shifters, see “Low-Power Cell Testing”.
You assign one scan enable signal to a power domain by using the set_scan_enable command
and specifying the power domain with the partition_name argument as shown in the example
here:
For more information on assigning a scan enable signal to a power domain, refer to the
set_scan_enable description in the Tessent Shell Reference Manual.
To assign more than one scan enable signal to a single power domain, you use the
set_scan_enable_sharing command and specify the -scan_partition switch which assigns a
unique scan enable signal to each of the specified power domains. By default, the types of the
added scan enable signals are different for the core chains, input wrapper chains, and output
wrapper chains
For more information, refer to the set_scan_enable description in the Tessent Shell Reference
Manual.
Figure 12-2 shows the stitching of the input wrapper cells for each power domain. The
newly added dedicated wrapper cells are stitched with the shared wrapper cells in the same
power domain.
Figure 12-2 shows the stitching of output wrapper cells for each power domain. The newly
added dedicated wrapper cells are stitched with the shared wrapper cells in the same power
domain.
Low-Power DRCs
In addition to checking design logic and the cell library, power-aware design rules
(DRCs V1-V21) check the design for violations and correctness of power data provided through
CPF/UPF files.
Note
DFTVisualizer does not have any direct support for power domain-related DRC failures.
However, you can use standard design tracing features in DFTVisualizer to pinpoint
issues.
The report_scan_partitions command extracts all updated information from the CPF/UPF files
and reports each power domain (scan partition) and the pathnames of all of the sequential
instances in that power domain; newly added dedicated wrapper cells and lockup cells are
indicated by the string “(new cell)” following their name.
For more information, refer to the report_scan_cells description in the Tessent Shell Reference
Manual.
For more information, refer to the set_gate_report description in the Tessent Shell Reference
Manual.
If the power mode can change during the capture cycle, the tool will issue V12 violations. When
V12 handling is a warning (default), the tool automatically adds ATPG constraints to fix the
power mode during the capture cycles:
…
// 1 ATPG constraint is added to fix power mode during capture.
// The active power mode at the beginning of capture cycle is PM2.
// Power-aware ATPG is enabled.
…
When power-aware ATPG is enabled, the tool performs ATPG and fault simulation according
to the power mode: the regular gates in a power-off domain will be X and the corresponding
faults are AU. The fault grouping will classify the fault as AU due to power off if faults in a
power domain are added:
ANALYSIS> create_patterns
ANALYSIS> report_statistics
---------------------- --------------
FU (full) 354
-------------------- --------------
DS (det_simulation) 52 (14.69%)
DI (det_implication) 40 (11.30%)
UU (unused) 26 ( 7.34%)
RE (redundant) 134 (37.85%)
AU (atpg_untestable) 102 (28.81%)
--------------------------------------
Untested Faults
--------------------
AU (atpg_untestable)
POFF (power_off) 102 (28.81%)
--------------------------------------
Coverage
--------------------
test_coverage 47.42%
fault_coverage 25.99%
atpg_effectiveness 100.00%
--------------------------------------
Instead of adding all faults, you can choose to add, delete, report, and write faults on power-on
domains or any user-specified power domains:
add_/delete_/report_/write_faults
[[-ON_domains] | [-OFf_domains] |
[ -POWer_domains {domain_name …}]]
[ -ISolation_cells] [ -LEvel_shifters ] [ -REtention_cells ]
Level Shifters
In most cases, you can handle level shifters as standard buffers and do not need any special
handling to achieve full test coverage. However, if one or more power domains in the design
can operate at more than one supply voltage, you should run ATPG for all permutations of the
supply voltage for both input and output sides of any given level shifter to ensure full coverage.
Isolation Cells
You can test isolation cells in one of two modes:
• Normal transmission mode — In this mode, when an isolation cell is disabled and
stuck-at “0” or “1”, the fault can be detected on the input and output of the cell. A
stuck-at fault (isolation on) for the isolation enable pin is also detected because this
failure forces the cell into isolation and prevents the transmission of data.
• Isolation mode — In this mode, input side stuck-at faults are not detectable if the
isolation cell is a clamp-style cell (output held to “0” or “1” when isolation on). If the
isolation cell is a latch-style cell, input side stuck-at faults are detectable by latching the
value of the driving domain before enabling isolation.
Introduction
This chapter describes MTFI (Mentor Tessent Fault Information) features, which are available
for use in the ATPG tool and Tessent LogicBIST. MTFI is a common and extendable file
format for storing fault status information. This chapter describes MTFI syntax beginning on
page 386, as well as the major MTFI features:
MTFI Syntax
This section describes the basic syntax of MTFI files.
FaultInformation {
version : 1;
FaultType (Stuck) {
FaultList {
Format : Identifier, Class, Location;
Instance ("/i1") {
0, DS, "F1";
1, DS, "F2";
}
}
}
}
• Comments
The “//” identifies the start of the comment until the end of line.
• FaultInformation { … }
Keyword that specifies the top-level block and file type.
• version : integer
Keyword that specifies the syntax version of the MTFI file.
• FaultType (type) { … }
Keyword that specifies the fault type of the data: Stuck, Iddq, Toggle, Transition,
Path_delay, Bridge. The keywords are identical to those available for the set_fault_type
command described in the Tessent Shell Reference Manual.
• FaultList { … }
Keyword that defines a data block that stores per-fault data.
• UnlistedFaultsData { … }
Keyword that defines a data block that stores the coverage information for specific
graybox instances to allow hierarchical fault accounting. For more information, refer to
“Support for Hierarchical Fault Accounting” on page 393.
• FaultCollapsing { true | false }
Keyword that specifies the fault collapsing status in the fault list. A value of “true”
means that the faults in the list are collapsed; a value of “false” means that the faults in
the list are uncollapsed. You can use this statement only inside the FaultList data block.
• DetectionLimit : integer
Keyword that specifies the detection drop limit for a DS fault.
• Format
Keyword that specifies the sequence of values stored in a specific data block (FaultList
or UnlistedFaultsData). The following keywords are available for use in the Format
statement:
• Class
Required keyword that specifies the fault category, and optionally the sub category
(for example, DS, UC, AU.BB). For more information, refer to “Support of Fault
Classes and Sub-Classes” on page 389.
• Location
Keyword that specifies the pin pathname. You can use this keyword only in the
FaultList data block. In the case of a stuck-at fault, the keyword is required.
• Identifier
Required keyword that specifies the fault identifier. In the case of stuck-at or
transition faults, the value can be 0 or 1. No other fault types are supported.
• Detections
Optional keyword that specifies the number of detections for the fault types stuck-at
and transition. For more information, refer to “Support of N-Detect Values” on
page 391.
• CollapsedFaultsCount
Required keyword that specifies the number of collapsed faults. You can use this
keyword only in the UnlistedFaultsData data block.
• UncollapsedFaultsCount
Required keyword that specifies the number of uncollapsed faults. You can use this
keyword only in the UnlistedFaultsData data block.
• Instance ( “pathname“ ) { … }
Required keyword that specifies the instance pathname to all of the pins in the data
block. You must enclose the pathname in parentheses and double quotes. The pathname
can be an empty string.
//
// Tessent FastScan v9.6
//
// Design = test.v
// Created = Tue Dec 20 20:08:46 2011
//
// Statistics:
// Test Coverage = 50.00%
// Total Faults = 6
// UC (uncontrolled) = 2
// DS (det_simulation) = 1
// DI (det_implication) = 1
// AU (atpg_untestable) = 2
//
FaultInformation {
version : 1;
FaultType ( Stuck ){
FaultList {
FaultCollapsing : false;
Format : Identifier, Class, Location;
Instance ( “” ) {
1, DS, “/i1/IN0”;
1, AU, “/i1/IN1”;
1, EQ, “/i2/Y”;
0, UC, “/i5/Z”;
1, DI, “/i5/Z”;
0, AU, “/i4/IN1”;
1, UC, “/i4/IN1”;
}
}
}
}
MTFI Features
The following text explains the major features of the MTFI format:
FaultInformation {
version : 1;
FaultType ( Stuck ){
FaultList {
FaultCollapsing : false;
Format : Identifier, Class, Location;
Instance ( “” ) {
1, DS, “/i1/IN0”;
1, AU, “/i1/IN1”;
1, EQ, “/i2/Y”;
0, UC, “/i5/Z”;
1, DI, “/i5/Z”;
0, AU, “/i4/IN1”;
1, UC, “/i4/IN1”;
}
}
}
}
In the following example, one AU fault is identified as being AU due to black box, and one DI
fault is specified as being due to LBIST. So for these two faults, the MTFI file reports both class
and sub-class values.
FaultInformation {
version : 1;
FaultType ( Stuck ) {
FaultList {
FaultCollapsing : false;
Format : Identifier, Class, Location;
Instance ( “” ) {
1, DS, “/i1/IN0”;
1, AU, “/i1/IN1”;
1, EQ, “/i2/Y”;
0, UC, “/i5/Z”;
1, DI, “/i5/Z”;
1, DI.LBIST, “/i5/Z”;
0, AU.BB, “/i4/IN1”;
1, UC, “/i4/IN1”;
}
}
}
}
In the preceding example, the sub-class information is part of the class value and separated by
the dot. Any of the AU, UC, UO and DI fault classes can be further divided into different sub-
classes. For all the available AU fault sub-classes, refer to the set_relevant_coverage command
description in the Tessent Shell Reference Manual. The tool supports the following UC and UO
fault sub-classes: ATPG_Abort (AAB), Unsuccessful (UNS), EDT Abort (EAB). The tool
supports the pre-defined fault sub-class EDT for DI faults.
• A-Z
• a-z
• 0-9
• -
• _
It is your responsibility to ensure that the name of the user-defined sub-class differs from any of
the predefined sub-classes. Otherwise, the faults may be accounted for incorrectly.
The statistics report now displays the breakdown of DI faults when there are some DI faults in
specific subcategories. The following example shows the statistics report with seven DI faults
declared in different subcategories; in this example, the sub-class analysis for DI.EDT is
disabled:
> report_statistics
Statistics Report
Stuck-at Faults
-------------------------------------------------------------------------
Fault Classes #faults
(total)
---------------------------------------------------------- --------------
FU (full) 61
-------------------------------------------------------- -------------
DS (det_simulation) 4 ( 6.56%)
DI (det_implication) 7 (11.48%)
UU (unused) 13 (21.31%)
BL (blocked) 1 ( 1.64%)
AU (atpg_untestable) 36 (59.02%)
-------------------------------------------------------------------------
DI Faults
--------------------------------------------------------
DI (det_imp)
DUMMY 5 ( 8.20%)
DUMMY_alias 1 ( 1.64%)
dummy 1 ( 1.64%)
Untested Faults
--------------------------------------------------------
AU (atpg_untestable)
TC* (tied_cells) 27 (44.26%)
my_TC 4 ( 6.56%)
mya_TC 5 ( 8.20%)
*Use "report_statistics -detailed_analysis" for details.
-------------------------------------------------------------------------
Coverage
--------------------------------------------------------
test_coverage 23.40%
fault_coverage 18.03%
atpg_effectiveness 100.00%
-------------------------------------------------------------------------
#test_patterns 0
#simulated_patterns 0
CPU_time (secs) 18.0
-------------------------------------------------------------------------
FaultInformation {
version : 1;
FaultType ( Stuck ) {
FaultList {
FaultCollapsing : false;
Format : Identifier, Class, Location;
Instance ( “” ) {
1, UC, “/in1”;
0, DS, “/in1”;
0, DS, “/i1/IN0”;
1, DS, “/i1/OUT”;
1, DS, “/i1/IN0”;
1, AU, “/i1/IN1”;
1, EQ, “/i2/Y”;
0, UC, “/i5/Z”;
1, DS, “/out”;
1, DI, “/i5/Z”;
}
}
}
}
In the FaultList block, you can add the value to the list using the Format statement’s Detections
keyword. The value must be a positive integer that specifies the number of detections of this
fault. All classes other than DS must have a value of 0.
In the following example, the detection drop limit is 4. For any DS faults that are detected four
times or more, the tool reports the detection value as “4”.
FaultInformation {
version : 1;
FaultType ( Stuck ) {
FaultList {
FaultCollapsing : false;
DetectionLimit : 4;
Format : Identifier, Class, Detections, Location;
Instance ( “” ) {
1, DS, 3, “/i1/OUT”;
1, DS, 4, “/i1/IN0”;
1, AU.BB, 0, “/i1/IN1”;
1, EQ, 0, “/i2/Y”;
0, UC, 0, “/i5/Z”;
1, DS, 2, “/out”;
1, DI, 0, “/i5/Z”;
}
}
}
}
In general, the same rules are valid for the UnlistedFaultsData block, as shown in the following
example:
FaultInformation {
version : 1;
FaultType ( Stuck ) {
UnlistedFaultsData {
DetectionLimit : 4;
Format : Class,Detections,CollapsedFaultCount,
UncollapsedFaultCount;
Instance ( “/CoreD/i1” ) {
UC, 0, 1252, 2079;
UC.EAB, 0, 452, 543;
DS, 1, 69873, 87232;
DS, 2, 12873, 21432;
DS, 3, 9752, 11974;
DS, 4, 4487, 6293;
AU.BB, 0, 8708, 10046;
AU, 0, 2374, 3782;
}
}
}
}
In the case of the UnlistedFaultsData, the preceding example shows the fault count after the
number of detections. Typically, there is one line per detection until reaching the current
detection limit. So in the preceding example, the number of faults have reached the detection
limit of 4.
shows the collapsed and uncollapsed fault count for the UC faults that are in the unclassified
sub-class (that is, those that do not fall into any of the predefined or user-defined sub-classes).
Similarly, the line
AU, 0, 2374, 3782
shows the fault counts for the unclassified AU faults.
While loading the MTFI file, the n-detection number stored in the file is capped at the detection
limit currently set in the tool. This applies to both the detection number in FaultList data block
and that in UnlistedFaultsData block. Depending on the switch, the n-detection data in the
external MTFI file can be appended to the internal detection number of the corresponding fault,
or replace the detection number of the corresponding fault in the internal fault list.
FaultInformation {
version : 1;
FaultType ( Stuck, Transition ) {
FaultList {
FaultCollapsing : false;
Format : Identifier, Class, Location;
Instance ( "" ) {
1, AU.PC, "/i1/OUT";
1, AU.PC, "/i1/IN0";
1, AU.BB, "/i1/IN1";
1, AU.BB, "/i2/Y";
0, AU.TC, "/i5/Z";
1, AU.TC, "/out";
1, AU.TC, "/i5/Z";
}
}
}
}
MTFI does not support combinations other than Stuck and Transition. And note that none of the
tools that support MTFI can output MTFI files that contain multiple fault types.
Consider the example in Figure 13-1. Core_A and Core_B are stand-alone designs with their
own individual test patterns and fault lists. After running ATPG on Core_A and Core_B, you
store fault information in MTFI files using the following commands:
Note that the logic in Core_A and Core_B is fully observable and controllable, so there are no
unlisted faults in the Core_A.mtfi or Core_B.mtfi files.
Next you create Core_C by instantiating graybox versions of Core_A and Core_B, and then you
use the fault information you wrote previously using the following commands:
The -Graybox switch directs the tool to map any faults it can to existing nets in Core_C and to
essentially discard the remaining faults by classifying them as unlisted. The tool retains the fault
statistics for the unlisted faults.
After you’ve run ATPG on Core_C, you can write out the fault information to an MTFI file:
The command writes out data for both the listed and unlisted faults that were created when you
issued the read_faults command. You could then instantiate a graybox version of Core_C in a
larger core, Core_D, and load the fault information from the Core_C.mtfi file. That way,
Core_A, Core_B, and Core_C will have already been fully tested and would not be tested again,
but the fault statistics from all three cores would be available for viewing and analysis with the
listed faults in Core_D.
Core_A.mtfi
FaultList {
Core_A } Core_C
Core_A.v Core_C.mtfi
Core_A FaultList {
Core_A (graybox)
graybox.v
}
UnlistedFaultsData {
instance Core_A {
Core_B.mtfi
Core_B FaultList {
Core_B.v Core_B }
} instance Core_B {
(graybox)
}
Core_B }
graybox.v
Core_C.v
For more information about the read_faults and write_faults commands, refer to their
descriptions in the Tessent Shell Reference Manual.
Introduction
Graybox functionality streamlines the process of scan insertion and ATPG processing in a
hierarchical design by allowing you to perform scan and ATPG operations on a sub-module,
and then allowing you to use a simplified, graybox representation of that sub-module when
performing scan and ATPG operations at the next higher level of hierarchy. Because the
graybox representation of a sub-module contains only a minimal amount of interconnect
circuitry, the use of grayboxes in a large, hierarchical design can dramatically reduce the
amount of memory and tool runtime required to perform scan insertion, optimize timing,
analyze faults, and create test patterns.
Note
Currently, only Mux-DFF scan architecture is supported with the graybox functionality.
Table 14-1 summarizes the commands that support graybox functionality, which is available in
the ATPG tool.
What is a Graybox?
A graybox is a simplified representation of a sub-module that contains only the minimum
amount of interconnect circuitry (primary inputs/outputs, wrapper chains, and the glue logic
outside of the wrapper chains) required to process the grayboxed sub-module at the next higher
level of hierarchy. To understand a graybox representation of a sub-module, first consider the
full netlist representation shown in Figure 14-1. This figure shows the input and output wrapper
chains, the core scan chains, and the combinational logic that exists both inside and outside the
wrapper chains.
After performing scan insertion, fault accounting, and pattern creation for this sub-module, you
create a graybox representation of the sub-module, as shown in Figure 14-2.
FF FF Comb FF
Logic
FF
FF FF
Primary Comb
FF Logic
Inputs Comb FF FF
Logic
FF Primary
Outputs
Comb FF
FF Logic
FF Comb
Logic
FF
Comb
Logic FF FF
FF FF FF
Figure 14-2 is a graybox representation of the sub-module shown in Figure 14-1. Note that the
graybox contains only the primary inputs/outputs, wrapper chains, and combinational logic that
exists outside of the wrapper chains (that is, any combinational logic between a primary input or
output and the nearest connected flip-flop).
FF FF
FF
FF
Primary FF
Inputs Comb FF
Logic
FF Primary
Outputs
FF
FF Comb
Logic
FF
Comb
Logic FF
FF FF
The dofile used for graybox netlist generation does the following:
1. Defines clock pins used in external mode (using the add_clocks command).
2. Constrains test control pins that place the circuit in external mode (using the
add_pin_constraints and/or the add_input_constraints commands).
Note
Test-setup procedures are not allowed if they pulse the clocks to initialize non-scan cells
to constant values in order to sensitize the control signals of external mode. In other
words, the only allowable control signals that place the circuit in external mode are the
primary inputs to the block (core).
5. Identifies graybox logic using the analyze_graybox command. The command also
displays a summary to indicate the combinational and sequential logic gates identified
by the analysis. The tool marks the identified graybox instances by setting their
“in_graybox” attribute. You can also include additional instances in the graybox netlist
(or exclude specific instances from the graybox netlist) by turning on/off this attribute
using the set_attribute_value command.
The graybox analysis performs the identification by tracing backward from all primary
output pins and wrapper chains. However, the scan-out pins of the core chains are
excluded from the backward tracing. Since core chains are not defined with the
add_scan_chains command, you accomplish this by setting the ignore_for_graybox
attribute of the scan-out pins using the set_attribute_value command.
6. The “write_design -graybox” command writes out all the instances marked with the
in_graybox attribute. The tool uniquifies all modules that are included in the graybox
netlist (except the top module). The interface (port declarations) of a uniquified module
is preserved. The uniquification is required because the partial inclusion of the logic
inside a module into the graybox netlist could cause conflicts between the different
instances of the module, as these instances could be interacting differently with the
wrapper chains.
add_clocks 0 NX1
# Ignore core chains scan_out pins for graybox analysis to exclude the
# logic intended for internal test mode
set_attribute_value scan_out3 –name ignore_for_graybox –value true
set_attribute_value scan_out4 –name ignore_for_graybox –value true
set_system_mode analysis
# NOTE: At this point, you can use the set_attribute_value command with
# the in_graybox attribute to include/exclude specific instances into/from
# graybox netlist.
The following is an example dofile. In order to generate the graybox netlist for the block, the
wrapper-extest ports are activated by constraining the global signal wrapper_extest to a logic 1.
Also, to exclude the EDT logic and subsequently the core chains from the graybox netlist, the
dofile marks the EDT channel outputs with the ignore_for_graybox attribute before performing
the graybox analysis.
# Define clocks
add_clocks 0 clk1
add_clocks 0 clk2
add_clocks 0 clk3
# Ignore EDT channel outputs to exclude EDT logic and core chains from
# the graybox netlist.
set_attribute_value edt_channels_out1 -name ignore_for_graybox -value true
set_attribute_value edt_channels_out2 -name ignore_for_graybox -value true
set_attribute_value edt_channels_out3 -name ignore_for_graybox -value true
set_system_mode analysis
The use of clock gaters to reduce power consumption is becoming a widely adopted design
practice. Although effective for reducing power, clock gaters create new challenges for ATPG
tools because of the additional complication introduced in clock paths. Among the challenges,
the most frequently encountered in the tool is the C1 DRC violation. The C1 rule is fairly strict,
requiring clock ports of scan cells to be at their off states when all clock primary inputs (PIs) are
at their off states. Not all designs abide by this rule when there are clock gaters in clock paths.
scan_en
en D Q
gclk
clk
The cell (inside the dashed box) has three inputs: scan_en, en, and clk. The output of the cell is
the gated clock, gclk. The scan_en input is for test mode and is usually driven by a scan enable
signal to allow shifting. The en input is for functional mode and is usually driven by internal
control logic. Sometimes test_en is used to drive the scan_en input to avoid any trouble caused
by the clock gater. However, this ends up keeping the clock gater always on and results in loss
of coverage in the en fanin cone. The latch in the clock gater eliminates potential glitches.
Depending on the embedding, there could be inversions of the clk signal both in front of clk and
after gclk, which in the figure are shown as inverters on the dashed lines representing the clk
input and gclk output.
Figure A-2. Two Types of Embedding for the Basic Clock Gater
Type-A
D Q
gclk1
PI /clock
Type-B
D Q
gclk2
In the figure, assume the PI /clock drives two clock gaters and that the off state of /clock is 0.
The behavior of the two types of embeddings is as follows:
• Type-A — When PI /clock is at its off state, the latch in the clock gater is transparent,
and the AND gate in the clock gater gets a controlling value at its input. As a result, the
output gclk1 is controlled to a deterministic off state.
• Type-B — When /clock is at its off state, the latch in the clock gater is not transparent,
and the AND gate in the clock gater gets a non-controlling value at its input. As a result,
the output gclk2 is not controlled to a deterministic off state. Its off state value will
depend on the output of the latch.
Note
The preceding classification has nothing to do with whether there is inversion after gclk.
It only depends on whether the off state of /clock can both make the latch transparent and
control the AND gate.
• Since the latch is transparent, when scan_en is asserted at the beginning of load_unload,
the clock gater is immediately turned on. Therefore, subsequent shifting is reliable and
there will be no scan chain tracing DRC violations.
• Since gclk is controlled to a deterministic off state, there are no C1 DRC violations for
downstream scan cells driven by it.
• The tool can pick up full fault coverage in the fanin cone logic of the en and scan_en
inputs of the clock gater. This coverage is often too significant to be sacrificed.
Tip: Type-A embedding does not necessarily mean the downstream scan cells have to be
either all leading edge (LE) flip-flops or all trailing edge (TE) flip-flops. A designer can
have both of them by inserting inversions after gclk.
• When PI /clock is at its off state, the latch in the clock gater is not transparent. This
means a change on its D input at the beginning of a cycle will not immediately be
reflected at its Q output. In other words, the action of turning the clock gater on or off
lags its instruction.
• The clock off state of gclk is not deterministic. It depends on what value the latch in the
clock gater captures in the previous cycle. Therefore, the tool will issue a C1 DRC
violation.
The kinds of problems that can arise due to these undesirable characteristics are described in the
following sections:
Figure A-3 shows an example circuit where a Type-B clock gater drives both TE and LE scan
flip-flops.
Note
Assuming the off state of the PI /clock is 0, an inverter is needed after gclk to make the
downstream flip-flop LE. The inverted gclk is indicated as gclk_b.
TE scan flip-flop
scan_en
en D Q
LE scan flip-flop
gclk
PI /clock
gclk_b
/clock
scan_en
Q_bar
gclk_b
Figure A-4 shows the timing diagram of several signals during capture and the beginning of
load_unload. Suppose the latch in the Type-B clock gater captures a 1 in the last capture cycle
(shown as Q_bar going low in the capture window). You can see that the first leading edge is
suppressed because the latch holds its state after capture and into load_unload. Although
scan_en is high at the beginning of load_unload, the output of the latch will not change until the
first shift clock arrives. This lag between the “instruction” and the “action” causes the
downstream LE scan flip-flops to miss their first shift edge. However, TE-triggered scan flip-
flops are still able to trigger on the first trailing edge.
Tip: To work around this problem, you can use test_en instead of scan_en to feed the
clock gater. But be aware that this workaround loses fault coverage in the fanin cone of
the clock gater’s en input.
tools. The tools handle Type-B clock gaters that drive TE scan flip-flops just fine, and change
any downstream latches, LE nonscan flip-flops, RAMs, and POs to TIEX. This prevents C1
DRC violations, coverage loss in the en cone of the clock gater, and potential simulation
mismatches when you verify patterns in a timing based simulator.
1. Initialize the clock gaters in one cycle of test_setup by driving scan_enable high and
pulsing the clocks.
2. Issue the set_stability_check command using the following arguments:
set_stability_check on -sim_static_atpg_constraints on
3. Add ATPG constraints of “1” on the functional enable of the Type-B clock gaters using
the add_atpg_constraints command using the following arguments:
add_atpg_constraints 1 functional_enable_pin -static
gclk2
gclk1
PI /clock
scan cell
scan cell
However, when the level-1 gater is of Type-B, the tool cannot apply the basic definition to the
level-2 gater directly, since the clock off value of gclk1 is undetermined. In this case, the type
for the level-2 clock gater is defined by assuming the level-1 clock gater has been turned on.
Therefore, even if the level-1 clock gater is of Type-B, the tool can still classify the level-2
clock gater.
Summary
Table A-1 summarizes the support that the tool provides for each clock gater configuration.
Note
The information in this appendix uses the set_stability_check command set to On (the
default for this command), except as noted in Example 3 and Example 9.
For “drc_pattern load_unload” and “drc_pattern shift”, the superimposed values for all
applications of the procedure are reported. This means a pin that is 1 for only the first
application of shift, but 0 or X for the second application of shift shows up as X.
When you set the Drc_pattern option of the set_gate_report command to State_stability as
shown in the following example:
the state stability report also includes the load_unload and shift data for the first application of
these procedures.
When you debug state stability, you normally compare the state stability values (the values
during the first application of the procedures) with the superimposed (stable) values from
“drc_pattern load_unload” and “drc_pattern shift.”
The first row lists the column labels in parentheses. The second row displays the pin name and
five or more groups of data in parentheses. Each group has one or more bits of data
corresponding to the number of events in each group.
number of primary input events in the shift procedure. The group without a tilde (~) is
the independent shift.
The last bit (after the tilde) corresponds to the stable state after application of the last
shift in the main shift statement. By default, the precise number of shifts is not
simulated. The stable state shown corresponds to an infinite number of shift cycles; that
is, in some cases, when for instance the depth of non-scan circuitry is deeper than the
scan chain length, sequential circuitry that should be 1 or 0 after the first load_unload
may show up as X. For more information, see the description of the “set_stability_check
all_shift” command in “Example 4 — Single Post Shift” on page 423.
After the third group, there could be additional groups if there are the following:
o Multiple apply shift statements
o Events in the load_unload procedure after the apply shift statement
• shdw_con — Shadow_control procedure. This column is not shown in the examples.
Look at the test procedure file to determine the meaning of this group.
• cell_con — Cell constraints. If there are cell constraints, an extra simulation event is
added to show the value. This is always one bit.
• cap — Capture procedure. This is the simulation of the first capture cycle. Notice that
this is not the simulation of pattern 0 or any specific pattern. Therefore, normally the
capture clock going to 0X0 (or 1X1 for active low clocks) is displayed, indicating that
the clock may or may not pulse for any given pattern. If the set_capture_clock -Atpg
command is used to force a specific capture clock to be used exactly once for every
pattern, the capture cycle simulation is less pessimistic and “010” or “101” is reported.
• stbl — Final stable values after several iterations of simulating load_unload and capture
procedures. If the value of a gate is always the same at the end of the test_setup and
capture procedures, then its stable value is the same; otherwise, the stable value is X.
Note
The skew_load, master_observe, or shadow_observe procedures are not simulated as part
of state stability analysis, so their simulation data is not displayed in a state stability
report. To view the simulation data for any of these procedures, use the
set_gate_report Drc_pattern command with the specific procedure_name of interest.
timeplate gen_tp1 =
force_pi 0;
measure_po 10;
pulse clk1 20 10;
pulse clk2 20 10;
pulse reset 20 10;
period 40;
end;
procedure capture =
timeplate gen_tp1;
cycle =
force_pi;
measure_po;
pulse_capture_clock;
end;
end;
procedure shift =
scan_group grp1;
timeplate gen_tp1;
cycle =
force_sci;
measure_sco;
pulse clk1;
force C 0;
end;
end;
procedure test_setup =
scan_group grp1;
timeplate gen_tp1;
// First cycle, one PI event (force)
cycle =
force clk1 0;
force clk2 0;
force reset 0;
force A 0;
force B 0;
force C 0;
force D 0;
force E 0;
end;
// Second cycle, two PI events (pulse on, pulse off)
cycle =
pulse reset;
pulse clk2;
end;
// Third cycle, three PI events (force, pulse on, and pulse off)
cycle =
force A 1;
pulse clk1;
end;
end;
procedure load_unload =
scan_group grp1;
timeplate gen_tp1;
// First cycle, one PI event (force)
cycle =
force clk1 0;
force clk2 0;
force reset 0;
force scan_en 1;
force B 1;
force C 1;
end;
apply shift 3;
end;
In this case, you might expect the output to always be 1 after initialization because the third
cycle of the test_setup procedure forced a 1 on input A and pulsed clk1. For comparison
purposes, following is the reported state_stability data together with the data reported for
load_unload and shift. Notice especially the Q output:
// /ff00 dff
// (ts)(ld)(shift)(cap)(stbl) (ld)(shift)
// CLK I ( 0)( 0)(010~0)(0X0)( 0 ) ( 0)( 010) (010)
// D I ( 1)( X)(XXX~X)(XXX)( X ) ( X)( XXX) (XXX)
// Q O ( 1)( 1)(1XX~X)(XXX)( X ) ( 1)( XXX) (XXX)
// QB O ( 0)( 0)(0XX~X)(XXX)( X ) ( 0)( XXX) (XXX)
You can see from the state stability display that, after test_setup, the output of Q is set to 1. In
the first application of load_unload it is still 1, but it goes to X during the first shift. Compare
this to what is shown for “drc_pattern load_unload” and “drc_pattern shift”.
A stable initialization value can be better achieved by doing for ff00 something similar to what
occurs for ff10, where the D input is connected to the constrained D pin:
// /ff00 dff
// (ts)(ld)(shift)(cap)(stbl) (ld)(shift)
// CLK I ( 0)( 0)(010~0)(0X0)( 0 ) ( 0)( 010) (010)
// D I ( 1)( X)(000~0)(000)( X ) ( X)( 000) (000)
// Q O ( 1)( 1)(000~0)(000)( X ) ( 0)( 000) (000)
// QB O ( 0)( 0)(111~1)(111)( X ) ( 1)( 111) (111)
Another interesting observation can be made for ff32. This flip-flop is at the end of a 4-bit shift
register where all the flip-flops are reset during test_setup as shown in Figure B-3.
reset
PI ff30 ff31 ff31b ff32
R R R R
Q Q Q Q
A D D D D
QB QB QB QB
PI CLK CLK CLK CLK
dffr dffr dffr dffr
clk1
PI
procedure test_setup =
...
// Second cycle...
cycle =
pulse reset;
...
end;
...
Notice how Q in this case is stable for the first application of load_unload and shift, but the
stable state after the last shift (after ~) is X. This is due to an optimization the tool does by
default for the state_stability check. (Compare this output to example Example 9 — Setting
Stability Check to Off and All_shift.)
// /ff32 dffr
// (ts)(ld)(shift)(cap)(stbl) (ld)(shift)
// R I ( 0)( 0)(000~0)(0X0)( 0 ) ( 0)( 000) (000)
// CLK I ( 0)( 0)(010~0)(0X0)( 0 ) ( 0)( 010) (010)
// D I ( 0)( 0)(000~0)(XXX)( X ) ( 0)( 000) (XXX)
// Q O ( 0)( 0)(000~1)(XXX)( X ) ( 0)( 000) (XXX)
// QB O ( 1)( 1)(111~1)(XXX)( X ) ( 1)( 111) (XXX)
Non-scan flip-flop ff20 is clocked by clk2, which is not a shift clock. This flip-flop is also
initialized during test_setup as shown in Figure B-4.
The Q output is disturbed during capture, not during shift, because this element is not exercised
during shift:
// /ff20 dff
// (ts)(ld)(shift)(cap)(stbl) (ld)(shift)
// CLK I ( 0)( 0)(000~0)(0X0)( 0 ) ( 0)( 000) (000)
// D I ( 1)( X)(XXX~X)(XXX)( X ) ( X)( XXX) (XXX)
// Q O ( 0)( 0)(000~0)(0XX)( X ) ( 0)( 000) (XXX)
// QB O ( 1)( 1)(111~1)(1XX)( X ) ( 1)( 111) (XXX)
Notice that the load_unload and shift data for ff32 and ff20 is almost identical (except for the
clock data), but that the state_stability data enables you to see that they become unstable in very
different ways.
procedure load_unload =
scan_group grp1 ;
timeplate gen_tp1 ;
// First cycle, one PI event (force)
cycle =
force clk1 0 ;
force clk2 0 ;
force reset 0 ;
force scan_en 1 ;
force B 1;
force C 1;
force E 1;
end ;
// Second cycle, three PI events (force, pulse on, pulse off)
cycle =
force E 0;
pulse clk2;
end ;
// Third cycle, two PI events (pulse on, pulse off)
cycle =
pulse clk2;
end ;
apply shift 3;
end;
As a result, multiple events are displayed in the second group of state stability data. Notice there
are now three cycles. The following gate report excerpts show six bits of data (in bold),
corresponding to the total number of events. The first bit is from the first cycle (one event), the
next three bits are from the second cycle (three events), and the last two bits are from the third
cycle, which has two events.
// /E primary_input
// (ts)( ld )(shift)(cap)(stbl)
// E O ( 0)(100000)(000~0)(XXX)( X)
// /A primary_input
// (ts)( ld )(shift)(cap)(stbl)
// A O ( 1)(XXXXXX)(XXX~X)(XXX)( X)
// /clk2 primary_input
// (ts)( ld )(shift)(cap)(stbl)
// clk2 O ( 0)(001010)(000~0)(0X0)( 0)
// /ff20 dff
// (ts)( ld )(shift)(cap)(stbl)
// CLK I ( 0)(001010)(000~0)(0X0)( 0)
// D I ( 1)(XXXXXX)(XXX~X)(XXX)( X)
// Q O ( 0)(00XXXX)(XXX~X)(XXX)( X)
// QB O ( 1)(11XXXX)(XXX~X)(XXX)( X)
Notice how A goes to X for the load_unload simulation. This is because it is not explicitly
forced in the load_unload procedure (or constrained with an add_input_constraints command).
Suppose the non-scan flip-flop ff20 of the preceding example is clocked by a PG as shown in
Figure B-5. Excerpts below the figure show how the PG events would appear in gate reports.
A
PI ff20
pg1 D Q
clk2 clk out CLK QB
pulse_gen
PI dff
// /clk2 primary_input
// (ts)( ld )(shift)( cap )(stbl)
// clk2 O ( 0)(001[11]01[11]0)(000~0)(0X[X]0)( 0) /pg1/clk
// /pg1 pulse_gen
// (ts)( ld )(shift)( cap )(stbl)
// clk I ( 0)(001[11]01[11]0)(000~0)(0X[X]0)( 0) /clk2
// out O ( 0)(000[10]00[10]0)(000~0)(00[X]0)( 0) /ff20/CLK
// /ff20 dff
// (ts)( ld )(shift)( cap )(stbl)
// CLK I ( 0)(000[10]00[10]0)(000~0)(00[X]0)( 0) /pg1/out
// D I ( 1)(XXX[XX]XX[XX]X)(XXX~X)(XX[X]X)( X) /A
// Q O ( 0)(000[XX]XX[XX]X)(XXX~X)(XX[X]X)( X)
// QB O ( 1)(111[XX]XX[XX]X)(XXX~X)(XX[X]X)( X)
The rising edge events on clk2 initiate pg1’s two output pulses (highlighted in bold). Notice the
pulses are not shown simultaneous with the input changes that caused them. This is an
exception to the typical display of output changes simultaneous with such input changes, as
shown for ff20. Notice also how the active clock edge at ff20’s CLK input is one event later
than clk2’s active edge and is seen to be a PG signal due to the brackets.
For an introduction to pulse generators, see “Pulse Generators” on page 104. For detailed
information about the tool’s pulse generator primitive, see “Pulse Generators with User Defined
Timing” in the Tessent Cell Library Manual.
procedure load_unload =
scan_group grp1 ;
timeplate gen_tp1 ;
// First cycle, one PI event (force)
cycle =
force clk1 0 ;
force clk2 0 ;
force reset 0 ;
force scan_en 1 ;
force B 1;
force C 1;
end ;
// Second cycle, three PI events (force, pulse on, pulse off)
cycle =
force E 0;
pulse clk2;
end;
apply shift 2;
apply shift 1;
end;
In this case, the state stability data has an additional group (shown in bold) between the main
shift and the capture cycle. This corresponds to the first application of the post shift:
// /ff32 dffr
// (ts)( ld )(shift)(shift)(cap)(stbl)
// R I ( 0)(0000)(000~0)( 000 )(0X0)( 0) /reset
// CLK I ( 0)(0000)(010~0)( 010 )(0X0)( 0) /clk1
// D I ( 0)(0000)(000~X)( XXX )(XXX)( X) /ff31b/Q
// Q O ( 0)(0000)(000~X)( XXX )(XXX)( X)
// QB O ( 1)(1111)(111~X)( XXX )(XXX)( X)
You can see that ff32 is really stable during the first application of shift. If you use the
set_stability_check All_shift command in this case, the output is slightly different:
set_stability_check all_shift
set_system_mode setup
set_system_mode analysis
report_gates ff32
// /ff32 dffr
// (ts)( ld )(shift)(shift)(cap)(stbl)
// R I ( 0)(0000)(000~0)( 000 )(0X0)( 0) /reset
// CLK I ( 0)(0000)(010~0)( 010 )(0X0)( 0) /clk1
// D I ( 0)(0000)(000~1)( 1XX )(XXX)( X) /ff31b/Q
// Q O ( 0)(0000)(000~0)( 011 )(1XX)( X)
// QB O ( 1)(1111)(111~1)( 100 )(0XX)( X)
Notice how ff32 is now 0 throughout the main shift application, but is set to 1 during the post
shift. This is due to how A is set to 1 in test_setup and this pulse is clocked through.
procedure load_unload =
scan_group grp1 ;
timeplate gen_tp1 ;
// First cycle, one PI event (force)
cycle =
force clk1 0 ;
force clk2 0 ;
force reset 0 ;
force scan_en 1 ;
force B 1;
force C 1;
end ;
// Second cycle, three PI events (force, pulse on, pulse off)
cycle =
force A 1;
pulse clk2;
end ;
apply shift 3;
// Third cycle, three PI events (force, pulse on, pulse off)
cycle =
force C 1;
force A 0;
pulse clk2;
end ;
apply shift 1;
end;
procedure shift =
scan_group grp1 ;
timeplate gen_tp1 ;
cycle =
force_sci ;
measure_sco ;
pulse clk1 ;
force C 0;
end;
end;
The fourth data group (highlighted in bold) represents the cycle between the two applications of
shift (for the first application of the load_unload procedure). The fifth data group represents the
application of the post shift, and the last (sixth) group represents capture. Notice how pins A and
C vary state due to the values forced on them in the load_unload and shift procedures.
// /A primary_input
Notice also that clk2 in this case is pulsed during load_unload only, not in test_setup. Here is the
modified test_setup procedure (with the clk2 pulse removed from the second cycle):
procedure test_setup =
scan_group grp1 ;
timeplate gen_tp1 ;
// First cycle, one event (force)
cycle =
force clk1 0 ;
force clk2 0 ;
force reset 0;
force A 0;
force B 0;
force C 0;
force D 0;
force E 0;
end ;
// Second cycle, two events (pulse on, pulse off)
cycle =
pulse reset ;
end;
// Third cycle, three events (force, pulse on, pulse off)
cycle =
force A 1;
pulse clk1 ;
end;
end;
This results in the following behavior for ff20, which is clocked by clk2:
// /ff20 dff
// (ts)( ld )(shift)( ld)(shift)(cap)(stbl)
// CLK I ( 0)(0010)(000~0)(010)( 000 )(0X0)( 0) /clk2
// D I ( 1)(X111)(111~1)(000)( 000 )(XXX)( X) /A
// Q O ( X)(XX11)(111~1)(100)( 000 )(0XX)( X)
// QB O ( X)(XX00)(000~0)(011)( 111 )(1XX)( X)
procedure load_unload =
scan_group grp1 ;
timeplate gen_tp1 ;
// First cycle, one PI event (force)
cycle =
force clk1 0 ;
force clk2 0 ;
force reset 0 ;
force scan_en 1 ;
force B 1;
force C 1;
end ;
apply shift 3;
// Second cycle, one PI event (force)
cycle =
force C 1;
end ;
// Third cycle, three PI events (force, pulse on, pulse off)
cycle =
force C 0;
pulse clk2;
end ;
// Fourth cycle, one PI event (force)
cycle =
force C 1;
end ;
end;
procedure shift =
scan_group grp1 ;
timeplate gen_tp1 ;
cycle =
force_sci ;
measure_sco ;
pulse clk1 ;
force C 0;
end;
end;
In this case, the second data group in the state stability report represents the one event in the
cycle before the apply shift statement. The fourth data group represents the events in the three
cycles after the apply shift statement (but still for the first application of load_unload). The first
bit is the one event in the second cycle, the next three bits represent the third cycle, and the last
bit represents the fourth cycle:
// /C primary_input
// (ts)(ld)(shift)( ld )(cap)(stbl)
// C O ( 0)( 1)(000~0)(10001)(XXX)( X)
// /clk2 primary_input
// (ts)(ld)(shift)( ld )(cap)(stbl)
// clk2 O ( 0)( 0)(000~0)(00100)(0X0) ( 0) /ff20/CLK
procedure load_unload =
scan_group grp1 ;
timeplate gen_tp1 ;
apply shift 3;
end;
procedure shift =
scan_group grp1 ;
timeplate gen_tp1 ;
cycle =
force_scan_en 1 ;
force sci ;
measure_sco ;
pulse clk1 ;
force C 0;
end;
end;
In this case, the report still shows an event for load_unload in the second data group. This makes
it easier to see differences between the end of test_setup and the entry into the first load_unload.
Such differences can occur because during load_unload the tool sets to X any primary input pins
that are not constrained with an add_input_constraints command or explicitly forced in the
load_unload procedure. This is the case for pin A in this example:
// /A primary_input
// (ts)(ld)(shift)(cap)(stbl)
// A O ( 1)( X)(XXX~X)(XXX)( X) /ff30/D /ff20/D /ff00/D
// /ff20 dff
// (ts)(ld)(shift)(cap)(stbl)
// CLK I ( 0)( 0)(000~0)(0X0)( 0) /clk2
// D I ( 1)( X)(XXX~X)(XXX)( X) /A
// Q O ( 0)( 0)(000~0)(0XX)( X)
// QB O ( 1)( 1)(111~1)(1XX)( X)
For All_shift, the tool simulates the exact number of shifts. This means for situations where
particular events take place during shift, the tool will simulate these exactly rather than
simulating the stable state after an “infinite” number of shifts. The following state_stability
displays show the difference between using On and using All_shift for ff32 and the procedures
of the basic example (values of interest are highlighted in bold):
set_stability_check On:
// /ff32 dffr
// (ts)(ld)(shift)(cap)(stbl)
// R I ( 0)( 0)(000~0)(0X0)( 0) /reset
// CLK I ( 0)( 0)(010~0)(0X0)( 0) /clk1
// D I ( 0)( 0)(000~X)(XXX)( X) /ff31b/Q
// Q O ( 0)( 0)(000~X)(XXX)( X)
// QB O ( 1)( 1)(111~X)(XXX)( X)
set_stability_check All_shift:
// /ff32 dffr
// (ts)(ld)(shift)(cap)(stbl)
// R I ( 0)( 0)(000~0)(0X0)( 0) /reset
// CLK I ( 0)( 0)(010~0)(0X0)( 0) /clk1
// D I ( 0)( 0)(000~X)(XXX)( X) /ff31b/Q
// Q O ( 0)( 0)(000~1)(1XX)( X)
// QB O ( 1)( 1)(111~0)(0XX)( X)
In the All_shift case, notice how the stable state after shift differs from the On case. After
exactly three applications of the shift procedure, the state is 1, but after “infinite” applications of
the shift procedure, it is X.
When stability checking is set to off, the tool reports only dashes:
// /ff32 dffr
// R I (-) /reset
// CLK I (-) /clk1
// D I (-) /ff31/Q
// Q O (-)
// QB O (-)
It is a good practice to always force the constrained pins to their constrained state at the end of
the test_setup procedure. If you do not do that, the tool will add an additional cycle to the
test_setup procedure when you write out the patterns. This recommended practice is not
followed in this example:
procedure test_setup =
scan_group grp1
timeplate gen_tp1 ;
// First cycle, three PI events (force, pulse on, pulse off)
cycle =
force clk1 0 ;
force clk2 0 ;
force reset 0 ;
force A 0 ;
force B 0 ;
force C 0 ;
force E 0 ;
pulse clk1 ;
end ;
// Second cycle, three PI events (force, pulse on, pulse off)
cycle =
force D 1 ;
pulse clk1 ;
end ;
end;
Then, for state stability, notice how D changes from 1 to 0 between test_setup and the first
application of load_unload. This is because of the pin constraint to 0 on this pin:
procedure load_unload =
scan_group grp1 ;
timeplate gen_tp1 ;
// First cycle, one event (force)
cycle =
force clk1 0 ;
force clk2 0 ;
force reset 0 ;
force scan_en 1 ;
force B 1;
force C 1;
force E 1;
end ;
apply shift 1; // Pre shift
// Second cycle, three PI events (force, pulse on, pulse off)
cycle =
force C 0;
force E 0;
pulse clk2;
end;
apply shift 2; // Main shift
end;
procedure shift =
scan_group grp1 ;
timeplate gen_tp1 ;
cycle =
force_sci ;
measure_sco ;
pulse clk1 ;
force C 0;
end;
end;
The third group in the state_stability display (highlighted in bold) is the pre-shift. The fourth
group is the cycle between the shift applications, and the fifth group is the main shift.
You can use Tessent Shell in either an interactive or non-interactive manner. You conduct a tool
session interactively by entering the commands manually, or the session can be completely
scripted and driven using a dofile. This non-interactive mode of operation allows the entire
session to be conducted without user interaction. This method of using Tessent Shell can be
further expanded to allow the session to be scheduled and run as a true batch or cron job. This
appendix focuses on the features of Tessent Shell that support its use in a batch environment.
set_dofile_abort exit
The exit option sets the exit code to a non-zero value if an error occurs during execution of the
dofile. This allows a shell script that launches a Tessent Shell session to control process flow
based on the success or failure of a tool operation. Note the line check for the exit status
following the line that invokes Tessent Shell.
#!/bin/csh -b
##
## Add the pathname of the <Tessent_Tree_Path>/bin directory to the PATH
## environment variable so you can invoke the tool without typing the full
## pathname
##
setenv PATH <Tessent_Tree_Path>/bin:${PATH}
##
setenv DESIGN `pwd`
##
##
tessent -shell -dofile ${DESIGN}/tshell.do \
-license_wait 30 -log ${DESIGN}/`date +log_file_%m_%d_%y_%H:%M:%S`
setenv proc_status $status
if ("$proc_status" == 0 ) then
echo "Session was successful"
echo " The exit code is: " $proc_status
else echo "Session failed"
echo " The exit code is: " $proc_status
endif
echo $proc_status " is the exit code value."
You can use environment variables in a Tessent Shell dofile. For example, the shell script sets
the DESIGN environment variable to the current working directory. When a batch job is
created, the process may not inherit the same environment that existed in the shell environment.
To assure that the process has access to the files referenced in the dofile, the DESIGN
environment variable is used. A segment of a Tessent Shell dofile displaying the use of an
environment variable follows:
# The shell script that launches this dofile sets the DESIGN environment
# variable to the current working directory.
add_scan_groups g1 ${DESIGN}/procfile
#
add_scan_chains c1 g1 scan_in CO
...
#
write_faults ${DESIGN}/fault_list -all -replace
You can also use a startup file to alias common commands. To set up the predefined alias
commands, use the file .tessent_startup (located by default in your home directory). For
example:
The following dofile segment displays the use of the alias defined in the .tessent_startup file:
Another important consideration is to exit in a graceful manner from the dofile. This is required
to assure that Tessent Shell exits instead of waiting for additional command line input.
If Tessent Shell is unable to obtain a license after the specified number of retries, the tool exits.
An example of the Tessent Shell invocation line with this option follows:
Another item of interest is the logfile name created using the UNIX “date” command for each
Tessent Shell run. The logfile is based on the month, day, year, hour, minute, and second that
the batch job was launched. An example of the logfile name that would be created follows:
log_file_05_30_12_08:42:37
There are several ways to get help when setting up and using Tessent® software tools.
Depending on your need, help is available from documentation, online command help, and
Mentor Graphics Support.
Documentation
A comprehensive set of reference manuals, user guides, and release notes is available in two
formats:
http://supportnet.mentor.com
For more information on setting up and using Tessent documentation, see the “Using Tessent
Documentation” chapter in the Managing Mentor Graphics Tessent Software manual.
http://supportnet.mentor.com/about/
If you have questions about a software release, you can log in to SupportNet and search
thousands of technical solutions, view documentation, or open a Service Request online:
http://supportnet.mentor.com
If your site is under current support and you do not have a SupportNet login, you can register for
SupportNet by filling out a short form here:
http://supportnet.mentor.com/user/register.cfm
http://supportnet.mentor.com/contacts/supportcenters/index.cfm
Index
add_clocks, 167
Index
IMPORTANT INFORMATION
USE OF ALL SOFTWARE IS SUBJECT TO LICENSE RESTRICTIONS. CAREFULLY READ THIS LICENSE
AGREEMENT BEFORE USING THE PRODUCTS. USE OF SOFTWARE INDICATES CUSTOMER’S
COMPLETE AND UNCONDITIONAL ACCEPTANCE OF THE TERMS AND CONDITIONS SET FORTH IN
THIS AGREEMENT. ANY ADDITIONAL OR DIFFERENT PURCHASE ORDER TERMS AND CONDITIONS
SHALL NOT APPLY.
This is a legal agreement concerning the use of Software (as defined in Section 2) and hardware (collectively “Products”)
between the company acquiring the Products (“Customer”), and the Mentor Graphics entity that issued the
corresponding quotation or, if no quotation was issued, the applicable local Mentor Graphics entity (“Mentor
Graphics”). Except for license agreements related to the subject matter of this license agreement which are physically
signed by Customer and an authorized representative of Mentor Graphics, this Agreement and the applicable quotation
contain the parties’ entire understanding relating to the subject matter and supersede all prior or contemporaneous
agreements. If Customer does not agree to these terms and conditions, promptly return or, in the case of Software
received electronically, certify destruction of Software and all accompanying items within five days after receipt of
Software and receive a full refund of any license fee paid.
2. GRANT OF LICENSE. The software installed, downloaded, or otherwise acquired by Customer under this Agreement,
including any updates, modifications, revisions, copies, documentation and design data (“Software”) are copyrighted, trade
secret and confidential information of Mentor Graphics or its licensors, who maintain exclusive title to all Software and retain
all rights not expressly granted by this Agreement. Mentor Graphics grants to Customer, subject to payment of applicable
license fees, a nontransferable, nonexclusive license to use Software solely: (a) in machine-readable, object-code form (except
as provided in Subsection 5.2); (b) for Customer’s internal business purposes; (c) for the term of the license; and (d) on the
computer hardware and at the site authorized by Mentor Graphics. A site is restricted to a one-half mile (800 meter) radius.
Customer may have Software temporarily used by an employee for telecommuting purposes from locations other than a
Customer office, such as the employee’s residence, an airport or hotel, provided that such employee’s primary place of
employment is the site where the Software is authorized for use. Mentor Graphics’ standard policies and programs, which vary
depending on Software, license fees paid or services purchased, apply to the following: (a) relocation of Software; (b) use of
Software, which may be limited, for example, to execution of a single session by a single user on the authorized hardware or for
a restricted period of time (such limitations may be technically implemented through the use of authorization codes or similar
devices); and (c) support services provided, including eligibility to receive telephone support, updates, modifications, and
revisions. For the avoidance of doubt, if Customer provides any feedback or requests any change or enhancement to Products,
whether in the course of receiving support or consulting services, evaluating Products, performing beta testing or otherwise, any
inventions, product improvements, modifications or developments made by Mentor Graphics (at Mentor Graphics’ sole
discretion) will be the exclusive property of Mentor Graphics.
3. ESC SOFTWARE. If Customer purchases a license to use development or prototyping tools of Mentor Graphics’ Embedded
Software Channel (“ESC”), Mentor Graphics grants to Customer a nontransferable, nonexclusive license to reproduce and
distribute executable files created using ESC compilers, including the ESC run-time libraries distributed with ESC C and C++
compiler Software that are linked into a composite program as an integral part of Customer’s compiled computer program,
provided that Customer distributes these files only in conjunction with Customer’s compiled computer program. Mentor
Graphics does NOT grant Customer any right to duplicate, incorporate or embed copies of Mentor Graphics’ real-time operating
systems or other embedded software products into Customer’s products or applications without first signing or otherwise
agreeing to a separate agreement with Mentor Graphics for such purpose.
4. BETA CODE.
4.1. Portions or all of certain Software may contain code for experimental testing and evaluation (which may be either alpha or
beta, collectively “Beta Code”), which may not be used without Mentor Graphics’ explicit authorization. Upon Mentor
Graphics’ authorization, Mentor Graphics grants to Customer a temporary, nontransferable, nonexclusive license for
experimental use to test and evaluate the Beta Code without charge for a limited period of time specified by Mentor
Graphics. This grant and Customer’s use of the Beta Code shall not be construed as marketing or offering to sell a license
to the Beta Code, which Mentor Graphics may choose not to release commercially in any form.
4.2. If Mentor Graphics authorizes Customer to use the Beta Code, Customer agrees to evaluate and test the Beta Code under
normal conditions as directed by Mentor Graphics. Customer will contact Mentor Graphics periodically during Customer’s
use of the Beta Code to discuss any malfunctions or suggested improvements. Upon completion of Customer’s evaluation
and testing, Customer will send to Mentor Graphics a written evaluation of the Beta Code, including its strengths,
weaknesses and recommended improvements.
4.3. Customer agrees to maintain Beta Code in confidence and shall restrict access to the Beta Code, including the methods and
concepts utilized therein, solely to those employees and Customer location(s) authorized by Mentor Graphics to perform
beta testing. Customer agrees that any written evaluations and all inventions, product improvements, modifications or
developments that Mentor Graphics conceived or made during or subsequent to this Agreement, including those based
partly or wholly on Customer’s feedback, will be the exclusive property of Mentor Graphics. Mentor Graphics will have
exclusive rights, title and interest in all such property. The provisions of this Subsection 4.3 shall survive termination of
this Agreement.
5. RESTRICTIONS ON USE.
5.1. Customer may copy Software only as reasonably necessary to support the authorized use. Each copy must include all
notices and legends embedded in Software and affixed to its medium and container as received from Mentor Graphics. All
copies shall remain the property of Mentor Graphics or its licensors. Customer shall maintain a record of the number and
primary location of all copies of Software, including copies merged with other software, and shall make those records
available to Mentor Graphics upon request. Customer shall not make Products available in any form to any person other
than Customer’s employees and on-site contractors, excluding Mentor Graphics competitors, whose job performance
requires access and who are under obligations of confidentiality. Customer shall take appropriate action to protect the
confidentiality of Products and ensure that any person permitted access does not disclose or use Products except as
permitted by this Agreement. Customer shall give Mentor Graphics written notice of any unauthorized disclosure or use of
the Products as soon as Customer becomes aware of such unauthorized disclosure or use. Except as otherwise permitted for
purposes of interoperability as specified by applicable and mandatory local law, Customer shall not reverse-assemble,
reverse-compile, reverse-engineer or in any way derive any source code from Software. Log files, data files, rule files and
script files generated by or for the Software (collectively “Files”), including without limitation files containing Standard
Verification Rule Format (“SVRF”) and Tcl Verification Format (“TVF”) which are Mentor Graphics’ proprietary
syntaxes for expressing process rules, constitute or include confidential information of Mentor Graphics. Customer may
share Files with third parties, excluding Mentor Graphics competitors, provided that the confidentiality of such Files is
protected by written agreement at least as well as Customer protects other information of a similar nature or importance,
but in any case with at least reasonable care. Customer may use Files containing SVRF or TVF only with Mentor Graphics
products. Under no circumstances shall Customer use Software or Files or allow their use for the purpose of developing,
enhancing or marketing any product that is in any way competitive with Software, or disclose to any third party the results
of, or information pertaining to, any benchmark.
5.2. If any Software or portions thereof are provided in source code form, Customer will use the source code only to correct
software errors and enhance or modify the Software for the authorized use. Customer shall not disclose or permit disclosure
of source code, in whole or in part, including any of its methods or concepts, to anyone except Customer’s employees or
on-site contractors, excluding Mentor Graphics competitors, with a need to know. Customer shall not copy or compile
source code in any manner except to support this authorized use.
5.3. Customer may not assign this Agreement or the rights and duties under it, or relocate, sublicense or otherwise transfer the
Products, whether by operation of law or otherwise (“Attempted Transfer”), without Mentor Graphics’ prior written
consent and payment of Mentor Graphics’ then-current applicable relocation and/or transfer fees. Any Attempted Transfer
without Mentor Graphics’ prior written consent shall be a material breach of this Agreement and may, at Mentor Graphics’
option, result in the immediate termination of the Agreement and/or the licenses granted under this Agreement. The terms
of this Agreement, including without limitation the licensing and assignment provisions, shall be binding upon Customer’s
permitted successors in interest and assigns.
5.4. The provisions of this Section 5 shall survive the termination of this Agreement.
6. SUPPORT SERVICES. To the extent Customer purchases support services, Mentor Graphics will provide Customer with
updates and technical support for the Products, at the Customer site(s) for which support is purchased, in accordance with
Mentor Graphics’ then current End-User Support Terms located at http://supportnet.mentor.com/about/legal/.
7. LIMITED WARRANTY.
7.1. Mentor Graphics warrants that during the warranty period its standard, generally supported Products, when properly
installed, will substantially conform to the functional specifications set forth in the applicable user manual. Mentor
Graphics does not warrant that Products will meet Customer’s requirements or that operation of Products will be
uninterrupted or error free. The warranty period is 90 days starting on the 15th day after delivery or upon installation,
whichever first occurs. Customer must notify Mentor Graphics in writing of any nonconformity within the warranty period.
For the avoidance of doubt, this warranty applies only to the initial shipment of Software under an Order and does not
renew or reset, for example, with the delivery of (a) Software updates or (b) authorization codes or alternate Software under
a transaction involving Software re-mix. This warranty shall not be valid if Products have been subject to misuse,
unauthorized modification, improper installation or Customer is not in compliance with this Agreement. MENTOR
GRAPHICS’ ENTIRE LIABILITY AND CUSTOMER’S EXCLUSIVE REMEDY SHALL BE, AT MENTOR
GRAPHICS’ OPTION, EITHER (A) REFUND OF THE PRICE PAID UPON RETURN OF THE PRODUCTS TO
MENTOR GRAPHICS OR (B) MODIFICATION OR REPLACEMENT OF THE PRODUCTS THAT DO NOT MEET
THIS LIMITED WARRANTY. MENTOR GRAPHICS MAKES NO WARRANTIES WITH RESPECT TO:
(A) SERVICES; (B) PRODUCTS PROVIDED AT NO CHARGE; OR (C) BETA CODE; ALL OF WHICH ARE
PROVIDED “AS IS.”
7.2. THE WARRANTIES SET FORTH IN THIS SECTION 7 ARE EXCLUSIVE. NEITHER MENTOR GRAPHICS NOR
ITS LICENSORS MAKE ANY OTHER WARRANTIES EXPRESS, IMPLIED OR STATUTORY, WITH RESPECT TO
PRODUCTS PROVIDED UNDER THIS AGREEMENT. MENTOR GRAPHICS AND ITS LICENSORS
SPECIFICALLY DISCLAIM ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NON-INFRINGEMENT OF INTELLECTUAL PROPERTY.
10. INDEMNIFICATION. CUSTOMER AGREES TO INDEMNIFY AND HOLD HARMLESS MENTOR GRAPHICS AND
ITS LICENSORS FROM ANY CLAIMS, LOSS, COST, DAMAGE, EXPENSE OR LIABILITY, INCLUDING
ATTORNEYS’ FEES, ARISING OUT OF OR IN CONNECTION WITH THE USE OF MENTOR GRAPHICS PRODUCTS
IN OR FOR HAZARDOUS APPLICATIONS. THE PROVISIONS OF THIS SECTION 10 SHALL SURVIVE THE
TERMINATION OF THIS AGREEMENT.
11. INFRINGEMENT.
11.1. Mentor Graphics will defend or settle, at its option and expense, any action brought against Customer in the United States,
Canada, Japan, or member state of the European Union which alleges that any standard, generally supported Product
acquired by Customer hereunder infringes a patent or copyright or misappropriates a trade secret in such jurisdiction.
Mentor Graphics will pay costs and damages finally awarded against Customer that are attributable to such action.
Customer understands and agrees that as conditions to Mentor Graphics’ obligations under this section Customer must:
(a) notify Mentor Graphics promptly in writing of the action; (b) provide Mentor Graphics all reasonable information and
assistance to settle or defend the action; and (c) grant Mentor Graphics sole authority and control of the defense or
settlement of the action.
11.2. If a claim is made under Subsection 11.1 Mentor Graphics may, at its option and expense: (a) replace or modify the Product
so that it becomes noninfringing; (b) procure for Customer the right to continue using the Product; or (c) require the return
of the Product and refund to Customer any purchase price or license fee paid, less a reasonable allowance for use.
11.3. Mentor Graphics has no liability to Customer if the action is based upon: (a) the combination of Software or hardware with
any product not furnished by Mentor Graphics; (b) the modification of the Product other than by Mentor Graphics; (c) the
use of other than a current unaltered release of Software; (d) the use of the Product as part of an infringing process; (e) a
product that Customer makes, uses, or sells; (f) any Beta Code or Product provided at no charge; (g) any software provided
by Mentor Graphics’ licensors who do not provide such indemnification to Mentor Graphics’ customers; or
(h) infringement by Customer that is deemed willful. In the case of (h), Customer shall reimburse Mentor Graphics for its
reasonable attorney fees and other costs related to the action.
11.4. THIS SECTION 11 IS SUBJECT TO SECTION 8 ABOVE AND STATES THE ENTIRE LIABILITY OF MENTOR
GRAPHICS AND ITS LICENSORS, AND CUSTOMER’S SOLE AND EXCLUSIVE REMEDY, FOR DEFENSE,
SETTLEMENT AND DAMAGES, WITH RESPECT TO ANY ALLEGED PATENT OR COPYRIGHT
INFRINGEMENT OR TRADE SECRET MISAPPROPRIATION BY ANY PRODUCT PROVIDED UNDER THIS
AGREEMENT.
13. EXPORT. The Products provided hereunder are subject to regulation by local laws and United States (“U.S.”) government
agencies, which prohibit export, re-export or diversion of certain products, information about the products, and direct or indirect
products thereof, to certain countries and certain persons. Customer agrees that it will not export or re-export Products in any
manner without first obtaining all necessary approval from appropriate local and U.S. government agencies. If Customer wishes
to disclose any information to Mentor Graphics that is subject to any U.S. or other applicable export restrictions, including
without limitation the U.S. International Traffic in Arms Regulations (ITAR) or special controls under the Export
Administration Regulations (EAR), Customer will notify Mentor Graphics personnel, in advance of each instance of disclosure,
that such information is subject to such export restrictions.
14. U.S. GOVERNMENT LICENSE RIGHTS. Software was developed entirely at private expense. The parties agree that all
Software is commercial computer software within the meaning of the applicable acquisition regulations. Accordingly, pursuant
to U.S. FAR 48 CFR 12.212 and DFAR 48 CFR 227.7202, use, duplication and disclosure of the Software by or for the U.S.
government or a U.S. government subcontractor is subject solely to the terms and conditions set forth in this Agreement, which
shall supersede any conflicting terms or conditions in any government order document, except for provisions which are contrary
to applicable mandatory federal laws.
15. THIRD PARTY BENEFICIARY. Mentor Graphics Corporation, Mentor Graphics (Ireland) Limited, Microsoft Corporation
and other licensors may be third party beneficiaries of this Agreement with the right to enforce the obligations set forth herein.
16. REVIEW OF LICENSE USAGE. Customer will monitor the access to and use of Software. With prior written notice and
during Customer’s normal business hours, Mentor Graphics may engage an internationally recognized accounting firm to
review Customer’s software monitoring system and records deemed relevant by the internationally recognized accounting firm
to confirm Customer’s compliance with the terms of this Agreement or U.S. or other local export laws. Such review may include
FlexNet (or successor product) report log files that Customer shall capture and provide at Mentor Graphics’ request. Customer
shall make records available in electronic format and shall fully cooperate with data gathering to support the license review.
Mentor Graphics shall bear the expense of any such review unless a material non-compliance is revealed. Mentor Graphics shall
treat as confidential information all information gained as a result of any request or review and shall only use or disclose such
information as required by law or to enforce its rights under this Agreement. The provisions of this Section 16 shall survive the
termination of this Agreement.
17. CONTROLLING LAW, JURISDICTION AND DISPUTE RESOLUTION. The owners of certain Mentor Graphics
intellectual property licensed under this Agreement are located in Ireland and the U.S. To promote consistency around the
world, disputes shall be resolved as follows: excluding conflict of laws rules, this Agreement shall be governed by and construed
under the laws of the State of Oregon, U.S., if Customer is located in North or South America, and the laws of Ireland if
Customer is located outside of North or South America. All disputes arising out of or in relation to this Agreement shall be
submitted to the exclusive jurisdiction of the courts of Portland, Oregon when the laws of Oregon apply, or Dublin, Ireland when
the laws of Ireland apply. Notwithstanding the foregoing, all disputes in Asia arising out of or in relation to this Agreement shall
be resolved by arbitration in Singapore before a single arbitrator to be appointed by the chairman of the Singapore International
Arbitration Centre (“SIAC”) to be conducted in the English language, in accordance with the Arbitration Rules of the SIAC in
effect at the time of the dispute, which rules are deemed to be incorporated by reference in this section. Nothing in this section
shall restrict Mentor Graphics’ right to bring an action (including for example a motion for injunctive relief) against Customer in
the jurisdiction where Customer’s place of business is located. The United Nations Convention on Contracts for the
International Sale of Goods does not apply to this Agreement.
18. SEVERABILITY. If any provision of this Agreement is held by a court of competent jurisdiction to be void, invalid,
unenforceable or illegal, such provision shall be severed from this Agreement and the remaining provisions will remain in full
force and effect.
19. MISCELLANEOUS. This Agreement contains the parties’ entire understanding relating to its subject matter and supersedes all
prior or contemporaneous agreements. Some Software may contain code distributed under a third party license agreement that
may provide additional rights to Customer. Please see the applicable Software documentation for details. This Agreement may
only be modified in writing, signed by an authorized representative of each party. Waiver of terms or excuse of breach must be
in writing and shall not constitute subsequent consent, waiver or excuse.