TOSHIBA is continually working to improve the quality and reliability of its products. Nevertheless,
semiconductor devices in general can malfunction or fail due to their inherent electrical sensitivity
and vulnerability to physical stress. It is the responsibility of the buyer, when utilizing TOSHIBA
products, to comply with the standards of safety in making a safe design for the entire system, and to
avoid situations in which a malfunction or failure of such TOSHIBA products could cause loss of
human life, bodily injury or damage to property. In developing your designs, please ensure that
TOSHIBA products are used within specified operating ranges as set forth in the most recent
TOSHIBA products specifications. Also, please keep in mind the precautions and conditions set forth
in the "Handling Guide for Semiconductor Devices," or "TOSHIBA Semiconductor Reliability
Handbook" etc.
The Toshiba products listed in this document are intended for usage in general electronics
applications (computer, personal equipment, office equipment, measuring equipment, industrial
robotics, domestic appliances, etc.). These Toshiba products are neither intended nor warranted for
usage in equipment that requires extraordinarily high quality and/or reliability or a malfunction or
failure of which may cause loss of human life or bodily injury ("Unintended Usage"). Unintended
Usage include atomic energy control instruments, airplane or spaceship instruments, transportation
instruments, traffic signal instruments, combustion control instruments, medical instruments, all
types of safety devices, etc. Unintended Usage of Toshiba products listed in this document shall be
made at the customer’s own risk.
Toshiba does not take any responsibility for incidental damage (including loss of business profit,
business interruption, loss of business information, and other pecuniary damage) arising out of the
use or disability to use the product.
The information contained herein is presented only as a guide for the applications of our products.
No responsibility is assumed by TOSHIBA for any infringements of patents or other rights of the third
parties which may result from its use. No license is granted by implication or otherwise under any
patents or patent rights of TOSHIBA or others.
The products described in this document may include products subject to the foreign exchange and
foreign trade laws.
Synopsys, TetraMAX, Design Compiler, VCS, DFT Compiler, PrimeTime, VCS, BSD Compiler and
DesignWare are trademarks of Synopsys, Inc. Verilog, Verilog-XL, and NC-Verilog are trademarks of
Cadence Design Systems, Inc. Gemini and Voyager are trademarks of IKOS Systems, Inc.
ModelSim is a trademark of Model Technology, Inc. Sun-4, SunOS and Solaris are trademarks of
Sun Microsystems, Inc. HP-UX is a trademark of Hewlett-Packard Company. UNIX is a trademark in
the United States and other countries, licensed exclusively by X/Open Company, Ltc. Red Hat is a
trademark of Red Hat, Inc. Linux is a trademark of Linux Torvalds. All other products or services
mentioned in this document are identified by the trademarks or service marks of their respective
companies or organizations.
Synopsys-DFT User Guide Preface
Preface
DFT Compiler and TetraMAX from Synopsys, Inc are popular DFT tools. Toshiba
supports these DFT tools for development of its ASICs by providing cell libraries
and design kit software programs.
The Synopsys-DFT User Guide is for design and test engineers involved in a chip
design for the Toshiba ASIC, using Synopsys’ DFT Compiler, BSD Compiler and
TetraMAX. This manual provides necessary background material on DFT
techniques and describes how to use the above tools to get the best results. For a
complete description of their commands and usages, consult the documents
provided by Synopsys.
All information in this manual is based on the latest product information available
at the time of printing. Toshiba reviewed the accuracy of this manual, but should
you find, in this manual, any ambiguities or be in doubt as to any meanings, please
direct all queries to your nearest Toshiba ASIC Design Center. In case of any
inconsistencies existing between this and Synopsys’ manuals, please refer to the
Synopsys manuals.
This manual is for the DFT Compiler, BSD Compiler and TetraMAX versions
listed below:
♦ DFT Compiler 2000.11 and above
Please keep in mind that users of other versions might encounter minor
inconsistencies existing in this manual.
i
Preface Synopsys-DFT User Guide
Manual Organization
ii
Synopsys-DFT User Guide Preface
Part 4: Appendixes
♦ Appendix A, "Quick Tour," walks you through the entire DFT process, from
synthesizing scan circuitry using DFT Compiler to performing parallel-load
simulation using VSO.
Related Documents
Toshiba’s Documents
iii
Preface Synopsys-DFT User Guide
Synopsys’ Documents
iv
Synopsys-DFT User Guide Contents
Contents
v
Contents Synopsys-DFT User Guide
Chapter 9 Validating the Scan Structure and ATPG Test Vectors . . . . . . . . . 201
9.1 Key Decision Criteria for Quality of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
9.2 Scan Design Rule Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
9.3 Verifying the ATPG Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
vi
Synopsys-DFT User Guide Contents
Part 4 Appendixes
vii
Contents Synopsys-DFT User Guide
viii
Synopsys-DFT User Guide Style Conventions
Style Conventions
The following syntax and notation conventions are used throughout this manual:
ix
Style Conventions Synopsys-DFT User Guide
x
CMOS ASIC Design Manual
Part 1
DFT Fundamentals
1
Synopsys-DFT User Guide
2
Chapter 1 Understanding DFT Concepts
.....................................
.....
T his chapter provides design engineers with the basics of design-for-testability (DFT)
methodologies. It discusses motivation for DFT and testability measures, and introduces
common DFT techniques. The material is organized into the following sections:
☞ Introduction
☞ Internal-Scan
☞ JTAG Boundary-Scan
3
Understanding DFT Concepts
1 1.1 Introduction
1.1 Introduction
A point of interest to IC users is the probability that defective chips are shipped. This is
referred to as defect level (DL). It would be best if we could somehow get an accurate
prediction for a chip’s defect level, or the number of test escapes. However, it is extremely
difficult to get an accurate estimate of the defect level due to a prohibitive amount of data
(including statistics about every conceivable kind of defect characteristics and manufacturing
yields) and the huge computational resources required.
As an alternative to the defect level, fault coverage is generally used to provide a useful
measure of manufacturing test quality. Fault coverage is the extent to which a test can detect
faults, or physical defects, in a design, and expressed as a ratio of the number of detected faults
to the number of faults tested. A mathematical equation is known that theoretically represents
the relationship among fault coverage, manufacturing yield and defect level. Figure 1–1 gives
some indication of fault coverage and defect level relationship for different yields. It clearly
shows the importance of achieving the highest possible test fault coverage.
4
.....
Understanding DFT Concepts
1.1 Introduction
100
90 Yield
80 10
20
Defect Level (%)
70
30
60 40
50 50
40 60
70
30
80
20 90
10
0
0 10 20 30 40 50 60 70 80 90 100
Fault Coverage (%)
One outcome of higher integration in ASICs is that the circuit complexity has increased much
faster than the number of I/O pins. This gate-to-pin ratio has increased dramatically over the
past several years, creating a test problem for designers. The impaired accessibility of the
internal logic from I/O pins is a bottleneck in developing high-quality test patterns. Proper
testing is no longer possible without enhancing the "inherent" testability of a circuit design.
The most widely used approach to DFT is by using EDA systems to automate the entire DFT
process. EDA applications generally consist of a tightly integrated set of a test synthesis tool
and an automatic test pattern generation (ATPG) tool. EDA tools help to shorten the test
development time and increase the test fault coverage.
Fault Models
..................................................
There are many kinds of faults that can occur in digital components. But, for what kinds of
faults should we test? When a chip has manufacturing defects, physical defects have, by and
large, logical effects on the circuit behavior. Thus, we can focus on the consequences of those
faults rather than on their causes. In estimating the test fault coverage, the most commonly
occurring faults are modeled to conform to some premise or conjecture about real physical
defects.
5
Understanding DFT Concepts
1 1.1 Introduction
The fault model which is most widely used for the purpose of automatic test pattern generation
is the single stuck-at fault model. In stuck-at fault models, the inputs and outputs of a logic gate
are assumed fixed to a value, either logic 0 or logic 1, irrespective of what value is applied to or
should be coming out of the network. The stuck-at-1 fault represents a circuit node that is
permanently fixed at a logic 1 value. The stuck-at-0 fault represents a circuit node that is
permanently fixed at a logic 0. The single stuck-at fault model assumes that only one node in
the circuit is faulty at a time. Basically, the DFT methodology described in this manual uses the
single stuck-at fault assumption.
Testability Measures
..................................................
The amount of fault coverage you achieve depends on the inherent testability of your logic
design. Testability problems of a logic design can be classified into controllability and
observability. If a node is controllable to a particular logic value, then you can drive it to that
value by setting primary input pins to certain values. Controllability consists of
0-controllability and 1-controllability. If a particular logic value on a node is observable, then
that value can be propagated to primary output pins where you can measure it for evaluation.
0-Controllability Observability
S-A-1
To detect a stuck-at fault on a node, both controllability and observability are required for that
node. For example, to detect a stuck-at-1 (S-A-1) fault on a node, you must control the value of
that node to the opposite of the stuck-at value first, by applying a test pattern at the primary
inputs. Then the effect of that fault must be propagated to a primary output where you can
observe it.
SCOAP is one of the most popular algorithms to measure the controllability and observability
of particular nodes within a design.
6
.....
Understanding DFT Concepts
1.1 Introduction
Design-for-Test Methods
..................................................
DFT techniques are broadly divided into two categories: ad hoc methods and structured
methods. Ad hoc DFT techniques are directed toward correcting specific testability problems
which make it difficult or impossible to create effective tests. Structured DFT techniques put an
emphasis on transforming a design into a form that lends itself to automating test pattern
generation and test process.
Ad hoc DFT techniques are used when the situation makes it necessary or desirable to enhance
the testability of particular circuit nodes rather than being arranged in advance or as part of a
general DFT scheme. Ad hoc techniques are useful to supplement internal-scan for increased
controllability and observability. For example, test point insertion is an ad hoc technique to add
non-scan circuitry to better control selected points and to better observe selected points.
Another example is to bypass internally generated clocks during testing because they are hard
to control efficiently.
Structured DFT techniques are applied to the overall design and included as part of the general
design flow. The following are principal structured DFT techniques:
■ Internal-scan: This is a DFT technique that makes stored-state elements such as flip-flops
both controllable and observable by replacing them with logically equivalent cells with a
serial shift function and stitching them together to form one or more large shift register
paths called scan chains. The next section briefly introduces the internal-scan design
concept. Chapter 2 describes the scan style alternatives supported by Toshiba and the
design considerations for scan insertion.
■ Build-in self-test (BIST): BIST involves adding test circuitry for generating test patterns
on-chip and verifying response on-chip. Toshiba supports BIST for SRAMs, mask ROMs
and DRAMs. BIST is outside the scope of this manual. For details on BIST, refer to the
MemoryBIST User Guide from Toshiba.
■ Core Test: For standalone testing of an IP core or a megacell, a direct-access and
wrapper-scan approaches are used to isolate the IP core or megacell from the rest of the
design by providing a mux or wrapper scan register collar at its input and output pins. The
benefit of a core test approach is that the designer can use the IP core’s or megacell’s
standalone test developed by Toshiba for manufacturing test.
7
Understanding DFT Concepts
1 1.1 Introduction
■ JTAG boundary-scan: This is a board-level test vehicle that provides control over the
input and output pads of digital ICs through test structures integrated on-chip. Chapter 3
describes the JTAG boundary-scan methodology and the design considerations for its
implementation.
8
.....
Understanding DFT Concepts
1.2 Internal-Scan
1.2 Internal-Scan
In the scan design technique, flip-flops in your design are replaced by logically equivalent
elements that also perform a serial shift function called scan flip-flops. Figure 1–3 shows a
non-scan flip-flop and an equivalent single-clocked scan flip-flop.
D
D Q
Scan Replacement
D Q D Q
CP QN = TI
CP QN TI CP QN
TE
TE
Standard D Flip-Flop
Scan Flip-Flop
This implementation has a multiplexer in front of the data input of the flip-flop. When the TE
input is 0, system data from the D input is selected. When the TE input is 1, scan-input data
from the TI input is selected. One of the data outputs of the flip-flop (Q or QN) is also used as
the scan-output signal.
The scan-output signal of a flip-flop is connected to the scan-input signal of another flip-flop to
form a shift register, as shown in Figure 1–4. This shift register path is called a scan chain or a
scan path. Flip-flops in a scan chain are scan-controllable and scan-observable; that is, scan
flip-flops can be controlled to a known state by serially shifting in specific logic values and can
be observed by serially shifting out data. This scan shift capability makes internal nodes more
accessible for testing.
The process of replacing non-scan cells with the scan equivalents is called scan replacement.
The process of implementing scan-chain connections and scan-control signal routing is called
scan assembly. The process of performing scan replacement and scan assembly in a single step
is called scan insertion or scan synthesis.
9
Understanding DFT Concepts
1 1.2 Internal-Scan
Scan-in Scan-out
F/F F/F
F/F
Clock
Scan Shift Enable
Scan Chain
In scan shift mode, the entire scan chain operates as a long shift register. In this mode, test
vector values are shifted in from the external scan-in input, and the contents of the scan
flip-flops are shifted out on the external scan-out output.
■ Scan capture mode (Capture mode)
In capture mode, all flip-flops in a scan chain operate as a standard flip-flop. Flip-flops
are preloaded in scan shift mode to control the inputs to combinational logic islands.
Once the capture mode is selected, a functional test vector is applied to the primary
inputs, and the steady-state output response from the combinational logic is captured into
the flip-flops by pulsing the system clock.
A scan test sequence is repeated by alternating these two modes. Figure 1–5 illustrates the scan
test sequence step by step.
10
.....
Understanding DFT Concepts
1.2 Internal-Scan
Scan
Shift 1. Test vector values are serially
shifted into scan flip-flops F/F F/F
Mode through the scan chain. 2. The test
(Scan-in) pattern is Comb Comb Comb
applied to the Logic F/F Logic F/F Logic
primary inputs. Island Island Island
Scan
Capture 2. A functional test vector is F/F F/F
applied to the primary inputs.
Mode
F/F F/F
3. The output response is 3. The response
checked at the primary outputs Comb Comb Comb is checked at
and compared to the expected Logic F/F Logic F/F Logic the primary
response. Island Island Island outputs.
4. The response F/F F/F
from the comb
4. The clock is exercised to logic is clocked
capture the response from the into scan
combinational logic into scan flip-flops.
flip-flops.
5. The contents of scan
flip-flops are shifted out.
Scan
Shift 5. The contents of the scan
Mode flip-flops are serially shifted out F/F F/F
from the scan chain and Comb Comb Comb
compared to the expected
response. (Scan-out) Logic F/F Logic F/F Logic
Island Island Island
F/F F/F
Steps 1 to 5 shown in Figure 1–5 are repeated for each test pattern. Note that, except for the last
test pattern, a new test pattern is shifted into the scan chain while, simultaneously, the test
result is shifted out, thus shortening the test time. You can use ATPG to automatically generate
test patterns.
ATPG
..................................................
In effect, ATPG can treat scan flip-flop outputs as primary inputs and scan flip-flop inputs as
primary outputs. In addition to the scan chain giving access to the internal states of a circuit,
the scan chain may also be considered as a means of partitioning a circuit into less complex
combinational logic blocks. Thus, a scan design technique enormously simplifies automatic
test pattern generation.
11
Understanding DFT Concepts
1 1.2 Internal-Scan
ATPG fault-simulates each random pattern to determine which fault it detects and
calculates the overall fault coverage achieved with each new pattern.
2. Deterministic generation of patterns to cover specific stuck-at faults that are otherwise hard
to detect
In the second phase, ATPG analyzes the remaining undetected faults, one at a time, and
tries to derive patterns to detect each of those faults. D-algorithm is one of the most
popular test generation algorithms.
12
.....
Understanding DFT Concepts
1.3 JTAG Boundary-Scan
Since the first proposal for a boundary-scan standard came from the Joint Test Action Group
(JTAG), often it is simply called JTAG. The JTAG proposal is standardized as IEEE Std
1149.1.
Boundary-Scan Architecture
..................................................
To implement boundary-scan, there are two things that must be done: 1) add specialized test
logic to all (or part) of the ICs on a board; 2) connect JTAG test signals of individual ICs on the
board. Figure 1–6 and Figure 1–7 illustrate the architecture of boundary-scan logic and a
simple boundary-scannable board design.
13
Understanding DFT Concepts
1 1.3 JTAG Boundary-Scan
Boundary-Scan Register
Boundary-Scan Path
JTAG Controller
14
.....
Understanding DFT Concepts
1.3 JTAG Boundary-Scan
System System
Inputs Boundary-Scan Register Outputs
System Logic
G
Device Identification Register
MUX
User-Specific Test Data Registers
Bypass Register
TDI
GI
ID
Instruction Register MUX
CI
TDO
EN
TMS
TAP
TCK
Controller
TRST*
The following subsections briefly describe the components of the IEEE Std 1149.1
boundary-scan design.
The TAP is the JTAG interface between the chip and the external environment. It provides
access to test support functions built into the chip for the board testing. The internal test
functions may also be accessed through the TAP.
The TAP consists of the following three input and one output signal. An optional fourth input
connection called TRST* may be included.
■ TCK (Test Clock Input)
The TCK signal is the clock for the TAP controller. The actions of the JTAG test logic
are synchronized by the TCK signal.
15
Understanding DFT Concepts
1 1.3 JTAG Boundary-Scan
The TMS signal controls the transitions of the TAP controller in conjunction with the
rising edge of the Test Clock (TCK). IEEE Std 1149.1 stipulates that TMS be high in case
of an undriven input (due to open faults in the board-level boundary-scan path). Thus the
TMS input uses an input buffer with pullup.
■ TDI (Test Data Input)
The TDI input provides serial test instructions and data received by the JTAG test logic.
The signal presented at TDI is fed into the TAP controller on the rising edge of TCK.
IEEE Std 1149.1 stipulates that TDI be high in case of an undriven input (due to open
faults in the board-level boundary-scan path). Thus the TDI input uses an input buffer
with pullup.
■ TDO (Test Data Output)
The TDO signal is the serial output for test instructions and data from the instruction
register and test data registers.
■ TRST* (Test Reset Input)
The optional TRST* input provides for asynchronous initialization of the JTAG test
logic. Initialization occurs when the TRST* input changes to the low logic level. Thus to
prevent an erroneous low signal on the TRST* input, an input buffer with pullup is used
for the TRST* input.
Note: In IEEE Std 1149.1, signals that are asserted or active in the low state
have an asterisk suffix.
TAP Controller
The TAP controller is a finite state machine with 16 states that controls the operation of the
JTAG test logic. The TMS signal controls the transitions of the TAP controller in conjunction
with the rising edge of TCK. The TAP controller is initialized to the reset state asynchronously
when the low logic level is presented at the TRST* input. A synchronizing sequence for the
state machine also exists: it will return to the reset state when TMS is held high for at least five
rising edges of TCK.
Instruction Register
The instruction register includes at least two shift-register-based cells that hold instruction data
shifted in from the TDI input. The instruction is used to select the test to be performed or the
data register to be "targeted" between TDI and TDO.
16
.....
Understanding DFT Concepts
1.3 JTAG Boundary-Scan
Each instruction selects a unique test data register path to be enabled to shift data between TDI
and TDO. There are the following types of test data registers.
Boundary-Scan Register
Bypass Register
The bypass register is a mandatory 1-bit shift register. This register provides a minimum-length
serial path through the IC (between TDI and TDO) when the IC is not required for the current
test. The ability to "bypass" segments of the board-level serial test interconnect (boundary-scan
path) allows considerable shortening of the overall path for the movement of test data.
IEEE Std 1149.1 can be extended by adding optional user-defined test data registers. The user
has a freedom to define new instructions to gain access to the test features within the IC such as
a self-test function and internal scan chains.
TAP Controller
..................................................
The TMS signal controls the sequence of transitions of the TAP controller in conjunction with
the rising edge of TCK. The state diagram of the TAP controller is shown in Figure 1–8. Each
arrow between states is labeled with a 1 or 0, indicating the logic value of TMS that must be set
up before the rising edge of TCK to cause the transition.
17
Understanding DFT Concepts
1 1.3 JTAG Boundary-Scan
1 Test-Logic-Reset
0
1 1 1
0 Run-Test/Idle Select-DR-Scan Select-IR-Scan
0 0
1 1
Capture-DR Capture-IR
0 0
Shift-DR 0 Shift-IR 0
1 1
1 1
Exit1-DR Exit1-IR
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
This is the controller reset state. The controller must be placed in this state after
power-up.
■ Run-Test/Idle
In this state, the IC is put in a test mode only when certain instructions are present.
Otherwise, the instruction register and all test data registers retain their previous state.
■ Select-DR-Scan — Capture-DR — Shift-DR — Exit1-DR — Pause-DR — Exit2-DR —
Update-DR
These are the controller states in which test data registers such as the boundary-scan
register are controlled. The Capture-DR, Shift-DR and Update-DR states are used to
manipulate test data registers. All the other DR states are temporary or halt states. In the
Capture-DR state, test results are parallel-loaded into test data registers selected by the
current instruction. In the Shift-DR state, the test data register connected between TDI
and TDO shifts data one stage forward towards its serial output. In the Update-DR state, a
test data register with a latched parallel output drives out data to the logic under test.
18
.....
Understanding DFT Concepts
1.3 JTAG Boundary-Scan
These are the controller states in which the instruction register is controlled. The
Capture-IR, Shift-IR and Update-IR states are used to manipulate the instruction register.
All the other IR states are temporary or halt states. In the Capture-IR state, the shift
register contained in the instruction register loads a pattern of fixed logic values. In the
Shift-IR state, data is shifted through the shift register stage of the instruction register
from TDI, and the MSB of the instruction register’s shift register stage is shifted onto
TDO. The Update-IR state allows the instruction shifted into the instruction register to be
latched onto the parallel output. Once the new instruction is latched, it becomes the
current instruction.
1. Loading an instruction
The first step is to load serially into an IC the instruction code for a particular test operation
to be performed. When the TAP controller has moved from the Select-IR-Scan state to the
Shift-IR state, an instruction code is serially shifted from the TDI input into the shift
register portion of the instruction register. After the shift operation is completed, in the
Update-IR state the instruction code is latched into the update register portion of the
instruction register; once the new instruction is latched, it becomes the current instruction.
The instruction code is decoded to select a test data register to be accessed in the DR states
such as Shift-DR and Update-DR.
Next, it may be necessary to load test data into the selected test circuitry before a
meaningful response can be made. In the Shift-DR state, test data is shifted bit by bit from
the TDI input into the shift register portion of the test data register selected by the current
instruction. After the shift operation is completed, in the Update-DR state test data is
latched into the update register portion of the test data register, which drives the logic under
test.
Following execution of the test instruction, test results are captured into the test data
register in the Capture-DR state, and then shifted out onto the TDO output for examination
in the Shift-DR state.
19
Understanding DFT Concepts
1 1.3 JTAG Boundary-Scan
Below is a description of the general test sequence for the IEEE Std 1149.1 EXTEST
instruction to test the interconnections between ICs.
1. TRST* is asserted to initialize the TAP controller (TAPC). The controller is then moved to
the Shift-IR state by using TMS and TCK.
IC-A IC-B
BSR BSR
TCK
01100... TMS
TRST
2. In the Shift-IR state, the instruction register of each IC is connected between respective
TDI and TDO pins. In this state, the binary code of the EXTEST instruction is shifted into
the instruction register through the TDI pin.
IC-A IC-B
BSR BSR
TCK
00000... TMS
TRST
3. The controller is moved to the Shift-DR state via the Update-IR state.
IC-A IC-B
BSR BSR
TCK
11100... TMS
TRST
20
.....
Understanding DFT Concepts
1.3 JTAG Boundary-Scan
4. Test data is shifted into the boundary-scan register from the TDI input.
IC-A IC-B
BSR BSR
TCK
TMS
TRST
5. In the Update-DR state, data is latched onto the parallel output of the BSR and driven onto
its external connections. In the Capture-DR state, the state of all signals is received at the
input pins of IC-B. If there is no fault in board-level interconnections, IC-B will see signal
values with no modification.
Data propagates from A to B
IC-A IC-B
0
BSR BSR
1
TCK
1100 TMS
TRST
6. In the Shift-DR state, the data captured in the BSR of IC-B is shifted out from the TDO
output for examination. This way, the propagation of data from IC-A to IC-B can be
verified.
IC-A IC-B
BSR BSR
21
Understanding DFT Concepts
1 1.3 JTAG Boundary-Scan
22
Chapter 2 Using the Internal-Scan
Methodology
.....................................
.....
T his chapter describes things you should know before performing scan insertion and
automatic test pattern generation (ATPG). The material is organized into the following
sections:
23
Using the Internal-Scan Methodology
2 2.1 Scan Implementation Alternatives
Selecting a scan style is the first thing you need to do. Toshiba supports two scan styles:
singled-clocked and dual-clocked. The following sections describe these scan styles.
Single-Clocked Scan
..................................................
This scan implementation is formally known as the multiplexed flip-flop scan style. Figure 2–1
shows a standard D-type flip-flop and a single-clocked scan equivalent. The system clock input
is used as a scan clock for scan shifting.
Scan Replacement D
D Q D Q D Q Q
CP QN = TI
CP QN TI CP QN QN
TE
TE
Standard D Flip-Flop
Scan Flip-Flop CP
When the TE pin is at logic 0, data from the system data input (D) is selected. In scan shift
mode, data from the Test Input (TI) pin is selected. In Figure 2–1, when TE=1, data from the TI
pin is latched on the rising edge of the clock (CP). The scan-out pin is shared with a system
data output.
Figure 2–2 shows a single-clocked scan flip-flop that is less likely to cause hold-time
violations than the one shown in Figure 2–1.
D
D Q D Q Q
CP QN = TI
TI SO CP QN QN
TE
TE
Scan Flip-Flop CP SO
This scan flip-flop has a dedicated Scan-Out (SO) pin with a predefined delay to prevent
hold-time violations.
24
.....
Using the Internal-Scan Methodology
2.1 Scan Implementation Alternatives
General Characteristics
• Tighter setup constraints than dual-clocked scan flip-flops because of the multiplexer
in front of the D input
• Requires skew control because hold violations can occur when a scan flip-flop’s
scan-out pin (Q or QN) is directly connected to the next scan flip-flop’s scan-in pin (TI)
• Requires lock-up latches whenever a scan chain crosses between two clock domains.
Single-clocked scan flip-flops require or may require the following test pins:
■ Scan test enable input (usually, but not always, required)
■ Scan shift enable input (always required)
■ Scan-in inputs and scan-out outputs (required for each scan chain, but can be shared with
system pins)
Section 2.2, "I/O Pin Requirements for Scan Methodologies," provides a description of the test
pins.
Dual-Clocked Scan
..................................................
Figure 2–3 shows a standard D-type flip-flop and an equivalent dual-clocked scan version.
This scan implementation uses dedicated two-phase clocks (A and B) for scan shifting.
25
Using the Internal-Scan Methodology
2 2.1 Scan Implementation Alternatives
Latch1 Latch2
Scan Replacement D Q
D Q D Q
CP
=
CP QN SI QN QN
A
CP
B SO
Standard D Flip-Flop SI
A
Scan Flip-Flop SO
B
Latch3
In normal operation mode, the scan flip-flop functions like the original standard flip-flop. In
scan shift mode, two nonoverlapping clocks (A and B) are used to shift data from the Scan-In
(SI) pin to the Scan-Out (SO) pin. When A=1, data on the SI input is loaded into Latch 2.
When B=1, data in Latch 2 is shifted to Latch 3.
General Characteristics
Dual-clocked scan flip-flops require or may require the following test pins:
■ Scan test enable input (usually, but not always, required)
■ Scan shift enable input (usually, but not always, required)
■ Scan-in inputs and scan-out outputs (required for each scan chain, but can be shared with
system pins)
■ Two scan clocks (always required for the A and B clocks, but can be shared with system
pins)
Section 2.2, "I/O Pin Requirements for Scan Methodologies," provides a description of the test
pins.
26
.....
Using the Internal-Scan Methodology
2.2 I/O Pin Requirements for Scan Methodologies
Scan design requires one or more I/O pins for test purposes. The following sections describe
the scan test pins.
You can use a system input pin as the Scan Shift Enable pin. However, a shared Scan Shift
Enable pin is held at its active value, say, logic 1, during scan shift mode and at its inactive
value (logic 0) during capture mode. Because test patterns can not be generated with the Scan
Shift Enable pin set to 1, fault coverage is lowered.
When a system input pin is used as the Scan Shift Enable pin, a Scan Test Enable pin is
required to control the Scan Shift Enable signal. The Scan Shift Enable signal is allowed to go
active only during scan testing so that it does not disturb the circuit behavior in normal
operation mode.
27
Using the Internal-Scan Methodology
2 2.2 I/O Pin Requirements for Scan Methodologies
Figure 2–4 Using a System Input Pin as the Scan Shift Enable Input
ATPG can not generate test patterns with the system input set to 1. This
causes a drop in fault coverage.
System Input/
Scan Shift Enable
(Active-High) Scan Chain
TE TE
MUX
System/Scan
Input System/Scan
Output
SI SO SI SO SI SO
Scan Chain
Scan Clocks
..................................................
The dual-clocked scan style uses two-phase clocks: master clock A (capture clock) and slave
clock B (update clock). Even if your design has multiple scan chains, all scan chains can share
the same scan clocks. You can use system input pins as the scan clock pins; in this case,
however, either a Scan Shift Enable or Scan Test Enable pin is required to control the scan
clocks so that they do not disturb the circuit behavior in normal operation mode. The shared
28
.....
Using the Internal-Scan Methodology
2.2 I/O Pin Requirements for Scan Methodologies
pin lowers possible fault coverage because it is constrained to the inactive state of the scan
clocks during scan capture mode. Thus, you should select, as a Scan Test Enable pin, an input
pin that is only connected with small logic. Figure 2–6 shows an example of using system input
pins as scan clocks.
ATPG can not generate test patterns with the system input set to 1. This
causes a drop in fault coverage.
Scan Chain 2
A B A B
In this scan implementation, the Scan Shift Enable signal drives all scan flip-flops. The Scan
Shift Enable signal requires no skew control, but to prevent drive-limit violations it is
necessary to create a buffer tree to drive the Scan Shift Enable signal. A buffer tree can be
created in two ways: 1) Use the clock tree synthesis (CTS) feature during physical layout; or 2)
re-run compile in DFT Compiler after insert_scan (or insert_dft).
However, if you want to generate AC test patterns such as a Path Test or a Transition Test with
ATPG, it is recommended to run CTS on the Scan Shift Enable signal for clock skew
management. This helps to achieve higher fault coverage with fewer patterns.
29
Using the Internal-Scan Methodology
2 2.2 I/O Pin Requirements for Scan Methodologies
Scan Flip-Flops
TE
In this scan implementation, the scan clock signals drive all scan flip-flops. Being two-phase
clocks, the scan clock signals require no rigid skew control, but to prevent drive-limit
violations it is necessary to create buffer trees to drive the scan clock signals. Buffer trees can
be created in two ways: 1) Use the clock tree synthesis (CTS) feature during physical layout; or
2) re-run compile in DFT Compiler after insert_scan (or insert_scan).
However, if you want to generate AC test patterns such as a Path Test or a Transition Test with
ATPG, it is recommended to run CTS on the scan clock signals for clock skew management.
This helps to achieve higher fault coverage with fewer patterns.
Scan Flip-Flops
A
B
Scan Clock A
Scan Clock B A
B
30
.....
Using the Internal-Scan Methodology
2.3 Scan Design Rules
To perform scan synthesis and scan test correctly, you must create your design in conformance
with the test design rules. Although the scan synthesis and ATPG tools do not require you to
eliminate all violations, many of them have a severe impact on fault coverage results.
You can use the integrated design rule checker of your DFT tool to check that your design
conforms to the design rules of your chosen scan style. The rule checker might be able to
correct minor violations automatically, but most violations are left unfixed. Therefore, you
should watch for and correct testability problems in your design earlier in the design process,
preferably at RTL, rather than later when it is difficult and time-consuming to get them right.
Flip-Flops
During early design exploration, pay close attention to the inferred flip-flops to determine that
they can be converted to scan. Specifically,
■ Add synthesis constraints so that sequential elements will be mapped only to
positive-edge-triggered D-type flip-flops. Avoid using JK flip-flops and toggle flip-flops.
■ Make set and reset signals directly controllable from I/O pins for testing.
■ Make clock signals directly controllable from I/O pins for testing.
Clock signals will be discussed in detail in the section "System Clocks" on page 33. Figure 2–9
shows a technique to control the reset input of a flip-flop from a primary input during testing to
prevent it from resetting asynchronously.
31
Using the Internal-Scan Methodology
2 2.3 Scan Design Rules
System
Reset Logic
Test Reset
Note: As an alternative to the design shown above, you can use the Scan Test
Enable signal to disable the Test Reset signal during scan testing. However,
this makes it impossible to test the reset pin of the flip-flop, causing a drop in
fault coverage.
Latches
Avoid using latches wherever possible because there are no scannable equivalents in the
Toshiba cell library. If your design has latches, they must not block the propagation of fault
effects so as not to affect fault coverage results. A recommended workaround is to either fix the
latch enables at a constant logic 1 or make them easily controllable to logic 1 during testing.
This way, all latches can be placed in transparent mode during testing. The ATPG tool can
optionally generate test patterns, considering the storage mode of latches; however, this greatly
lowers the ATPG efficiency, making it difficult to obtain expected results. Figure 2–10 shows a
design in which a latch enable is gated using a Scan Test Enable pin.
Enable Control
Remember that treating latches as transparent may cause more design rule violations than
leaving them non-transparent. This occurs because if a combinational path exists from the
output of a latch to the input of the same latch, placing the latch in transparent mode introduces
a combinational feedback loop into the design.
32
.....
Using the Internal-Scan Methodology
2.3 Scan Design Rules
Flip-flops and latches can be mixed in the same clock domain provided they use the opposite
edges of a clock, as shown in Figure 2–11.
Figure 2–11 Mixed Flip-Flops and Latches Using the Opposite Edges of the Clock
Combinational Logic
Combinational Logic
System Clock
System Clocks
..................................................
System Clock Controllability
All clock signals for flip-flops must be directly controllable from I/O pins for test purposes,
and all flip-flops driven by the same clock must be sensitive to the same edge of that clock.
Bypass violating clocks to I/O pins in order to allow control of the clocks.
In the case where flip-flops are driven by a clock divider as shown in Figure 2–12(a), it is
difficult or impossible to directly control the divided-down clocks for test. This design will
have uncontrollable scan flip-flops after scan replacement; thus you will not be able to
generate high-fault-coverage test patterns for it. To solve this problem, it is necessary to
directly control flip-flops using Scan Test Enable muxes or make all flip-flops operate with the
same clock during scan testing, bypassing the clock divider. When the divider is bypassed,
clock slew management is required (see the next section).
33
Using the Internal-Scan Methodology
2 2.3 Scan Design Rules
(a)
Clock
Divider
is
t Th Scan Flip-Flops
Clock
No
(b)
Test Clock 1
Test Clock 2
Clock
Divider
MUX
Scan Flip-Flops
MUX
Clock
For Scan Test Enable muxes, provide separate test clock pins to control each clock domain
independently. It is recommended to allocate dedicated pins to the test clocks because pulse
waveforms are applied to them.
Skew Control
ATPG uses zero-delay models and expects no timing violations to exist in the design. The
assumption is that all flip-flops in the same scan chain are clocked simultaneously. Therefore,
the presence of timing violations can cause ATPG to generate test patterns that do not perform
the scan operation correctly.
In order to guarantee that no timing violations occur, you need to provide skew control through
clock tree synthesis (CTS) or create your design in a manner that makes it insensitive to skew.
Usually, Toshiba is responsible for building a clock tree during physical layout. Before layout,
Toshiba predicts the impact of clock tree synthesis on the delay of the design, so you can assign
an estimate of the clock tree during timing verification.
34
.....
Using the Internal-Scan Methodology
2.3 Scan Design Rules
CTS gives no special consideration to skew between clock domains. A configuration such as
the one shown in Figure 2–13 might cause hold violations during testing.
CTS1
Clock
Divider
MUX
Clock skew can cause
MUX hold violations during
testing.
CTS2
Clock
There are two ways to prevent timing problems caused by the capture of data between clock
domains:
■ drive each domain from its own clock pin as shown in Figure 2–12(b), or
■ make the interface between clock domains insensitive to clock skew when you want to
use the same test clock for multiple clock domains.
If you elect to use the latter method, be sure to perform timing verification to identify any
timing violations that might exist during test.
Toshiba’s Gated CTS provides a way to control skew between gated clocks; so you do not need
to bypass gated clocks to external I/O pins for testing. If the enable input of the clock-gating
elements seldom goes active, you can force it to its active state during testing by using a Scan
Test Enable pin, as shown in Figure 2–14.
35
Using the Internal-Scan Methodology
2 2.3 Scan Design Rules
Enable Logic
Test Enable
(Held at 1 During Test)
Clock
CTS
A capture clock group is a set of clocks that can be safely clocked in the same cycle. By
default, ATPG activates only one system clock in any given cycle. This is to prevent unreliable
capture conditions from arising between scan flip-flops in different clock domains.
As described in the previous chapter, the internal states of the circuit are captured during scan
capture mode by exercising the system clock and then shifted out at a primary output for
observation during scan shift mode. That is, scan flip-flops controlled by inactive system
clocks retain their previous scanned-in state. Consequently, the default ATPG behavior leads to
a lengthy test pattern set for designs with multiple system clocks.
In cases where the relative timing of the capture clocks has no effect on the circuit behavior
during test, they can be assigned to the same capture clock group in order to minimize the
pattern count. Figure 2–15 shows a design with three clocks.
36
.....
Using the Internal-Scan Methodology
2.3 Scan Design Rules
Block A
Block B
CLK1
CLK3
■ By default, ATPG partitions the system clocks into three capture clock groups as follows:
In order to take advantage of the grouping of capture clocks, the ATPG user must have a solid
knowledge of the clocking scheme for the entire design. Therefore, use of capture clock groups
is discouraged unless your design has many clocks and the generated test pattern set has turned
out to be too lengthy. The default ATPG behavior (1 capture clock group = 1 clock) is always
the safest strategy.
37
Using the Internal-Scan Methodology
2 2.3 Scan Design Rules
Flip-Flops
Decoder
h is
T
A
B
Combinational
Logic
o t
N
Flip-Flops
Decoder
A
B
Combinational
Logic
38
.....
Using the Internal-Scan Methodology
2.3 Scan Design Rules
The design in Figure 2–17 controls the 3-state bus with a decoder that is connected to external
test input pins.
MUX
Enable
Logic
Test Enable
(Held at 1 During Test)
To ensure the highest possible fault coverage, ATPG must be able to create test patterns that
place each one of the drivers in the active state, either via external inputs or scan flip-flops.
Even if bus conflict does not occur, any one driver should not be the only active driver during
scan testing because drivers that are not enabled block the propagation of fault effects and
lower fault coverage. If the bus is not controllable, the propagation of fault effects may be
blocked at the bus, thereby lowering fault coverage.
Bidirectional Pins
..................................................
All bidirectional pins must be placed in input mode during scan shift operation so that the
output buffer will not be enabled and output a logical value which conflicts with the value from
a tester’s driver. Unless bidirectional pins are forced into input mode, bidirectional pin conflict
or float can occur because the circuit can be put into a random state during scan shift. Bus
conflicts that last only briefly typically does not damage the device, but long periods of bus
conflicts can destroy the device.
Use the Scan Shift Enable signal to hold bidirectional pins in input mode throughout the scan
shift process, as shown in Figure 2–18.
39
Using the Internal-Scan Methodology
2 2.3 Scan Design Rules
System Enable
Bidirectional Pin
Logic
40
.....
Using the Internal-Scan Methodology
2.4 Scan Chain Number and Balancing
General Considerations
..................................................
The following considerations apply to scan chain connections:
■ Consider scan routing from the perspective of the top level of the design.
■ Serialized scan-in and expected scan-out patterns constitute a large majority of ATPG
patterns. Therefore, testers are typically equipped with specialized memory for scan test.
Because the test time is proportional to the length of the longest scan chain, increasing the
number of scan chains reduces the test time for a design. However, the maximum number
of scan chains is restricted due to tester limitations. Using the maximum number of scan
chains supported minimizes the test time. Ask your Toshiba design center engineer for
the maximum number of scan chains supported by your prototype and production testers.
■ The number of bits (i.e., cycles) in the scan test pattern for a scan chain is equal to the
number of scan flip-flops in that scan chain. If the scan chains are different lengths, the
scan test patterns for the shorter scan chains are automatically padded to make all patterns
the same length. Therefore, the time required for the scan shift process is proportional to
the length of the longest scan chain. To reduce the time required for scan-shifting, it is
recommended that all scan chains be balanced.
■ Each scan chain must have a scan-in and a scan-out pin associated with it. You can use
functional input and output pins as scan-in and scan-out pins respectively.
Note that the number of scan chains implemented in the design is important here, not the
number of scan chains activated by a given test pattern file. Configuring 16 scan chains may
exceed the target tester limit even if at most eight of the 16 scan chains are exercised by a given
test pattern file. A workaround for this limit is to use a Scan Path Select pin to share the same
scan-in and scan-out pins between scan chains that are not accessed in parallel. For details on
the Scan Path Select pin, see the Design-for-Test Handbook.
41
Using the Internal-Scan Methodology
2 2.4 Scan Chain Number and Balancing
h is Q Q
TI
t T TI TI
Clock1
N o
Clock2
Although the design in Figure 2–20 uses only one clock pin, the scan flip-flops have different
branches of the clock. This scan chain might not also shift properly due to the effects of clock
skew.
TI
Q
h is TI
Q
TI
Q
Clock
t T
No
Divider
Clock
Test Enable
42
.....
Using the Internal-Scan Methodology
2.5 Fixing Testability Problems
Internal-scan significantly enhances the testability of your design. However, certain issues may
limit its effectiveness. Commonly encountered problems include signals fixed at a constant
logic value during testing, deeply buried logic states, and cells treated as black boxes during
ATPG such as RAMs. This section explains how you can resolve these testability problems.
ATPG can not generate test patterns to detect faults at nodes that are held at constant logic
values for testing, such as certain nodes in the test mode logic added to disable the circuitry
that causes design rule violations. Several downstream nodes may also be untestable because
fixed logic values block the propagation of their logic values. For example, in the design in
Figure 2–21, the circled signals are blocked when the Scan Test Enable input is active. You
must add observe test points if you need to restore their observability (see Figure 2–25 to
Figure 2–27).
MUX
Decoder
43
Using the Internal-Scan Methodology
2 2.5 Fixing Testability Problems
Nodes buried deep within a design are hard to control and observe. Buried states may defeat
the ATPG’s attempt to generate test patterns or lead to an increase in pattern count. You can
enhance the testability of deeply buried nodes by inserting control and observe test points. See
the section "Inserting Test Points" on page 45.
ATPG can not propagate fault effects through black box cells such as megacells and forces
their outputs to unknown (X) values; so ATPG can not detect faults on black box cells and cells
in their neighborhoods. Black box cells have an adverse effect on fault coverage. Figure 2–22
shows logic in the shadow of a black box. Black box cells require additional test logic to
resolve the shadow effects and increase overall testability.
Any signal between scan flip-flops Any signal between the black box
(primary inputs) and the black box and scan flip-flops that is affected
that pass only into the black box by the outputs of the black box
are unobservable. is uncontrollable.
Black Box
Module
Using the Scan Shift Enable Input Versus the Scan Test Enable Input
..................................................
Figure 2–23 shows a technique to make the untestable nodes in the design of Figure 2–21
testable. Use a Scan Shift Enable input so that the signals that were blocked by the Scan Test
Enable signal can propagate through the multiplexers.
44
.....
Using the Internal-Scan Methodology
2.5 Fixing Testability Problems
GND MUX
VDD MUX
This way, during scan capture mode (i.e., when the Scan Shift Enable input is at logic 0), the
TetraMAX ATPG tool can safety generate conflict- and float-free test patterns. During scan
shift mode (i.e., when the Scan Shift Enable input is at logic 1), the 3-state bus is safely fixed in
a known state, independent of the random state in which the circuit is placed during scan shift.
Test-Point
Control Input
Test Enable
(Held at 1 During Test)
Cancels the effect of the OR gate
during normal functional operation.
45
Using the Internal-Scan Methodology
2 2.5 Fixing Testability Problems
Megacells such as RAMs pose a problem to the logic in the shadow of the megacell. Figure
2–25 shows a technique to make a RAM input more observable by creating a direct path to a
test-point output pin. The test-point output pin can be shared with a functional output pin.
RAM RAM
If you want to insert several observe test points, you can use an EXOR gate to reduce the
number of required test-point output pins, as shown in Figure 2–26.
Functional Data
Select Control
Test Enable
(Held at 1 During Test)
46
.....
Using the Internal-Scan Methodology
2.5 Fixing Testability Problems
All the above examples used external I/O pins to provide controllability and observability.
When you are adding scan, you can exploit the scan chain to scan in and scan out the control
and observe data, as shown in Figure 2–28. This approach alleviates the need for additional I/O
pins.
Figure 2–28 Connecting the Control and Observe Test Points to a Scan Flip-Flop
Scan F/F
D Q
System Clock
Test Enable
(Held at 1 During Test)
Bypassing Megacells
..................................................
Megacells modeled as black boxes have a dramatic impact on ATPG fault coverage. To
improve testability, add bypass logic from the inputs of a megacell to the output of the same
megacell. If the megacell have more input pins than output pins, adding EXOR cells makes the
propagation of fault effects easier.
Megacell
Combinational Combinational
Logic Logic
Test Enable
(Held at 1 During Test)
Note: Make sure that bypassing a megacell does not create combinational
feedback loops.
47
Using the Internal-Scan Methodology
2 2.6 Determining Timing Parameters for Scan Test Patterns
Each scan style has unique scan test sequence cycles and timing. You must determine the
timing characteristics for testing prior to execution of ATPG. Because zero delay is assumed
during ATPG, the length of your tester cycle can be long, provided no hold violations occur.
However, long tester cycles lead to long test times; to minimize your test time, it is required
that the tester cycle be as short as possible, but it must be long enough for the circuit behavior
to be tolerant against timing variations in the real test environment. This section describes how
to determine your ATPG timing.
Note: ATPG is executed at the chip level. Therefore, you must consider your
test timing at the chip level.
Tcycle
Bidirectional Pins
Tstb
Output Strobe
Tdc
System/Scan Clock Pin
Twc
48
.....
Using the Internal-Scan Methodology
2.6 Determining Timing Parameters for Scan Test Patterns
Tcycle Tcycle
Functional Data Input Pins
Scan-in Input Pins
Bidirectional Pins
Tstb Tstb
Output Strobe
Tdc
System Clock Pin
Twc
Scan Clock A Pin Tdca
(Master Clock) Tdca
Scan Clock B Pin Tdcb
(Slave Clock) Twcb
Exercised in the master_observe procedure
(see "ATPG Test Cycles" on page 184).
49
Using the Internal-Scan Methodology
2 2.6 Determining Timing Parameters for Scan Test Patterns
Before you can determine the optimal timing parameters to be used for ATPG, you must know
the following timing characteristics:
■ Maximum path delays on I/O-to-register, register-to-register, register-to-I/O and
I/O-to-I/O paths
Calculation of maximum path delays require special test considerations different from
system verification. These include:
• Test condition: Whether to test the chip using the nominal operating condition alone or
in min-max mode.
• Output pin loads and input pin slew rates on the tester
• Effects of input pins fixed at constant logic values during testing
• PLL bypass mode
• Elimination of special handling for multi-cycle paths
50
.....
Using the Internal-Scan Methodology
2.6 Determining Timing Parameters for Scan Test Patterns
■ Tester restrictions, such as the minimum test cycle, the minimum pulse width, the
potential input/output skew on the tester itself, etc.
Ask your Toshiba design center engineer for specific tester guidelines for your design.
Maximum delay values for each of the path groups in scan capture mode are important in
determining scan test parameters. There are four types of timing paths:
■ Dif: Maximum delay on paths from external input pins to the data input pins of
flip-flips. Exclude external input pins that are fixed at a constant value during
testing. For clocks, only system clocks need to be considered.
■ Dff: Maximum delay on paths from the clock input pins of flip-flops to the data input
pins of flip-flops. For clocks, only system clocks need to be considered.
■ Dfo: Maximum delay on paths from the clock input pins of flip-flops to external output
pins
■ Dio: Maximum delay on paths from external input pins to external output pins. Exclude
external input pins that are fixed at a constant value during testing.
Dio
IN1 OUT1
IN2 OUT2
CLK
The dual-clocked scan technique uses dedicated pins for scan clocks. Timing paths involving
scan clocks must be analyzed separately.
51
Using the Internal-Scan Methodology
2 2.6 Determining Timing Parameters for Scan Test Patterns
As described earlier in Section 2.3, "Scan Design Rules," bidirectional pins must be held in
input mode so that the output buffer will not be enabled and output a logical value which
conflicts with the value from a tester’s driver. During this time, the tester forces all
bidirectional pins to a fixed value so that they will not interfere with the scan shift process.
However, bidirectional pins go into conflict very briefly due to the circuit delay while the
enable signals, activated by the Scan Shift Enable input, are switching. To prevent such
conflicts, the application of logic values at bidirectional pins must occur a little after the Scan
Shift Enable pin is activated.
0 -> 1
Scan Shift Enable
L/H -> Z
Bidirectional Pins
Dsb: Maximum delay from the time when the Scan
Shift Enable input pin is activated to the
the time when bidirectional pins are
are placed in input mode
• Minimum test cycle supported by your tester (Ask your Toshiba design center
engineer.)
• Sum of Dff and potential tester skew
• Sum of the maximum value among Dif, Dfo and Dio plus potential tester skew plus
10 ns
52
.....
Using the Internal-Scan Methodology
2.6 Determining Timing Parameters for Scan Test Patterns
■ Tbd
Set Tbd to the value equal to Dsb.
■ Tsb
Sum of Dio and potential tester skew
■ Tic
If Dif is larger than Dio, use the sum of Dif plus potential tester skew. If Dio is larger than
Dif, use the sum of Dio and potential tester skew.
■ Twc
Scan testing does not require the clock duty cycle to be set to 50%. Also, the system clock
pulse width can be different between normal operation mode and test mode. Taking the
minimum supported tester cycle, input slew rates and the results of clock tree synthesis
into consideration, the system clock pulse width can be approximately 10 ns (or 5 ns for
>100 MHz testers).
The following example demonstrates how to determine the test timing for a hypothetical
design:
■ Target tester: 40 MHz (Tscycle = 25 ns), Potential skew (Tskew) = 5 ns
■ Maximum input pin to flip-flop delay (Dif) = 12 ns
■ Maximum flip-flop to flip-flop delay (Dff) = 20 ns
■ Maximum input pin to output pin delay (Dio) = 20 ns
■ Average Scan Shift Enable to bidirectional enable delay (Dsb) = 5 ns
53
Using the Internal-Scan Methodology
2 2.6 Determining Timing Parameters for Scan Test Patterns
54
Chapter 3 Using JTAG Boundary-Scan
Methodology
.....................................
.....
T his chapter describes a set of recommendations for inserting JTAG logic into your design.
This chapter focuses on the topics related to insertion of boundary-scan DesignWare cells
by using BSD Compiler. The material is organized into the following sections:
☞ Implementing Instructions
☞ JTAG Boundary-Scan Data
☞ I/O Pin and Buffer Considerations
55
Using JTAG Boundary-Scan Methodology
3 3.1 Implementing Instructions
BYPASS Selects the 1-bit bypass register to be connected between TDI All 1’s (1111....)
and TDO to bypass the IC’s boundary-scan chain.
SAMPLE/PRELOAD In Sample mode, samples data traffic flowing through the input Arbitrary
and output pads of an IC. In Preload mode, initializes the
boundary-scan register with test values.
EXTEST Allows circuitry external to an IC to be tested. All 0’s (0000....)
Instruction Function
INTEST Tests the IC’s core logic using the boundary-scan register.
RUNBIST Selects a user-defined BIST register that invokes device self-test functions.
CLAMP Allows the IC’s pins to be held in a safe state.
IDCODE Selects the IEEE Std 1149.1-defined device identification register to be connected
between TDI and TDO.
USERCODE Selects a user-defined device identification register to be connected between TDI
and TDO.
HIGHZ Forces all system output pins into the high-impedance state.
† The binary codes for the optional instructions are not defined by IEEE Std 1149.1. They can be arbitrarily defined.
First of all, you must decide what kinds of test functions you will need. When using BSD
Compiler, you need to specify JTAG instructions before you can synthesize a boundary-scan
design.
When you use your own TAP controller, BSD Compiler allows you to implement the
mandatory and optional set of IEEE Std 1149.1 instructions as well as user-defined
instructions. When you use the DesignWare foundation library TAP controller, only INTEST,
IDCODE, RUNBIST, CLAMP and HIGHZ are available as optional instructions.
56
.....
Using JTAG Boundary-Scan Methodology
3.1 Implementing Instructions
57
Using JTAG Boundary-Scan Methodology
3 3.2 JTAG Boundary-Scan Data
Once you have added JTAG logic to your design, you must generate the following:
■ JTAG test patterns
Because JTAG circuitry is a test logic that can operate independently from system logic,
system functional patterns can hardly verify the functionality of the JTAG logic. You can
use BSD Compiler to generate test patterns for your JTAG logic. (Refer to Chapter 11.)
■ BSDL file
• the operations of JTAG and other test logic accessed in response to JTAG instructions
• a complete list and description of JTAG and other test control signals
IEEE Std 1149.1 includes documentation requirements for any component claiming
conformance to the standard.
58
.....
Using JTAG Boundary-Scan Methodology
3.3 I/O Pin and Buffer Considerations
This section describes a set of rules and recommendations for I/O pins to be followed when
using BSD Compiler to insert JTAG boundary-scan.
The INTEST instruction shifts each test pattern through the boundary-scan register (BSR).
Since each BSR cell is inserted between the Z output of an input buffer and the core logic, the
JTAG test logic has no control over its PO output. When you want to implement the INTEST
instruction, you can not use the PO output of an input buffer (or the input portion of a
bidirectional buffer) for a system input signal.
Use 3-state output buffers for system output pins when implementing the HIGHZ
instruction.
When the HIGHZ instruction is selected, all system logic outputs (including 2-state and 3-state
output pins and bidirectional pins) of the component must immediately be placed in an
inactive-drive state (high-impedance state), as required by IEEE Std 1149.1. Because this rule
applies to all system outputs, 3-state output buffers must be used even when system
requirements are 2-state outputs.
59
Using JTAG Boundary-Scan Methodology
3 3.3 I/O Pin and Buffer Considerations
IEEE Std 1149.1 specifies that only one control BSR cell can be connected to an I/O pin. Even
if both the EN and TN pins of an I/O buffer is used, a BSR cell can only be inserted to either
one of them. Therefore, 3-state output and bidirectional buffers should be controlled through
either the EN or TN pin. The EN pin is preferred by Toshiba. Also, a signal connected to the
EN pin of an I/O buffer must not be connected to the TN pin of another I/O buffer.
You may want to use the TN pin only for test purposes such as controlling the direction of
bidirectional pins during internal-scan shift or forming a NAND tree. In such cases, the TN pin
must be held at logic 1 during JTAG boundary-scan test.
The following illustrations show the recommendations for the EN and TN pin connections.
EN
h is EN
t T System System
No
Logic Logic
TN TN
Don’t connect the same signal to the EN and TN pins of different I/O buffers. (Delete the
TN signal connection and route it to the EN pin through an inverter.)
i s
Th
EN
EN
ot TN
System
Logic
TN System
Logic
N EN
TN
EN
TN
60
.....
Using JTAG Boundary-Scan Methodology
3.3 I/O Pin and Buffer Considerations
If you want to use the TN pin for non-JTAG test purposes such as for a NAND tree test
enable or an internal-scan shift enable, the non-JTAG test logic must be disabled
during JTAG boundary-scan test. (Use a JTAG-enable pin.)
† In this manual, the term "JTAG-enable pin" is used synonymously with "compliance-enable pin" defined in Section
4.8 of the IEEE Std 1149.1 document.
JTAG-Enable Input
or the EXTC Output from the JTAG Controller
EN
System
TN Logic
If a NAND tree test enable pin or an internal-scan shift enable pin is directly connected to
3-state enable input of a bidirectional buffer, that pin must be held at logic 1 during JTAG
boundary-scan test. This means a BSR cell can not be inserted to that pin. Figure 3–3 shows a
workaround to this problem where the TN input can be held at logic 1, regardless of the input
to the non-JTAG enable pin.
61
Using JTAG Boundary-Scan Methodology
3 3.3 I/O Pin and Buffer Considerations
The TAP connections must comply with IEEE Std 1149.1. The subsections that follow
describe the considerations for the following:
■ Pin-sharing
■ TRST*
■ Addition of BSR cells
Pin-Sharing
Four input pins and one output pin must be allocated for external JTAG interface. IEEE Std
1149.1 states that the TRST* input is optional, but it is required in most cases (see the next
section).
If you do not have extra pins left for the TAP pins, IEEE Std 1149.1 permits them to be shared
with other signals. The rules for pin-sharing are:
■ So that the shared pins can be used as JTAG test pins, one or more dedicated
"JTAG-enable input pins" must be allocated. Compliance with IEEE Std 1149.1 must be
enabled/disabled by one or more steady-state logic patterns (called "compliance-enable or
JTAG-enable patterns") applied at the JTAG-enable pins. (3.8)
Note: In this manual, the term "JTAG-enable pin" is used synonymously with
"compliance-enable pin" defined in the IEEE Std 1149.1 document.
■ After the application of JTAG-enable patterns, the TRST* input must be asserted (low) to
reset the JTAG logic. (5.3)
■ BSR cells must not be provided at JTAG-enable pins. (10.4)
Figure 3–4 Sharing JTAG Test Pins with Other Test Pins
JTAG-Enable Input
JTAG Logic
TDO /
TMS / Other Test Input TMS TDO Other Test Output
Non-JTAG
Test Logic
62
.....
Using JTAG Boundary-Scan Methodology
3.3 I/O Pin and Buffer Considerations
Note that JTAG-enable pins require board-level connections to switch on or off compliance
with IEEE Std 1149.1.
TRST* Input
A reset signal is required to initialize the JTAG logic to the reset state. IEEE Std 1149.1
specifies that the JTAG logic be forced into the reset state at power-up. The initialization must
be accomplished by use of a reset signal applied externally or as a result of circuitry built into
the test logic. However, the Toshiba ASIC cell library does not allow you to build circuitry that
dictates the auto-power-up behavior. Thus, a reset signal needs to be provided from the external
world.
A general method is to use the TRST* pin at the IC interface and connect it to the on-board
power-on-reset. Consequently, although IEEE Std 1149.1 states that the TRST* input is
optional, it is required in most cases for Toshiba ASICs. An exception is when your test logic
has a power-on-reset, in which case a reset pin may be shared with other signal; however, this
does not fully comply with the IEEE Std 1149.1 requirements.
IEEE Std 1149.1 requires that an input buffer with a pull-up resistor be used for the TRST*
pin, but in actuality, there are ICs using a pull-down resistor at TRST* (violating the rule) so
that undriven input causes the JTAG logic to be forced into the reset state. If such ICs are
mixed with ICs that comply with the IEEE Std 1149.1 rule, the board’s JTAG logic might not
work properly. Therefore, you should consult with your system designer before selecting an
input buffer to be used at TRST*.
You do not have a choice to determine at which pins to add BSR cells and at which pins not to
add them. As per IEEE Std 1149.1, you must add a BSR cell to all pins, with the exception of
the following pins.
■ JTAG test pins (TAP)
■ JTAG-enable pins
■ Non-digital pins (analog and power/ground pins)
63
Using JTAG Boundary-Scan Methodology
3 3.3 I/O Pin and Buffer Considerations
64
Chapter 4 DFT Considerations
.....................................
.....
T his chapter describes things you should know during the design specification stage. The
material is organized into the following sections.
Note: This manual assumes that you use TSTL2 to write test patterns. If you
want to use the Standard Tester Interface Language (STIL), contact your
Toshiba design center engineer.
65
DFT Considerations
4 4.1 Selecting DFT Methodologies
The major purpose of the JTAG boundary-scan is to automate the process of board-level
testing. To implement JTAG boundary-scan, you must have extra I/O pins that can be
allocated for the TAP and possibly JTAG-enable pins.
■ Memory BIST
Memory BIST involves adding test circuitry for generating memory test patterns on-chip
and verifying the memory response on-chip.
66
.....
DFT Considerations
4.1 Selecting DFT Methodologies
Area Impact
The conversion from a non-scan to a scan design adds a few gates for each scan flip-flop. The
JTAG boundary-scan and memory BIST require hundreds to thousands of gates. During the
sizing of your design, any area overhead due to DFT logic should be taken into account.
Table 4–1 shows the additional I/O pins used by the internal-scan methodology.
Table 4–1 I/O Pin Requirements for Internal-Scan
67
DFT Considerations
4 4.1 Selecting DFT Methodologies
Table 4–2 shows the additional I/O pins used by the JTAG boundary-scan methodology.
Test Mode Select (TMS) Input Controls the transitions of the TAP controller.
Test Clock (TCK) Input Test clock input to synchronize the JTAG logic
Test Reset (TRST*) Input TAP controller asynchronous reset
Test Data In (TDI) Input Test data input pin
Test Data Out (TDO) Output Test data output pin
JTAG Enable Input Enables JTAG logic functionality. Optional.
Table 4–3 shows the additional I/O pins used by memory BIST.
Practically, most designs do not have extra package pins that can be allocated to all of the test
signals. Typically, system functional pins are shared with most of the test signals by using one
or more Scan Test Enable pins. As a rule of thumb, consider pin-sharing in the following order:
It is not recommended to use system functional pins as JTAG test pins since they require
board-test considerations.
An alternative practice is to share common I/O pins between scan and JTAG test pins. In this
case, internal-scan circuitry must be permanently disabled once the chip is mounted on a pc
board. Thus scan test is only possible during chip test.
68
.....
DFT Considerations
4.1 Selecting DFT Methodologies
Decoder
Test Mode 1
Test Mode 2
System Logic
Clock
Data Out 1
Data In 1 MUX
Scan Chain 1
Data In 2
Scan Chain 2
Data Out 2
Data In 3 MUX
Memory BIST Logic
Circuit
Test Mode 1 Test Mode 2 Clock Data In 1 Data In 2 Data In 3 Data Out 1 Data Out 2
State
Highly complex designs may require hundreds or thousands of scan test patterns to achieve
high fault coverage. During testing, each scan test pattern is serially shifted into the scan chain
bit by bit. The bit length of scan test patterns equal the number of flip-flops in the scan chain.
Below is a list of techniques to reduce the time required for the scan shift sequence:
69
DFT Considerations
4 4.1 Selecting DFT Methodologies
■ Partition the scan chain into as many scan chains as your tester permits and have them
loaded in parallel. Also make the lengths of scan chains balanced. See 2.4, "Scan Chain
Number and Balancing," on page 41.
■ Make the length of the test cycle as short as possible. See 2.6, "Determining Timing
Parameters for Scan Test Patterns," on page 48.
■ For multiple-system-clock designs, if a set of clocks can be safely clocked in the same
cycle, assign them to the same capture clock group during ATPG. See the section
"Multiple Capture Clock Groups" on page 36.
70
.....
DFT Considerations
4.2 Design Environment
Sign-Off Systems
..................................................
Below is a list of the sign-off tools offered by Toshiba. Sign-off tools contain cell libraries and
application programs such as a delay calculator and a simulation results analyzer.
■ VSO
VSO is for Verilog-XL and NC-Verilog from Cadence and VCS from Synopsys. VSO
supports HDL designs written in Verilog-HDL and is based on gate-level dynamic
simulation.
■ VITALSO
VOYSO is for Voyager from IKOS. VOYSO supports HDL designs written in VHDL
and is based on gate-level dynamic simulation.
■ GEMINISO
GEMINISO is for Gemini from IKOS. GEMINISO supports HDL designs written in
Verilog-HDL and is based on gate-level dynamic simulation.
■ PrimeTime Sign-Off (PTSO) System
PTSO supports a static timing sign-off flow. The design needs to be mainly synchronous.
Designers are responsible for any supplemental functional verification using a dynamic
simulator.
71
DFT Considerations
4 4.2 Design Environment
DFT Compiler can be used as an extension of Design Compiler. You can use the standard
DC library with DFT Compiler for test synthesis. DC libraries for Toshiba’s ASICs are
available from Toshiba.
■ TetraMAX Design Kit
The TetraMAX Design Kit contains both cell libraries and interface programs. By using
it in conjunction with the Synopsys TetraMAX, you can generate scan test patterns for
Toshiba ASIC designs and interface to the sign-off system.
■ BSD Compiler Library
BSD Compiler can be used as an extension of Design Compiler. You can use the standard
DC library with BSD Compiler for JTAG insertion and verification. DC libraries for
Toshiba’s ASICs are available from Toshiba.
■ BSD Compiler Design Kit
The BSD Compiler Design Kit contains a utility program used for JTAG insertion. Using
it in conjunction with BSD Compiler facilitates JTAG insertion.
72
.....
DFT Considerations
4.2 Design Environment
■ TetraMAX
TetraMAX provides an ATPG solution optimized for the full-scan methodology that is
integrated with DFT Compiler.
■ BSD Compiler
BSD Compiler allows you to perform JTAG insertion and verification within the Design
Compiler synthesis environment.
73
DFT Considerations
4 4.3 Design-for-Test Flows
This section shows how scan methodologies fit into the general design flow.
Figure 4–2 Typical Design Flow for Internal-Scan Design Using DFT Compiler and TetraMAX
Design (RTL/Gate/db)
Gate-Level Netlist
3. TetraMAX
(ATPG)
4. Sign-off Verification
1. Use DFT Compiler to automate scan insertion as part of your synthesis flow.
2. Perform design rule checking during synthesis or prior to test pattern generation to check
adherence to scan design rules.
3. Use TetraMAX to generate manufacturing test patterns and save them in the Toshiba
TSTL2 format.
4. Verify the generated netlist and test pattern files for sign-off.
If your design can not adhere to the scan design rules or appears to have a lot of shadow
elements, it is recommended to perform a trial ATPG run before finalizing your netlist or
tuning the timing. Use a sample of faults to quickly assess the likelihood of attaining your fault
coverage goal and to check the correctness of any hand-crafted portions of scan logic.
74
.....
DFT Considerations
4.3 Design-for-Test Flows
Figure 4–3 Typical Design Flow for Internal-Scan and JTAG Boundary-Scan Insertion
1. BSD Compiler
(Synthesis / JTAG Insertion & Verification)
2. DFT Compiler
(Synthesis / Scan Insertion)
4. TetraMAX
(ATPG)
5. Sign-off Verification
1. Use BSD Compiler to insert JTAG boundary-scan logic to the top level of your design
hierarchy and check the compliance of your design against IEEE Std 1149.1. Then
generate JTAG test pattern and BSDL files. For JTAG insertion, lower modules that
comprise system logic can be black boxes with only port declarations.
2. Use DFT Compiler to automate scan insertion as part of your synthesis flow. At this time,
you can optionally insert internal-scan logic to the JTAG logic. So that internal-scan can be
inserted to the JTAG logic, the following two must be satisfied:
75
DFT Considerations
4 4.3 Design-for-Test Flows
• An inverted TCK signal must be supplied to the update register portions of the
boundary-scan register (BSR) cells.
You can use check_bsd to check if your JTAG logic meets the above requirements.
3. Run the BSD Compiler check_bsd command to check the compliance of your design
against IEEE Std 1149.1. You must re-run check_bsd if you alter your JTAG logic during
internal-scan insertion or any subsequent design phases.
5. Verify the generated netlist and test pattern files for sign-off.
For starters, Figure 4–4 shows a typical design flow for adding memory BIST logic alone using
MemoryBIST.
76
.....
DFT Considerations
4.3 Design-for-Test Flows
Design
BISTGROUP File
(RTL/Gate/db)
1. bist_lib_gen
(BIST Generation)
2. bist_insert
(BIST Insertion / Test Pattern Generation)
Gate-Level
TSTL2 Test Data
BISTed Netlist
1. Divide RAMs and ROMs into groups and run bist_lib_gen to generate synthesizable RTL
models for the BIST logic.
2. After synthesis, run bist_insert to add the gate-level BIST logic to your design.
When your design is scanned, you can also convert the BIST logic to scan to enhance the
overall fault coverage. bist_insert replaces RAMs and ROMs with BISTed modules with mux
collars, which incurs some delay overhead; you should budget an increase of the delay during
synthesis.
Figure 4–5 shows a typical design flow for adding BIST and scan logic using MemoryBIST
with DFT Compiler and TetraMAX.
77
DFT Considerations
4 4.3 Design-for-Test Flows
Figure 4–5 Typical Design Flow Using MemoryBIST with DFT Compiler and TetraMAX
Design
BISTGROUP File
(RTL/Gate/db)
3. DFT Compiler
DC script RTL BIST Logic (Synthesis / Scan Insertion)
3. DFT Compiler
(Synthesis / Scan Insertion)
Gate-Level Gate-Level
Scanned BIST Logic Scanned Netlist
4. bist_insert
(BIST Insertion / Test Pattern Generation)
Gate-Level
SPF
Scanned/BISTed Netlist
6. TetraMAX
(Test Pattern Generation)
ATPG Patterns
(TSTL2)
7. Sign-off Verification
1. Divide RAMs and ROMs into groups and run bist_lib_gen to generate synthesizable RTL
models for the BIST logic.
2. The DC script file from bist_lib_gen contains no dc_shell commands for scan synthesis.
Add scan synthesis commands to it.
78
.....
DFT Considerations
4.3 Design-for-Test Flows
3. Use DFT Compiler to synthesize both BIST and system logic directly to scanned gates.
Scan routing can be done either at this stage or later at Step 6.
4. Use bist_insert to insert the gate-level BIST logic to your netlist and generate BIST test
patterns.
5. If you performed scan routing at Step 3, either edit the netlist manually or use DFT
Compiler to connect the scan chain in the BIST logic to system functional modules. If you
did not perform scan routing at Step 3, use DFT Compiler to route scan chains through
both the BIST and system functional modules.
7. Verify the generated netlist, and BIST and ATPG test pattern files for sign-off.
79
DFT Considerations
4 4.3 Design-for-Test Flows
80
CMOS ASIC Design Manual
Part 2
Using the Synopsys DFT Tools
81
Synopsys-DFT User Guide
82
Chapter 5 Setting Up the Design
Environment
.....................................
.....
T his chapter describes how to set up the design environment for scan design using the
Synopsys DFT tools. The material is organized into the following sections:
83
Setting Up the Design Environment
5 5.1 Synopsys DFT Tools and Toshiba Design Kits
To use Synopsys’ DFT Compiler in the Toshiba ASIC design environment, you must have the
following software installed on your workstation:
■ Synopsys Design Compiler
Scan synthesis capability is available with the optional DFT Compiler license. If you
have Design Compiler installed on your workstation, no extra software installation is
required. You just need to obtain a license for DFT Compiler.
■ Toshiba Design Compiler library
BSD Compiler
To use Synopsys’ BSD Compiler in the Toshiba ASIC design environment, you must have the
following software installed on your workstation:
■ Synopsys Design Compiler
The BSD Compiler license is available as an extension to Design Compiler. If you have
Design Compiler installed on your workstation, no extra software installation is required.
You just need to obtain a license for BSD Compiler.
■ Toshiba Design Compiler library
■ Toshiba BSD Compiler design kit
TetraMAX
To use Synopsys’ TetraMAX in the Toshiba ASIC design environment, you must have the
following software installed on your workstation:
■ Synopsys TetraMAX
■ Toshiba TetraMAX design kit
84
.....
Setting Up the Design Environment
5.1 Synopsys DFT Tools and Toshiba Design Kits
Note: You must validate test patterns generated by TetraMAX for design
sign-off. Therefore, a Toshiba sign-off tool is required.
85
Setting Up the Design Environment
5 5.2 Installing and Setting Up Toshiba’s Design Kits and Libraries
Directory Structure
..................................................
All the Toshiba tools and libraries, including a sign-off system, are installed in a directory
pointed to by the environmental variable $TOSH_ROOT. Figure 5–1 exemplifies the directory
structure beneath $TOSH_ROOT.
$TOSH_ROOT
toshiba_common
lib
tmax
verilog
dft
bin_Solaris
bin_Linux32
bin_HP
etc
message
tmax
bin_Solaris
bin_Linux32
bin_HP
demo
doc
lib
rule
bsdc
bin_Solaris
bin_Linux32
bin_HP
demo
doc
rule
86
.....
Setting Up the Design Environment
5.2 Installing and Setting Up Toshiba’s Design Kits and Libraries
Installation
..................................................
To install a design kit or a library, decompress the delivered file in the $TOSH_ROOT directory.
For a description of the installation procedure, refer to the release notes that accompany your
design kit or library release.
For the C shell, for example, you can use the following commands:
setenv TOSH_ROOT install_dir
set path = ( $TOSH_ROOT/dft/bin_<platform> /usr/openwin/bin $path )
To use the Design Compiler library, set these variables in a DC script file, or set them in the
.synopsys_dc.setup file. Replace the technology name in the following commands with
an appropriate name.
tsb_lib_path = { "install_dir", "install_dir/tc240c" }
search_path = search_path + tsb_lib_path
87
Setting Up the Design Environment
5 5.2 Installing and Setting Up Toshiba’s Design Kits and Libraries
symbol_library = { tc240c.workview.sdb }
BSD Compiler
BSD Compiler utilizes the DesignWare libraries. Add the following lines to the DC setup file.
The version of BSD Compiler must match that of the DesignWare libraries.
synthetic_library = { standard.sldb dw01.sldb dw02.sldb dw03.sldb \
dw04.sldb dw06.sldb }
TetraMAX Library
To read a TetraMAX library, use the read netlist command as shown below. You can use
the $TOSH_ROOT variable in specifying the pathname.
BUILD> read netlist -library \
$TOSH_ROOT/lib/tmax/TC240CT/TC240CT.tmaxlib
88
Chapter 6 Scan Synthesis Methodology
Using DFT Compiler
.....................................
.....
T his chapter describes the scan synthesis methodology using DFT Compiler. The material
is organized into the following sections:
89
Scan Synthesis Methodology Using DFT Compiler
6 6.1 Overview of Test-Ready Compile
Read in a design.
(read, analyze, link, etc.)
Scan synthesis has two stages: scan replacement and scan assembly. The compile -scan
command performs scan replacement during the initial mapping of a design to gates. After
scan replacement, the insert_scan (or insert_dft) command is used to assemble scan
chains. Figure 6–2 illustrates the functionality of these commands.
90
.....
Scan Synthesis Methodology Using DFT Compiler
6.1 Overview of Test-Ready Compile
RTL Design
Test-ready compile maps all sequential cells directly to
scan flip-flops. Scan flip-flops are not scan-chained
Set synthesis constraints together; a loop is connected from the scan-out pin of a
and scan style. flip-flop to the scan-in pin of the same flip-flop. All scan
control pins are tied to ground.
SI SO SI SO
Gate-Level Design
Gate-Level SI SO SI SO
Scanned Design
Scan-in Scan-out
You can perform scan replacement block by block, then execute the insert_scan (or
insert_dft) command at the top level of the design.
Alternatively, you can run compile without the -scan option, in which case all sequential
cells are mapped to non-scan cells. When you run insert_scan (or insert_dft) on the
mapped design, both scan replacement and scan assembly occur simultaneously. For a detailed
description, see 6.5, "Considerations for Scan Synthesis Using DFT Compiler," on page 110.
Using the design flow shown in Figure 6–3, you can run compile -scan on each of the
modules, then build scan chains at the top level.
91
Scan Synthesis Methodology Using DFT Compiler
6 6.1 Overview of Test-Ready Compile
Gate-level Gate-level
Top Level
insert_scan
92
.....
Scan Synthesis Methodology Using DFT Compiler
6.1 Overview of Test-Ready Compile
You may prefer to develop your design on a module-by-module basis. Using the design flow
shown in Figure 6–4, you can implement a complete scan architecture in each module as it is
developed. When you want to use this flow, you must include scan ports in each prescan
module.
Gate-level Gate-level
Top Level
93
Scan Synthesis Methodology Using DFT Compiler
6 6.1 Overview of Test-Ready Compile
In the example shown in Figure 6–4, the chip-level scan architecture is completed when you
have the two submodules. You don’t need to pre-define scan ports and scan connections in the
top level; you can use insert_scan to build the scan chains in the top level.
Load the RTL code of your design and run compile -scan to synthesize a gate-level
design. Then run check_test on the gate-level design to check for scan design rule
violations. At this phase, check_test determines whether the flip-flops in your design
can be replaced by their scan equivalents, whether your design has no combinational
feedback loops, and so on. Fix design rule violations in one of the following ways:
Run check_test to check the scan-chain connections and the corrections made by the
AutoFix feature of insert_dft.
Run check_test at the chip level. You can also check for scan design rule violations in a
TetraMAX session.
94
.....
Scan Synthesis Methodology Using DFT Compiler
6.2 Naming Rules for Ports, Cells and Nets
When you use Toshiba’s sign-off system, you must observe the naming rules imposed by it, in
addition to the conventions of the HDL language (Verilog-HDL or VHDL) being used. For the
naming rules of your sign-off system, refer to the VSO/VITALSO x.xx User Guide.
When you adopt DFT methodologies, you also need to follow these guidelines:
■ When you use internal-scan design, don’t use the slash character (/) in instance names.
■ When you use JTAG boundary-scan, don’t use the reserved words of VHDL and BSDL.
You can use the change_names command to change the names of ports, cells and nets to
conform to the specified rules. Figure 6–5 shows an example of a change_names script you
can use for Verilog-HDL designs.
/*
** VSO Naming Rules for Ports, Cells and Nets
*/
define_name_rules toshiba \
-max_length 50 \
-restricted ".*" \
-first_restricted "|!\"#$%&'()=\\-^~{}`@:[]/?<>," \
-map {{"_TSB","_TB"},{"_Tsb","_Tb"},{"_TSb","_Tb"},{"_tsb","_tb"}, \
{"_tsB","_tB"},{"_tSB","_tB"}} \
-reserved_words {always, and, assign, begin, buf, bufif0, bufif1, case, \
casex, casez, cmos, deassign, default, defparam, disable, \
edge, else, end, endattribute, endcase, endfunction, \
endmodule, endprimitive, endspecify, endtable, endtask, \
event, for, force, forever, fork, function, highz0, highz1, \
if, initial, inout, input, integer, join, large, \
macromodule, medium, module, nand, negedge, nmos, nor, not, \
notif0, notif1, or, output, parameter, pmos, posedge, \
primitive, pull0, pull1, pullup, pulldown, reg, rcmos, reg, \
release, repeat, rnmos, rpmos, rtran, rtranif0, rtranif1, \
scalared, small, specify, specparam, strength, strong0, \
strong1, supply0, supply1, table, task, time, tran, \
tranif0, tranif1, tri, tri0, tri1, trinand, trior, trireg, \
use, vectored, wait, wand, weak0, weak1, while, wire, wor, \
xor, xnor}
/*
** VSO Naming Rules for Ports
*/
define_name_rules toshiba_ports \
-max_length 35 \
-type port \
-allowed "A-Z a-z 0-9 _ [ ] " \
-first_restricted "0-9 _ [ ] " \
-map {{"^VDD","XVDD"},{"^VDd","XVDd"},{"^Vdd","XVdd"},{"^vdd","xvdd"}, \
95
Scan Synthesis Methodology Using DFT Compiler
6 6.2 Naming Rules for Ports, Cells and Nets
{"^vdD","xvdD"},{"^vDD","xvDD"},{"^VSS","XVSS"},{"^VSs","XVSs"}, \
{"^Vss","XVss"},{"^vss","xvss"},{"^vsS","xvsS"},{"^vSS","xvSS"}, \
{"_TSB","_TB"}, {"_Tsb","_Tb"}, {"_TSb","_Tb"}, {"_tsb","_tb"}, \
{"_tsB","_tB"},{"_tSB","_tB"}} \
-reserved_words {always, and, assign, begin, buf, bufif0, bufif1, case, \
casex, casez, cmos, deassign, default, defparam, disable, \
edge, else, end, endattribute, endcase, endfunction, \
endmodule, endprimitive, endspecify, endtable, endtask, \
event, for, force, forever, fork, function, highz0, highz1, \
if, initial, inout, input, integer, join, large, \
macromodule, medium, module, nand, negedge, nmos, nor, not, \
notif0, notif1, or, output, parameter, pmos, posedge, \
primitive, pull0, pull1, pullup, pulldown, reg, rcmos, reg, \
release, repeat, rnmos, rpmos, rtran, rtranif0, rtranif1, \
scalared, small, specify, specparam, strength, strong0, \
strong1, supply0, supply1, table, task, time, tran, \
tranif0, tranif1, tri, tri0, tri1, trinand, trior, trireg, \
use, vectored, wait, wand, weak0, weak1, while, wire, wor, \
xor, xnor, NC, Nc, nC, nc}
/*
** Naming rules for Toshiba’s scan methodology
*/
define_name_rules toshiba_scan -restricted "/"
/*
** JTAG Naming Rules: VHDL reserved words can not be used as package pin names.
*/
define_name_rules jtag_vhdl \
-type port \
-allowed "A-Z a-z 0-9 _ [ ] " \
-reserved_words {abs, access, after, alias, all, and, architecture, array, \
assert, attribute, begin, block, body, buffer, bus, case, \
component, configuration, constant, disconnect, downto, \
else, elsif, end, entity, exit, file, for, function, \
generate, generic, guarded, if, in, inout, is, label, \
library, linkage, loop, map, mod, nand, new, next, nor, \
not, null, of, on, open, or, others, out, package, port, \
procedure, process, range, record, register, rem, report, \
return, select, severity, signal, subtype, then, to, \
transport, type, units, until, use, variable, wait, when, \
while, with, xor} \
-case_insensitive
/*
** JTAG Naming Rules: BSDL reserved words can not be used as package pin names.
*/
define_name_rules jtag_bsdl \
-type port \
-allowed "A-Z a-z 0-9 _ [ ] " \
-reserved_words {at_pins, bc_0, bc_1, bc_2, bc_3, bc_4, bc_5, bc_6, bc_7, bc_8, bc_9, \
bc_10, bc_11, bc_12, bc_13, bc_14, bc_15, bc_16, bc_17, bc_18, bc_19, \
bc_20, bc_21, bc_22, bc_23, bc_24, bc_25, bc_26, bc_27, bc_28, bc_29, \
bc_30, bc_31, bc_32, bc_33, bc_34, bc_35, bc_36, bc_37, bc_38, bc_39, \
bc_40, bc_41, bc_42, bc_43, bc_44, bc_45, bc_46, bc_47, bc_48, bc_49, \
bc_50, bc_51, bc_52, bc_53, bc_54, bc_55, bc_56, bc_57, bc_58, bc_59, \
bc_60, bc_61, bc_62, bc_63, bc_64, bc_65, bc_66, bc_67, bc_68, bc_69, \
bc_70, bc_71, bc_72, bc_73, bc_74, bc_75, bc_76, bc_77, bc_78, bc_79, \
bc_80, bc_81, bc_82, bc_83, bc_84, bc_85, bc_86, bc_87, bc_88, bc_89, \
bc_90, bc_91, bc_92, bc_93, bc_94, bc_95, bc_96, bc_97, bc_98, bc_99, \
96
.....
Scan Synthesis Methodology Using DFT Compiler
6.2 Naming Rules for Ports, Cells and Nets
/*
** Change names in a design with JTAG boundary-scan.
*/
change_names -rules jtag_vhdl
change_names -rules jtag_bsdl
97
Scan Synthesis Methodology Using DFT Compiler
6 6.3 Sample DC Script for Scan Synthesis
Figure 6–6 shows an example of a DC script that includes commands that are specifically used
for scan synthesis. Each command is explained in the next section.
/*
** FILE NAME : syn_muxscan.scr
** SCAN TYPE : Mux-scan
** This script compiles the design and performs scan synthesis.
*/
/*
** Read and link the design.
*/
read -f verilog {CKTCORE.v CKTTOP.v_prescan}
current_design CKTTOP
link
/*
** Create a clock and set delay constraints on I/O ports.
*/
create_clock -name CLK -period 20 -waveform {0.0 10.0} CLK
set_clock_skew -uncertainty 0.2 CLK
set_fix_hold CLK
set_input_delay 18.0 -clock CLK {all_inputs() - "CLK"}
set_output_delay 18.0 -clock CLK all_outputs()
/*
** Select a scan style and set a test mode constraint.
*/
set_scan_configuration -style multiplexed_flip_flop
set_test_hold 1 RESETN
/*
** Perform test-ready compile.
*/
set_max_area 0.0
compile -scan -map_effort high
/*
** Identify scan-in, scan-out and scan-enable ports.
*/
set_scan_signal test_scan_in -port DIA0 -hookup ui0/Z
set_scan_signal test_scan_out -port DO0 -hookup uo0/A
set_scan_signal test_scan_enable -port SCAN_ENABLE -hookup ui13/Z
/*
** Check scan design rules.
*/
check_test
98
.....
Scan Synthesis Methodology Using DFT Compiler
6.3 Sample DC Script for Scan Synthesis
/*
** Build scan chains.
*/
insert_scan
/*
** Set timing parameters for scan test.
*/
test_default_period = 100
test_default_delay = 0
test_default_bidir_delay = 0
test_default_strobe = 40
create_test_clock "CLK" -waveform { 50 70 }
/*
** Recheck scan design rules and generate a scan-related report.
*/
check_test > scan_design.report
report_test -scan -assertions -atpg_conflict >> scan_design.report
/*
** Write a STIL procedure file for TetraMAX.
*/
test_stil_netlist_format = verilog
write_test_protocol -format stil -o CKTTOP.spf
/*
** Write out a netlist.
*/
write -format verilog -o CKTTOP.v_postscan -h
quit
99
Scan Synthesis Methodology Using DFT Compiler
6 6.4 Step-by-Step Scan Synthesis Procedure
Syntax
Options
100
.....
Scan Synthesis Methodology Using DFT Compiler
6.4 Step-by-Step Scan Synthesis Procedure
Table 6–1 shows the types of selected scan flip-flops, depending on which scan style you
choose with the -style option.
Table 6–1 Scan Flip-Flop Types Selected by the -style Argument
n: 1, 2, 3, 4, 5 or 3L1 m: P, R, RR, 1, 2, 4, 8 or L
TC240C to TC260C cell-based IC families offer two types of scan flip-flops: CFDnEXm and
CFDnEAXm. While CFDnEXm is optimized for area, it provides smaller hold slack during
scan shift. Hold violations can be a problem if you use it in a design with potentially large
clock skew. In contrast, CFDnEAXm is not so susceptible to hold violations, but is a little
physically larger than CFDnEXm. In Toshiba’s DC library, CFDnEXm has the dont_use
attribute on it, so CFDnEAXm is used by default.
101
Scan Synthesis Methodology Using DFT Compiler
6 6.4 Step-by-Step Scan Synthesis Procedure
Note: LSSD scan flip-flops and all scan flip-flops for the TC300 family have a
dedicated Scan-Out pin. So that DFT Compiler will use the Scan-Out pin for
scan chain connections, enter:
set_scan_configuration -dedicated_scan_ports true
test_disable_find_best_scan_out = true
Without these settings, DFT Compiler might connect scan flip-flops using the
system data output pins (Q and QN) instead of the Scan-Out (SO) pins.
Syntax
Synthesizing a Design
..................................................
Use the compile command to synthesize a design. The -scan option instructs compile to
implement all sequential functions with scan flip-flops during the initial mapping of a design to
gates. The insert_scan command is used later to assemble scan chains.
102
.....
Scan Synthesis Methodology Using DFT Compiler
6.4 Step-by-Step Scan Synthesis Procedure
If you wish, you can also run compile without the -scan option, so all sequential cells are
mapped to non-scan cells; in this case, you can use insert_scan at the top level of the design
to perform scan replacement and assembly at the same time. For this design flow, see 6.5,
"Considerations for Scan Synthesis Using DFT Compiler," on page 110.
Syntax
compile [-scan]
Option
-scan Performs test-ready compile, mapping all sequential cells directly to scan
flip-flops.
Syntax
103
Scan Synthesis Methodology Using DFT Compiler
6 6.4 Step-by-Step Scan Synthesis Procedure
Options
-port Identifies ports that insert_scan can use for the specified scan signal
type. The ports must exist in the design. insert_scan will attribute
them as specific types.
In the single-clocked scan design, the Scan Shift Enable input drives all flip-flops in a scan
chain. In the dual-clocked scan design, Scan Clock A and Scan Clock B drive all flip-flops in a
scan chain. Therefore, it is necessary to buffer these signals to increase their drive strength.
You can create buffer trees in two ways, either in DFT Compiler or during clock tree synthesis
(CTS) in a layout tool, as explained in the section "Inserting Buffer Trees" on page 29. When
you choose to employ CTS to do this, assign the dont_touch_network attribute to the above
scan signals in DFT Compiler. For more on the set_scan_signal command, see 6.5,
"Considerations for Scan Synthesis Using DFT Compiler," on page 110.
104
.....
Scan Synthesis Methodology Using DFT Compiler
6.4 Step-by-Step Scan Synthesis Procedure
Syntax
check_test
At the end of the check_test output, DFT Compiler provides a summary of the test status of
sequential cells in your design, as shown in Figure 6–7.
**************************************************
Sequential Cell Summary
Within the summary, sequential cells are divided into two categories: those with violations and
those without. The report shown in Figure 6–7 indicates that two cells are treated as black
boxes. Black-box cells will cause a loss of fault coverage during ATPG.
In the check_test output, there are diagnostic messages that describe the sources of
violations. Modify your design according to the messages. You should confirm that there is no
cell that is treated as a black box before proceeding any further.
105
Scan Synthesis Methodology Using DFT Compiler
6 6.4 Step-by-Step Scan Synthesis Procedure
Syntax
insert_scan [-ignore_compile_design_rules]
Option
-ignore_compile_design_rules
Minimize the fixing of cell-drive violations.
106
.....
Scan Synthesis Methodology Using DFT Compiler
6.4 Step-by-Step Scan Synthesis Procedure
Syntax
test_default_period = test_cycle
test_default_delay = input_delay
test_default_bidir_delay = bidirectional_input_delay
test_default_strobe = output_strobe_time
create_test_clock "port_list" -waveform
{two_value_rise_fall_edge_list}
100 ns
Input Ports
5 ns
Bidirectional Ports
in Input Mode
Output Strobe 40 ns
10 ns
System/Scan 50 ns
Clock
107
Scan Synthesis Methodology Using DFT Compiler
6 6.4 Step-by-Step Scan Synthesis Procedure
100 ns 100 ns
Input Ports
5 ns 5 ns
Bidirectional Ports
in Input Mode
Output Strobe 40 ns 40 ns
10 ns
System Clock 50 ns
10 ns
Scan Clock A (Master) 50 ns
10 ns
Syntax
Redirect the output to disk files as shown above. For a description of the report_test
arguments, see the Synopsys manual.
108
.....
Scan Synthesis Methodology Using DFT Compiler
6.4 Step-by-Step Scan Synthesis Procedure
Writing a Netlist
..................................................
Before writing out a gate-level netlist, run the change_names command to make port, cell
and net names conform to the naming rules. An example command sequence to write out a
Verilog-HDL netlist is shown below:
dc_shell> current_design CKT
dc_shell> change_names -hierarchy -rules toshiba
dc_shell> change_names -hierarchy -rules toshiba_scan
dc_shell> change_names -rules toshiba_ports
dc_shell> write -format verilog -hierarchy -o CKT.v_scan
109
Scan Synthesis Methodology Using DFT Compiler
6 6.5 Considerations for Scan Synthesis Using DFT Compiler
When you create a gate-level netlist, set dc_shell variables as shown in Figure 6–8 so that all
sequential cells are mapped to D-type flip-flops. This is because only D-type flip-flops have
scan equivalents in Toshiba’s ASIC cell library.
RTL Design There are no scan equivalents for JK, toggle and
negative-edge-triggered flip-flops. Before compile, set
dont_use on these flip-flops. For example:
Set synthesis constraints
and scan style. set_dont_use tc220c/FT* /* Toggle */
set_dont_use tc220c/FJK* /* JK */
set_dont_use tc220c/FDN* /* Negedge */
compile
It is recommended to run check_test at this stage to confirm the mapping of sequential cells.
110
.....
Scan Synthesis Methodology Using DFT Compiler
6.5 Considerations for Scan Synthesis Using DFT Compiler
Use the insert_scan command to perform scan replacement and assembly at the same time.
By default, insert_scan corrects compile design rules violations such as max_fanout and
performs mapping optimization. If you want to minimize these corrections, give the
-ignore_compile_design_rules option.
insert_scan
-ignore_compile_design_rules All D-type flip-flops are replaced by their scan equivalents,
and scan chains are stitched.
FD1SF FD1SF
Scanned Gate-Level
Design
Scan-in Scan-out
The set_scan_signal command issues an error message if you specify ports that don’t exist
in your HDL circuit description. You can avoid such an error by creating ports with the
create_port command within DFT Compiler. Figure 6–10 shows this flow.
111
Scan Synthesis Methodology Using DFT Compiler
6 6.5 Considerations for Scan Synthesis Using DFT Compiler
Figure 6–10 Specifying Nonexistent Ports as Scan Test Ports with set_scan_signal
Scan Chain
set_scan_signal test_scan_in -port SIN
set_scan_signal test_scan_out -port SOUT
SIN SOUT
insert_scan
You can use the set_scan_signal command to share an existing functional port (without an
I/O buffer) with a scan-in port; insert_scan will connect the scan input signal directly to the
specified input port. You can also use the set_scan_signal command to share an existing
functional port (without an I/O buffer) with a scan-out port; in this case, a Scan Shift Enable
port is used to multiplex scan-out data and functional data at the specified output port. Figure
6–11 illustrates this process.
Figure 6–11 Using Existing Ports without I/O Buffers as Scan Test Ports
insert_scan
Scan Chain
A scan chain is connected between DIN MUX
and DOUT. If DOUT is connected to internal
logic, a mux logic is automatically added. DIN DOUT
Scan Shift
Enable
112
.....
Scan Synthesis Methodology Using DFT Compiler
6.5 Considerations for Scan Synthesis Using DFT Compiler
You can also specify existing functional ports with I/O buffers as scan ports with the
set_scan_signal command. In this case, insert_scan will connect the scan signals to
the core side of the I/O buffers. Figure 6–12 illustrates this process.
Note: For the TC240 to TC260 series, DFT Compiler can not automatically
recognize I/O buffers. For a workaround, see the section "Connecting Scan
Signals to I/O Buffers in the TC240 to TC260 Technologies" on page 114.
Figure 6–12 Using Existing Ports with I/O Buffers as Scan Test Ports
insert_scan
Scan Chain
A scan chain is connected to the core side MUX
of the I/O buffers at DIN and DOUT. If
DOUT is connected to internal logic, a mux DIN DOUT
logic is automatically added. Scan Shift
Enable
By default, insert_scan connects scan signals to the core side of the specified ports. You
can use the -hookup option of the set_scan_signal command to override this behavior
and instruct insert_scan to connect scan signals to specified pins. Figure 6–13 shows an
example usage of the -hookup option.
Figure 6–13 Sharing a Functional Input Port with a Scan Clock Using the -hookup Option
u0
set_scan_signal test_scan_clock_a \
-port DIN -hookup u0/Z DIN
Scan Shift
Enable
insert_scan
A Scan Chain
u0
Scan Clock A is connected to the Z output
DIN
of cell u0. The scan_clock_a attribute is
assigned to the DIN port. Scan Shift
Enable
113
Scan Synthesis Methodology Using DFT Compiler
6 6.5 Considerations for Scan Synthesis Using DFT Compiler
DFT Compiler can not automatically recognize I/O buffers for the TC240 to TC260 series. If
you want a scan chain connected to ports that already have I/O buffers, use the -hookup
option of the set_scan_signal command. Identify an instance of an input buffer as
instance_name/IOMAIN. Give the option -sense inverted for an inverting I/O buffer.
See Figure 6–14.
insert_scan
Scan Chain
The scan-in signal is connected to pin u1/Z, MUX
u1 u2
and the scan-out signal is connected to pin DIN DOUT
u2/A. If u2/A is connected to internal logic, a
Scan Shift
mux logic is automatically added. Enable
Unless specified, insert_scan assigns scan-in and scan-out ports to scan chains in the
default order. To allocate scan flip-flops to particular scan chains, use the set_scan_path
command. Then, you can use the -chain option of set_scan_signal to explicitly assign
scan-in and scan-out ports to particular scan chains, using scan chain names you assigned them
with set_scan_path. Figure 6–15 shows how to get the exact scan architecture you require.
set_scan_configuration -chain_count 2
...
set_scan_path IN1
set_scan_path IN2
set_scan_signal test_scan_in -port SIN1 -chain IN1
set_scan_signal test_scan_in -port SIN2 -chain IN2
set_scan_signal test_scan_out -port SOUT1 -chain IN1
set_scan_signal test_scan_out -port SOUT2 -chain IN2
114
.....
Scan Synthesis Methodology Using DFT Compiler
6.5 Considerations for Scan Synthesis Using DFT Compiler
Use set_scan_signal to identify design ports that you want connected during scan
assembly. Use set_signal_type to identify scan ports that are connected to the existing
scan structure.
DFT Compiler does not allow bidirectional ports to be used as scan or system clock ports.
The check_test command issues a warning message if it finds a bidirectional port used
as a clock. If you want to use a bidirectional port as a clock, you need to verify the
integrity of the scan chain by means of another tool.
■ Using a bidirectional port on a submodule
115
Scan Synthesis Methodology Using DFT Compiler
6 6.5 Considerations for Scan Synthesis Using DFT Compiler
FD1E FD1E
Q TI
DFT Compiler models cells that can not be found in the library as black-box cells. If not
all cell references can be resolved using technology libraries or designs in search_path,
the link command generates warning messages as shown below:
Warning: Unable to resolve reference ’EAS1A0A00016A’ in
’ram40x4k5.db:ram16x1k5’. (LINK-5)
Warning: Unable to resolve reference ’EAS1A0B00032A’ in
’ram40x2k4.db:ram32x2k4’. (LINK-5)
Both inputs and outputs of a black-box cell are assumed to have an unknown (X) value.
See the design in Figure 6–17 in which the RAM is treated as a black box. Consequently,
the system clock is assumed to have an X value, causing design rules violations.
116
.....
Scan Synthesis Methodology Using DFT Compiler
6.5 Considerations for Scan Synthesis Using DFT Compiler
Clock
FD1
************************************************
Sequential Cell Summary
DFT Compiler assumes that the FD1 cells are not scan-controllable and excludes them from
scan replacement.
As demonstrated by this example, the effects of unknown cells are often reported as other kinds
of violations. Occasionally, it takes a long time to identify the true source of the violation. To
prevent such a situation, pay great attention to the messages from link to ensure that no cells
will lead to unknown cells during check_test. In cases where your design has unresolved
references, you can avoid the problem by creating a dummy module as shown below in Figure
6–18.
117
Scan Synthesis Methodology Using DFT Compiler
6 6.5 Considerations for Scan Synthesis Using DFT Compiler
Although the RAM is still a black box, check_test does not assume an X value on it because
it is explicitly declared as an input port. Prior to writing out a netlist, be sure to remove this
dummy module by using the remove_design command.
118
Chapter 7 STIL Procedure File (SPF)
.....................................
.....
T his chapter provides guidelines for creating and editing STIL procedure files. The
material is organized into the following sections:
☞ Creating an SPF
☞ SPF Organization for Single-Clocked Scan
☞ SPF Organization for Dual-Clocked Scan
☞ Controlling Bidirectional Ports
☞ SPF Description for Scan-Out Ports with Bidirectional Buffers
☞ Pin-Sharing
☞ Editing an SPF Generated by DFT Compiler
☞ Editing an SPF Generated by TetraMAX
☞ SPF for a Design with JTAG Logic
119
STIL Procedure File (SPF)
7 7.1 Creating an SPF
A STIL procedure file (SPF) describes the scan structure inserted in your design and dictates
the capture and scan-shift operations of scan chains. An SPF is required by TetraMAX.
Basically, an SPF uses a subset of STIL syntax specified by IEEE Std 1450-1999, IEEE
Standard Test Interface Language (STIL) for Digital Test Vectors. An SPF also capitalizes on
the IEEE P1450.1 extensions to STIL.
You can create an SPF in three ways, using DFT Compiler, SPFGen or TetraMAX:
■ Generate an SPF within a DFT Compiler session when you have performed scan
synthesis at the chip level and run check_test.
■ Use SPFGen when you have not generated an SPF with DFT Compiler.
■ When you want to customize ATPG procedures, etc, modify an SPF manually generated
by DFT Compiler, SPFGen or TetraMAX.
Using SPFGen
..................................................
You can use SPFGen to create an SPF file and a command file for TetraMAX automatically.
Before running SPFGen, a setup file must be created. To run SPFGen, enter the following
command at a UNIX shell prompt.
%> spfgen
120
.....
STIL Procedure File (SPF)
7.1 Creating an SPF
Using TetraMAX
..................................................
TetraMAX also allows you to write out a template SPF. To create an SPF, enter the following
command within TetraMAX.
You can run this command in DRC and TEST command modes. An initial SPF generated in
DRC mode contains the minimum information needed by TetraMAX ATPG. An SPF is used
by test design rules checking. Edit it to define your scan structure, and required STIL
procedures and port timing. Figure 7–1 shows the flow for creating an SPF.
Define clocks.
Define primary pin constraints.
DRC Mode
write drc_file
SPF
Template
Error
DRC
OK
TEST Mode
write drc_file
SPF
121
STIL Procedure File (SPF)
7 7.2 SPF Organization for Single-Clocked Scan
Sample SPF
..................................................
Figure 7–2 shows a sample SPF with minimum information TetraMAX needs for
single-clocked scan design. This example assumes that all primary bidirectional ports can be
forced to input mode during scan-shifting. If any bidirectional ports are not directly
controllable, see the section 7.4, "Controlling Bidirectional Ports," on page 134.
STIL 1.00;
ScanStructures {
ScanChain "IN0" { ScanIn "SDI0"; ScanOut "SDO0"; } //Scan chains are named IN0, IN1 and IN2.
ScanChain "IN1" { ScanIn "SDI1"; ScanOut "SDO1"; } //Scan-in ports are SDI0, SDI1 and SDI2.
ScanChain "IN2" { ScanIn "SDI2"; ScanOut "SDO2"; } //Scan-out ports are SDO0, SDO1 and SDO2.
}
Procedures {
load_unload {
V { "CLK"=0; //System clock is set to off state.
"RST"=1 //Async. reset is set to off state.
"SEN"=1; //Scan Shift Enable is driven high to enable scan chains.
"BIDI_DISABLE"=1 //Bidirectional 3-state enable is set to off state
} //(input mode).
Shift
V { _si=\r3 #; _so=\r3 #; //Specify the number of scan-in and scan-out ports
//in the form \r<number>. _si and _so are naming
//conventions expected by TetraMAX. Enter a space
//between number and #.
"CLK"=P; //Shared system/scan clock port is pulsed (P).
"RST"=1 //Async. reset is set to off state.
"SEN0"=1; //Scan Shift Enable port is set to on state.
}
}
}
}
MacroDefs {
test_setup { //Define an initialization sequence.
V { "CLK=0; //System clock port is set to off state.
"RST"= 1 //Async. reset is set to off state.
"SEN0"=0; //Scan Shift Enable port is set to off state.
"BIDI_DISABLE"=1; //Bidirectional 3-state enable is set to off state
} //(input mode).
}
}
122
.....
STIL Procedure File (SPF)
7.2 SPF Organization for Single-Clocked Scan
ScanStructures Construct
..................................................
The ScanStructures construct defines the scan chains in your design and their scan-in and
scan-out ports. In the example in Figure 7–2, three scan chains are named IN0, IN1 and IN2.
The syntax of the ScanStructures construct is:
ScanStructures {
ScanChain "chain_name" { ScanIn "scan-in_port"; ScanOut "scan-out_port"; }
ScanChain "chain_name" { ScanIn "scan-in_port"; ScanOut "scan-out_port"; }
ScanChain "chain_name" { ScanIn "scan-in_port"; ScanOut "scan-out_port"; }
//Define all scan chains.
}
Although the SPF language specification also provides the ScanLength and
ScanInversion keywords, TetraMAX ignores them when reading in an SPF. However,
TetraMAX correctly supplies ScanLength and ScanInversion in an SPF and an STIL test
protocol file it generates.
Procedures Construct
..................................................
The Procedures construct defines the scan-shift and system capture operations for your
design. The general structure of the Procedures construct is shown below. Only the
load_unload procedure is mandatory; the other procedures are written only when needed.
123
STIL Procedure File (SPF)
7 7.2 SPF Organization for Single-Clocked Scan
Procedures {
load_unload {
V { ... } //Vector for placing scan chains in shift mode
Shift { //Specify how to shift scan chains.
V { ... } //Define how to shift one bit through scan chains. The
} //Shift procedure is applied repeatedly to shift as many
//bits as are in the longest scan chain.
V { ... } //Vector for placing scan chains in capture mode
}
shadow_observe { //Required only when your design has shadow registers
V { ... } //Set up a path from shadow registers back to scan registers
}
capture_<clk_name> { //Define a capture clock procedure.
F { ... } //Primary inputs fixed during capture cycles
V { ... } //Define a capture operation.
}
capture_<async_sig_name> { //Define an async set/reset procedure.
F { ... } //Primary inputs fixed during async set/reset
V { ... } //Define a set/reset operation.
}
capture { //Define an operation to measure test response only at POs.
F { ... } //Omit this procedure if you want a capture clock pulsed
V { ... } //in every test pattern.
}
}
The load_unload procedure defines: 1) how the scan chains in your design can be
placed into a shiftable state (scan shift mode), 2) how they can be shifted one bit, and 3)
how they are placed back in a capture state (scan capture mode). Usually, you can omit a
vector to place the scan chains in a capture state. The Shift procedure is placed within
the definition of the load_unload procedure.
■ shadow_observe procedure (optional)
A shadow register is not in the scan chain, but is loaded when its master register in the
scan chain is loaded. The shadow_observe procedure is used when a design has
shadow registers and the shadow register’s outputs are observable at the scan cells to
which they are shadows. The shadow_observe procedure defines how to set up paths
from shadow registers back to scan cells.
■ capture procedure (optional)
The capture procedure is used when you want to use non-default capture timing or
sequence. You can run ATPG with no capture definition in an SPF. The default capture
procedure usually consists of three cycles for applying inputs, observing outputs and
pulsing the system clock. You can optionally define the capture procedure if you want
124
.....
STIL Procedure File (SPF)
7.2 SPF Organization for Single-Clocked Scan
to merge the capture cycles into a single cycle. For a detailed description of the capture
procedure, see 8.4, "ATPG Test Cycles," on page 184.
By default, latches and flip-flops whose set and reset lines are not off when all clocks are
at their off state are treated as unstable cells. Because they are unstable, their output
values are unknown and they can not be used during test pattern generation. One way to
make these cells stable is to make their asynchronous set/reset input signals controllable
from external I/O pins and declare them as clocks using a capture block, as shown
above.
MacroDefs Construct
..................................................
An optional test_setup macro is written within the MacroDefs construct. The
test_setup macro defines an initialization sequence to put the device in test mode. Figure
7–3 shows an example of the MacroDefs construct.
MacroDefs {
test_setup {
V { TEST_ENABLE=1; RST=0; }
V { TEST_ENABLE=1; RST=1; }
}
}
Shift V ...
V V ... V V V ...
V V ....... F V: Vector
F: Fixed
As shown in Figure 7–4, the following vectors comprise a scan test pattern:
1. Initialization (test_setup)
125
STIL Procedure File (SPF)
7 7.2 SPF Organization for Single-Clocked Scan
5. Repetitions of 2 to 4
TetraMAX can usually create vectors where the data is "unloaded" through the scan-out port as
the data is "loaded" from the scan-in port.
126
.....
STIL Procedure File (SPF)
7.3 SPF Organization for Dual-Clocked Scan
This section describes how to create an SPF for dual-clocked scan design.
Sample SPF
..................................................
Figure 7–5 shows a sample SPF with minimum information TetraMAX needs for dual-clocked
scan design. This example assumes that all primary bidirectional ports can be forced to input
mode during scan-shifting. If any bidirectional ports are not directly controllable, see 7.4,
"Controlling Bidirectional Ports," on page 134.
STIL 1.00;
ScanStructures {
ScanChain "IN0" { ScanIn "SDI0"; ScanOut "SDO0"; } //Define a scan chain IN0.
}
SignalGroups { //This construct can be output by the
//TetraMAX write drc_file command.
"_default_In_Timing_" = ’"CLK" + "IN0" + "IN1" + "SDI0" +"ACK0" + "BCK0"’;
"_default_Out_Timing_" = ’"SDO0" + "OUT0" + "OUT1"’;
"_default_SysClk_Timing_" = ’"CLK"’;
"_default_Reset_Timing_" = ’"RST"’;
"_default_ScanMasterClk_Timing_" = ’"ACK0"’;
"_default_ScanSlaveClk_Timing_" = ’"BCK0"’;
}
Timing { //This construct can be output by the
WaveformTable "_default_WFT_" { //TetraMAX write_drc_file command.
Period ’100ns’; //Tester cycle period
Waveforms {
"_default_In_Timing_" { 0 { ’0ns’ D; } }
"_default_In_Timing_" { 1 { ’0ns’ U; } }
"_default_In_Timing_" { Z { ’0ns’ Z; } }
"_default_Out_Timing_" { X { ’0ns’ X; } }
"_default_Out_Timing_" { H { ’0ns’ X; ’40ns’ H; } } //Place strobe before
"_default_Out_Timing_" { T { ’0ns’ X; ’40ns’ T; } } active clock edge.
"_default_Out_Timing_" { L { ’0ns’ X; ’40ns’ L; } }
"_default_SysClk_Timing_" { P { ’0ns’ D; ’50ns’ U; ’80ns’ D; } }
"_default_Reset_Timing_" { P { ’0ns’ U; ’50ns’ D; ’80ns’ U; } }
"_default_ScanMasterClk_Timing_" { P { ’0ns’ D; ’10ns’ U; ’30ns’ D; } }
"_default_ScanSlaveClk_Timing_" { P { ’0ns’ D; ’60ns’ U; ’80ns’ D; } }
}
}
}
127
STIL Procedure File (SPF)
7 7.3 SPF Organization for Dual-Clocked Scan
Procedures {
load_unload {
W "_default_WFT_";
V { "CLK"=0; //System clock is set to off state.
"RST"=1; //Async reset is set to off state.
"ACK0"=0; //Scan Clock A is set to off state.
"BCK0"=0; //Scan Clock B is set to off state.
"BIDI_DISABLE"=1; //Bidirectional 3-state enable is set to off state
//(input mode).
}
Shift {
V { _si=\r1 #; _so=\r1 #; //Specify the number of scan-in and scan-out ports
//in the form \r<number>. _si and _so are naming
//conventions expected by TetraMAX. Enter a space
//between number and #.
"CLK"=0; //System clock is set to off state.
"RST"=1; //Async reset is set to off state.
"ACK0"=P; //Scan Clock A is pulsed (P).
"BCK0"=P; //Scan Clock B is pulsed (P).
}
}
}
master_observe { //Propagate the captured data from master latches
//to slave latches before scan-out.
V { "CLK"=0;
"RST=1;
"ACLK0"=0;
"BCLK0"=P; //Only Scan Clock B is pulsed (P).
}
}
}
MacroDefs {
test_setup { //Define an initialization sequence.
V { "CLK"=0; //System clock is set to off state.
"RST"=1; //Async reset is set to off state.
"ACK0"=0; //Scan Clock A is set to off state.
"BCK0"=0; //Scan Clock B is set to off state.
"BIDI_DISABLE"=1; //Bidirectional 3-state enable is set to off state
//(input mode).
}
}
}
An SPF for the dual-clocked scan design has these additional constructs and procedure, as
compared to an SPF for the single-clocked scan design:
■ SignalGroups construct
■ Timing construct
■ master_observe procedure
128
.....
STIL Procedure File (SPF)
7.3 SPF Organization for Dual-Clocked Scan
ScanStructures Construct
..................................................
The ScanStructures construct defines the scan chains in your design and their scan-in and
scan-out ports. In the example in Figure 7–5, the scan chain is named IN0. The syntax of the
ScanStructures construct is:
ScanStructures {
ScanChain "chain_name" { ScanIn "scan-in_port"; ScanOut "scan-out_port"; }
ScanChain "chain_name" { ScanIn "scan-in_port"; ScanOut "scan-out_port"; }
ScanChain "chain_name" { ScanIn "scan-in_port"; ScanOut "scan-out_port"; }
//Define all scan chains.
}
Although the SPF language specification also provides the ScanLength and
ScanInversion keywords, TetraMAX ignores them when reading in an SPF. However,
TetraMAX correctly supplies ScanLength and ScanInversion in an SPF and an STIL test
protocol file it generates.
SignalGroups Construct
..................................................
Define signal groups so that timing for all inputs and outputs can be defined in just a few lines.
The syntax for the SignalGroups construct is shown below. The write drc_file
command can generate this construct automatically; edit it as described in 7.8, "Editing an SPF
Generated by TetraMAX," on page 142.
signalGroups {
"input_port_label" = ’"input_port" + "bidirect_port" + "clock_port" + "scan-in_port"
+ "ACLK_port" + "BCLK_port"’ ;
"output_port_label" = ’"output_port" + "bidirect_port" + "scan-out_port"’ ;
"clock_port_label" = ’"clock_port"’ ;
"ACLK_port_label" = ’"ACLK_port"’ ;
"BCLK_port_label" = ’"BCLK_port"’ ;
}
Timing Construct
..................................................
The Timing construct contains a waveform table that defines the timing to be used at all input
and output ports. The write drc_file command can generate this construct automatically;
edit it as needed. Observe the following guidelines when writing the Timing construct:
129
STIL Procedure File (SPF)
7 7.3 SPF Organization for Dual-Clocked Scan
■ Due to the TetraMAX constraint, place the output strobe before any system clock events
in the cycle.
■ Scan Clock A must not overlap with Scan Clock B; the active region of Scan Clock A
must precede the active region of Scan Clock B.
Figure 7–6 gives the Timing construct in the SPF shown previously. Figure 7–7 shows a
waveform representation of the Timing construct in Figure 7–6.
Timing {
WaveformTable "_default_WFT_" { //Identify the timing definition.
Period ’100ns’; //Tester cycle period
Waveforms {
"_default_In_Timing_" { 0 { ’0ns’ D; } }
"_default_In_Timing_" { 1 { ’0ns’ U; } }
"_default_In_Timing_" { Z { ’0ns’ Z; } }
"_default_Out_Timing_" { X { ’0ns’ X; } }
"_default_Out_Timing_" { H { ’0ns’ X; ’40ns’ H; } } //Place strobe before
"_default_Out_Timing_" { T { ’0ns’ X; ’40ns’ T; } } active clock edge.
"_default_Out_Timing_" { L { ’0ns’ X; ’40ns’ L; } }
"_default_SysClk_Timing_" { P { ’0ns’ D; ’50ns’ U; ’80ns’ D; } }
"_default_Reset_Timing_" { P { ’0ns’ U; ’50ns’ D; ’80ns’ U; } }
"_default_ScanMasterClk_Timing_" { P { ’0ns’ D; ’10ns’ U; ’30ns’ D; } }
"_default_ScanSlaveClk_Timing_" { P { ’0ns’ D; ’60ns’ U; ’80ns’ D; } }
}
}
}
100 ns
_default_In_Timing_
_default_SysClk_Timing_
50 80
_default_Reset_Timing_
_default_ScanMasterClk_Timing_
10 30
_default_ScanSlaveClk_Timing_
60 80
_default_Out_Timing_ 40
130
.....
STIL Procedure File (SPF)
7.3 SPF Organization for Dual-Clocked Scan
Procedures Construct
..................................................
The Procedures construct defines the scan-shift and system capture operations for your
design. The general structure of the Procedures construct is shown below. Note the presence
of the master_observe procedure. The other procedures are basically identical to those for
the single-clocked scan design.
Procedures {
load_unload {
V { ... } //Vector for placing scan chains in shift mode
Shift { //Specify how to shift scan chains.
V { ... } //Define how to shift one bit through scan chains. The
} //Shift procedure is applied repeatedly to shift as many
//bits as are in the longest scan chain.
V { ... } //Vector for placing scan chains in capture mode
}
master_observe { //Required only for dual-clocked scan design
V { ... } //Vector for propagating the captured data from master latches
//to slave latches
shadow_observe { //Required only when your design has shadow registers
V { ... } //Set up a path from shadow registers back to scan registers
}
capture_<clk_name> { //Define a capture clock procedure.
F { ... } //Primary inputs fixed during capture cycles
V { ... } //Define a capture operation.
}
capture_<async_sig_name> { //Define an async set/reset procedure.
F { ... } //Primary inputs fixed during async set/reset
V { ... } //Define a set/reset operation.
}
capture { //Define an operation to measure test response only at POs.
F { ... } //Omit this procedure if you want a capture clock pulsed
V { ... } //in every test pattern.
}
}
The load_unload procedure defines: 1) how the scan chains in your design can be
placed into a shiftable state (scan shift mode), 2) how they can be shifted one bit, and 3)
how they are placed back in a capture state (scan capture mode). The Shift procedure is
placed within the definition of the load_unload procedure. Usually, you can omit a
vector to place the scan chains in a capture state.
■ master_observe procedure (always required for dual-clocked scan)
The master_observe procedure propagates the captured data from master latches to
slave latches prior to shifting scan test response through the scan chain. In the
131
STIL Procedure File (SPF)
7 7.3 SPF Organization for Dual-Clocked Scan
A shadow register is not in the scan chain, but is loaded when its master register in the
scan chain is loaded. The shadow_observe procedure is used when a design has
shadow registers and the shadow register’s outputs are observable at the scan cells to
which they are shadows. The shadow_observe procedure defines how to set up paths
from shadow registers back to scan cells.
■ capture procedure (optional)
The capture procedure is used when you want to use non-default capture timing or
sequence. You can run ATPG with no capture definition in an SPF. The default capture
procedure usually consists of three cycles for applying inputs, observing outputs and
pulsing the system clock. You can optionally define the capture procedure if you want
to merge the capture cycles into a single cycle. For a detailed description of the capture
procedure, see 8.4, "ATPG Test Cycles," on page 184.
By default, latches and flip-flops whose set and reset lines are not off when all clocks are
at their off state are treated as unstable cells. Because they are unstable, their output
values are unknown and they can not be used during test pattern generation. One way to
make these cells stable is to make their asynchronous set/reset input signals controllable
from external I/O pins and declare them as clocks using a capture block, as shown
above.
MacroDefs Construct
..................................................
An optional test_setup macro is written within the MacroDefs construct. The
test_setup macro defines an initialization sequence to put the device in test mode. Figure
7–8 shows an example of the MacroDefs construct.
MacroDefs {
test_setup {
V { TEST_ENABLE=1; RST=0; }
V { TEST_ENABLE=1; RST=1; }
}
}
132
.....
STIL Procedure File (SPF)
7.3 SPF Organization for Dual-Clocked Scan
Shift V ...
V V ... V V V ... V
V V ....... F
V: Vector
F: Fixed
As shown in Figure 7–9, the following vectors comprise a scan test pattern:
1. Initialization (test_setup)
Prior to a scan-shift operation (load_unload), the data in the master latch is transferred
to the slave latch.
6. Repetitions of 2 to 5
TetraMAX can usually create vectors where the data is "unloaded" through the scan-out port as
the data is "loaded" from the scan-in port.
133
STIL Procedure File (SPF)
7 7.4 Controlling Bidirectional Ports
Bidirectional I/O ports must be forced to input mode during scan shift, regardless of the scan
style. Unless your design conforms to this rule, modify the SPF as shown in Figure 7–10.
After a TSTL2 pattern file has been generated, you must not add the PATTYPE statement to its
DECLARE block; otherwise, bidirectional pin conflicts might occur during scan shift.
STIL 1.00;
... Omitted ...
SignalGroups {
"bidi_ports" = ’"D[0]"+"D[1]"+"D[2]"+"D[3]"’; //Create a bidirectional port group.
}
Procedures {
load_unload {
V {
... Omitted ...
"bidi_ports" = \r4 Z; //Set bidi_ports to a Z state.
}
Shift {
... Omitted ...
}
}
}
MacroDefs {
test_setup {
V { ... Omitted ...
"bidi_ports" = \r4 Z; //Set bidi_ports to a Z state.
}
}
}
134
.....
STIL Procedure File (SPF)
7.5 SPF Description for Scan-Out Ports with Bidirectional Buffers
If a scan-out port uses a bidirectional pin, place a Z value on that bidirectional port prior to
scan-chain shifting. Figure 7–11 shows an SPF with a bidirectional scan-out port. An addition
has been made to the load_unload procedure. Without this addition, a DRC violation of the
S1 class will occur.
The following shows an example of the messages generated in the presence of an S1 violation:
--------------------------------------------------------------------
Begin scan chain operation checking...
Error: Chain c0 blocked at BUS gate u_SDO0 (3574) after tracing 0 cells. (S1-1)
Error: Design rules checking failed: cannot exit DRC command mode. (M100)
135
STIL Procedure File (SPF)
7 7.6 Pin-Sharing
7.6 Pin-Sharing
As explained in 2.2, "I/O Pin Requirements for Scan Methodologies," on page 27, some scan
test ports can be shared with functional ports. The subsections that follow contain some tips for
working with an SPF when scan test ports are shared with functional ports.
padi_0
A Z
D0
PI
IBUFU
Scan Chain SOUT
STIL 1.00;
ScanStructures {
ScanChain "C0" { ScanIn "D0"; ScanOut "SOUT"; } //Shared scan-in port
}
... Omitted ...
Procedures {
load_unload {
Shift {
V { _si=#; _so=#; //No change needed
... Omitted ...
}
}
}
}
MacroDefs {
... Omitted ...
}
136
.....
STIL Procedure File (SPF)
7.6 Pin-Sharing
padi_0 CMX2X1
pado_9
A Z A0
D0 A Z
PI A1 OUT99
S
Scan Chain
padi_sen
A Z
SCAN_EN
PI
Figure 7–15 The Shared Scan-out Port and the Scan Shift Enable Port
STIL 1.00;
ScanStructures {
ScanChain "IN0" { ScanIn "D0"; ScanOut "OUT99"; } //Shared scan-out port
}
... Omitted ...
Procedures {
load_unload {
W "_default_WFT_";
Shift {
V { _si=\r1 #; _so=\r1 #;
"CLK"=0;
"ACK0"=P;
"BCK0"=P;
"SCAN_EN"=1; //Scan Shift Enable port is set to on state.
}
}
}
master_observe {
V { "CLK"=0
"ACLK0"=0;
"BCLK0"=P;
"SCAN_EN"=1; //Scan Shift Enable port is set to on state.
}
}
137
STIL Procedure File (SPF)
7 7.6 Pin-Sharing
}
MacroDefs {
test_setup {
V { "CLK"=0;
"ACK0"=0;
"BCK0"=0;
"BIDI_DISABLE"=1;
"SCAN_EN"=0; //Scan Shift Enable port is set to off state.
}
}
}
Figure 7–16 Functional Input Port Shared with a Scan Shift Enable Port
padi_0
A Z
D0
PI
SIN SOUT
padi_1
A Z
TEST_EN
PI
IBUFU
Figure 7–17 Scan Shift Enable and Scan Test Enable Ports
STIL 1.00;
... Omitted ...
Procedures {
load_unload {
W "_default_WFT_";
... Omitted ...
Shift {
V { _si=#; _so=#;
"CLK"=P;
"D0"=1; //Scan Shift Enable port is set to on state.
"TEST_EN"=1; //Scan Test Enable port is set to on state.
}
138
.....
STIL Procedure File (SPF)
7.6 Pin-Sharing
}
}
}
MacroDefs {
... Omitted ...
}
Figure 7–18 Scan Clock Ports Shared with Functional Input Ports
padi_0
A Z
D1
PI
ack_ctl
padi_1 ACK
A Z
D2
PI
bck_ctl
padi_sen
BCK
A Z
SCAN_EN
PI
Scan Chain
Figure 7–19 Scan Clock Ports Shared with Functional Input Ports
STIL 1.00;
... Omitted ...
Procedures {
load_unload {
W "_default_WFT_";
139
STIL Procedure File (SPF)
7 7.6 Pin-Sharing
Shift {
V { _si=\r3 #; _so=\r3 #;
"CLK"=0;
"D1"=P; //Shared Scan Clock A port
"D2"=P; //Shared Scan Clock B port
"SCAN_EN"=1; //Scan Shift Enable port is set to on state.
}
}
}
master_observe {
V { "CLK"=0
"D1"=0;
"D2"=P;
"SCAN_EN"=1; //Scan Shift Enable port is set to on state.
}
}
capture_clk {
F { "SCAN_EN"=0; "D1"=0; "D2"=0; } //Scan clocks are set to off state
//during a system capture procedure.
V { "_pi"=\r5 #; "_po"=\r5 #; "CLK"=P; }
}
}
MacroDefs {
test_setup {
V { "CLK"=0;
"D1"=0;
"D2"=0;
"BIDI_DISABLE"=1;
"SCAN_EN"=0; //Scan Shift Enable port is set to off state
//during normal operation mode.
}
}
}
The Scan Shift Enable port is held at logic 1 during the load_unload and master_observe
procedures, so the scan clocks become active during scan-shifting. The Scan Shift Enable port
and the scan clock ports are held at logic 0 during the capture procedure, so the scan
flip-flops function as standard flip-flops.
Consequently, fault coverage will suffer in combinational logic connected to the D1 and D2
inputs. Special care must be taken when you determine which ports to use for the Scan Clock
signals.
Because the clocks are held at a fixed value during the capture operation, design rules checking
generates the warning message shown below.
Warning: Rule C15 (scan cell port unable to capture) was violated N
times.
140
.....
STIL Procedure File (SPF)
7.7 Editing an SPF Generated by DFT Compiler
You can use an SPF generated by DFT Compiler with TetraMAX, with one minor
modification. DFT Compiler assigns lowercase names to scan chains, like c0. However,
Toshiba’s TSTL2 requires scan chain names to be all uppercase. Figure 7–20 shows a fragment
of an SPF after modification.
ScanStructures {
Scanchain "C0" { //Change scan chain name to uppercase.
ScanLength 4;
ScanIn "DIA0";
ScanOut "DO0";
}
}
141
STIL Procedure File (SPF)
7 7.8 Editing an SPF Generated by TetraMAX
This section describes how to modify an SPF generated by TetraMAX before running ATPG.
STIL 1.0 {
Extension Design P2000.5;
}
Header {
Title " TetraMAX (TM) 2000.05-i001012_225440 STIL output";
Date "Tue May 8 22:32:46 2001";
History {
Ann {* Uncollapsed Stuck Fault Summary Report *}
...
Ann {* There are no net connections *}
}
}
Signals {
"clk" In; "reset" In; "control[1]" In; "control[0]" In; "bus_ctl" In; "test_si1" In;
"test_si2" In; "test_se" In; "data_bus[7]" InOut; "data_bus[6]" InOut; "data_bus[5]" InOut;
"data_bus[4]" InOut; "data_bus[3]" InOut; "data_bus[2]" InOut; "data_bus[1]" InOut;
"data_bus[0]" InOut; "test_so1" Out; "test_so2" Out;
}
SignalGroups {
"_default_In_Timing_" = '"clk" + "reset" + "data_bus[7]" + "data_bus[6]" + "data_bus[5]"
+ "data_bus[4]" + "data_bus[3]" + "data_bus[2]" + "data_bus[1]" + "data_bus[0]" + "control[1]"
+ "control[0]" + "bus_ctl" + "test_si1" + "test_si2" + "test_se"'; //#signals=16
"_pi" = '"clk" + "reset" + "data_bus[7]" + "data_bus[6]" + "data_bus[5]" + "data_bus[4]"
+ "data_bus[3]" + "data_bus[2]" + "data_bus[1]" + "data_bus[0]" + "control[1]"
+ "control[0]" + "bus_ctl" + "test_si1" + "test_si2" + "test_se"'; // #signals=16
"_io" = '"data_bus[7]" + "data_bus[6]" + "data_bus[5]" + "data_bus[4]" + "data_bus[3]"
142
.....
STIL Procedure File (SPF)
7.8 Editing an SPF Generated by TetraMAX
143
STIL Procedure File (SPF)
7 7.8 Editing an SPF Generated by TetraMAX
STIL 1.0 {
Extension Design P2000.5;
}
Header {
Title " TetraMAX (TM) 2000.05-i001012_225440 STIL output";
Date "Tue May 8 21:29:47 2001";
History {
Ann {* Uncollapsed Stuck Fault Summary Report *}
...
Ann {* There are no net connections *}
}
}
Signals {
"clk" In; "reset" In; "control[1]" In; "control[0]" In; "bus_ctl" In; "test_si1" In;
"test_si2" In; "test_se" In; "data_bus[7]" InOut; "data_bus[6]" InOut; "data_bus[5]" InOut;
"data_bus[4]" InOut; "data_bus[3]" InOut; "data_bus[2]" InOut; "data_bus[1]" InOut;
"data_bus[0]" InOut; "test_so1" Out; "test_so2" Out;
}
SignalGroups {
"_default_In_Timing_" = '"clk" + "reset" + "data_bus[7]" + "data_bus[6]" + "data_bus[5]"
+ "data_bus[4]" + "data_bus[3]" + "data_bus[2]" + "data_bus[1]" + "data_bus[0]" + "control[1]"
+ "control[0]" + "bus_ctl" + "test_si1" + "test_si2" + "test_se"'; //#signals=16
"_pi" = '"clk" + "reset" + "data_bus[7]" + "data_bus[6]" + "data_bus[5]" + "data_bus[4]"
+ "data_bus[3]" + "data_bus[2]" + "data_bus[1]" + "data_bus[0]" + "control[1]"
+ "control[0]" + "bus_ctl" + "test_si1" + "test_si2" + "test_se"'; // #signals=16
"_io" = '"data_bus[7]" + "data_bus[6]" + "data_bus[5]" + "data_bus[4]" + "data_bus[3]"
+ "data_bus[2]" + "data_bus[1]" + "data_bus[0]"' { WFCMap 0X->0; WFCMap 1X->1;
WFCMap ZX->Z; WFCMap NX->N; } // #signals=8
"_default_Out_Timing_" = '"data_bus[7]" + "data_bus[6]" + "data_bus[5]" + "data_bus[4]"
+ "data_bus[3]" + "data_bus[2]" + "data_bus[1]" + "data_bus[0]" + "test_so1"
+ "test_so2"'; // #signals=10
"_po" = '"data_bus[7]" + "data_bus[6]" + "data_bus[5]" + "data_bus[4]" + "data_bus[3]"
+ "data_bus[2]" + "data_bus[1]" + "data_bus[0]" + "test_so1" + "test_so2"'; // #signals=10
"_default_Clk0_Timing_" = '"clk" + "reset"'; // #signals=2
}
144
.....
STIL Procedure File (SPF)
7.8 Editing an SPF Generated by TetraMAX
ScanStructures {
ScanChain "IN0" { ScanIn "test_si1"; ScanOut "test_so1"; }
ScanChain "IN1" { ScanIn "test_si2"; ScanOut "test_so2"; } (1)
}
Timing {
WaveformTable "_default_WFT_" {
Period '100ns';
Waveforms {
"_default_In_Timing_" { 0 { '0ns' D; } }
"_default_In_Timing_" { 1 { '0ns' U; } }
"_default_In_Timing_" { Z { '0ns' Z; } }
"_default_In_Timing_" { N { '0ns' N; } }
"_default_Clk0_Timing_" { P { '0ns' D; '50ns' U; '80ns' D; } }
"_default_Out_Timing_" { X { '0ns' X; } }
"_default_Out_Timing_" { H { '0ns' X; '40ns' H; } }
"_default_Out_Timing_" { T { '0ns' X; '40ns' T; } }
"_default_Out_Timing_" { L { '0ns' X; '40ns' L; } }
}
}
}
PatternBurst "_burst_" { PatList {
"_pattern_" {
}
}}
PatternExec {
PatternBurst "_burst_";
}
Procedures {
"capture_clk" {
W "_default_WFT_";
V { "_pi"=\r16 # ; "_po"=\r10 # ; "clk"=P; }
}
(2)
"capture_reset" {
W "_default_WFT_";
V { "_pi"=\r16 # ; "_po"=\r10 # ; "reset"=P; }
}
load_unload {
V {
"clk" = 0;
"bus_ctl" = 1;
"test_se" = 1;
"reset" = 0;
}
Shift { (3)
V {
_si = \r2 #;
_so = \r2 #;
"clk = P;
}
}
}
}
145
STIL Procedure File (SPF)
7 7.8 Editing an SPF Generated by TetraMAX
MacroDefs {
"test_setup" {
W "_default_WFT_";
V { "clk"=0; "reset"=0; "bus_ctl"=1; } (4)
}
}
1. ScanStructures construct
Define all scan chains in your design and their scan-in and scan-out ports. There must be as
many ScanChain statements as the number of scan chains. Scan chain names must be in
uppercase due to Toshiba’s TSTL2 restriction.
Use a V{...} statement immediately below load_unload to define how the scan chains
in your design can be placed into a shiftable state. Here, put the clock and the bidirectional
3-state enable signals in their off states. If your design has bidirectional ports that can not
be controlled externally, see the section 7.4, "Controlling Bidirectional Ports," on page
134.
Modify the Shift procedure to define how the scan chains in your design can be shifted
one bit. Look at the Shift procedure in an SPF before modification (Figure 7–21), which
pulses an asynchronous reset signal; delete "reset" =P from the event list. _si and _so
represent all scan-in and scan-out ports respectively. Enter _si = \r<number> # and
_so = \r<number> #, where <number> is equal to the number of the scan chains.
Add a definition to force bidirectional buses into input mode. If your design has any
bidirectional ports that can not be controlled externally, see the section 7.4, "Controlling
Bidirectional Ports," on page 134.
146
.....
STIL Procedure File (SPF)
7.8 Editing an SPF Generated by TetraMAX
STIL 1.0 {
Extension Design P2000.5;
}
Header {
Title " TetraMAX (TM) 2000.05-i001012_225440 STIL output";
Date "Wed May 9 16:47:02 2001";
History {
Ann {* Uncollapsed Stuck Fault Summary Report *}
...
Ann {* There are no net connections *}
}
}
Signals {
"clk" In; "reset" In; "control[1]" In; "control[0]" In; "bus_ctl" In;
"ACK" In; "BCK" In; "SDI0" In; "SDI1" In; "data_bus[7]" InOut;
"data_bus[6]" InOut; "data_bus[5]" InOut; "data_bus[4]" InOut;
"data_bus[3]" InOut; "data_bus[2]" InOut; "data_bus[1]" InOut;
"data_bus[0]" InOut; "SDO0" Out; "SDO1" Out;
}
SignalGroups {
"_default_In_Timing_" = '"clk" + "reset" + "data_bus[7]" + "data_bus[6]"
+ "data_bus[5]" + "data_bus[4]" + "data_bus[3]" + "data_bus[2]"
+ "data_bus[1]" + "data_bus[0]" + "control[1]" + "control[0]" + "bus_ctl"
+ "ACK" + "BCK" + "SDI0" + "SDI1"'; // #signals=17
"_pi" = '"clk" + "reset" + "data_bus[7]" + "data_bus[6]" + "data_bus[5]"
+ "data_bus[4]" + "data_bus[3]" + "data_bus[2]" + "data_bus[1]"
+ "data_bus[0]" + "control[1]" + "control[0]" + "bus_ctl" + "ACK" + "BCK"
+ "SDI0" + "SDI1"'; // #signals=17
"_io" = '"data_bus[7]" + "data_bus[6]" + "data_bus[5]" + "data_bus[4]"
+ "data_bus[3]" + "data_bus[2]" + "data_bus[1]" + "data_bus[0]"'
{ WFCMap 0X->0; WFCMap 1X->1; WFCMap ZX->Z; WFCMap NX->N; } // #signals=8
"_default_Out_Timing_" = '"data_bus[7]" + "data_bus[6]" + "data_bus[5]"
+ "data_bus[4]" + "data_bus[3]" + "data_bus[2]" + "data_bus[1]"
+ "data_bus[0]" + "SDO0" + "SDO1"'; // #signals=10
"_po" = '"data_bus[7]" + "data_bus[6]" + "data_bus[5]" + "data_bus[4]"
+ "data_bus[3]" + "data_bus[2]" + "data_bus[1]" + "data_bus[0]"
+ "SDO0" + "SDO1"'; // #signals=10
"_default_Clk0_Timing_" = '"clk" + "reset" + "ACK" + "BCK"'; // #signals=4 (1)
147
STIL Procedure File (SPF)
7 7.8 Editing an SPF Generated by TetraMAX
}
ScanStructures {
// Uncomment and modify the following to suit your design
// ScanChain "chain_name" { ScanIn "chain_input_name"; ScanOut "chain_output_name"; } (2)
}
Timing {
WaveformTable "_default_WFT_" {
Period '100ns';
Waveforms {
"_default_In_Timing_" { 0 { '0ns' D; } }
"_default_In_Timing_" { 1 { '0ns' U; } }
"_default_In_Timing_" { Z { '0ns' Z; } }
"_default_In_Timing_" { N { '0ns' N; } } (3)
"_default_Clk0_Timing_" { P { '0ns' D; '50ns' U; '80ns' D; } }
"_default_Out_Timing_" { X { '0ns' X; } }
"_default_Out_Timing_" { H { '0ns' X; '40ns' H; } }
"_default_Out_Timing_" { T { '0ns' X; '40ns' T; } }
"_default_Out_Timing_" { L { '0ns' X; '40ns' L; } }
}
}
}
PatternBurst "_burst_" { PatList {
"_pattern_" {
}
}}
PatternExec {
PatternBurst "_burst_";
}
Procedures {
"capture_clk" {
W "_default_WFT_";
"forcePI": V { "_pi"=\r19 # ; "_po"=\j \r10 X ; }
"measurePO": V { "_po"=\r10 # ; }
"pulse": V { "clk"=P; "_po"=\j \r10 X ; }
}
"capture_ACK" {
W "_default_WFT_";
"forcePI": V { "_pi"=\r19 # ; "_po"=\j \r10 X ; }
"measurePO": V { "_po"=\r10 # ; }
"pulse": V { "ACK"=P; "_po"=\j \r10 X ; }
}
"capture_BCK" {
W "_default_WFT_"; (4)
"forcePI": V { "_pi"=\r19 # ; "_po"=\j \r10 X ; }
"measurePO": V { "_po"=\r10 # ; }
"pulse": V { "BCK"=P; "_po"=\j \r10 X ; }
}
"capture_reset" {
W "_default_WFT_";
"forcePI": V { "_pi"=\r19 # ; "_po"=\j \r10 X ; }
"measurePO": V { "_po"=\r10 # ; }
"pulse": V { "reset"=P; "_po"=\j \r10 X ; }
}
"capture" {
W "_default_WFT_";
"forcePI": V { "_pi"=\r19 # ; "_po"=\j \r10 X ; }
"measurePO": V { "_po"=\r10 # ; }
148
.....
STIL Procedure File (SPF)
7.8 Editing an SPF Generated by TetraMAX
}
// Uncomment and modify the following to suit your design
// load_unload {
// V { "clk" = 0; "ACK" = 0; "BCK" = 0; "reset" = 0; } // force clocks off and
//scan shift enable pins active (5)
// Shift { V { _si=#; _so=#; "clk" = P; "ACK" = P; "BCK" = P; "reset" = P; }}
// pulse shift clocks
// }
}
MacroDefs {
"test_setup" {
W "_default_WFT_";
V { "clk"=0; "ACK"=0; "BCK"=0; "reset"=0; } (7)
}
}
STIL 1.0 {
Extension Design P2000.5;
}
Header {
Title " TetraMAX (TM) 2000.05-i001012_225440 STIL output";
Date "Wed May 9 16:47:02 2001";
History {
Ann {* Uncollapsed Stuck Fault Summary Report *}
...
Ann {* There are no net connections *}
}
}
Signals {
"clk" In; "reset" In; "control[1]" In; "control[0]" In; "bus_ctl" In;
"ACK" In; "BCK" In; "SDI0" In; "SDI1" In; "data_bus[7]" InOut;
"data_bus[6]" InOut; "data_bus[5]" InOut; "data_bus[4]" InOut;
"data_bus[3]" InOut; "data_bus[2]" InOut; "data_bus[1]" InOut;
"data_bus[0]" InOut; "SDO0" Out; "SDO1" Out;
}
SignalGroups {
"_default_In_Timing_" = '"clk" + "reset" + "data_bus[7]"
+ "data_bus[6]" + "data_bus[5]" + "data_bus[4]" + "data_bus[3]"
+ "data_bus[2]" + "data_bus[1]" + "data_bus[0]" + "control[1]"
+ "control[0]" + "bus_ctl" + "ACK" + "BCK" + "SDI0" + "SDI1"';
// #signals=17
"_pi" = '"clk" + "reset" + "data_bus[7]" + "data_bus[6]" + "data_bus[5]"
+ "data_bus[4]" + "data_bus[3]" + "data_bus[2]" + "data_bus[1]"
+ "data_bus[0]" + "control[1]" + "control[0]" + "bus_ctl" + "ACK" + "BCK"
+ "SDI0" + "SDI1"'; // #signals=17
"_io" = '"data_bus[7]" + "data_bus[6]" + "data_bus[5]" + "data_bus[4]"
+ "data_bus[3]" + "data_bus[2]" + "data_bus[1]" + "data_bus[0]"'
{ WFCMap 0X->0; WFCMap 1X->1; WFCMap ZX->Z; WFCMap NX->N; } // #signals=8
"_default_Out_Timing_" = '"data_bus[7]" + "data_bus[6]" + "data_bus[5]"
+ "data_bus[4]" + "data_bus[3]" + "data_bus[2]" + "data_bus[1]"
149
STIL Procedure File (SPF)
7 7.8 Editing an SPF Generated by TetraMAX
150
.....
STIL Procedure File (SPF)
7.8 Editing an SPF Generated by TetraMAX
Shift {
V {
_si = \r2 #;
_so = \r2 #;
"clk" = 0;
"ACK" = P; (5)
"BCK" = P;
"reset" = 0;
}
}
}
master_observe {
V {
"clk" = 0;
"ACK" = 0;
"BCK" = P; (6)
"reset" = 0;
"bus_ctl" = 1;
}
}
}
MacroDefs {
"test_setup" {
W "_default_WFT_";
V { "clk"=0; "ACK"=0; "BCK"=0; "reset"=0; "bus_ctl"=1; } (7)
}
}
1. SignalGroups construct
The write drc_file command groups all positive-triggered clocks (and asynchronous
sets and resets) into "_default_Clk0_Timing_" and all negative-triggered clocks (and
asynchronous sets and resets) into "_default_Clk1_Timing_". In the examples of
Figure 7–23 and Figure 7–24, all clocks are positive-edge-triggered; thus there is only a
"_default_Clk0_Timing" signal group. Delete scan clocks (ACK and BCK) from
"_default_Clk0_Timing" and define two new signal groups, one each for master (A)
and slave (B) scan clocks. Remember to surround the entire signal list between single
quotes.
2. ScanStructures construct
Define all scan chains in your design and their scan-in and scan-out ports. There must be as
many ScanChain statements as the number of scan chains. Scan chain names must be in
uppercase due to Toshiba’s TSTL2 restriction.
3. Timing construct
Define waveforms for the scan clocks. Scan Clock A (ACK) must go active before Scan
Clock B (BCK), and Scan Clock A must not overlap with Scan Clock B.
151
STIL Procedure File (SPF)
7 7.8 Editing an SPF Generated by TetraMAX
Use a V{...} statement immediately below load_unload to define how the scan chains
in your design can be placed into a shiftable state. Here, put all clock and the bidirectional
3-state enable signals in their off states. If your design has bidirectional ports that can not
be controlled externally, see the section 7.4, "Controlling Bidirectional Ports," on page
134.
Modify the Shift procedure to define how the scan chains in your design can be shifted
one bit. Enter _si = \r<number> # and _so = \r<number> #, where <number> is
equal to the number of the scan chains. Put all system clocks and asynchronous sets and
resets in their off states, and generate clock pulse events on the scan clocks (ACK and BCK).
In the master_observe procedure, generate clock pulse events only on Scan Block B
(BCLK). Put all system clocks, asynchronous sets and resets, and Scan Clock A (ACK) in
their off states. Force bidirectional buses into input mode. If your design has any
bidirectional ports that can not be controlled externally, see the section 7.4, "Controlling
Bidirectional Ports," on page 134.
Add a definition to force bidirectional buses into input mode. If your design has any
bidirectional ports that can not be controlled externally, see the section 7.4, "Controlling
Bidirectional Ports," on page 134.
152
.....
STIL Procedure File (SPF)
7.9 SPF for a Design with JTAG Logic
If your design has JTAG logic, you can perform ATPG in one of two ways. One way is to
disable the JTAG logic for ATPG. The other way is to use the SCANTEST instruction to control
scan chains with JTAG logic during ATPG. SCANTEST is Toshiba’s private instruction
implemented in JTAG IP cores. For a detailed description of the JTAG IP cores and how to
control scan chains with signals generated by JTAG circuitry, refer to an application note
entitled JTAG Design Guide.
Figure 7–25 SPF Used to Run ATPG with JTAG Logic Disabled
STIL 1.0;
Signals {
"CLK" In; "RST" In; "CTR[1]" In;
"SDI0" In { ScanIn; } "SDI1" In { ScanIn; } "CTR[0]" In; "DMODE[2]" In;
"DMODE[1]" In; "DMODE[0]" In; "TSTMODE[1]" In; "TSTMODE[0]" In;
"SCANEN[1]" In; "SCANEN[0]" In; "TCK" In; "TRST" In; "TMS" In; "TDI" In;
"SDI2" In { ScanIn; } "DA[11]" InOut; "DA[10]" InOut; "DA[9]" InOut;
"DA[8]" InOut; "DA[7]" InOut; "DA[6]" InOut; "DA[5]" InOut; "DA[4]" InOut;
"DA[3]" InOut; "DA[2]" InOut; "DA[1]" InOut; "DA[0]" InOut; "DB[11]" InOut;
"DB[10]" InOut; "DB[9]" InOut; "DB[8]" InOut; "DB[7]" InOut; "DB[6]" InOut;
"DB[5]" InOut; "DB[4]" InOut; "DB[3]" InOut; "DB[2]"InOut; "DB[1]" InOut;
"DB[0]" InOut; "DOUT[1]" Out;
"SDO0" Out { ScanOut; } "SDO1" Out { ScanOut; } "DOUT[0]" Out;
"ADR[3]" Out; "ADR[2]" Out; "ADR[1]" Out; "ADR[0]" Out; "TESTOUT" Out;
"TDO" Out; "SDO2" { ScanOut; }
}
SignalGroups {
"_pi" = ’"CLK" + "RST" + "CTR[1]" + "SDI0" + "SDI1" "SDI2" + "CTR[0]"
+ "DMODE[2]" + "DMODE[1]" + "DMODE[0]" + "TSTMODE[1]" + "TSTMODE[0]"
+ "SCANEN[1]" + "SCANEN[0]" + "TCK" + "TRST" + "TMS" + "TDI" + "DA[11]"
+ "DA[10]" + "DA[9]" + "DA[8]" + "DA[7]" + "DA[6]" + "DA[5]" + "DA[4]"
+ "DA[3]" + "DA[2]" + "DA[1]" + "DA[0]" + "DB[11]" + "DB[10]" + "DB[9]"
+ "DB[8]" + "DB[7]" + "DB[6]" + "DB[5]" + "DB[4]" + "DB[3]" + "DB[2]"
+ "DB[1]" + "DB[0]"’
"_io" = ’"DA[11]" + "DA[10]" + "DA[9]" + "DA[8]" + "DA[7]" + "DA[6]"
+ "DA[5]" + "DA[4]" + "DA[3]" + "DA[2]" + "DA[1]" + "DA[0]" + "DB[11]"
+ "DB[10]" + "DB[9]" + "DB[8]" + "DB[7]" + "DB[6]" + "DB[5]" + "DB[4]"
+ "DB[3]" + "DB[2]" + "DB[1]" + "DB[0]" ’;
"_si" = ’"SDI0" + "SDI1" + "SDI2"’ { ScanIn; }
153
STIL Procedure File (SPF)
7 7.9 SPF for a Design with JTAG Logic
Timing {
WaveformTable "_default_WFT_" {
Period ’100ns’;
Waveforms {
"_default_In_Timing_" { 0 { ’0ns’ D; } }
"_default_In_Timing_" { 1 { ’0ns’ U; } }
"_default_In_Timing_" { Z { ’0ns’ Z; } }
"_default_In_Timing_" { N { ’0ns’ N; } }
"_default_Out_Timing_" { X { ’0ns’ X; } }
"_default_Out_Timing_" { H { ’0ns’ X; ’30ns’ H; } }
"_default_Out_Timing_" { L { ’0ns’ X; ’30ns’ L; } }
"_default_Out_Timing_" { T { ’0ns’ X; ’30ns’ T; } }
"CLK" { P { ’0ns’ D; ’40ns’ U; ’60ns’ D; } }
"TCK" { P { ’0ns’ D; ’35ns’ U; ’85ns’ D; } }
}
}
}
154
.....
STIL Procedure File (SPF)
7.9 SPF for a Design with JTAG Logic
Procedures {
"load_unload" {
W "_default_WFT_";
V { "SCANEN[1]"=0; "SCANEN[0]"=1; "RST"=1; "CLK"=0; "TRST"=1; "TCK"=0; }
//Hold TRST at 1 and TCK at 0.
Shift {
W "_default_WFT_";
V { "CLK"=P; "TCK"=0; "_so"=###; "_si"=###; }
//Scan-shift
}
}
"capture_CLK" {
W "_default_WFT_";
F { "RST"=1; "TCK"=0; "TRST"=1; "TMS"=0;} //Hold TRST at 1 and TCK at 0.
"forcePI": V { "_pi"=\r40 # ; "_po"=\r28 X ; }
"measurePO": V { "_po"=\r28 # ; }
"pulse": V { "_po"=\r28 X ; "CLK"=P; }
}
"capture" {
W "_default_WFT_";
F { "RST"=1; "TCK"=0; "TRST"=1; "TMS"=0; } //Hold TRST at 1 and TCK at 0.
V { "_pi"=\r40 # ; "_po"=\r28 # ; }
}
MacroDefs {
"test_setup" {
W "_default_WFT_";
// Initialize JTAG logic to the reset state.
// Thereafter, keep it in the reset state throughout testing.
V { "JTAGEN[1]"=0; "JTAGEN[0]"=1; "RST"=0; "CLK"=0;
"TCK"=0; "TRST"=0; "TMS"=1; "TDI"=0; }
V { "TRST"=1; "RST"=1; }
}
}
Figure 7–26 SPF for Using the JTAG SCANTEST Instruction for ATPG
STIL 1.0;
Signals {
"CLK" In; "RST" In; "CTR[1]" In;
"SDI0" In { ScanIn; } "SDI1" In { ScanIn; } "CTR[0]" In; "DMODE[2]" In;
"DMODE[1]" In; "DMODE[0]" In; "TSTMODE[1]" In; "TSTMODE[0]" In;
"JTAGEN[1]" In; "JTAGEN[0]" In;
"TCK" In; "TRST" In; "TMS" In; "TDI" In { ScanIn; } "DA[11]" InOut;
"DA[10]" InOut; "DA[9]" InOut;
155
STIL Procedure File (SPF)
7 7.9 SPF for a Design with JTAG Logic
"DA[8]" InOut; "DA[7]" InOut; "DA[6]" InOut; "DA[5]" InOut; "DA[4]" InOut;
"DA[3]" InOut; "DA[2]" InOut;
"DA[1]" InOut; "DA[0]" InOut; "DB[11]" InOut; "DB[10]" InOut; "DB[9]" InOut;
"DB[8]" InOut; "DB[7]" InOut; "DB[6]" InOut; "DB[5]" InOut; "DB[4]" InOut;
"DB[3]" InOut; "DB[2]"InOut; "DB[1]" InOut; "DB[0]" InOut; "DOUT[1]" Out;
"SDO0" Out { ScanOut; } "SDO1" Out { ScanOut; } "DOUT[0]" Out; "ADR[3]" Out;
"ADR[2]" Out; "ADR[1]" Out; "ADR[0]" Out; "TESTOUT" Out;
"TDO" Out { ScanOut; }
}
SignalGroups {
"_pi" = ’"CLK" + "RST" + "CTR[1]" + "SDI0" + "SDI1" + "CTR[0]" + "DMODE[2]"
+ "DMODE[1]" + "DMODE[0]" + "TSTMODE[1]" + "TSTMODE[0]" + "JTAGEN[1]"
+ "JTAGEN[0]" + "TCK" + "TRST" + "TMS" + "TDI" + "DA[11]" + "DA[10]"
+ "DA[9]" + "DA[8]" + "DA[7]" + "DA[6]" + "DA[5]" + "DA[4]" + "DA[3]"
+ "DA[2]" + "DA[1]" + "DA[0]" + "DB[11]" + "DB[10]" + "DB[9]" + "DB[8]"
+ "DB[7]" + "DB[6]" + "DB[5]" + "DB[4]" + "DB[3]" + "DB[2]" + "DB[1]"
+ "DB[0]"’
"_io" = ’"DA[11]" + "DA[10]" + "DA[9]" + "DA[8]" + "DA[7]" + "DA[6]" + "DA[5]"
+ "DA[4]" + "DA[3]" + "DA[2]" + "DA[1]" + "DA[0]" + "DB[11]" + "DB[10]"
+ "DB[9]" + "DB[8]" + "DB[7]" + "DB[6]" + "DB[5]" + "DB[4]" + "DB[3]"
+ "DB[2]" + "DB[1]" + "DB[0]" ’;
"_si" = ’"SDI0" + "SDI1" + "TDI"’ { ScanIn; }
"_so" = ’"SDO0" + "SDO1" + "TDO"’ { ScanOut; }
"_po" = ’"DA[11]" + "DA[10]" + "DA[9]" + "DA[8]" + "DA[7]" + "DA[6]" + "DA[5]"
+ "DA[4]" + "DA[3]" + "DA[2]" + "DA[1]" + "DA[0]" + "DB[11]" + "DB[10]"
+ "DB[9]" + "DB[8]" + "DB[7]" + "DB[6]" + "DB[5]" + "DB[4]" + "DB[3]"
+ "DB[2]" + "DB[1]" + "DB[0]" + "ADR[3]" + "ADR[2]" + "ADR[1]" + "ADR[0]"
+ "TESTOUT" + "SDO0" + "SDO1" + "TDO"’;
"_default_In_Timing_" = ’"CLK" + "RST" + "CTR[1]" + "SDI0" + "SDI1" + "CTR[0]"
+ "DMODE[2]" + "DMODE[1]" + "DMODE[0]" + "TSTMODE[1]" + "TSTMODE[0]"
+ "JTAGEN[1]" + "JTAGEN[0]" + "TCK" + "TRST" + "TMS" + "TDI" + "DA[11]"
+ "DA[10]" + "DA[9]" + "DA[8]" + "DA[7]" + "DA[6]" + "DA[5]" + "DA[4]"
+ "DA[3]" + "DA[2]" + "DA[1]" + "DA[0]" + "DB[11]" + "DB[10]" + "DB[9]"
+ "DB[8]" + "DB[7]" + "DB[6]" + "DB[5]" + "DB[4]" + "DB[3]" + "DB[2]"
+ "DB[1]" + "DB[0]"’
"_default_Out_Timing_" = ’"DA[11]" + "DA[10]" + "DA[9]" + "DA[8]" + "DA[7]"
+ "DA[6]" + "DA[5]" + "DA[4]" + "DA[3]" + "DA[2]" + "DA[1]" + "DA[0]"
+ "DB[11]" + "DB[10]" + "DB[9]" + "DB[8]" + "DB[7]" + "DB[6]"
+ "DB[5]" + "DB[4]" + "DB[3]" + "DB[2]" + "DB[1]" + "DB[0]" + "ADR[3]"
+ "ADR[2]" + "ADR[1]" + "ADR[0]" + "TESTOUT" + "TDO"’;
}
ScanStructures {
ScanChain "IN0" {
ScanIn "SDI0";
ScanOut "SDO0";
}
ScanChain "IN1" {
ScanIn "SDI1";
ScanOut "SDO1";
}
ScanChain "IN3" {
ScanIn "TDI";
ScanOut "TDO";
}
}
156
.....
STIL Procedure File (SPF)
7.9 SPF for a Design with JTAG Logic
Timing {
WaveformTable "_default_WFT_" {
Period ’100ns’;
Waveforms {
"_default_In_Timing_" { 0 { ’0ns’ D; } }
"_default_In_Timing_" { 1 { ’0ns’ U; } }
"_default_In_Timing_" { Z { ’0ns’ Z; } }
"_default_In_Timing_" { N { ’0ns’ N; } }
"_default_Out_Timing_" { X { ’0ns’ X; } }
"_default_Out_Timing_" { H { ’0ns’ X; ’30ns’ H; } }
"_default_Out_Timing_" { L { ’0ns’ X; ’30ns’ L; } }
"_default_Out_Timing_" { T { ’0ns’ X; ’30ns’ T; } }
"CLK" { P { ’0ns’ D; ’40ns’ U; ’60ns’ D; } }
"TCK" { P { ’0ns’ D; ’35ns’ U; ’85ns’ D; } }
}
}
}
Procedures {
"load_unload" {
W "_default_WFT_";
// Move from the Pause-DR state to the Shift-DR state.
V { "JTAGEN[1]"=0; "JTAGEN[0]"=1; "RST"=1; "CLK"=0; "TRST"=1; "TCK"=P; "TMS"=1; }
V { "TCK"=P; "TMS"=0; }
// Shift-DR
Shift {
W "_default_WFT_";
V { "CLK"=P; "TCK"=0; "_so"=###; "_si"=###; }
// Shift scan chains.
}
// Move from the Shift-DR state back to the Pause-DR state.
V { "TCK"=P; "TMS"=1; }
V { "TCK"=P; "TMS"=0; }
// Pause-DR
}
"capture_CLK" {
W "_default_WFT_";
F { "RST"=1; "TCK"=0; "TRST"=1; "TMS"=0;}
"forcePI": V { "_pi"=\r40 # ; "_po"=\r27 X ; }
"measurePO": V { "_po"=\r27 # ; }
"pulse": V { "_po"=\r27 X ; "CLK1"=P; }
}
"capture" {
W "_default_WFT_";
F { "RST"=1; "TCK"=0; "TRST"=1; "TMS"=0; }
V { "_pi"=\r40 # ; "_po"=\r27 # ; }
}
MacroDefs {
"test_setup" {
W "_default_WFT_";
// Initialize JTAG logic to the reset state.
V { "JTAGEN[1]"=0; "JTAGEN[0]"=1; "RST"=0; "CLK"=0;
"TCK"=0; "TRST"=0; "TMS"=1; "TDI"=0; }
V { "TRST"=1; "RST"=1; }
// Move to the Shift-IR state.
157
STIL Procedure File (SPF)
7 7.9 SPF for a Design with JTAG Logic
V { "TCK"=P; "TMS"=0; }
V { "TCK"=P; "TMS"=1; }
V { "TCK"=P; "TMS"=1; }
V { "TCK"=P; "TMS"=0; }
V { "TCK"=P; "TMS"=0; }
// Serially shift in the instruction code for SCANTEST.
V { "TCK"=P; "TMS"=0; "TDI"=1; }
V { "TCK"=P; "TMS"=0; "TDI"=1; }
V { "TCK"=P; "TMS"=0; "TDI"=1; }
V { "TCK"=P; "TMS"=1; "TDI"=0; }
// Move to the Pause-DR state.
V { "TCK"=P; "TMS"=1; }
V { "TCK"=P; "TMS"=1; }
V { "TCK"=P; "TMS"=0; }
V { "TCK"=P; "TMS"=1; }
V { "TCK"=P; "TMS"=0; }
V { "TCK"=0; "TMS"=0; }
}
}
158
Chapter 8 Using TetraMAX ATPG
.....................................
.....
T his chapter describes how to perform ATPG using Synopsys’ TetraMAX in conjunction
with Toshiba’s TetraMAX design kit. The material is organized into the following
sections:
☞ Overview
☞ Running TetraMAX ATPG
☞ Various Test Coverage Calculations
☞ ATPG Test Cycles
☞ Running TFSA and LSF2DEF
☞ Advanced Topics
☞ Known Problems
159
Using TetraMAX ATPG
8 8.1 Overview
8.1 Overview
Synopsys TetraMAX
To Toshiba’s
Sign-off System TFSA (Toshiba’s TetraMAX Design Kit)
FSA LSF
SCRDEF
To place & route and scan-chain
reordering (SCR) in Layout-Verilog
interface flow
160
.....
Using TetraMAX ATPG
8.1 Overview
The files used and generated by TetraMAX, SPFGen, TFSA and LSF2DEF are explained
below. SPFGen and TFSA are contained in the Toshiba TetraMAX design kit, whereas
LSF2DEF is contained in the Toshiba DFT design kit.
■ Netlist file Gate-level netlist in Verilog-HDL or VHDL format produced by DFT
Compiler. See Chapter 6.
■ Setup file The required setup file differs, depending on the tool used for scan
synthesis. Refer to 10.2, "SPFGen," on page 229.
■ TMCMD file TetraMAX command file
■ SPF STIL procedure file. See Chapter 7, "STIL Procedure File (SPF)," for
a detailed description. This file provides the following information
needed by TetraMAX ATPG:
161
Using TetraMAX ATPG
8 8.1 Overview
Running SPFGen
..................................................
You can use SPFGen to create an SPF file and a command file for TetraMAX automatically.
Before running SPFGen, a setup file must be created. To run SPFGen, enter the following
command at a UNIX shell prompt.
%> spfgen
Invoking TetraMAX
..................................................
You can use TetraMAX in one of the two user interfaces: graphical user interface (GUI) or
text-based command interface (Shell mode). The invocation commands are:
Use Shell mode when your design environment does not support window-based interface or
when you want to run the TetraMAX job in the background. The GUI mode features the
Graphical Schematic Viewer (GSV) window, which enables interactive analysis and debugging
of design rules violations. In either mode, you can submit a list of commands as a file and have
TetraMAX execute those commands in batch mode. Figure 8–2 shows an example of a
command file.
162
.....
Using TetraMAX ATPG
8.1 Overview
//comment
read netlist -lib $TOSH_ROOT/lib/tmax/TC260CT/TC260CT.tmaxlib
read netlist TOP.v
run build_model TOP
....
You can specify a command file to be run when starting TetraMAX, as follows:
You can also run a command file within a TetraMAX session by using the source command:
163
Using TetraMAX ATPG
8 8.1 Overview
No
OK?
Yes
No
OK?
Yes
Running TFSA
..................................................
TFSA takes as input SCE and SPA files, and generates FSA and LSF files. To execute TFSA,
enter the following command at a UNIX shell prompt.
For a detailed description of TFSA, see Chapter 10, "Toshiba TetraMAX Design Kit," on page
159.
164
.....
Using TetraMAX ATPG
8.1 Overview
Running LSF2DEF
..................................................
LSF2DEF converts an LSF file into an SCRDEF file required for scan-chain reordering in the
layout-Verilog interface flow. To execute LSF2DEF, enter the following command at your
UNIX shell prompt:
165
Using TetraMAX ATPG
8 8.2 Running TetraMAX ATPG
The command mode indicator displays either BUILD>, DRC> or TEST>, depending on which
mode is currently enabled. You must successfully complete the current command mode before
you can enter the next command mode. Figure 8–4 shows a typical command sequence
executed in each mode.
166
.....
Using TetraMAX ATPG
8.2 Running TetraMAX ATPG
BUILD Mode
DRC Mode
TEST Mode
167
Using TetraMAX ATPG
8 8.2 Running TetraMAX ATPG
Use this command to specify the dot character as the hierarchical delimiter.
When you are creating a design for Toshiba’s ASIC, use the library contained in the Toshiba
TetraMAX design kit. The filename is technology.tmaxlib.
168
.....
Using TetraMAX ATPG
8.2 Running TetraMAX ATPG
TetraMAX can read designs in Verilog-HDL and VHDL formats. The read netlist
command can take one file at a time. If you have multiple netlist files, run read netlist on
each file, or use the wildcard character (*) in filename.
Before building the ATPG design model, you can explicitly identify modules which should be
black-boxed, such as megacells (e.g., RAMs) and analog cells. Enter the following command:
Run the following command to build the ATPG model for your design.
169
Using TetraMAX ATPG
8 8.2 Running TetraMAX ATPG
Use the add clocks command to define clocks, and primary inputs that function as
asynchronous sets and resets to scan cells. Don’t specify synchronous sets and resets. The
off-state is 0 when the port is active-high, and 1 when the port is active-low.
By default, only one system clock is activated in any given cycle to avoid unreliable capture
conditions. If necessary, you can optionally define a capture clock group, or a set of clocks that
can be safely clocked in the same cycle. This helps to reduce the pattern count when your
design has multiple system clocks. For more details on this topic, see the section "Multiple
Capture Clock Groups" on page 36.
Two examples are given below. The add pi equivalences command declares primary
input ports to be equivalent; equivalent ports are always driven with the same value during
ATPG.
■ When your design has three system clocks named CLK1, CLK2 and CLK3, and CLK2 and
CLK3 can be equivalent, enter:
■ When your design has three clocks named CLK1, CLK2 and CLK3, and all of them can be
equivalent, enter:
DRC> add clocks off_state CLK1 CLK2 CLK3
DRC> add pi equivalences CLK1 CLK2 CLK3
170
.....
Using TetraMAX ATPG
8.2 Running TetraMAX ATPG
Use the following command to define primary input ports to be held constant during ATPG.
The value of Z can be set only to bidirectional and 3-state output ports.
Figure 8–6, which follows, illustrates how fault effects propagate through the circuit. Faults are
exercised by test vectors applied to primary inputs (PIs) and pseudo-primary inputs (PPIs).
Fault effects can reach pseudo-primary outputs (PPOs) or primary outputs (POs). Fault effects
that propagates to PPOs are captured into scan flip-flops by pulsing a system clock, then
shifted out through the scan chain toward a scan-out port. Scan-out for the current pattern and
scan-in for the next pattern occur simultaneously. On the other hand, fault effects that
propagate to POs are directly observable without pulsing the system clock; the next
scan-shifting is done only to scan in the next pattern.
Stuck-at Faults
Fault effects
propagate to a PO.
Fault effects
propagate to a PPI.
Scan-in Scan-out
(SDI) (SDO)
If you permit generation of such patterns (with no capture clocks in capture mode cycles), the
overall ATPG pattern size could increase. To avoid this situation, it is recommended to set the
following parameters so that a clock is always supplied during scan capture mode.
171
Using TetraMAX ATPG
8 8.2 Running TetraMAX ATPG
The run drc command checks your design to determine that the following rules are met:
■ Scan chains operate correctly during scan shift mode.
■ Scan chains are stitched correctly from primary scan-in ports to primary scan-out ports.
■ All clocks, and asynchronous set and reset signals for scan flip-flops can be directly
controlled from primary input ports.
■ All clocks, and asynchronous set and reset signals are in their off states when the design
switches between scan shift and capture modes.
■ No bus conflict occurs on multiple-drive nets.
Figure 8–7 shows an example of an SCE file. This file is used as input to Toshiba’s TFSA
program to generate FSA and LSF files necessary for PLS and SCR.
172
.....
Using TetraMAX ATPG
8.2 Running TetraMAX ATPG
Number of flip-flops
Scan chain names in a scan chain Scan-in port Scan-out port
When scan-chain reordering (SCR) is to be performed, you must also generate an SPA file.
Redirect a transcript of the report scan path command on all the scan chains to a single
disk file, as shown below.
This file is used as input to Toshiba’s TFSA program to generate an LSF file necessary for
SCR.
Note: The SPA file can be very huge for complex designs. Ensure that you
have sufficient free disk space. See 10.1, "System Requirements" on page
228.
173
Using TetraMAX ATPG
8 8.2 Running TetraMAX ATPG
174
.....
Using TetraMAX ATPG
8.2 Running TetraMAX ATPG
Use the set atpg command to specify the amount of effort to be expended in the ATPG
process. The set atpg command allows you to control the following:
■ Maximum number of aborts in searching for a pattern for a specific fault
(-abort_limit)
■ Maximum capture cycle depth (-capture_cycles)
■ Maximum CPU time allowed per fault and for the entire ATPG run (-time)
■ Maximum number of patterns (-patterns)
■ Test coverage limit (-coverage)
■ Pattern merging effort level during the ATPG process (-merge)
■ Whether ATPG patterns should be stored (-store|-nostore)
Running ATPG
175
Using TetraMAX ATPG
8 8.2 Running TetraMAX ATPG
Alternatively, you can run them with a single command; give the -auto option to the run
atpg command.
To obtain a quick estimate of the final test coverage result, use the following command
sequence.
Figure 8–9 shows a fault summary report when all of the above three options are specified.
176
.....
Using TetraMAX ATPG
8.2 Running TetraMAX ATPG
Possibly detected PT 0
Undetectable UD 0
ATPG untestable AU 0
Not detected ND 0
--------------- ----------------------------------------
total faults 116
test coverage 100%
--------------------------------------------------------
Pattern Summary Report
--------------------------------------------------------
#internal patterns 10
#basic_scan patterns 10
--------------------------------------------------------
Toshiba supports TSTL2 and STIL as tester interface languages in the sign-off environment.
Here, the method for converting ATPG patterns generated by TetraMAX into TSTL2 format
will be described. If you want to use STIL, contact your Toshiba design center engineer.
TetraMAX allows you to generate a chain test for testing the shift operation of the scan chain.
The methods for generating a chain test differs between TetraMAX versions.
■ Using TetraMAX 2000.11-SP1
TetraMAX 2000.11-SP1 generates a chain test separately from scan-test patterns. The
chain test pattern is predetermined and can not be changed. You can generate a chain test
without running the ATPG process. Enter the following command:
TetraMAX 2001.08 generates a chain test as pattern 0 together with the ATPG patterns. It
allows you to select the sequence of a chain test pattern. You must run the ATPG process
even when you only need a chain test. Enter the following command:
aaaaaa
177
Using TetraMAX ATPG
8 8.2 Running TetraMAX ATPG
Run the following commands to convert the generated ATPG patterns into the TSTL2 format.
■ Using TetraMAX 2000.11-SP1
TetraMAX invokes a separate program called Ltran when writing test patterns in TSTL2. To
run Ltran, an environment setup is necessary.
■ Using TetraMAX 2001.08-SP1 or earlier
Before starting TetraMAX, set the environmental to open an Xterm window as shown
below since Ltran uses an Xterm window.
Before invoking TetraMAX, set the following environmental variable to run Ltran in the
background.
The TSTL2 file from TetraMAX does not contain the following statements within the
DECLARE block. You can use SPFGen to automatically generate a file containing only the
DECLARE block.
178
.....
Using TetraMAX ATPG
8.2 Running TetraMAX ATPG
■ SYSCLK
■ SCMCLK
■ SCKSLK
■ SCSEL
■ PATTYPE
Edit the generated TSTL2 file to add these statements. Figure 8–10 shows examples of the
DECLARE blocks for the single- and dual-clocked scan designs. For a description of the
DECLARE block syntax, see B.2, "DECLARE Block," on page 336.
ATPG patterns for a large, complex design can be very lengthy. You may have to split patterns
into multiple TSTL2 files.
■ Specifying the range of pattern numbers
The -first and -last options specify the pattern numbers of the first and last patterns.
Run the above command several times.
179
Using TetraMAX ATPG
8 8.2 Running TetraMAX ATPG
The -split option allows you to limit the number of patterns per output file. The output
TSTL2 files will be namedfilename.tst_00, filename.tst_01 and so on.
TetraMAX can not read a TSTL2 test pattern file. Save test patterns in the binary format before
writing a TSTL2 file.
TetraMAX2001.08-SP1 and earlier occasionally fail to convert ATPG patterns into the TSTL2
format due to the use of the Xterm window. For example, TetraMAX2001.08-SP1 and earlier
may also experience failure to launch the Xterm window or even bring up as many Ltran
sessions (Xterm windows) as required by -split option, causing the system to become
unstable. Should such problems occur, you would lose the generated ATPG patterns.
Therefore, be sure to save test patterns in the binary format before writing a TSTL2 file.
To save ATPG patterns in TetraMAX ATPG binary format, enter the following command:
This way, should TSTL2 conversion fails, you can restore test patterns from a binary file
without re-running the ATPG process.
You can read a binary pattern file into TetraMAX and convert it into TSTL2 format. To do so,
use the -external option on the write patterns command instead of the -internal
option.
180
.....
Using TetraMAX ATPG
8.3 Various Test Coverage Calculations
TetraMAX can perform various calculations to measure the quality of your test patterns. This
section discusses fault coverage, test coverage and testable fault coverage.
Fault Coverage
Fault coverage is defined as the percentage of detected faults out of all faults. Give PT faults a
zero credit, so fault coverage is calculated as follows:
DT
Fault Coverage = ------------------------- × 100
total faults
Use the -PT_credit option on the set faults command, as shown below:
TEST> set faults -fault_coverage -PT_credit 0
TEST> report faults -summary
Figure 8–11 shows a fault summary report resulting from these commands.
...
---------------------------------------------------
fault class code #faults
------------------------------ ---- ---------
Detected DT 181
Possibly detected PT 0
Undetectable UD 3
ATPG untestable AU 4
Not detected ND 0
---------------------------------------------------
total faults 188
test coverage 97.84%
fault coverage 96.28%
...
If you included any megacells in ATPG, see the section "Test Coverage Calculations When
Megacell Models Are Used" on page 195.
181
Using TetraMAX ATPG
8 8.3 Various Test Coverage Calculations
Test Coverage
Test coverage is defined as the percentage of detected faults (DT) out of detectable faults. All
faults meaningless to test are excluded from calculation. One example is stuck-at-1 faults on
power nets. Test coverage is the mostly commonly used measure of test pattern quality.
DT
Test Coverage = ----------------------------------------- × 100
total faults – UD
To get a test coverage result close to fault simulation, set both PT_credit and AU_credit to 0, as
follows.
TEST> set faults -PT_credit 0 -AU_credit 0
TEST> report faults -summary
Figure 8–12 shows a fault summary report resulting from these commands.
...
--------------------------------------------------
fault class code #faults
------------------------------ ---- ---------
Detected DT 181
Possibly detected PT 0
Undetectable UD 3
ATPG untestable AU 4
Not detected ND 0
--------------------------------------------------
total faults 188
test coverage 97.84%
...
If you included any megacells in ATPG, see the section "Test Coverage Calculations When
Megacell Models Are Used" on page 195.
Testable fault coverage is the percentage of detected faults out of all faults that can be
detectable using ATPG methods. You can use it as guiding statistics in the course of ATPG.
DT
Testable Fault Coverage = -------------------------------------------------------- × 100
total faults – UD – AU
182
.....
Using TetraMAX ATPG
8.3 Various Test Coverage Calculations
Figure 8–13 shows a fault summary report resulting from these commands.
...
---------------------------------------------------
fault class code #faults
------------------------------ ---- ---------
Detected DT 181
Possibly detected PT 0
Undetectable UD 3
ATPG untestable AU 4
Not detected ND 0
--------------------------------------------------
total faults 188
test coverage 100.00%
...
If you included any megacells in ATPG, see the section "Test Coverage Calculations When
Megacell Models Are Used" on page 195.
183
Using TetraMAX ATPG
8 8.4 ATPG Test Cycles
This section discusses ATPG test cycles that TetraMAX uses to generate a test pattern.
During design rules checking in DRC command mode, TetraMAX searches for non-scan cells
that can be considered to be shadow registers. You can check the presence of shadow registers
in a run drc transcript.
184
.....
Using TetraMAX ATPG
8.4 ATPG Test Cycles
Capture Operation
Scan Flip-Flop Scan Flip-Flop
B
L1 L2 L1 L2
A
System Clock
Scan-in Scan-out
L3 L3
Scan Clock A
Scan Clock B
In scan capture mode, functional data is captured into L2 by pulsing the system clock. Next,
the flip-flop is put in scan shift mode. Basically, Scan Clock A and Scan Clock B are exercised
repeatedly to shift the data through the scan chain. An important thing to be aware of here is
that the captured data in L2 must be moved to L3 by pulsing Scan Clock B once before
beginning the scan-shift sequence (A-B-A-B- ...). Otherwise the data in L2 will be overwritten
and lost. This movement of data from master latches (L2) to slave latches (L3) is performed by
the master_observe procedure.
Figure 8–15 shows the waveform diagram for the dual-clocked scan design.
185
Using TetraMAX ATPG
8 8.4 ATPG Test Cycles
shadow_ master_
load_unload capture observe observe load_unload
Scan Clock A
Scan Clock B
Scan-in
Scan-out
3. Pulse the system clock (capture).
System Clock
1. Force primary inputs.
Primary Inputs (PIs)
2. Measure primary outputs.
Primary Outputs (POs)
capture_CLK {
V{ "_pi"=#; } //Apply primary inputs.
V{ "_po"=#; } //Observe primary outputs.
V{ "CLK"=P; } //Pulse the system clock.
}
186
.....
Using TetraMAX ATPG
8.4 ATPG Test Cycles
V{} represents a single test cycle. The following capture procedure, which is written within
the Procedures construct, merges the three cycles into a single cycle.
capture_CLK {
V{ "_pi"=#; "_po"=#; "CLK"=P; }
}
The Timing construct in an SPF must define the timing for _pi, _po and CLK in this order.
Timing {
WaveformTable "_default_WFT_" {
Period ’100ns’;
Waveforms {
"_default_In_Timing_" { 0 { ’0ns’ D; } }
"_default_In_Timing_" { 1 { ’0ns’ U; } }
"_default_In_Timing_" { Z { ’0ns’ Z; } }
"_default_In_Timing_" { N { ’0ns’ N; } }
"_default_Clk0_Timing_" { P { ’0ns’ D; ’50ns’ U; ’80ns’ D; } }
"_default_Out_Timing_" { X { ’0ns’ X; } }
"_default_Out_Timing_" { H { ’0ns’ X; ’40ns’ H; } }
"_default_Out_Timing_" { T { ’0ns’ X; ’40ns’ T; } }
"_default_Out_Timing_" { L { ’0ns’ X; ’40ns’ L; } }
187
Using TetraMAX ATPG
8 8.5 Running TFSA and LSF2DEF
Overview
..................................................
Figure 8–17 illustrates the input and output files of TFSA and LSF2DEF.
TetraMAX
TFSA
FSA LSF
Testbench SCRDEF
Functions of TFSA
Test patterns generated by TetraMAX must be simulated with timing. However, during a scan
test, a scan input pattern is serially shifted in, and scan output response is evaluated by shifting
data out serially. This means the actual number of test cycles is proportional to the length of the
scan chain. With typical (serial-load) simulation, the runtime penalty is prohibitive. To slash
simulation runtimes, a parallel-load simulation (PLS) can be employed.
188
.....
Using TetraMAX ATPG
8.5 Running TFSA and LSF2DEF
Toshiba’s sign-off system supports parallel-load simulation. The sign-off system requires an
FSA file to convert a TSTL2 file into a Verilog or VHDL description suitable for
parallel-loading. The TFSA program in the Toshiba TetraMAX design kit is used to generate
an FSA file. The FSA file contains information about scan flip-flops in a design. For PLS, see
"Parallel-Load Simulation" on page 225.
The TFSA program also allows you to generate an LSF file that describes the connections of
cells in scan chains. The LSF file is used for scan-chain reordering (SCR) when
place-and-route is performed using the conventional layout flow. For details on SCR, see
Chapter 12, "Scan-Chain Reordering (SCR)," on page 301.
Functions of LSF2DEF
When place-and-route is performed using the new layout-Verilog interface flow, an LSF file
must be converted into an SCRDEF file for scan-chain reordering (SCR). To do this, use
LSF2DEF contained in the Toshiba DFT design kit. For details on SCR, see Chapter 12,
"Scan-Chain Reordering (SCR)," on page 301.
Note: LSF2DEF is a Perl script that runs on Perl version 4 or above. To run
LSF2DEF, set up the Perl environment.
Running TFSA
..................................................
Syntax
To execute TFSA, enter the following command at a UNIX shell prompt. For a full description
of the command syntax, input and output files, and error messages, see Chapter 10, "Toshiba
TetraMAX Design Kit," on page 227.
189
Using TetraMAX ATPG
8 8.5 Running TFSA and LSF2DEF
Options
-chip Generates a chip-level LSF file. This option is valid only when the -lsf
option is specified. If you don’t give this option, TFSA generates an LSF
file for block-based layout.
-delimit Specifies the character used as the hierarchy delimiter when you changed
it from the default / to another character in TetraMAX.
Running LSF2DEF
..................................................
Note: LSF2DEF is a Perl script that runs on Perl version 4 or above. To run
LSF2DEF, set up the Perl environment.
Use LSF2DEF to convert an LSF file into an SCRDEF file required for scan-chain reordering
in the layout-Verilog interface flow. To execute LSF2DEF, enter the following command at a
UNIX shell prompt:
190
.....
Using TetraMAX ATPG
8.6 Advanced Topics
■ When using the new Layout-Verilog interface flow, use the keyword copy_count to
specify the number of instances for ROMs.
ROMS1B WORD=256 BIT=8 copy_count=1;
ROMS1B WORD=512 BIT=16 copy_count=3;
RAMS2A WORD=256 BIT=8;
RFS12A WORD=256 BIT=10;
■ When the conventional layout flow is used, memory model files will be named
module_name.tmaxlib.
■ When the Layout-Verilog interface flow is used, RAM model files will be named
module_name.tmaxlib, and ROM model files will be named
module_name<sequence_number>.tmaxlib, like EOS1D0D4012A0001.tmaxlib,
EOS1D0D4012A0002.tmaxlib, EOS1D0D4012A0003.tmaxlib, and so on.
3. When the Layout-Verilog interface flow is used, modify your netlist to reflect correct ROM
module names.
191
Using TetraMAX ATPG
8 8.6 Advanced Topics
Sequential ATPG
..................................................
TetraMAX allows you to perform sequential ATPG with a capture cycle depth of 2 to 10.
Sequential ATPG (Fast-Sequential ATPG) is effective for designs with megacell models and
non-scan latches. Disadvantages of sequential ATPG include long runtimes and increased
pattern sizes.
A capture cycle depth of zero causes only combinational ATPG (Basic-Scan ATPG) to be
performed. Don’t use a large value in the first run of ATPG; doing so might lower fault
coverage results. Run sequential ATPG as follows.
2. The following command reports the maximum sequential depth in your design.
4. If the fault coverage results are not satisfactory, increase the capture cycle depth by one and
rerun ATPG.
192
.....
Using TetraMAX ATPG
8.6 Advanced Topics
1. First, run combinational ATPG. Identify all memory modules as black boxes, as follows:
2. Save ATPG patterns, and create a fault list of undetected faults, as shown below:
4. Restart TetraMAX and read in memory model files. This time, don’t set memory modules
to black boxes.
The next sequential ATPG run tries to generate test patterns for faults that were not
detected by combinational ATPG to shorten the runtime.
193
Using TetraMAX ATPG
8 8.6 Advanced Topics
6. Run sequential ATPG using the flow described in the previous section. If fault coverage
results are not satisfactory, rerun sequential ATPG with a larger capture cycle depth.
Figure 8–18 shows the entire flow for using sequential ATPG effectively and efficiently. The
commands given above are highlighted in boldface.
//Combinational ATPG
BUILD> read netlist -library $TOSH_ROOT/lib/tmax/TC260CP/TC260CP.tmaxlib
BUILD> read netlist DEMO.v
BUILD> set build -black_box EAS1D06G008A
BUILD> set build -black_box EF12D06G008A
BUILD> run build TOP
DRC> run drc DEMO.spf
TEST> run atpg -auto
TEST> write faults DEMO_cmb.flt -class PT -class UD -class AU -class ND
TEST> write patterns DEMO_cmb.bin -format binary -internal -replace
TEST> write patterns DEMO_cmb.tst -format tstl2 -internal -replace
TEST> quit -force
//Sequential ATPG
BUILD> read netlist -library $TOSH_ROOT/lib/tmax/TC260CP/TC260CP.tmaxlib
BUILD> read netlist -library EAS1D06G008A.tmaxlib
BUILD> read netlist -library EF12D06G008A.tmaxlib
BUILD> read netlist DEMO.v
BUILD> run build TOP
DRC> run drc DEMO.spf
TEST> read faults DEMO_cmb.flt
TEST> set atpg -capture_cycles 3
TEST> run atpg fast_sequential_only
TEST> set atpg -capture_cycles 5
TEST> run atpg fast_sequential_only
TEST> write patterns DEMO_seq.bin -format binary -internal -replace
TEST> write patterns DEMO_seq.tst -format tstl2 -internal -replace
TEST> quit -force
194
.....
Using TetraMAX ATPG
8.6 Advanced Topics
Symbol Meaning
■ Fault coverage
■ Test coverage
Test coverage is the percentage of faults detected by combinational and sequential ATPG
runs out of all faults minus those that are meaningless to fault during sequential ATPG.
DT_comb + DT_seq
Test Coverage = ----------------------------------------------------------------- × 100
All_Fault_comb – UD_seq
195
Using TetraMAX ATPG
8 8.6 Advanced Topics
n–1 n–1
α in the second term indicates the number of cycles required per scan capture mode operation.
It depends on your ATPG setups and is normally 2 to 5.
For large designs, the first term (i.e., scan-shifting) contributes to a majority of the total file
size. Thus, the above equation can be approximated as follows:
n–1
≈ (total_sum_of_scan_chain_lengths) × pattern_count × 2
For example, if your design has 35-k scan flip-flops and TetraMAX generated 1,300 patterns
for it, the resulting TSTL2 file size is estimated as:
196
.....
Using TetraMAX ATPG
8.6 Advanced Topics
Therefore, to write out a TSTL2 file, you need a disk space three times a TSTL2 file size
estimate. Figure 8–19 shows the results for an actual design with 35-k scan flip-flops and 1,300
patterns.
197
Using TetraMAX ATPG
8 8.7 Known Problems
By setting the environmental variable LTRAN_SHELL to 1, you can have TetraMAX generate
TSTL2 files without opening an Xterm window even in Shell mode. Enter as follows to invoke
TetraMAX:
Even in Shell mode, the write patterns -format tstl2 command always launches the
Xterm window to run Ltran. If the DISPLAY environment variable is not set correctly, an
attempt to start Xterm fails. Note that, even in this case, TetraMAX does not issue an error
message. When you use a command file for your ATPG run, be sure to set the DISPLAY
variable and the path to Xterm before invoking TetraMAX.
198
.....
Using TetraMAX ATPG
8.7 Known Problems
■ Wrong
library IEEE, tc220c;
■ Correct
library IEEE;
library tc220c;
199
Using TetraMAX ATPG
8 8.7 Known Problems
200
Chapter 9 Validating the Scan Structure and
ATPG Test Vectors
.....................................
.....
T his chapter describes how to evaluate the quality of your scan implementation and
generated test patterns. The material is organized into the following sections.
Note: This manual assumes that you use TSTL2 to write test patterns. If you
want to use the Standard Tester Interface Language (STIL), contact your
Toshiba design center engineer.
201
Validating the Scan Structure and ATPG Test Vectors
9 9.1 Key Decision Criteria for Quality of Results
Today’s design teams work on sub-blocks in parallel. Ideally, it is best to run ATPG at the chip
level before you decide you have reached ultimate DFT closure on your sub-block. However,
you may need to complete your own sub-block before all the other sub-blocks are made
available. In such cases, you should perform a trial ATPG on your sub-block to obtain a quick
estimate of possible fault coverage and validate its test timing. This is necessary to ensure that
your sub-block will not adversely affect chip-level testability when it is eventually embedded
in the entire chip environment.
Ensure there are no design rule checking problems related to the following, at the time of scan
synthesis and prior to ATPG.
■ Scan chains
■ Sequential cells
■ Internal 3-state buses
■ Bidirectional pins
■ Combinational feedback loops
202
.....
Validating the Scan Structure and ATPG Test Vectors
9.1 Key Decision Criteria for Quality of Results
Certain types of design rule violations, e.g., those on latches and feedback loops, invariably
lower fault coverage. You can add test mode control logic to disable circuitry that causes
design rule violations. However, the test mode control logic itself also affects fault coverage, as
it blocks fault propagation. Therefore, to get a design closure on a sub-block, it is
recommended to run ATPG on a random sample of faults to obtain an quick estimation of fault
coverage.
Timing Verification
You must perform timing verification at the chip level using the test timing. This is not a part of
the scan synthesis process, but if the design does not work, you need to modify your design and
rerun scan synthesis.
• Chain test (patterns related to testing scan chains; also known as a shift test)
• First 10 ATPG patterns
• Last 10 ATPG patterns
• Full scan test patterns
■ ATPG log or fault summary report (including fault coverage results)
■ Detected fault report (optional)
203
Validating the Scan Structure and ATPG Test Vectors
9 9.1 Key Decision Criteria for Quality of Results
Before deciding you have reached ATPG closure, examine the transcript from the TetraMAX
run drc command to ensure there are no design rule checking problems related to the
following.
■ Internal buses and external bidirectional pins
■ Test protocol procedures
■ Scan chain tracing
■ Clocks and clocked elements
■ Non-scan storage elements
■ Multidriver nets
■ Combinational feedback loops
Determine that the test vector functionality and timing match the predicted behavior from the
ATPG. 9.3, "Verifying the ATPG Patterns," discusses vector verification.
■ Verify the functions of the chain test file and the ATPG pattern files, using a typical (i.e.,
serial-load) simulation method.
■ Verify the timing of the ATPG pattern files at the test timing.
204
.....
Validating the Scan Structure and ATPG Test Vectors
9.2 Scan Design Rule Checking
You can perform test design rule checking (DRC) with both scan synthesis and ATPG tools. To
weed out testability problems early in the design cycle, it is strongly recommended to check
the design rules during the scan synthesis process. This section describes how to evaluate the
DRC results from DFT Compiler and TetraMAX.
During the scan synthesis process, use the check_test command to perform test design rule
checking (DRC). Design rule checking can occur only at the gate level; so check the design
rules right after the first compile (i.e., once your design is synthesized to gates) and after you
have a fixed gate-level design.
The report_test command allows you to generate detailed scan-related reports. Run the
check_test command before report_test because check_test is an essential
preprocess to guarantee that the reports from report_test are correct.
Scan Chains
The check_test command reports design rule violations related to scan chains. Figure 9–1
shows a fragment of a check_test transcript. It describes potential problems with the scan
chain.
205
Validating the Scan Structure and ATPG Test Vectors
9 9.2 Scan Design Rule Checking
**************************************************
Sequential Cell Summary
After running check_test, you can run the report_check command to generate detailed
scan-related reports. To obtain information about existing scan chains in a design, enter the
following command:
Figure 9–2 is a partial sample of a report generated when the design has a complete scan chain.
****************************************
Report : test
-scan_path
Design : DEMO8
Version: 1999.05
Date : Fri Feb 11 15:16:36 2000
****************************************
DII0 ->
iii[1]/REG_A_reg_0 -> The instance names of the flip-flops
iii[1]/REG_A_reg_1 -> are not followed by error indicators.
iii[1]/REG_A_reg_2 ->
...
206
.....
Validating the Scan Structure and ATPG Test Vectors
9.2 Scan Design Rule Checking
The report shown in Figure 9–3 identifies two incomplete scan chains, along with scan
flip-flops that are only scan-controllable or only scan-observable.
****************************************
Report : test
-scan_path
Design : DEMO8
Version: 1999.05
Date : Fri Feb 11 15:25:11 2000
****************************************
DII0 ->
iii[1]/REG_A_reg_0 (c) ->
iii[1]/REG_A_reg_1 (c) ->
iii[1]/REG_A_reg_2 (c) -> The instance names of the flip-flops
iii[1]/REG_A_reg_3 (c) -> are followed by error indicators.
iii[1]/REG_A_reg_4 (c) ->
iii[1]/REG_A_reg_5 (c) ->
iii[1]/REG_A_reg_6 (c) ->
iii[1]/REG_A_reg_7 (c) ->
Sequential Cells
At the end of the check_test output, DFT Compiler provides a summary of the test status of
sequential cells in your design, as shown in Figure 9–4.
207
Validating the Scan Structure and ATPG Test Vectors
9 9.2 Scan Design Rule Checking
...
**************************************************
Sequential Cell Summary No sequential cell has design
rule violations.
0 out of 5 sequential cells have violations
**************************************************
Within the summary, sequential cells are divided into two categories: those with violations and
those without. Although the report shown in Figure 9–4 says there is no sequential cell with
violations, two sequential cells are transparent latches, not "valid scan cells." These latches
might affect test coverage results; to ensure your fault coverage goal will be satisfied, it is
recommended to perform a trial ATPG on a sample of faults.
To generate a report that identifies 3-state nets with ATPG conflicts, run the following
command.
Note: TetraMAX might not be able to identify all 3-state violations. Be sure to
check for bus conflict and float conditions through simulation.
Bidirectional Ports
Check the check_test transcript to ensure that all bidirectional pins are forced to input mode
during scan-shifting. Figure 9–5 shows a report summary with a violation message.
**************************************************
Test Design Rule Violation Summary
Total violations: 3
**************************************************
PROTOCOL VIOLATIONS
3 net (connected to bidirectional port) with unknown 3-state driver mode
violations (TEST-563)
208
.....
Validating the Scan Structure and ATPG Test Vectors
9.2 Scan Design Rule Checking
Remember, even if your design has no problem, you will get bidirectional port violations
unless you correctly set the Scan Shift Enable port with the set_signal_type command
prior to check_test.
Check the check_test transcript to ensure that your design has no combinational feedback
loop. Figure 9–6 shows messages from check_test identifying cells in a combinational
feedback loop.
Total violations: 16
**************************************************
TOPOLOGY VIOLATIONS
16 Combinational feedback loop violations (TEST-117)
...
♦ Schematic of mult32g/control
Transparent latches
specified by set_scan_transparent
To perform pattern generation, the combinational feedback loop must be disabled through
constant logic values or injection of unknown (X) values. This lowers possible fault coverage
results. To evaluate the fault coverage impact, it is recommended to perform a trial ATPG on a
sample of faults. If the impact is significant, break the loop by using a test mode signal.
209
Validating the Scan Structure and ATPG Test Vectors
9 9.2 Scan Design Rule Checking
The design in Figure 9–6 has two latches defined with the set_scan_transparent
command. If you don’t specify these latches as transparent, a loop is not completed. However,
that does not provide a solution to the fault coverage problem because more nets end up
assuming X values during ATPG.
• B (Build rules)
• C (Clock rules)
• N (Netlist rules)
• S (Scan trace rules for scan chain operation)
• V (Vector rules)
• X (X state rules)
• Z (3-state rules)
■ Test design rule severity
Each design rule is assigned one of the four severity levels by default:
210
.....
Validating the Scan Structure and ATPG Test Vectors
9.2 Scan Design Rule Checking
Before issuing the run drc command, declare clock input ports and primary input constraints
and create an SPF. The syntax of the run drc command is:
The run drc command displays a series of messages. Figure 9–7 shows its processing flow.
Summary generation
The run drc command first checks buses to identify any drivers that could potentially cause
bus conflicts (contentions) and floating (Z-state) bus conditions. Figure 9–8 shows a fragment
of the run drc transcript regarding the bus contention/float checking.
211
Validating the Scan Structure and ATPG Test Vectors
9 9.2 Scan Design Rule Checking
Figure 9–8 Summary Report from the Bus/Wire Contention Ability Checking
---------------------------------------------------------------------------
Begin Bus/Wire contention ability checking...
In Figure 9–8, the "Bus summary" line provides the following information:
■ #bus_gates the total number of bus gates in your design
TetraMAX treats all 3-state devices as buses, including both internal and external buses. In the
above example, the design has 30 bus gates, all of which are external bidirectional ports.
Based on the results of this checking, bus gates are assigned one of the contention and Z-state
status types:
■ #pass the number of bus gates that can never be in a contention or Z-state
condition.
■ #fail the number of bus gates that can be in a contention or Z-state condition.
■ #abort the number of bus gates for which TetraMAX couldn’t determine
pass/fail classifications.
TetraMAX can not correctly control bus gates classified as "abort." Because these bus gates
introduce unpredictable logic values, you should modify your design to eliminate them. For
bus gates classified as "fail," TetraMAX discards any patterns that result in a contention or Z
state, yet at the expense of a longer runtime and a lower fault coverage.
Note: TetraMAX might not be able to identify all 3-state violations. Be sure to
check for bus conflict and float conditions through simulation.
Bus Keepers
If decode logic is not designed properly, bus gates can cause floating (Z-state) bus conditions.
You can use a bus keeper so that a bus retains the last value driven on it to avoid a Z state.
212
.....
Validating the Scan Structure and ATPG Test Vectors
9.2 Scan Design Rule Checking
Figure 9–9 shows a report generated for a design in which a bus has no bus keeper on it; the
"Z-state status" line indicates the presence of one failing bus, which is accompanied by a Z2
violation warning message.
---------------------------------------------------------------------------
Begin Bus/Wire contention ability checking...
Bus summary: #bus_gates=2, #bidi=1, #weak=0, #pull=0, #keepers=0
Contention status: #pass=1, #bidi=1, #fail=0, #abort=0, #not_analyzed=0
Z-state status : #pass=0, #bidi=1, #fail=1, #abort=0, #not_analyzed=0
Warning: Rule Z2 (bus capable of holding Z state) was violated 1 times.
Bus/Wire contention ability checking completed, CPU time=0.00 sec.
---------------------------------------------------------------------------
Although TetraMAX discards any patterns that result in a Z state, bus gates classified as "fail"
cause a longer runtime and lower fault coverage.
Figure 9–10 shows a report for a design in which a bus has a bus keeper attached to it. The bus
that was previously classified as "fail" without a bus keeper is now classified as "pass."
---------------------------------------------------------------------------
Begin Bus/Wire contention ability checking...
Bus summary: #bus_gates=2, #bidi=1, #weak=0, #pull=1, #keepers=1
Contention status: #pass=1, #bidi=1, #fail=0, #abort=0, #not_analyzed=0
Z-state status : #pass=1, #bidi=1, #fail=0, #abort=0, #not_analyzed=0
Bus/Wire contention ability checking completed, CPU time=0.01 sec.
---------------------------------------------------------------------------
The run drc command simulates test protocol procedures in an SPF to determine the logic
states of non-scan flip-flops and latches during ATPG. Figure 9–11 shows a report from a
procedure simulation.
213
Validating the Scan Structure and ATPG Test Vectors
9 9.2 Scan Design Rule Checking
The run drc command simulates each scan chain as defined by test procedures to determine
that it operates correctly and complies with a set of scan trace rules. During scan chain tracing,
TetraMAX performs the following:
Figure 9–12 shows a fragment of the report regarding scan chain operation.
TetraMAX verifies the scan chain operation simultaneously while simulating test procedures.
As each scan chain is simulated, TetraMAX displays the scan chain name and its length (or the
number of scan cells in it).
The run drc command checks all clocks against the clock rules. Figure 9–13 shows a report
from the clock rule checking with three warning messages.
214
.....
Validating the Scan Structure and ATPG Test Vectors
9.2 Scan Design Rule Checking
The run drc command analyzes all non-scan storage elements, including:
■ Non-scan D-type flip-flops
■ Latches
■ RAMs
■ ROMs
■ Bus keepers
These cells hold state. Latches that can be put in transparent mode are identified, and latches
that can not be made transparent are replaced by TIEX logic that always outputs an unknown
(X) value. Figure 9–14 shows a report from non-scan rule checking.
The second line gives the number of D-type flip-flop (DFF) and latch (DLAT) primitives as well
as the latch usage type (tla_usage_type). Use this summary as a basis to determine if you
need to do something about non-scan flip-flops.
The run drc command analyzes the multidriver nets previously identified as potentially
causing bus contentions. The purpose of this step is to determine which drivers actually cause
bus contentions. Figure 9–15 shows a report from this checking.
The first message tells that 163 scan cells connected to bidirectional bus gates were identified.
As a result, rule Z9 was violated 19 times.
215
Validating the Scan Structure and ATPG Test Vectors
9 9.2 Scan Design Rule Checking
During the additional circuit learning process, the run drc command analyzes feedback loops
to determine whether they can be logically broken by the Scan Test Enable signal. If it can not
find a set of Scan Test Enable values to break a loop, run drc issues an X1 violation. Figure
9–16 shows a report from the feedback loop checking.
In this example, one feedback loop was detected, and it has no violation.
1. To see the number of each class of violations, run the following command:
For more detailed information about the DRC violations in your design, enter:
2. To view detailed help on a specific violation, use the man command as follows:
For example:
DRC> man z4
3. You can visually inspect violations by using the Graphical Schematic Viewer (GSV). The
GSV displays a schematic, zooming in on the logic gates involved in a particular violation,
along with any useful diagnostic information.
216
.....
Validating the Scan Structure and ATPG Test Vectors
9.3 Verifying the ATPG Patterns
ATPG doesn’t simulate timing events in a design. Therefore, you must verify through
simulation that the generated patterns function correctly.
The chain test shifts a sequence of 1s and 0s into a scan chain and examines the response at
the scan-out pin to determine that the scan chain itself operates properly.
2. Validate the first 10 (or so) and last 10 (or so) ATPG patterns by a typical (serial-load)
simulation.
Since most of the simulation time is spent shifting data along the scan chain, you only need
to simulate first 10 or so ATPG patterns and last 10 or so ATPG patterns to detect gross
errors. You can create these pattern files by manually cutting out a subset of patterns to
separate files, or by using the -first and -last options of the write patterns
command. Generally, TetraMAX generates scan test patterns in two or more stages; thus
first and last patterns are derived using different methods. That’s why scan test patterns are
sampled from two different locations.
Simulating the serial shifting of scan chains is very time-consuming. Therefore, ATPG
patterns are converted into a parallel-load testbench that directly loads and unloads scan
217
Validating the Scan Structure and ATPG Test Vectors
9 9.3 Verifying the ATPG Patterns
flip-flops in parallel instead of performing a complete serial load. For the parallel-load
simulation (PLS) flow, see the section "Parallel-Load Simulation" on page 225.
Using HSS
..................................................
For a huge design, full-timing simulation can exceed the memory and performance capacity of
your sign-off simulator. In that case, you can use the HSS (High-Speed Simulation) System
which provides runtime and capacity advantages by focusing on the circuit’s function with no
concern for timing.
The purpose of HSS is to provide an efficient design flow by separating functional and timing
aspects of verification. For timing verification, an STA tool provides a full accuracy along with
short runtimes and large capacities required by designers implementing large designs.
HSS uses less elaborate or zero-delay models to speed up simulation. It supports both Verilog
and VHDL simulations. For details on HSS, refer to the High-Speed Simulation (HSS) System
User Guide.
HSS is not a replacement for sign-off simulation. Therefore, HSS can not exist by itself in a
sign-off flow; it only complements full-timing simulation by a Toshiba-certified sign-off
simulator or static timing analysis.
When performing simulation with HSS, follow the same steps as described in the previous
section:
2. Validate the first 10 (or so) and last 10 (or so) ATPG patterns by a typical (serial-load)
simulation.
218
.....
Validating the Scan Structure and ATPG Test Vectors
9.3 Verifying the ATPG Patterns
These considerations relate to the timing verification of a scanned design using PrimeTime:
■ Don’t set any mutlicycle paths in normal mode of operation.
■ Perform a case analysis for scan test mode by setting certain test control pins to a constant
value.
■ Create an SDF file with your tester conditions and set the tester’s input skew and output
strobe margins.
■ Verify the circuit’s operation in scan shift and capture modes separately.
■ If your design has more than one clock group, verify the circuit’s scan capture mode
operation group by group.
If you don’t know the tester conditions, run DCAL without using an IOPARAM file when
generating an SDF (DCSDF) file.
Figure 9–17 illustrates the test timing for the single-clocked scan design.
Virtual Clock
Multicycle Paths: (40 ns + 1cycle period) – 45 ns
219
Validating the Scan Structure and ATPG Test Vectors
9 9.3 Verifying the ATPG Patterns
Figure 9–18 shows a sample script for verifying scan shift mode operation. Figure 9–19 shows
a sample script for verifying scan capture mode operation. The assumptions are:
■ Primary ports
• Group 1: CLK1
• Group 2: CLK2, CLK3
# Constrain the Scan Test Enable port held at a constant value throughout scan
# shift and capture modes with set_test_hold or in a STIL file.
set_case_analysis 1 TEN
220
.....
Validating the Scan Structure and ATPG Test Vectors
9.3 Verifying the ATPG Patterns
# Define paths going from one clock domain to another as false paths.
# (There is no possibility of hold violations occurring in capture mode because
# only one clock group is activated at a time.)
set_false_path -from CLK_GRP1 -to CLK_GRP2 -hold
set_false_path -from CLK_GRP2 -to CLK_GRP1 -hold
# This also causes paths from input ports to output ports to be treated as
# multicycle path. Redefine these paths as single-cycle path.
set_multicycle_path 1 -from [all_inputs] -to [all_outputs]
# Constrain the Scan Test Enable port held at a constant value throughout scan
# shift and capture modes with set_test_hold or in a STIL file.
set_case_analysis 1 TEN
Figure 9–20 illustrates the test timing for the dual-clocked scan design.
221
Validating the Scan Structure and ATPG Test Vectors
9 9.3 Verifying the ATPG Patterns
100 ns
Inputs
TIMESET(0)
5 ns
Input-Mode Bidirects
TIMESET(1)
Output Strobe
TIMESET(7)
Multicycle path relative to
System Clocks Scan Clock B
TIMESET(2)
10 ns
Scan Clock A 50 ns
TIMESET(3)
10 ns
Scan Clock B 70 ns
TIMESET(4)
Virtual Clock
Virtual Clock
222
.....
Validating the Scan Structure and ATPG Test Vectors
9.3 Verifying the ATPG Patterns
Figure 9–21 shows a sample script for verifying scan shift mode operation. Figure 9–22 shows
a sample script for verifying scan capture mode operation. The assumptions are:
■ Primary ports
• Group 1: CLK1
• Group 2: CLK2, CLK3
# Constrain the Scan Test Enable port held at a constant value throughout scan
# shift and capture modes with set_test_hold or in a STIL file.
set_case_analysis 1 TEN
223
Validating the Scan Structure and ATPG Test Vectors
9 9.3 Verifying the ATPG Patterns
# Output ports but scan-out ports change in response to ACK. Define ACK to scan-out
# paths as false paths.
set_false_path -from ACK -to [all_outputs]
# Use the following command to avoid timing violations between ACK edges.
# (This is a library problem.)
set_false_path -from ACK -to ACK
# Constrain the Scan Test Enable port held at a constant value throughout scan
# shift and capture modes with set_test_hold or in a STIL file.
set_case_analysis 1 TEN
# Define paths from ACK to all clocks and output ports as multicycle paths.
set_multicycle_path 2 -from ACK -to [all_clocks]
# Define paths going from one clock domain to another as false paths.
# (There is no possibility of these paths getting sensitized in 1-to2 cycles
# because only one clock group is activated at a time.)
set_false_path -from CLOCK_GRP1 -to CLOCK_GRP2
set_false_path -from CLOCK_GRP2 -to CLOCK_GRP1
# Define paths from each clock group to output ports as false paths.
# (In capture mode, output ports are not strobed after system clocks are exercised.
set_false_path -from CLOCK_GRP1 -to [all_outputs]
set_false_path -from CLOCK_GRP2 -to [all_outputs]
# Define paths from each clock group to Scan Clock A as false paths.
# (There is more than one cycle time between the active edge of a system
# clock and the active edge of Scan Clock A. This is because a
# cycle is inserted to apply Scan Clock B.)
set_false_path -from CLOCK_GRP1 -to ACK
set_false_path -from CLOCK_GRP2 -to ACK
224
.....
Validating the Scan Structure and ATPG Test Vectors
9.3 Verifying the ATPG Patterns
Parallel-Load Simulation
..................................................
When you simulate scan test patterns, most of the time is spent serially loading and unloading
the scan chain. This serial-load operation incurs a significant simulation runtime penalty
because it requires thousands of tester cycles to shift data bit by bit into the scan chain.
Parallel-load simulation performs this load operation in 2 to 3 cycles, reducing the runtime
dramatically.
Once you save your ATPG pattern set in TSTL2 format, you can convert it into a parallel-load
testbench with the TSC program in the Toshiba sign-off environment. Figure 9–23 shows the
parallel-load simulation flow.
Verilog-HDL or VHDL
Netlist
TSTL2 FSA
Toshiba’s Sign-Off System
COMP TSC
Sign-Off Simulator
Simulation Results
File
To generate a parallel-load testbench with TSC, use the options explained below. For details,
see the Sign-Off System Command Reference manual.
225
Validating the Scan Structure and ATPG Test Vectors
9 9.3 Verifying the ATPG Patterns
iscan = [ON|OFF]
When set ON, generates a parallel-load testbench. In the VSO environment,
WAV and DRIVE files are created. In the VITALSO environment, a PARA
file is additionally created.
plscmp = [ON|OFF]
When set ON, compacts a parallel-load testbench. The default is ON. Turn on
this option for complex designs.
fsaread = [ON|OFF]
When set ON, reads in an FSA file generated by the TFSA program. Be sure
to turn on this option.
fsa = filename
Specifies the name of the FSA file if it is different from the default
(design.fsa).
226
Chapter 10 Toshiba TetraMAX Design Kit
.....................................
.....
T oshiba’s TetraMAX design kit is comprised of four utility programs (SPFGen, TFSA,
LSF2DEF and SCRTST), a cell library and a user manual. This chapter describes the
SPFGen, TFSA, LSF2DEF and SCRTST programs. The material is organized into the
following sections:
☞ System Requirements
☞ SPFGen
☞ TFSA
☞ LSF2DEF
☞ SCRTST
227
Toshiba TetraMAX Design Kit
10 10.1 System Requirements
This section shows the hardware and software requirements for using Toshiba’s TetraMAX
design kit.
Note: Be sure to obtain the latest design kit release before you begin creating
a design.
Note: Ask your Toshiba design center engineer for the latest information about
supported TetraMAX versions.
Note: The SPA file can be very huge for complex designs.
228
.....
Toshiba TetraMAX Design Kit
10.2 SPFGen
10.2 SPFGen
Functions of SPFGen
..................................................
To run TetraMAX, a STIL procedure file (SPF) is required. If you perform scan synthesis with
DFT Compiler, you can write out an SPF within a DFT Compiler session. If you use another
test synthesis tool for scan insertion, you must create an SPF. However, the SPF syntax is
complicated, and mistakes in writing SPF descriptions often lead to trouble. SPFGen assists
you in automatically generating an SPF. SPFGen is contained in version 1.12A and above of
the Toshiba TetraMAX design kit.
SPFGen
SPFGen
229
Toshiba TetraMAX Design Kit
10 10.2 SPFGen
SPFGen
Input Files
SPFGen supports netlists written in Verilog-HDL. To run SPFGen, the netlist of the top
module suffices.
■ tsb.config
Configuration file for the Toshiba sign-off system. See page 237.
■ SPF (DC)
SPF file generated by DFT Compiler. SPFGen provides the capability to tune the SPF file
from DFT Compiler.
■ INIT
The INIT file is optionally used to specify an initialization sequence and a sequence
before and after scan shifting. This file is required when your design needs an
initialization sequence and when scan circuitry is controlled by signals generated by
JTAG logic. See page 236.
■ TDCMD
Same setup file as that used by VSO/DFT to define test modes and scan chains.
■ atpg.config
Setup file used by SPFGen to define test modes and scan chains. See page 232.
Output Files
230
.....
Toshiba TetraMAX Design Kit
10.2 SPFGen
■ DECLARE
This file contains the DECLARE block written in TSTL2 format. Copy the contents of this
file to the TSTL2 file appropriately when running parallel-load simulation. The default
filename is top_module_name.declare.
■ TMCMD
TetraMAX command file. You can run this command file without modification. The
default filename is top_module_name.tmcmd.
■ SPF
STIL procedure file that can be submitted to TetraMAX. The default filename is
top_module_name.tmspf.
■ Log
Running SPFGen
..................................................
Syntax
Options
231
Toshiba TetraMAX Design Kit
10 10.2 SPFGen
atpgconf Specifies an alternative name to give the generated ATPG configuration file.
readspf If on, reads an SPF file from DC. The default is off.
scan Selects the scan style, muxscan for a single-clocked scan design, fascan
for a dual-clocked scan design, and mix for a mixed single/dual-clocked
scan design.
lang Selects the language in which log files are generated, J for Japanese and E
for English. The default is English. Screen output (standard output) is
always English.
atpg.config File
..................................................
Following is the format of the atpg.config file:
$option {
$module = top_module_name ;
$tech = ASIC_technology ;
$netlist = netlist_filename ;
$spfin = SPF_filename_from_DC ;
$spfout = Output_SPF_filename ;
$cmdout = TMCMD_filename ;
$init = INIT_filename ;
$scan = {muxscan|fascan|mix} ;
$lang = [J|E] ;
$jtag = {JTAGC11|JTAGC14} ;
$jtaginst = {SCANTEST|PSSCAN} ;
}
$chain scan_chain_name {
pin_name = [+|-] attribute ;
}
$port {
pin_name = [+|-] attribute ;
}
232
.....
Toshiba TetraMAX Design Kit
10.2 SPFGen
$option block
$spfout Specifies an alternative name to give the generated SPF file. The default
filename is top_module_name.tmspf.
$init Specifies the name of the INIT file. The default filename is
top_module_name.init.
$scan Selects the scan style, muxscan for a single-clocked scan design, fascan
for a dual-clocked scan design, and mix for a mixed single/dual-clocked
scan design. This keyword is required.
$lang Selects the language in which log files are generated, J for Japanese and E
for English. The default is English. Screen output (standard output) is
always English.
$jtag Selects a JTAG controller when you want the internal-scan logic controlled
by signals generated by the JTAG IP core, JTAGC11 for a 11-instruction
JTAG controller or JTAGC14 for a 14-instruction JTAG controller. Give this
option together with the $jtaginst option.
$jtaginst Selects an instruction to be used when you want the internal-scan logic
controlled by signals generated by the JTAG IP core. Give this option
together with the $jtag option. When you give this option, you do not need
to prepare an INIT file. For a detailed description of the SCANTEST and
PSSCAN instructions, see the JTAG Design Guide application note.
$chain Block
The $chain block provides information about a particular scan chain. This block is required
for each of the scan chains in your design to specify the following:
■ Scan-in port
■ Scan-out port
■ System clock ports (only when $SCANTYPE=mix is specified)
233
Toshiba TetraMAX Design Kit
10 10.2 SPFGen
Identify only scan-in and scan-out ports for a design with a uniform single-clocked scan logic
or a uniform dual-clocked scan logic; use the $port block to designate other ports. System
and scan clocks can only be specified in the $chain block for a mixed single/dual-clocked
design.
$port Block
The $port block provides information that is not specific to a given scan chain. Information in
this block includes:
■ System clock ports
■ Scan clock ports (ACLK, BCLK)
■ Scan Test Enable ports
■ Scan Shift Enable ports
■ Asynchronous set/reset ports
■ JTAG ports
The attribute can be one of the following. The + and - signs denote active-high and
active-low signals, respectively. For scan-in and scan-out ports, the + and - signs indicate
whether a noninverting or inverting I/O buffer is used for a port. If the sign is omitted, the
default is +.
■ SC System clock
■ AC Scan clock A
■ BC Scan clock B
■ ST Asynchronous set
■ RT Asynchronous reset
■ NC Clock not exercised for capture operation
■ TM Test mode (Scan Test Enable)
■ SM Scan mode (Scan Shift Enable)
■ SI Scan-in
■ SO Scan-out
■ TMS JTAG TMS port
■ TDI JTAG TDI port
■ TDO JTAG TDO port
■ TCK JTAG TCK port
■ TRST JTAG TRST port
234
.....
Toshiba TetraMAX Design Kit
10.2 SPFGen
$option {
$module = demo;
$tech = tc240c;
$netlist = demo.v;
$scan = muxscan;
$init = demo.init;
$spfout = demo.spfnew;
$lang = E;
}
$chain IN0 {
SDI0 = +SI;
SDO0 = +SO;
}
$chain IN1 {
SDI1 = +SI;
SDO1 = +SO;
}
$port {
clk = +SC;
reset = +RT;
TMODE = +TM;
SEN = +SM;
bus_ctl = +SM;
}
235
Toshiba TetraMAX Design Kit
10 10.2 SPFGen
INIT File
..................................................
The INIT file is optionally used to specify an initialization sequence and a sequence before and
after scan shifting. It is required when your design requires an initialization sequence and when
scan circuitry is controlled by signals generated by JTAG logic using the SCANTEST or
PSSCAN instruction. Following is the format of the INIT file:
// comment
*INIT
pin_name1 pin_name2 ... pin_nameN ;
input_sequence ;
input_sequence ;
...
input_sequence ;
$PRE_SHIFT
pin_name1 pin_name2 ... pin_nameN ;
input_sequence ;
input_sequence ;
...
input_sequence ;
*POST_SHIFT
pin_name1 pin_name2 ... pin_nameN ;
input_sequence ;
input_sequence ;
...
input_sequence ;
*PRE_SHIFT
SMODE0, SMODE1, MODECK;
11 P;
10 P;
236
.....
Toshiba TetraMAX Design Kit
10.2 SPFGen
01 0;
*POST_SHIFT
SMODE0, SMODE1, MODECK;
01 P;
00 P;
11 0;
tsb.config File
..................................................
ATPG options are included under the *ATPG heading in the tsb.config file, as shown
below:
*COMMON
module = top_module_name
technology = ASIC_technology
*ATPG
netlist = filename
spfin = filename
spfout = filename
cmdout = filename
init = filename
scan = {muxscan|fascan|mix}
lang = {J|E}
jtag = {JTAGC11|JTAGC14}
jtaginst = {SCANTEST|PSSCAN}
tck = JTAG_TCK_port
tms = JTAG_TMS_port
tdi = JTAG_TDI_port
tdo = JTAG_TDO_port
trst = JTAG_TRST_port
spfin Specifies the name of the input SPF generated by DFT Compiler.
237
Toshiba TetraMAX Design Kit
10 10.2 SPFGen
scan Selects the scan style, muxscan for a single-clocked scan design, fascan
for a dual-clocked scan design, and mix for a mixed single/dual-clocked
scan design. This keyword is required.
lang Selects the language in which log files are generated, J for Japanese and E
for English. The default is English. Screen output (standard output) is
always English.
jtag Selects a JTAG controller when you want the internal-scan logic controlled
by signals generated by the JTAG IP core, JTAGC11 for a 11-instruction
JTAG controller or JTAGC14 for a 14-instruction JTAG controller. Give this
option together with the jtaginst option.
jtaginst Selects an instruction to be used when you want the internal-scan logic
controlled by signals generated by the JTAG IP core. Give this option
together with the jtag option. When you give this option, you do not need
to prepare an INIT file. For a detailed description of the SCANTEST and
PSSCAN instructions, see the JTAG Design Guide application note.
*common
module = demo
technology = TC240CQ
*ATPG
netlist = demo.v
spfout = demo.spf
cmdout = demo.tmaxcmd
scan = muxscan
lang = E
jtag = JTAGC14
jtaginst = SCANTEST
tck = TCK
238
.....
Toshiba TetraMAX Design Kit
10.2 SPFGen
tms = TMS
tdi = TDI
tdo = TDO
trst = TRST
239
Toshiba TetraMAX Design Kit
10 10.3 TFSA
10.3 TFSA
Functions of TFSA
..................................................
TFSA generates FSA and LSF files. The FSA file is required to convert a TSTL2 test data file
generated by TetraMAX into a parallel-load testbench. The LSF file is required to change the
order in which scan chains are connected during place-and-route.
TetraMAX
TFSA
FSA LSF
Testbench SCRDEF
240
.....
Toshiba TetraMAX Design Kit
10.3 TFSA
Input Files
SCE File
The SCE file contains reports on the scan flip-flops and scan chains in your design generated
by the TetraMAX report scan chains and report scan cells commands. To run
TFSA, the SCE file must be named design_name.sce.
Redirect the output of the report scan chains and report scan cells commands to
the design_name.sce file, using the redirection operators > and >>, as shown below. The
order of these commands is not important.
For example:
TEST> report scan chain > TMDEMO.sce
TEST> report scan cells -all >> TMDEMO.sce
SPA File
The SPA file contains reports on the scan chains in your design generated by the TetraMAX
report scan path command. The SPA file is only required when generating an LSF file
used for scan-chain reordering. To run TFSA, the SPA file must be named
design_name.spa.
Redirect the output of the report scan path command on each scan chain to the
design_name.spa file, using the redirection operators > and >>. If your design has five scan
chains, for example, repeat report scan path five times, as shown below:
TEST> report scan path IN0 sco sci > TMDEMO.spa
TEST> report scan path IN1 sco sci >> TMDEMO.spa
TEST> report scan path IN2 sco sci >> TMDEMO.spa
TEST> report scan path IN3 sco sci >> TMDEMO.spa
TEST> report scan path IN4 sco sci >> TMDEMO.spa
Output Files
241
Toshiba TetraMAX Design Kit
10 10.3 TFSA
FSA File
The FSA file identifies scan flip-flops in each scan chain in your design and their properties.
The FSA file is required by the Toshiba sign-off system when converting a TSTL2 test data file
produced by TetraMAX into a parallel-load testbench, either in Verilog-HDL or VHDL format.
TFSA names the FSA file design_name.fsa.
LSF File
The LSF file contains information about scan chain routing order. The LSF file is only required
when performing scan-chain reordering (SCR) during place-and-route. TFSA names this file
design_name.lsf.
Log File
TFSA generates a log file. The filename is design_name.tfsalog. Figure 10–8 shows a
sample log.
**********************************************
* Errors and Warning
**********************************************
TFSA-2001 Get chains information.
TFSA-2002 Get cells information.
TFSA-2003 Writing a FSA file.
TFSA-2004 Get scan chain IN0 information from SPA file.
TFSA-2005 Search dummy instance in scan path data.
TFSA-2006 Writing a LSF file.
TFSA-2004 Get scan chain IN1 information from SPA file.
TFSA-2005 Search dummy instance in scan path data.
TFSA-2006 Writing a LSF file.
TFSA-2004 Get scan chain IN2 information from SPA file.
TFSA-2005 Search dummy instance in scan path data.
TFSA-2006 Writing a LSF file.
**********************************************
* Results
242
.....
Toshiba TetraMAX Design Kit
10.3 TFSA
**********************************************
Total error: 0
Total warning: 0
Running TFSA
..................................................
Syntax
Options
-chip Generates a chip-level LSF file. This option is valid only when the -lsf
option is specified. If you don’t give this option, TFSA generates an LSF
file for block-based layout.
-delimit Specifies the character used as the hierarchy delimiter when you changed
it from the default / with this TetraMAX command: set build
-hierarchical_delimiter character.
243
Toshiba TetraMAX Design Kit
10 10.3 TFSA
Several examples of the tfsa command are given below. The assumption is that the top
module name is TMDEMO.
■ The following command generates an FSA file for the VSO environment, but not an LSF
file:
%> tfsa TMDEMO
■ The following command generates an FSA file and a block-based LSF file for the VSO
environment:
%> tfsa TMDEMO -lsf
■ The following command generates an FSA file for the VITALSO environment, but not an
LSF file:
%> tfsa TMDEMO -vhdl
■ The following command generates an FSA file and a chip-level LSF file for the VSO
environment:
%> tfsa TMDEMO -lsf -chip
■ The following command generates an FSA file and a chip-level LSF file for the VSO
environment. The -delimit option is required when you have changed the hierarchy
delimiter to the dot (.) character with the TetraMAX set build command.
%> tfsa TMDEMO -lsf -chip -delimit .
244
.....
Toshiba TetraMAX Design Kit
10.3 TFSA
245
Toshiba TetraMAX Design Kit
10 10.3 TFSA
246
.....
Toshiba TetraMAX Design Kit
10.3 TFSA
Warning Messages
247
Toshiba TetraMAX Design Kit
10 10.3 TFSA
Status Messages
248
.....
Toshiba TetraMAX Design Kit
10.4 LSF2DEF
10.4 LSF2DEF
Function of LSF2DEF
..................................................
When place-and-route is performed using the new layout-Verilog interface flow, an LSF file
must be converted into an SCRDEF file for scan-chain reordering (SCR). To do this, use
LSF2DEF contained in the Toshiba DFT design kit. For details on SCR, see Chapter 12,
"Scan-Chain Reordering (SCR)," on page 301.
Note: LSF2DEF is a Perl script that runs on Perl version 4 or above. To run
LSF2DEF, set up the Perl environment.
The syntax of the LSF file follows. All lines beginning with a # are treated as comments. All
keywords begin with the $ character.
$ScanPath ChainName ;
$ScanIn ScanInInstance Port ;
$ScanOut ScanOutInstance Port ;
$Arbit Arbitname ;
ff_identification
$End ArbitName ;
$Sequence SequenceName ;
ff_identification
$End SequenceName ;
$End ChainName ;
249
Toshiba TetraMAX Design Kit
10 10.4 LSF2DEF
ScanInInstance, Port
Identifies the beginning of a scan chain (e.g., the Z or PO output of an input
buffer, JTAG controller output, etc.)
ScanOutInstance, Port
Identifies the end of a scan chain (e.g., the A input of an output buffer, an
input of a mux, etc.)
$Arbit Marks the beginning of a section that identifies scan flip-flops which should
be reordered.
$Sequence Marks the beginning of a section that identifies scan flip-flops which should
not be reordered.
The format of the ff_Identification in the $Arbit and $Sequence sections is:
InstanceName PortI PortO
where, InstanceName is the instance name of a scan flip-flop written in the Verilog-HDL or
VHDL convention, PortI is the scan-in port of the flip-flop (e.g., TI, SO), and PortO is the
scan-out port of the flip-flop.
A $Sequence section can be nested within a $Arbit section. A nested $Sequence section
causes the scan-in pin of the first flip-flop and the scan-out pin of the last flip-flop listed in it to
be reordered.
Two LSF file examples are given in Figure 10–11 and Figure 10–12, with reference to the logic
design below.
io_2
ff_1 module_1
ff_a
SI SO ff_4
SI SO
SI SO
ff_2 ff_b
io_1
SI SO SI SO
ff_5
SI SO
ff_3
SI SO
250
.....
Toshiba TetraMAX Design Kit
10.4 LSF2DEF
Figure 10–11 shows an example of an LSF file that allows the routing order of all the scan
flip-flops to be changed whereas Figure 10–12 shows an example of an LSF file to retain the
order of the scan flip-flops in module_1.
$ScanPath IN1 ;
$ScanIn .io_1 Z ;
$ScanOut .io_2 A ;
$Arbit ARIN1 ;
.ff_1 SI SO
.ff_2 SI SO
.ff_3 SI SO
.module_1.ff_a SI SO
.module_1.ff_b SI SO
.ff_4 SI SO
.ff_5 SI SO
$end ARIN1 ;
$end IN1 ;
$ScanPath IN1 ;
$ScanIn .io_1 Z ;
$ScanOut .io_2 A ;
$Arbit ARIN1 ;
.ff_1 SI SO
.ff_2 SI SO
.ff_3 SI SO
$Sequence SEQ1 ;
.module_1.ff_a SI SO
.module_1.ff_b SI SO
$End SEQ1 ;
.ff_4 SI SO
.ff_5 SI SO
$end ARIN1 ;
$end IN1 ;
251
Toshiba TetraMAX Design Kit
10 10.4 LSF2DEF
Running LSF2DEF
..................................................
LSF2DEF converts an LSF file into an SCRDEF file required for scan-chain reordering in the
layout-Verilog interface flow. To execute LSF2DEF, enter the following command at your
UNIX shell prompt:
252
.....
Toshiba TetraMAX Design Kit
10.5 SCRTST
10.5 SCRTST
Functions of SCRTST
..................................................
After scan-chain reordering, (SCR), SCRTST reformats TSTL2 scan test patterns according to
the revised order of the scan chain.
Running SCRTST
..................................................
To run SCRTST, a TSTL2 test data file as well as the original and revised FSA files are
required. The output from SCRTST is a TSTL2 test data file. Figure 10–13 illustrates the input
and output files of SCRTST.
SCRTST
Revised TSTL2
where:
test_id Is the test identifier of the input TSTL2 test data file.
-bfsa=FSA_filename
Specifies the name of the original FSA file.
253
Toshiba TetraMAX Design Kit
10 10.5 SCRTST
-afsa=FSA_filename
Specifies the name of the revised FSA file.
Below is an example of the SCRTST command. In this example, the input TSTL2 test data file
is named CKT.tstATPG. The output TSTL2 test data file will be named CKT.tstATPG_scr.
%> scrtst CKT ATPG -bfsa=CKT.fsa.old -afsa=CKT.fsa
254
Chapter 11 JTAG Boundary-Scan Insertion
Using BSD Compiler
.....................................
.....
T his chapter describes the design methodology for JTAG boundary-scan using Synopsys’
BSD Compiler. The material is organized into the following sections.
☞ Overview
☞ BSD Compiler Limitations
☞ JTAG Design and Verification Flow
☞ Step-by-Step JTAG Boundary-Scan Design Procedure
☞ Miscellaneous Commands
☞ JTAG Verification
☞ BSD Compiler Design Kit
☞ Known Problems
255
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.1 Overview
11.1 Overview
BSD Compiler is a boundary-scan automation tool that runs within the Design Compiler (DC)
synthesis environment with the same DC library. BSD Compiler serves two purposes. One is to
generate a boundary-scan design at the RTL simultaneously with synthesis. The other is to
ensure that your design complies with IEEE Std 1149.1. You can generate a boundary-scan
design, verifies that the design complies with the IEEE Std 1149.1 specification and create
boundary-scan test patterns sequentially; or you can only check IEEE Std 1149.1 compliance
for a design that already incorporates boundary-scan logic.
256
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.2 BSD Compiler Limitations
This section describes the limitations for boundary-scan design using BSD Compiler 2000.11.
Core System
System
Design Output Pins
Input Pins
BSR
JTAG JTAG
Input Pins Output Pins
TAPC
257
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.2 BSD Compiler Limitations
TAP Requirements
..................................................
Before JTAG insertion, the TAP ports must have I/O cells attached in your RTL code, as shown
in Figure 11–1.
However, at present, BSD Compiler does not provide a simple means for handling these JTAG
components. If you want to use them with BSD Compiler, contact your Toshiba design center
engineer.
258
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.3 JTAG Design and Verification Flow
This section shows a JTAG boundary-scan design flow using BSD Compiler and DesignWare
components. Read the section "JTAG Insertion and Verification Flow" on page 259 if you want
to insert and verify JTAG circuitry. Read the section "JTAG Verification-Only Flow" on page
264 if you only want to verify JTAG circuitry.
Figure 11–3 Overall JTAG Insertion and Verification Flow Using BSD Compiler
PPMAPGEN
Core Design
Top-Level Design (Black Box)
PPMAP SCR_BSDC
BSDL TSTL2
Figure 11–4 shows the design steps in a BSD Compiler session. Because BSD Compiler works
on the top module, the core design module can be a black box.
259
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.3 JTAG Design and Verification Flow
PPMAPGEN
Read RTL netlist Synthesize design
Figure 11–5 shows a sample script for JTAG boundary-scan design using DesignWare JTAG
components. Replace search paths, top module name and design file names as appropriate.
/* ===============================================================
FILE NAME jtag_insertion.scr
JTAG TYPE : DW-JTAG
This script inserts and verifies JTAG.
=============================================================== */
/* --------------------------------------------------------------
Set up design environment
----------------------------------------------------------------- */
search_path = { \
/usr/local/synopsys/libraries/syn \
/usr/local/synopsys/tsbdk/tc240c \
}
target_library = tc240c.db_WCCOM25
symbol_library = tc240c.workview.sdb
synthetic_library = { \
standard.sldb \
dw01.sldb \
dw02.sldb \
dw03.sldb \
dw04.sldb \
dwo6.sldb \
}
link_library = { \
"*" \
tc240c.db_WCCOM25 \
260
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.3 JTAG Design and Verification Flow
tc240ct_io_macro.db \
} + synthetic_library
/* --------------------------------------------------------------
Read top module and core logic module (black box)
----------------------------------------------------------------- */
read -format verilog CKTTOP.v_prejtag
read -format verilog CKTCORE.v_blackbox
current_design CKTTOP
link
/* --------------------------------------------------------------
Define clock signals and I/O delays
----------------------------------------------------------------- */
create_clock -name CLK -period 20 -waveform {0.0 10.0} CLK
create_clock -name TCK -period 100 -waveform {0.0 50.0} TCK
set_clock_skew -uncertainty 0.2 CLK
set_fix_hold CLK
set_input_delay 18.0 -clock CLK {all_inputs() - "CLK" - "TCK" }
set_output_delay 18.0 -clock CLK all_outputs()
set_max_fanout 32 CKTTOP
/* --------------------------------------------------------------
Read Port-to-Pin Mapping file (PPMAP)
----------------------------------------------------------------- */
read_pin_map CKTTOP.ppmap
/* --------------------------------------------------------------
Define IEEE Std 1149.1 Test Access Ports
----------------------------------------------------------------- */
set_bsd_signal tck TCK
set_bsd_signal tdi TDI
set_bsd_signal tdo TDO
set_bsd_signal tms TMS
set_bsd_signal trst TRST
/* --------------------------------------------------------------
Define I/O softmacrocells
(Required for TC240 and later series)
----------------------------------------------------------------- */
include CKTTOP.scr_bsdc
/* --------------------------------------------------------------
Configure ID code register
----------------------------------------------------------------- */
test_bsd_manufacturer_id = 24
test_bsd_part_number = 32
test_bsd_version_number = 7
/* --------------------------------------------------------------
Set JTAG configuration
----------------------------------------------------------------- */
set_bsd_configuration \
-style synchronous \
-instruction_encoding default \
-ir_width 4 \
-asynchronous_reset true \
261
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.3 JTAG Design and Verification Flow
-default_package PKG00
/* --------------------------------------------------------------
Set implemented JTAG instructions
----------------------------------------------------------------- */
set_bsd_instruction { \
BYPASS, \
EXTEST, \
SAMPLE, \
IDCODE, \
HIGHZ, \
CLAMP \
}
set_bsd_instruction INTEST \
-input_clock_condition PI \
-output_condition BSR
/* --------------------------------------------------------------
Check design
----------------------------------------------------------------- */
check_design
/* --------------------------------------------------------------
Preview JTAG components
----------------------------------------------------------------- */
preview_bsd -show all
/* --------------------------------------------------------------
Generate and Insert JTAG components
----------------------------------------------------------------- */
insert_bsd
/* --------------------------------------------------------------
Check design
----------------------------------------------------------------- */
current_design CKTTOP
check_design
/* --------------------------------------------------------------
Write GTECH design with JTAG components
----------------------------------------------------------------- */
write \
-format verilog \
-hierarchy \
-output CKTTOP.v_jtag_presynth
/* --------------------------------------------------------------
Synthesize and optimize JTAG components
----------------------------------------------------------------- */
current_design CKTTOP
create_clock -name TCK -period 20 -waveform {0.0 10.0} TCK
set_dont_touch_network TCK
set_clock_skew -uncertainty 0.2 TCK
set_fix_hold TCK
set_input_delay 5.0 -clock TCK {all_inputs() - "CLK" - "TCK" }
set_output_delay 5.0 -clock TCK all_outputs()
262
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.3 JTAG Design and Verification Flow
set_max_area 0
set_max_fanout 32 find(design)
link
current_design CKTTOP
compile
report -timing
/* --------------------------------------------------------------
Optimize boundary-scan register
----------------------------------------------------------------- */
test_bsd_optimize_control_cell = true
test_bsd_control_cell_drive_limit = 4
test_bsd_allow_tolerable_violations = true
optimize_bsd
/* --------------------------------------------------------------
Write gate-level netlist (top module, TAPC and BSR)
----------------------------------------------------------------- */
remove_design CKTCORE
write \
-format verilog \
-hierarchy \
-output CKT.v_jtag_postsynth_withJTAG
/* --------------------------------------------------------------
Read core design (black box)
----------------------------------------------------------------- */
read -format verilog CKTCORE.v_blackbox
current_design CKTTOP
link
/* --------------------------------------------------------------
Set test timing parameters
----------------------------------------------------------------- */
test_default_period = 50.0
test_default_delay = 5.0
test_default_bidir_delay = 5.0
test_default_strobe = 40.0
test_default_strobe_width = 1.0
/* --------------------------------------------------------------
Check IEEE Std 1149.1 compliance
----------------------------------------------------------------- */
check_bsd -verbose -effort high
263
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.3 JTAG Design and Verification Flow
/* --------------------------------------------------------------
Write BSDL file
----------------------------------------------------------------- */
write_bsdl -output CKTTOP.bsdl
/* --------------------------------------------------------------
Generate test patterns
----------------------------------------------------------------- */
write_test_formats = write_test_formats + tstl2_scan
write_test_input_dont_care_value = 0
create_bsd_patterns -output CKTTOP_JTAG
write_test \
-input CKTTOP_JTAG \
-format tstl2_scan \
-out CKTTOP.tst_jtag
PPMAPGEN
Netlist /w JTAG
PPMAP
BSDL TSTL2
264
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.3 JTAG Design and Verification Flow
PPMAPGEN
Read netlists
Figure 11–8 shows a sample script for JTAG verification. Replace search paths, top module
name and design file names as appropriate.
/* ===============================================================
FILE NAME jtag_verification.scr
JTAG TYPE : Anything
This script verifies JTAG.
=============================================================== */
/* --------------------------------------------------------------
Set up design environment
----------------------------------------------------------------- */
search_path = { \
/usr/local/synopsys/libraries/syn \
/usr/local/synopsys/tsbdk/tc240c \
}
target_library = tc240c.db_WCCOM25
symbol_library = tc240c.workview.sdb
synthetic_library = { \
standard.sldb \
dw01.sldb \
dw02.sldb \
dw03.sldb \
dw04.sldb \
dwo6.sldb \
}
link_library = { \
"*" \
tc240c.db_WCCOM25 \
tc240ct_io_macro.db \
} + synthetic_library
265
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.3 JTAG Design and Verification Flow
/* --------------------------------------------------------------
Read all design netlists with JTAG components
----------------------------------------------------------------- */
/* --------------------------------------------------------------
Define clock signals
----------------------------------------------------------------- */
create_clock -name CLK -period 20 -waveform {0.0 10.0} CLK
create_clock -name TCK -period 20 -waveform {0.0 10.0} TCK
set_dont_touch_network CLK
set_dont_touch_network TCK
/* --------------------------------------------------------------
Read Port-to-Pin Mapping file (PPMAP)
----------------------------------------------------------------- */
read_pin_map CKTTOP.ppmap
/* --------------------------------------------------------------
Define IEEE Std 1149.1 Test Access Ports
----------------------------------------------------------------- */
set_bsd_port tck TCK
set_bsd_port tdi TDI
set_bsd_port tdo TDO
set_bsd_port tms TMS
set_bsd_port trst TRST
/* --------------------------------------------------------------
Set test timing parameters
----------------------------------------------------------------- */
test_default_period = 50.0
test_default_delay = 5.0
test_default_bidir_delay = 5.0
test_default_strobe = 40.0
test_default_strobe_width = 1.0
/* --------------------------------------------------------------
Check IEEE Std 1149.1 compliance
----------------------------------------------------------------- */
check_bsd -verbose -effort high
/* --------------------------------------------------------------
Write BSDL file
----------------------------------------------------------------- */
write_bsdl -output CKTTOP.bsdl
/* --------------------------------------------------------------
Generate test patterns
----------------------------------------------------------------- */
266
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.3 JTAG Design and Verification Flow
267
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
This section guides you through the steps for the following tasks using BSD Compiler:
■ Inserting JTAG boundary-scan logic
■ Verifying a boundary-scan design
■ Generating a BSDL file
■ Generating JTAG test patterns
268
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
You can use PPMAPGEN contained in Toshiba’s BSD Compiler design kit to generate a
PPMAP file for your design. For a description of PPMAPGEN, refer to "PPMAPGEN" on
page 290.
Syntax
read_pin_map top_module.ppmap
269
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
Syntax
[tck|tdi|tms|trst|tdo]
Specifies the type of the IEEE Std 1149.1 test signal.
270
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
Syntax
set_bsd_pad_design
I/O_cell_name
-type input|output|tristate_output|bidirectional|
open_drain_output|open_source_output|
open_drain_bidirectional|
open_source_bidirectional
-access { data_in port_name,
data_in_inverted port_name,
data_out port_name,
data_out_inverted port_name,
enable port_name,
enable_inverted port_name,
port port_name,
port_inverted port_name,
}
[-lib_cell true|false]
[-differential true|false]
[-disable_res WEAK0|WEAK1|PULL0|PULL1]
Options
-access Specifies the names of the ports to which BSR signals are connected. Table
11–1 shows the port type choices for each type of I/O cells. For example,
specify data_out_inverted for an inverting input buffer; specify
data_out, data_in and enable_inverted for a noninverting
bidirectional buffer whose EN pin is connected to the BSR. Versions
2001.08 and above can define ports connected to package pins.
271
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
Table 11–1 Port Type Choices for Each Type of I/O Cells
-lib_cell Specifies whether the I/O cell is a library cell. Set this option to false for
an I/O cell configured as a softmacrocell. This option is available with
versions 2001.08 and above.
-differential Specifies whether the I/O cell is a differential I/O cell. Set this option to
true for a differential I/O cell. With 2001.08 and above, you must specify
both port and port_inverted for the differential pad with the -access
option.
-disable_res Specifies the disable result for a 3-state output. This will be written to a
BSDL file as the <disable result> element. It can be one of the following:
You can use PPMAPGEN to automatically generate a script file (called an SCR_BSDC file)
that contains a series of set_bsd_pad_design commands. Include the SCR_BSDC file, as
follows, prior to the JTAG insertion process:
dc_shell> include CKTTOP.scr_bsdc
Take care if your design has custom I/O cells. PPMAPGEN only generates templates of
set_bsd_pad_design for custom I/O cells; you must edit the SCR_BSDC file produced by
PPMAPGEN. For a detailed description of the handling of custom I/O cells, refer to the section
"Handling of Custom I/O Cells" on page 292.
272
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
Syntax
You can specify the device identification code by setting the following environment variables:
test_bsd_manufacturer_id = n (n = 24)
test_bsd_part_number = n (n = 0 to 65535)
test_bsd_version_number = n (n = 0 to 15)
273
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
Syntax
set_bsd_configuration
[-asynchronous_reset true|false]
[-default_package package_name]
[-instruction_encoding default|one_hot]
[-ir_width ir_bit_width]
[-style asynchronous|synchronous]
Options
-asynchronous_reset
Set this option to true to use TRST as a JTAG reset.
-default_package
Sets the default package to be used.
-instruction_encoding
Selects the instruction register encoding style.
274
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
Syntax
Options
-code Sets the binary code for the instruction. By default, BSD Compiler
automatically assigns an appropriate code. To specify codes for multiple
instructions, repeat the set_bsd_instruction command.
-input_clock_condition
Specifies the value that drives the system clock signal during instruction
execution.
-output_condition
Specifies how the system outputs are driven during instruction execution.
275
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
Syntax
Options
-script Generates a script that contains the commands you used to configure your
boundary-scan design.
Note: When both the -show and -script options are specified, the -script option
takes precedence.
insert_bsd
276
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
As the result of the insert_bsd command, the following two modules are added to the top
module:
■ <design_name>_BSR_top_inst_design
■ DW_tap
These two modules are still empty at this point. The synthesis process will add DesignWare
JTAG components to these modules. You can uniquify the boundary-scan register if you want.
277
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
■ To reduce area overhead, one control BSR cell is used to control the enable pin of many
bidirectional and 3-state output buffers.
■ BSR cells are replaced by observe-only BSR cells to satisfy timing constraints.
Syntax
test_bsd_optimize_control_cell = true|false
test_bsd_control_drive_limit = number_of_cells
set_bsr_cell_type
-port port_list
[-direction in|out]
[control_observe|observe_only|none]
set_max_delay -from port_name max_delay
test_bsd_allow_tolerable_violations = true|false
optimize_bsd
278
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
Syntax
Options
-effort Controls the effort used to search for implemented instructions. If your
design has binary (default) encoding, use medium or high effort.
Syntax
279
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
Options
-naming_check
Specifies the type of naming checks to perform on the design.
-output Specifies the name to give the generated BSDL file. The default is
top_design_name.bsdl.
Syntax
Options
-output Specifies the name to give the generated test pattern file.
-effort Controls the effort used to search for implemented instructions. If your
design has binary (default) encoding, use medium or high effort.
280
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
Syntax
Options
-input Specifies the name of the test pattern file generated by the
create_bsd_patterns command.
-output Specifies the name to give the generated test pattern file.
-format Selects the format for the output test pattern file. Set this option to
tstl2_scan to create a TSTL2 file.
Before creating a TSTL2 test pattern file, you need to add tstl2_scan to
the write_test_formats variable and assign logic 0 to an input
don’t-care value, as shown below:
dc_shell> write_test_formats = write_test_formats + tstl2_scan
dc_shell> write_test_input_dont_care_value = 0
281
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.4 Step-by-Step JTAG Boundary-Scan Design Procedure
282
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.5 Miscellaneous Commands
This section describes useful commands and features that were not covered in the previous
section.
Syntax
Option
283
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.5 Miscellaneous Commands
Use the set_bsd_data_cell command to assign a specific data BSR cell to some ports. For
a bidirectional port, use the -direction option to specify the direction to be considered. If
none is give as a cell type argument, no BSR cell is assigned to that port; use none to avoid
putting BSR cells on JTAG-enable ports.
Syntax
set_bsd_data_cell BC_1|BC_2|BC_4|none
-port_list port_list [-direction in|out]
Options
-port_list Identifies ports of a design for which the specified BSR cell type is to be
used.
Use the set_bsd_control_cell command to assign a specific control BSR cell to some
ports. cell_identifier is an arbitrary name.
284
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.5 Miscellaneous Commands
Syntax
Options
-port_list Identifies ports of a design for which the specified BSR cell type is to be
used.
Syntax
285
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.5 Miscellaneous Commands
■ 2000.11 to 2001.08-SP1
set_bsd_compliance
{ port_name, 1|0,
port_name, 1|0, ...}
■ 2002.05
set_bsd_compliance
pattern_name
{ port_name, 1|0,
port_name, 1|0, ...}
■ 2000.11 to 2001.08-SP1
dc_shell> set_bsd_data_cell none -port_list TSTMODE
dc_shell> set_bsd_compliance { TSTMODE, 0 }
286
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.6 JTAG Verification
Be sure to verify that your design complies with the IEEE Std 1149.1 specification. BSD
Compiler allows you to check IEEE Std 1149.1 compliance. Ensure that there is no violation in
the verification results.
***************************************************
IEEE 1149.1 Violation Summary
***************************************************
2 Violations found in extraction of TAP Controller
Violates Rule: 3.3.1b Corresponds to Errors: TEST-819
Violates Rule: 3.6.1b Corresponds to Errors: TEST-819
2 Boundary scan design Violations found
Violates Rule: 10.2.1b Corresponds to Errors: TEST-838
Violates Rule: 10.4.1a Corresponds to Errors: TEST-838
0 Violations found during BSR cell analysis
1
Return code
The last line of the violation summary shows the return code: a value of 1 indicates that
check_bsd terminated normally; note that it does not mean your design fully complies with
IEEE Std 1149.1. A value of 0 indicates abnormal termination.
The check_bsd command verifies IEEE Std 1149.1 compliance of the TAP, the JTAG
registers and inferred instructions, in this order. The subsections that follow describe what is
checked and how to resolve violations.
287
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.6 JTAG Verification
The TEST-838a violation warns you that an output BSR cell is missing on a bidirectional
buffer. You need to check the identified bidirectional buffer. One reason why an output BSR
cell was not inserted to a bidirectional buffer is that it is intentionally used only as an input. If
so, you can ignore this warning message.
288
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.6 JTAG Verification
The TEST-875 message indicates that the mandatory SAMPLE instruction is not implemented
correctly; you need to check your boundary-scan design. This message tells you that the BSR
cell at a bidirectional buffer is not able to capture the logic state of an input port; check if the
identified bidirectional buffer is correctly connected with the boundary-scan register. Or the
polarity of the 3-state enable input of that bidirectional buffer might be opposite to that
required.
Verification Summary
..................................................
At the end of the report is a summary of the extracted JTAG boundary-scan logic. If you use
the -verbose option, the check_bsd command provides you with a complete list of the
instruction register’s instance name, the binary codes of the TAP controller states, the
implemented instructions and the BSR cells.
289
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.7 BSD Compiler Design Kit
Overview
..................................................
The BSD Compiler design kit facilitates boundary-scan design using BSD Compiler in the
Toshiba ASIC design flow. The design kit contains a utility program (PPMAPGEN), demo
files and a quick reference manual. The BSD Compiler design kit runs as an extension to the
Toshiba ASIC sign-off system.
Before installing the BSD Compiler design kit, make sure that you have the Toshiba ASIC
sign-off system installed on your workstation. The versions of the BSD Compiler design kit
and the sign-off system must match.
PPMAPGEN
..................................................
The BSD Compiler design kit contains a program called PPMAPGEN. You can use it to
generate PPMAP and SCR_BSDC files. The PPMAP file is a port-to-pin mapping file that
defines the correspondence between logical ports and physical package pins, the order in
which the boundary-scan register (BSR) cells are routed, and the package you intend to use.
The SCR_BSDC file is a script that containing a series of set_bsd_pad_design commands
that define I/O softmacrocells. For a description of the set_bsd_pad_design command, see
the section "Defining I/O Softmacrocells (Only for TC240 to TC260)" on page 270.
Syntax
290
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.7 BSD Compiler Design Kit
Options
-input Specifies the type of the file that PPMAPGEN must use as input.
• The PPA file is a file used as input to ADAS, Toshiba’s package design
system. Generally, the designer creates one manually.
• The VPPA file is generated by the design verifier program (DVER) of
the Toshiba ASIC sign-off system. The VPPA file does not contain
information about package pins and the package name; so you can only
use it for a trial run of BSD Compiler. You must define a package name
appropriately before you can use it with BSD Compiler.
• The DEV file is an output from ADAS, Toshiba’s package design
systems. For BGA packages, the DEV file enables BSD Compiler to
stitch a boundary-scan path in an optimal order.
• The DCF file is an output from FREEDOM, Toshiba’s package design
system for the TC300 and later series. You must use a DCF file for the
TC300 and later series.
-series Specifies a Toshiba ASIC series if your design is built with TC240 to
TC260 series. This option is required to generate an SCR_BSDC file.
Generally, an SCR_BSDC file is not required for the TC190 to TC220 and
TC280 series.
-bsdc00 Generates an SCR_BSDC file for BSD Compiler 2000.11 and 2000.11-SP1.
If this option is not given, PPMAPGEN generates a script for BSD
Compiler 2002.05.
-bsdc01 Generates an SCR_BSDC file for BSD Compiler 2008.08, 2001.08-SP1 and
2001.08-SP2. If this option is not given, PPMAPGEN generates a script for
BSD Compiler 2002.05.
291
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.7 BSD Compiler Design Kit
Alternatively, you can add your custom I/O cells to the I/O database that accompanies
PPMAPGEN. This way, PPMAPGEN can treat custom I/O cells as if they were standard cells.
The I/O database is located in the $TOSH_ROOT/dft/bsdc/rule directory. There is one
database file for each ASIC series. The filename is series_name.iocell.
%> ls $TOSH_ROOT/dft/bsdc/rule/
tc240c.iocell tc240dc.iocell tc240de.iocell tc240e.iocell
tc250c.iocell tc260c.iocell tc260e.iocell
Copy the IOCELL file for your ASIC series to the directory in which PPMAPGEN will be run.
For example:
%> cp $TOSH_ROOT/dft/bsdc/rule/tc260c.iocell .
Add your custom I/O cells to this file. The format of the IOCELL file is shown below.
#-------------------------------------------------------------------
# Comment
#-------------------------------------------------------------------
cell_group_name INPUT|OUTPUT|BIDIRECT ( port_type = port_name, ... ):
cell_name, ... ,cell_name ;
292
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.7 BSD Compiler Design Kit
#-------------------------------------------------------------------
# Type : BUF_I_DPLL( Input Buffer )
#-------------------------------------------------------------------
BUF_I_DPLL INPUT (ext=CLKIN, out=CLKOUT, pi=PI, po=PO):
ZDPLLX1, ZDPLLX2;
■ cell_group_name
<cell_type_id> Function
Provide a list of the names of all the I/O cells that belong to the same group. When listing
multiple cell names, separate them with commas. End the entire cell name list with a
semicolon.
293
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.7 BSD Compiler Design Kit
■ port_type = port_name
where, port_type is one of the choices listed in Table 11–3. An example of the port
name declaration is given below:
(ext=CLKIN, out=CLKOUT, pi=PI, po=PO):
294
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.8 Known Problems
Versions 2000.11 and 2000.11-SP1 of BSD Compiler do not support using open-drain
bidirectional buffers for the TC190 to TC220, TC280 and TC300 technologies. There is a
workaround for the TC240 to TC260 technologies.
BSD Compiler 2001.08 and above can correctly insert BSR cells to open-drain bidirectional
buffers for all ASIC series.
Workaround
For the TC240 and TC260 series, I/O cells are configured as softmacrocells. Figure 11–15
shows a sample script to have BSD Compiler insert BSR cells to the open-drain bidirectional
buffers. In this example, ports data_bus_0 to data_bus_7 use open-drain bidirectional buffers.
Figure 11–15 Sample Script for BSD Compiler 2000.11 and Above
/*
* Define open-drain bidirectional I/O cells *
*/
set_bsd_pad_design BD4CODIF \
-type bidirectional \
295
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.8 Known Problems
-access { \
data_out ZI, \
data_in EN \
}
/*
* Insert BC_4 to ZI port *
* data_bus_n ports have open-drain bidirectional I/O cells *
*/
set_bsd_data_cell BC_4 \
-port { \
data_bus_0, \
data_bus_1, \
data_bus_2, \
data_bus_3, \
data_bus_4, \
data_bus_5, \
data_bus_6, \
data_bus_7 } \
-direction in
/*
* Insert BC_1 to EN port *
* data_bus_n ports have open-drain bidirectional I/O cells *
*/
set_bsd_data_cell BC_1
-port { \
data_bus_0, \
data_bus_1, \
data_bus_2, \
data_bus_3, \
data_bus_4, \
data_bus_5, \
data_bus_6, \
data_bus_7 } \
-direction out
set_bsd_pad_design BD4CODIF
-type open_drain_bidirectional \
-access { \
data_out ZI, \
enable_inverted EN \
}
-libcell false
The I/O cells for the TC190 to TC220, TC280 and TC300 series are library cells. There is a
workaround for BSD Compiler 2001.08 and above. Figure 11–17 shows a sample script to
have BSD Compiler insert BSR cells to open-drain bidirectional buffers. This script does not
work with 2000.11 and 2000.11-SP1.
296
.....
JTAG Boundary-Scan Insertion Using BSD Compiler
11.8 Known Problems
Figure 11–17 Sample Script for BSD Compiler 2001.08 and Above
/*
* Define open-drain bidirectional I/O cells *
*/
set_bsd_pad_design BD4CODIF \
-type bidirectional \
-access { \
data_out ZI, \
data_in EN \
} \
-lib_cell true
/*
* Insert BC_4 to ZI port *
* data_bus_n ports have open-drain bidirectional I/O cells *
*/
set_bsd_data_cell BC_4 \
-port { \
data_bus_0, \
data_bus_1, \
data_bus_2, \
data_bus_3, \
data_bus_4, \
data_bus_5, \
data_bus_6, \
data_bus_7 } \
-direction in
/*
* Insert BC_1 to EN port *
* data_bus_n ports have open-drain bidirectional I/O cells *
*/
set_bsd_data_cell BC_1
-port { \
data_bus_0, \
data_bus_1, \
data_bus_2, \
data_bus_3, \
data_bus_4, \
data_bus_5, \
data_bus_6, \
data_bus_7 } \
-direction out
set_bsd_pad_design BD4CODIF
-type open_drain_bidirectional \
-access { \
data_out ZI, \
enable_inverted EN \
}
-libcell true
297
JTAG Boundary-Scan Insertion Using BSD Compiler
11 11.8 Known Problems
If you run set_bsd_pad_design on an I/O cell to which a BC_4 cell is to be inserted, a net
from that I/O cell to the core design module gets deleted.
Workaround
298
CMOS ASIC Design Manual
Part 3
Advanced Topics
299
Synopsys-DFT User Guide
300
Chapter 12 Scan-Chain Reordering (SCR)
.....................................
.....
T his chapter describes scan-chain reordering, a feature of the layout tool to change the
order in which scan flip-flops are connected, based on cell placement. The material is
organized into the following sections:
301
Scan-Chain Reordering (SCR)
12 12.1 What is Scan-Chain Reordering?
As a result of scan synthesis using DFT Compiler, flip-flops in your design are replaced by
equivalent scan flip-flops, and the serial inputs and outputs of the scan flip-flops are connected
together to form scan chains. By default, DFT Compiler determines scan-chain routing order,
based on the instance names of the flip-flops. Consequently, closely-related flip-flops are not
necessarily connected together. If the depth of your design hierarchy is shallow, the scan chain
order can become inconsistent with the normal-mode operation of the flip-flops.
In the past, the layout tool made no distinction between scan test circuitry and the rest of the
design. When scan flip-flops were placed based on their normal-mode functionality, scan nets
became unexpectedly long and thus caused routing congestion problems. Now, scan-chain
reordering provides a solution to this problem by resynthesizing scan chains after cell
placement.
The layout tool first breaks or deletes scan nets from the original netlist, then reorders the scan
chain to create new scan nets with optimal wire length. Scan-chain reordering thus helps to
reduce area overhead due to scan nets.
302
.....
Scan-Chain Reordering (SCR)
12.1 What is Scan-Chain Reordering?
SI SO
Scan-out
SI SO
Scan-out
303
Scan-Chain Reordering (SCR)
12 12.2 Scan-Chain Reordering (SCR) Flow
Scan-chain reordering requires the information about the oreder in which scan cells are
connected. When the conventional layout flow is used, the scan routing order is provided in a
file called an LSF file. When the new Layout-Verilog interface flow is used, it is provided in a
file called SCRDEF file. The SCRDEF file can be created by converting an LSF file with
LSF2DEF contained in the Toshiba DFT design kit.
The flow chart in Figure 12–2 illustrates the process of scan-chain reordering when the
conventional layout flow is used.
304
.....
Scan-Chain Reordering (SCR)
12.2 Scan-Chain Reordering (SCR) Flow
chgcir
Original fsa Original TSTL2
[3]
NETMOD
Revised fsa
[5]
SCRTST
Revised TSTL2
Use TFSA to create LSF and FSA files. The LSF file is used as an interface to a layout tool
for reordering the scan chain; it contains an identification of the scan-in pins, scan-out pins
and scan flip-flops. The FSA file contains information about the order in which each scan
chain is connected. After the routing order has been changed during layout, the revised
order must be back-annotated through the FSA file to reformat the scan test patterns
accordingly. For a detailed description of TFSA, see Chapter 10, "Toshiba TetraMAX
Design Kit," on page 301.
When your netlist contains scan chains, scan nets are deleted from the netlist based on the
LSF file prior to cell placement, and new scan nets are created to connect scan flip-flops
with optimal wire length. As a result of physical layout, you will obtain a CHGCIR file,
which contains information about changes made to your logical design.
305
Scan-Chain Reordering (SCR)
12 12.2 Scan-Chain Reordering (SCR) Flow
3. Run NETMOD
NETMOD in the sign-off system takes the CHGCIR file as input and implements logical
netlist changes. For NETMOD, see the Sign-Off System Command Reference manual.
In TetraMAX, regenerate SCE and SPA files. Then, generate a revised FSA file by means
of TFSA.
5. Run SCRTST
Use SCRTST in the Toshiba TetraMAX design kit to reformat the scan test patterns
according to the revised FSA file. For a detailed description of SCRTST, see Chapter 10,
"Toshiba TetraMAX Design Kit," on page 301.
306
.....
Scan-Chain Reordering (SCR)
12.2 Scan-Chain Reordering (SCR) Flow
The flow chart in Figure 12–3 illustrates the process of scan-chain reordering when the new
Layout-Verilog Interface flow is used.
Verilog-HDL
Netlist lsf
LSF2DEF [2]
scrdef
Original fsa Original TSTL2
Revised fsa
[5]
SCRTST
Revised TSTL2
Use TFSA to create LSF and FSA files. The LSF file is used as an interface to a layout tool
for reordering the scan chain; it contains an identification of the scan-in pins, scan-out pins
and scan flip-flops. The FSA file contains information about the order in which the scan
chain is connected. After the routing order has been changed during layout, the revised
order must be back-annotated through the FSA file to reformat the scan test patterns
accordingly. For a detailed description of TFSA, see Chapter 10, "Toshiba TetraMAX
Design Kit," on page 301.
307
Scan-Chain Reordering (SCR)
12 12.2 Scan-Chain Reordering (SCR) Flow
Use LSF2DEF contained in the Toshiba DFT design kit to convert an LSF file into an
SCRDEF file. For how to run LSF2DEF, see the section "Running LSF2DEF" on page
165.
When your netlist contains scan chains, scan nets are deleted from the netlist based on the
SCRDEF file prior to cell placement, and new scan nets are created to connect scan
flip-flops with optimal wire length. As a result of physical layout, you will obtain a new
Verilog-HDL netlist.
In TetraMAX, regenerate SCE and SPA files. Then, generate a revised FSA file by means
of TFSA.
5. Run SCRTST
Use SCRTST in the Toshiba TetraMAX design kit to reformat the scan test patterns
according to the revised FSA file. For a detailed description of SCRTST, see Chapter 10,
"Toshiba TetraMAX Design Kit," on page 301.
308
Chapter 13 Timing Analysis Using PrimeTime
.....................................
.....
T his chapter discusses case analysis useful for analyzing normal- and test-mode timing of
your design using PrimeTime. The material is organized into the following sections:
309
Timing Analysis Using PrimeTime
13 13.1 STA Considerations for a Design with DFT Logic
In most cases, DFT structures such as internal-scan, JTAG boundary-scan and BIST logic
operate off dedicated test clock pins. Even when system clock pins are used, during testing
clock signals are usually operated at frequencies that differ from the system clock frequencies.
Consequently, performing static timing analysis (STA) in normal operation mode can result in
a lot of false timing violations.
To avoid this problem, it is recommended that case analysis be used to perform timing analysis
under different specific conditions, as follows:
■ Disable any DFT logic to validate the timing in normal operation mode.
■ Enable DFT logic to validate its timing.
310
.....
Timing Analysis Using PrimeTime
13.2 Validating the Normal-Mode Operation of a Scanned Design
This section presents some tips for analyzing the normal-mode operation of a design that
includes single- or dual-clocked scan logic.
The following example specifies that the port TEN1 is at a constant logic value 0.
pt_shell> set_case_analysis 0 TEN1
The following example specifies that the port SEN1 is at a constant logic value 0.
pt_shell> set_case_analysis 0 SEN1
Scan Clocks
..................................................
For a dual-clocked scan design, set case analysis logic constants on the scan clocks to disable
false paths. If your design allows the scan clocks to be disabled via the Scan Shift Enable input,
set an appropriate logic constant on the Scan Shift Enable input.
The following example specifies that the ports ACLK and BCLK are at a constant logic value 0.
pt_shell> set_case_analysis 0 ACLK
pt_shell> set_case_analysis 0 BCLK
311
Timing Analysis Using PrimeTime
13 13.2 Validating the Normal-Mode Operation of a Scanned Design
Scan Chains
..................................................
Generally, it is not necessary to add any constraints on scan chains. If you want a greater
confidence that all scan chains will be excluded from timing analysis, you can set false paths
on the scan chains with the set_false_path command. The following example specifies
that all scan chains in a dual-clocked scan design are excluded.
pt_shell> set_false_path -through [list */SI]
312
.....
Timing Analysis Using PrimeTime
13.3 Validating the Test-Mode Operation of a Scanned Design
If you don’t know the tester conditions, run DCAL without using an IOPARAM file when
generating an SDF (DCSDF) file.
313
Timing Analysis Using PrimeTime
13 13.3 Validating the Test-Mode Operation of a Scanned Design
Virtual Clock
Multicycle Paths: (40 ns + 1cycle period) – 45 ns
Figure 13–2 shows a sample script for verifying scan shift mode operation. Figure 13–3 shows
a sample script for verifying capture mode operation. The assumptions are:
■ Primary ports
• Group 1: CLK1
• Group 2: CLK2, CLK3
314
.....
Timing Analysis Using PrimeTime
13.3 Validating the Test-Mode Operation of a Scanned Design
# Constrain the Scan Test Enable port held at a constant value throughout scan
# shift and capture modes with set_test_hold or in a STIL file.
set_case_analysis 1 TEN
# Define paths going from one clock domain to another as false paths.
# (There is no possibility of hold violations occurring in capture mode because
# only one clock group is activated at a time.)
set_false_path -from CLK_GRP1 -to CLK_GRP2 -hold
set_false_path -from CLK_GRP2 -to CLK_GRP1 -hold
315
Timing Analysis Using PrimeTime
13 13.3 Validating the Test-Mode Operation of a Scanned Design
# This also causes paths from input ports to output ports to be treated as
# multicycle path. Redefine these paths as single-cycle path.
set_multicycle_path 1 -from [all_inputs] -to [all_outputs]
# Constrain the Scan Test Enable port held at a constant value throughout scan
# shift and capture modes with set_test_hold or in a STIL file.
set_case_analysis 1 TEN
316
.....
Timing Analysis Using PrimeTime
13.3 Validating the Test-Mode Operation of a Scanned Design
100 ns
Inputs
TIMESET(0)
5 ns
Input-Mode Bidirects
TIMESET(1)
Output Strobe
TIMESET(7)
Multicycle path relative to
System Clocks Scan Clock B
TIMESET(2)
10 ns
Scan Clock A 50 ns
TIMESET(3)
10 ns
Scan Clock B 70 ns
TIMESET(4)
Virtual Clock
Virtual Clock
Figure 13–5 shows a sample script for verifying scan shift mode operation. Figure 13–6 shows
a sample script for verifying capture mode operation. The assumptions are:
■ Primary ports
317
Timing Analysis Using PrimeTime
13 13.3 Validating the Test-Mode Operation of a Scanned Design
• Group 1: CLK1
• Group 2: CLK2, CLK3
# Constrain the Scan Test Enable port you specified with set_test_hold or
# in a STIL file to its active state.
set_case_analysis 1 TEN
# Use the following command to avoid timing violations between ACK edges.
# (This is a library problem.)
set_false_path -from ACK -to ACK
318
.....
Timing Analysis Using PrimeTime
13.3 Validating the Test-Mode Operation of a Scanned Design
# Constrain the Scan Test Enable port you specified with set_test_hold or
# in a STIL file to its active state.
set_case_analysis 1 TEN
# Define paths from ACK to all clocks and output ports as multicycle paths.
set_multicycle_path 2 -from ACK -to [all_clocks]
# Define paths going from one clock domain to another as false paths.
# (There is no possibility of these paths getting sensitized in 1-to2 cycles
# because only one clock group is activated at a time.)
set_false_path -from CLOCK_GRP1 -to CLOCK_GRP2
set_false_path -from CLOCK_GRP2 -to CLOCK_GRP1
# Define paths from each clock group to output ports as false paths.
# (In capture mode, output ports are not strobed after system clocks are exercised.
set_false_path -from CLOCK_GRP1 -to [all_outputs]
set_false_path -from CLOCK_GRP2 -to [all_outputs]
# Define paths from each clock group to Scan Clock A as false paths.
# (There is more than one cycle time between the active edge of a system
# clock and the active edge of Scan Clock A. This is because a
# cycle is inserted to apply Scan Clock B.)
set_false_path -from CLOCK_GRP1 -to ACK
319
Timing Analysis Using PrimeTime
13 13.3 Validating the Test-Mode Operation of a Scanned Design
320
CMOS ASIC Design Manual
Part 4
Appendixes
321
Synopsys-DFT User Guide
322
Appendix A Quick Tour
T his appendix walks you through the entire process of synthesizing scan circuitry, running
ATPG and verifying the generated scan test patterns. The material is organized into the
following sections:
323
Quick Tour
A A.1 General Design Flow
The Quick Tour walks you through the flow shown in Figure A–1, starting with pre-synthesis
RTL code.
Report File
TetraMAX (ATPG)
TFSA
CKTTOP.fsa
Scan-related information
324
.....
Quick Tour
A.2 1-Pass Scan Synthesis Using DFT Compiler
This section covers scan synthesis, using DFT Compiler’s "test-ready compile," a feature that
integrates logic optimization and scan replacement.
DC Synthesis Script
..................................................
Figure A–2 shows an example of a DC script that includes commands that are specifically used
for scan synthesis. This script synthesizes single-clocked scan (multiplexed scan) circuitry. See
Chapter 6 for a description of each command.
/*
** FILE NAME : syn_muxscan.scr
** SCAN TYPE : Mux-scan
** This script performs test-ready compile.
*/
/*
** Read and link the design.
*/
read -f verilog {CKTCORE.v CKTTOP.v_prescan}
current_design CKTTOP
link
/*
** Create a clock and set delay constraints on I/O ports.
*/
create_clock -name CLK -period 20 -waveform {0.0 10.0} CLK
set_clock_skew -uncertainty 0.2 CLK
set_fix_hold CLK
set_input_delay 18.0 -clock CLK {all_inputs() - "CLK"}
set_output_delay 18.0 -clock CLK all_outputs()
/*
** Select a scan style and set a scan test mode constraint.
*/
set_scan_configuration -style multiplexed_flip_flop
set_test_hold 1 RESETN
/*
** Perform test-ready compile.
*/
set_max_area 0.0
compile -scan -map_effort high
325
Quick Tour
A A.2 1-Pass Scan Synthesis Using DFT Compiler
/*
** Identify scan-in, scan-out and scan shift enable ports.
*/
set_scan_signal test_scan_in -port DIA0 -hookup ui0/Z
set_scan_signal test_scan_out -port DO0 -hookup uo0/A
set_scan_signal test_scan_enable -port SCAN_ENABLE -hookup ui13/Z
/*
** Check scan design rules.
*/
check_test
/*
** Build scan chains.
*/
insert_scan
/*
** Set timing parameters for scan test.
*/
write_test_input_dont_care_value = 0
test_default_period = 100
test_default_delay = 0
test_default_bidir_delay = 0
test_default_strobe = 40
create_test_clock "CLK" -waveform { 50 70 }
/*
** Recheck scan design rules and generate a scan-related report.
*/
check_test > scan_design.report
report_test -scan -assertions -atpg_conflict >> scan_design.report
/*
** Write a STIL procedure file for TetraMAX.
*/
test_stil_netlist_format = verilog
write_test_protocol -format stil -o CKTTOP.spf
/*
** Write out a netlist.
*/
write -format verilog -o CKTTOP.v_postscan -h
quit
326
.....
Quick Tour
A.2 1-Pass Scan Synthesis Using DFT Compiler
■ CKTCORE.v
■ CKTCORE.v_prescan
■ syn_muxscan.scr
When you execute this script, DFT Compiler generates a scanned netlist
(CKTTOP.v_postscan), a transcript from the check_test command
(scan_design.report) and an SPF for TetraMAX (CKTTOP.spf).
327
Quick Tour
A A.3 TetraMAX ATPG
ScanStructures {
Scanchain "C0" { //Change scan chain name to uppercase.
ScanLength 4;
ScanIn "DIA0";
ScanOut "DO0";
}
}
328
.....
Quick Tour
A.3 TetraMAX ATPG
// Quit TetraMAX
quit -force
Enter the following command to invoke TetraMAX and execute the command file:
%> tmax CKTTOP.tmaxcmd
After TetraMAX ATPG is finished, make sure that you have a TSTL2 test data file
(CKTTOP.tst), an SCE file (CKTTOP.sce) and a log file (CKTTOP.tmaxlog).
329
Quick Tour
A A.4 Verifying the Scan Test Patterns
*COMMON
hdl = verilog // HDL language
simulator = verilog // Simulator
edaversion = 2.7 // Verilog-XL version
technology = TC220C // Technology
arraytype = T3S60T8 // Array size
voltage = 3.0 // Core voltage
libdir = . // Library directory
project = TetraMAX Design Kit // Project name
design = CKTTOP // Design name
module = CKTTOP // Module name
instance = wave.CKTTOP_wave // Top module instance name
330
.....
Quick Tour
A.4 Verifying the Scan Test Patterns
TITLE TITLE;
DECLARE;
SYSCLK(P) CLK(C0); // System clock polarity (P) and pin name
SCSEL(C0) SCAN_ENABLE=1; // Scan Shift Enable pin name and active state
ENDDEC;
FUNCTEST FC1;
2. Run DVER to check the design’s physical and electrical feasibility for implementation as
real devices.
%> dver
3. Run DCAL to calculate propagation delays for each cell in the design and generate an
Open Verilog International (OVI) Standard Delay Format (SDF) file.
%> dcal
4. Run TSC to convert a test data file written in the Toshiba TSTL2 format into a parallel-load
testbench for Verilog simulation. TSC also generates an expected values (EXP) file used as
input to SRA and an analysis command (SRACOM) file.
%> tsc iscan=ON fsaread=ON force=ON
5. It is strongly recommended to produce four kinds of vector files to evaluate the scan test
patterns, as described in Chapter 9. TSBSIM allows you to save signals listed in the
SRACOM file during simulation. TSBSIM is run as a Verilog task.
331
Quick Tour
A A.4 Verifying the Scan Test Patterns
6. Run SRA to analyze the results of simulation, based on the SRACOM file from TSC.
%> sra
The report file (CKTTOP.sralst) from SRA contains a summary of the detected error
counts. Check the report file if any error occurred. Figure A–7 shows a fragment of the
SRA report.
332
Appendix B TSTL2 Scan Test Data
Description
T his appendix provides an outline of serialized TSTL2 scan test vectors and how they are
applied for scan testing. The material is organized into the following sections:
333
TSTL2 Scan Test Data Description
B B.1 TSTL2 Scan Vector File Organization
Figure B–1 shows a TSTL2 serialized scan vector file. When using TSTL2 scan vector files,
keep the following points in mind:
■ Extra statements are required in the DECLARE block when performing parallel-load
simulation (PLS).
■ Scan chains are defined, including scan-in and scan-out pins.
■ SP statements are used to describe serialized scan test vectors.
The TSTL2 file generated by TetraMAX does not include any statements required in the
DECLARE block for parallel-load simulation. Those statements are used by the TSC program in
the Toshiba sign-off system to convert a TSTL2 test data into a Verilog or VHDL parallel-load
testbench. Serial-load simulation can be performed without the DECLARE block.
TITLE TITLE ;
DECLARE ;
Declarations required for parallel-load simulation
SYSCLK(P) CLK(SC1) ;
SCSEL(SC1) SEN=1 ;
ENDDEC ;
FUNCTEST FC1 ;
INPUT(0) DIN1,DIN2,DIN3,DIN4,SIN,SEN;
INPUT(1) CLK;
OUTPUT(7) DOUT,SOUT;
TIMING TS1 ;
CYCLE 100 ;
TIMESET(1) PP, 50, 20 ;
TIMESET(7) STB, 40 ;
ENDTIM ;
SCAN SC1I; Scan-in and scan-out
PATH SIN; definitions
CONST DIN1=0, DIN2=0, DIN3=0, DIN4=0, CLK=1, SEN=1 ;
ENDSCAN;
SCAN SC1O;
PATH SOUT;
CONST DIN1=0, DIN2=0, DIN3=0, DIN4=0, CLK=1, SEN=1 ;
ENDSCAN;
334
.....
TSTL2 Scan Test Data Description
B.1 TSTL2 Scan Vector File Organization
ASSIGN DOUT,SOUT,,DIN1,DIN2,DIN3,DIN4,,CLK,SIN,SEN;
TESTPATT PAT1;
ENABLE TS1 ;
XX 0000 000; /* 1 */
XX 0000 000; /* 2 */
SP (SC1I) 0101,
SP (SC1O) XXXX; Scan test vectors written using SP statements
HL 1110 P00; /* 7 */
SP (SC1I) 0100,
SP (SC1O) LHHH;
LL 1001 P00; /* 12 */ Test cycle numbers
SP (SC1I) 1100,
SP (SC1O) LLLH;
HH 0101 P00; /* 17 */
SP (SC1I) 1011,
SP (SC1O) LLLH;
LH 0010 P10; /* 22 */
SP (SC1I) 1110,
SP (SC1O) LLLL;
HH 1010 P10; /* 27 */
SP (SC1I) 0000,
SP (SC1O) HLLH;
ENDTEST ;
ENDFUNC ;
END ;
335
TSTL2 Scan Test Data Description
B B.2 DECLARE Block
The DECLARE block begins with a DECLARE statement and ends with an ENDDEC statement. In
a scan test pattern, the following statements are used within the DECLARE block:
■ SYSCLK Specifies the polarity and pin name of the system clock.
■ SCMCLK Specifies the polarity and pin name of Scan Clock A (for dual-clocked
scan design).
■ SCSCLK Specifies the polarity and pin name of Scan Clock B (for dual-clocked
scan design).
■ SCSEL Specifies the pin name and active state of the Scan Shift Enable pin.
■ PATTYPE Controls bidirectional pin modes during scan shift. This statement is
optional.
DECLARE ;
...
ENDDEC ;
Description
■ The DECLARE and ENDDEC statements define the beginning and end of the declaration
block.
■ The DECLARE block must appear between TITLE and FUNCTEST statements.
■ The DECLARE block must appear exactly once in a TSTL2 file.
■ Only the following statements can appear in the DECLARE block:
• VECTOR
• SYSCLK
336
.....
TSTL2 Scan Test Data Description
B.2 DECLARE Block
Example
TITLE ATPG_FTEST;
DECLARE;
VECTOR Din[0:3], Dout[0:3], Dbid[4:7];
SYSCLK(P) CLK(IN1);
SCMCLK(P) ACLK(IN1);
SCSCLK(P) BCLK(IN1);
ENDDEC;
SYSCLK Statement
..................................................
Format
Description
■ The SYSCLK statement identifies one or more system clock pins for the scan chains.
■ The scan chains must be defined by SCAN blocks.
■ The polarity indicates the active edge of the clock(s). Use the letter P for PP (positive
pulse) clocks and the letter N for NP (negative pulse) clocks.
■ The SYSCLK statement must appear at least once in the DECLARE block.
Example
SYSCLK(P) CLK1(IN1);
SYSCLK(N) CLK2(IN3,IN4);
CLK1 is a system clock defined as a PP waveform for the flip-flops in scan chain IN1. CLK2 is
a system clock defined as an NP waveform for the flip-flops in scan chains IN2 and IN3.
337
TSTL2 Scan Test Data Description
B B.2 DECLARE Block
Description
■ The SCMCLK statement identifies one or more Scan Clock A (master) pins.
■ The SCSCLK statement identifies one or more Scan Clock B (slave) pins.
■ The scan chains must be defined by SCAN blocks.
■ The polarity indicates the active edge of the clock(s). Use the letter P for PP (positive
pulse) clocks and the letter N for NP (negative pulse) clocks.
■ The SCMCLK and SCSCLK statements may appear at least once in the DECLARE block.
Example
SCMCLK(P) ACLK(IN1,IN2);
SCSCLK(P) BCLK(IN1,IN2);
ACLK is a Scan Clock A pin for scan chains IN1 and IN2. BCLK is a Scan Clock B pin for scan
chains IN1 and IN2.
338
.....
TSTL2 Scan Test Data Description
B.2 DECLARE Block
SCSEL Statement
..................................................
Format
Description
■ The SCSEL statement identifies one or more Scan Shift Enable pins for a scan chain and
their active states.
■ The scan chain must be defined by a SCAN block.
■ The Scan Shift Enable pins must also be defined with the same active states in a CONST
statement within the SCAN block.
Example
SCSEL(IN1) SEN=1;
SCSEL(IN2) SEN=1,SEN2=1;
Scan chain IN1 is placed in scan shift mode when SEN is at logic 1. Scan chain IN2 is placed
in scan shift mode when both SEN and SEN2 are at logic 1.
PATTYPE Statement
..................................................
Format
PATTYPE {TSBINTERNAL|TSBJTAG} ;
Description
■ The PATTYPE statement affects the default values assigned to bidirectional pins during
scan shift.
■ TSBINTERNAL causes bidirectional pins to be held in input mode and assigned input
patterns throughout scan shift.
339
TSTL2 Scan Test Data Description
B B.2 DECLARE Block
■ TSBJTAG causes bidirectional pins to remain at the immediately previous logic values.
Therefore, when the previous pattern data is a 0, 1 or Z, a 0, 1 or Z is assumed
respectively; when the previous pattern data is an L, H or X, an X (or a don’t-care) is
assumed.
■ If the PATTYPE statement is omitted, bidirectional pins are assumed to be in the output
unknown state and assigned Xs (or don’t-cares).
■ The PATTYPE statement may appear at most once within the DECLARE block.
Example
Where a design is compliant with the internal-scan design rules, bidirectional pins are forced to
input mode during scan shift. The following is the correct PATTYPE statement for such a
design:
PATTYPE TSBINTERNAL;
340
.....
TSTL2 Scan Test Data Description
B.3 Scan Definition Blocks
The SCAN and ENDSCAN statements bracket a scan definition block, which defines either a
scan-in or scan-out pin and any pins that are held constant during scan shift. The following
statements are required in the scan definition block:
■ PATH Identifies either an scan-in or scan-out pin.
■ CONST Specifies any pins and fixed pattern data required to shift test data
through a scan chain.
For a detailed description of these statements, refer to the TDL, TSTL2, ROM Data manual.
SCAN scan_name ;
...
ENDSCAN ;
Description
■ The SCAN and ENDSCAN statements define the beginning and end of a scan definition
block.
■ The scan_name consists of a scan chain name and a suffix, as shown below:
<scan_chain_name><suffix>
341
TSTL2 Scan Test Data Description
B B.3 Scan Definition Blocks
■ Only the following statements are allowed between the SCAN and ENDSCAN statements:
• PATH
• CONST
PATH Statement
..................................................
Format
PATH pin_name ;
Description
■ Identify either the scan-in or scan-out pin for the scan chain defined with the SCAN
statement.
■ The PATH statement must appear within a SCAN block.
CONST Statement
..................................................
Format
Description
■ Specify any I/O pins for which pattern data do not change during scan shift mode.
■ The CONST statement must appear exactly once in a SCAN block.
342
.....
TSTL2 Scan Test Data Description
B.3 Scan Definition Blocks
SCAN IN1I;
PATH SCIN1;
CONST SYSCLK=0,ACLK=P,BCLK=P;
ENDSCAN;
SCAN IN1O;
PATH SCOUT1;
CONST SYSCLK=0,ACLK=P,BCLK=P;
ENDSCAN;
Scan chain IN1 is implemented with scan-in pin SCIN1 and scan-out pin SCOUT1. Scan-in
patterns to be applied to SCIN1 will be described using SP statements identifying the scan
name with the I suffix, like SP(IN1I). Scan-out patterns coming out of SCOUT1 will also be
described using SP statements identifying the scan name with the O suffix, like SP(IN1O).
During scan shift, SYSCLK is assigned pattern data "0", ACLK is assigned pattern data "P" and
BCLK is assigned pattern data "P"; i.e., SYSCLK is off, and ACLK and BCLK are on.
343
TSTL2 Scan Test Data Description
B B.4 Scan Pattern Descriptions
As opposed to parallel test data in which all I/O pins are assigned pattern data cycle by cycle,
scan test data uses serialized vectors, each of which represent thousands of cycles. Scan-in
patterns are serialized to be applied at the scan-in pin, and scan-out patterns are serialized to be
measured at the scan-out pin.
SP Statement
..................................................
Format
SP(scan_name1) serialized_vector ;
SP(scan_name1) serialized_vector ;
...
Description
■ The SP statement is used to write a serialized scan vector for the specified scan chain. The
scan_name1 identifies one of the scan chains defined with a PATH statement. Serialized
scan vector is loaded into a scan chain, with the leftmost bit first (1 bit = 1 cycle).
■ Multiple scan chains can be loaded and unloaded in parallel by delimiting SP statements
with commas.
SP(SC1I)0011,SP(SC2I)0101; Two scan chains are loaded in parallel.
00LH N00 00XX ;
SP(SC1O)LLHH,SP(SC2O)LHLH, Two scan chains are unloaded in parallel, while
SP(SC1I)0101,SP(SC2I)0101 ; at the same time they are loaded with new vectors.
11HL N00 00XX ;
SP(SC1O)LHLH,SP(SC2O)LHLH ;
...
■ I/O pins other than the active scan-in and scan-out pins are assigned specific pattern data
as follows (in priority order).
• Pattern data defined with the CONST statement corresponding to the active scan chain.
• Input pins are assigned the same pattern data as the immediately previous cycle; output
pins are assigned Xs if the immediately previous cycle has an L or H.
• Bidirectional pin values are determined by the PATTYPE statement.
344
.....
TSTL2 Scan Test Data Description
B.4 Scan Pattern Descriptions
For a detailed description of the SP statement, refer to the TDL, TSTL2, ROM Data manual.
Figure B–3 shows a serialized scan test pattern, in comparison with parallel sequences.
SYSCLK
SDO1
SCAN IN1O;
BCLK
ACLK
SDI1
O1
O2
PATH SDO1;
I1
I2
CONST SYSCLK=0,ACLK=P,BCLK=P;
ENDSCAN;
ASSIGN I1,I2,O1,O2,,SYSCLK,,ACLK,BCLK,, 10XX 0 00 0X; 1. Capture mode
SDI1,SDO1; 10XX 0 PP 0X;
TESTPAT SAMPLE; 10XX 0 PP 0X;
1 10XX 0 00 0X; 10XX 0 PP 1X; 2. Scan shift mode (scan-in)
2 SP(IN1I) 00100; 10XX 0 PP 0X;
3 10HL P 00 0X; 10XX 0 PP 0X;
SP(IN1O) LLHHH, 10HL P 00 0X; 3. Capture mode
4
SP(IN1I) 11010; 10XX 0 PP 1L;
5 01LL P 00 1X; 10XX 0 PP 1L;
6 SP(IN1O) HHHLL, 10XX 0 PP 0H; 4. Scan shift mode
SP(IN1I) 01000; 10XX 0 PP 1H; (Scan-out and scan-in)
... 10XX 0 PP 0H;
01LL P 00 1X; 5. Capture mode
01XX 0 PP 0H;
01XX 0 PP 1H;
01XX 0 PP 0H; 6. Scan shift mode
01XX 0 PP 0L; (Scan-out and scan-in)
01XX 0 PP 0L;
In the above example, I1, I2, O1 and O2 are functional data pins. The CONST statement within
the SCAN block defines the pattern data for the system clock (SYSCLK) and the scan clocks
(ACLK and BCLK) during scan shift mode. The SP statement is used to write serialized patterns
for the scan-in (SDI1) and scan-out (SDO1) pins. Test patterns for the capture mode are written
in parallel format without using the SP statement.
345
TSTL2 Scan Test Data Description
B B.5 Scan Test Sequence
This section provides an example of a scan design and illustrates the typical scan test sequence.
Figure B–4 shows simple designs before and after scan insertion.
c1 ff1 ff3
n1 n3 c3 n5 n7
DIN1 D Q D Q
MUX
0 c5
DIN2 1 DOUT
c2 ff2 ff4
n2 n4 c4 n6
D Q D Q
n8
DIN3
DIN4
CLK
c1 ff1 ff3
n1 n3 c3 n5 n7
DIN1 D Q D Q
TI TI MUX
TE TE 0 c5
DIN2 1 DOUT
c2 ff2 ff4
n2 n4 c4 n6
D Q D Q SOUT
n8
TI TI
TE TE
DIN3
DIN4
CLK
SIN
SEN
In the design after scan insertion, the scan routing order is ff2 – ff1 – ff3 – ff4.
Figure B–5 shows TSTL2 test data generated by TetraMAX. The TDL, TSTL2, ROM Data
manual specifies scan test patterns in this order: scan-in – capture mode – scan-out; however,
TetraMAX uses a different order: scan-in – scan-out – capture mode.
346
.....
TSTL2 Scan Test Data Description
B.5 Scan Test Sequence
TITLE TITLE ;
FUNCTEST FC1 ;
INPUT(0) DIN1,DIN2,DIN3,DIN4,SIN,SEN;
INPUT(1) CLK;
OUTPUT(7) DOUT,SOUT;
TIMING TS1 ;
CYCLE 100 ;
TIMESET(1) PP, 50, 20 ;
TIMESET(7) STB, 40 ;
ENDTIM ;
SCAN SC1I;
PATH SIN;
CONST DIN1=0, DIN2=0, DIN3=0, DIN4=0, CLK=1, SEN=1 ;
ENDSCAN;
SCAN SC1O;
PATH SOUT;
CONST DIN1=0, DIN2=0, DIN3=0, DIN4=0, CLK=1, SEN=1 ;
ENDSCAN;
ASSIGN DOUT,SOUT,,DIN1,DIN2,DIN3,DIN4,,CLK,SIN,SEN;
TESTPATT PAT1;
ENABLE TS1 ;
XX 0000 000; /* 1 */
Cycles 1–2
XX 0000 000; /* 2 */
SP (SC1I) 0101,
Cycles 3–6
SP (SC1O) XXXX;
HL 1110 P00; /* 7 */ Cycle 7
SP (SC1I) 0100,
Cycles 8–11
SP (SC1O) LHHH;
LL 1001 P00; /* 12 */ Cycle 12
SP (SC1I) 1100,
SP (SC1O) LLLH;
HH 0101 P00; /* 17 */
SP (SC1I) 1011,
SP (SC1O) LLLH;
LH 0010 P10; /* 22 */
SP (SC1I) 1110,
SP (SC1O) LLLL;
HH 1010 P10; /* 27 */
SP (SC1I) 0000,
SP (SC1O) HLLH;
ENDTEST ;
ENDFUNC ;
END ;
Following is a description how this scan test pattern is used to test the scanned design.
347
TSTL2 Scan Test Data Description
B B.5 Scan Test Sequence
The following two vectors constitute the initialization cycles before beginning a scan test.
XX 0000 000; /*1*/
XX 0000 000; /*2*/
In scan shift mode, test vectors are written in serialized format using SP statements, as follows:
SP (SC1I) 0101,
SP (SC1O) XXXX;
Notice that the two SP statements are delimited by a comma; the first statement is for scan-in,
and the second one is for scan-out. Thus, the scan chain is loaded while simultaneously being
unloaded. The scan-in vector is applied at the scan-in pin (SIN) defined by the PATH statement
within the SCAN SC1I block. The CONST statement within this SCAN block defines DIN1=0,
DIN2=0, DIN3=0, DIN4=0, CLK=P, SEN=1, which specifies constant pattern data during
scan shift mode. Consequently, the above SP statements are equivalent to: the following:
SOUT
DIN1
DIN2
DIN3
DIN4
SEN
CLK
SIN
X 0000 P01; /* 3 */
X 0000 P11; /* 4 */
X 0000 P01; /* 5 */
X 0000 P11; /* 6 */
The scan-in vector written in the SP statement is serially shifted into the scan chain, with the
leftmost bit first. Therefore, a 0 is shifted in in cycle 3; a 1 is shifted in in cycle 4; a 0 is shifted
in in cycle 5; and a 1 is shifted in in cycle 6.
Figure B–6 illustrates the process of serially shifting in this scan-in vector.
348
.....
TSTL2 Scan Test Data Description
B.5 Scan Test Sequence
Cycle 3 0 – – –
Cycle 4 1 0 – –
Cycle 5 0 1 0 –
Cycle 6 1 0 1 0
1 0 1 0
The paragraphs that follow describe the sequence of events triggered by this vector.
1. The vector is applied to the input pins but the clock pin (CLK) at the beginning of the cycle
(at time 700 ns), as specified by the timing definition in the TSTL2 file.
c1 ff1 ff3
1 n1 n3 c3 n5 n7
DIN1 D Q D Q
TI 0 TI 1 MUX
1 TE TE 0 c5
DIN2 1 DOUT
c2 ff2 ff4
n2 n4 c4 n6
D Q D Q SOUT
n8
TI 1 TI 0
TE TE
1
DIN3
0
DIN4
0
CLK
0
SIN
0
SEN
In scan shift mode, the flip-flops have been preloaded. Once the functional vector is
applied at the primary input pins, combinational logic paths are sensitized, and the states of
349
TSTL2 Scan Test Data Description
B B.5 Scan Test Sequence
the input pins of the flip-flops (n1, n2, n5 and n6) and output signals to primary output
pins (DOUT and SOUT) become stable.
c1 ff1 ff3
1 n1 1 n3 c3 n5 1 n7
DIN1 D Q D Q
TI 0 TI 1 MUX
1 TE TE 0 c5 1
DIN2 1 DOUT
c2 ff2 ff4
n2 1
Q
n4 c4 n6 0 D Q
0
D SOUT
n8
TI 1 TI 0
TE TE
1
DIN3
0
DIN4
0
CLK
0
SIN
0
SEN
3. The output response is examined for evaluation at the primary output pins (DOUT and
SOUT) at time 740 ns, as specified by the timing definition in the TSTL2 file.
4. The system clock is pulsed once to capture the internal states (n1, n2, n5 and n6) into the
flip-flops.
c1 ff1 ff3
1 n1 1 n3 c3 n5 1 n7
DIN1 D Q D Q
TI 1 TI 1 MUX
1 TE TE 0 c5 1
DIN2 1 DOUT
c2 ff2 ff4
n2 1
Q
n4 c4 n6 0 D Q
0
D SOUT
n8
TI 1 TI 0
TE TE
1
DIN3
0
DIN4
CLK
0
SIN
0
SEN
350
.....
TSTL2 Scan Test Data Description
B.5 Scan Test Sequence
Following is the scan test vector for the next scan shift mode:
SP (SC1I) 0100,
SP (SC1O) LHHH;
Since the two SP statements are delimited by a comma, the scan chain is loaded while
simultaneously it is unloaded. These SP statements are equivalent to the following:
SOUT
SIN
L 0000 P01; /* 8 */
H 0000 P11; /* 9 */
H 0000 P01; /* 10 */
H 0000 P01; /* 11 */
Figure B–10 illustrates the process of serially shifting the scan chain. As shown in this figure,
the output response observed at SOUT in cycles 8 to 11 is expected to be 0111 (LHHH), which
matches the expected outputs specified in the SP statement.
SIN SOUT
0 1 1 1 0
Cycle 8 1 0 1 1 1 0
Cycle 9 0 1 0 1 1 1
Cycle 10 0 0 1 0 1 1
Cycle 11 0 0 1 0 1
0 0 1 0
Cycle 12–
From cycle 12 onwards, the same process as cycles 3–11 is repeated using different vectors.
351
TSTL2 Scan Test Data Description
B B.5 Scan Test Sequence
352
Synopsys-DFT User Guide Index
Index
353
Index Synopsys-DFT User Guide
354
Synopsys-DFT User Guide Index
355
Index Synopsys-DFT User Guide
356
Synopsys-DFT User Guide Index
357
Index Synopsys-DFT User Guide
358
Synopsys-DFT User Guide Index
359
Index Synopsys-DFT User Guide
360
Synopsys-DFT User Guide Index
361
Index Synopsys-DFT User Guide
running 189
TFSALOG file 242
Timing construct
dual-clocked scan
format 129
modifying an SPF from TetraMAX 151
timing verification 218
dual-clocked scan design 221, 316
single-clocked scan design 219, 313
TMCMD file 161, 231
TMS (Test Mode Select Input) 16
Transition Test 29, 30
TRST* (Test Reset Input) 16, 63
tsb.config file 230, 237
TSC 225
TSTL2 generation 178
file size 196
in shell mode 198
required disk space 197
splitting into multiple files 179
TSTL2 serialized scan vector file 334
U
unknown cell violations 116
USERCODE instruction 56
V
VITALSO 71
VOYSO 71
VPPA file 291
VSO 71
W
wrapper-scan approach 7
write drc_file command (TetraMAX) 121, 129, 142,
147
write faults command (TetraMAX) 193
write patterns command (TetraMAX) 177, 178, 179,
180
write_bsdl command (BSD Compiler) 279
write_test command (BSD Compiler) 281
write_test_formats variable (BSD Compiler) 281
write_test_protocol command (DFT Compiler) 109
362