Professional Documents
Culture Documents
2.dft_flow
2.dft_flow
Module 2
ATPG Flow
Objectives
2-2 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Full DFT Flow
Design
Design Flow Requirements
Tool Flow
RTL Coding
DRC
Gate Level DFT Library RTL Design
Netlist
Scan SYNTHESIS
Insertion
DRC
DRC Gate Level
Scan Inserted Setup Files
Netlist Netlist
SCAN
INSERTION
ATPG
DRC Scan Inserted
Netlist
Tessent FastScan or Test Patterns
ATPG
Tessent TestKompress
(atpg mode)
Test
ATE Patterns
Verification Simulation
Library
2-3 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
DFT Model Description DFT Library DFT Library
Gate Level
of Scan Cell (DFF) Scan
Netlist
Insertion
//==========================================
Model: DFF Setup Files Scan Inserted
Netlist
//===========================================
model DFF ( PRE,CLR,CLK,D,Q,QB) (
input ( PRE, CLR, D) () ATPG
2-4 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
DFT Library (Cont.)
The DFT library is a function of the lowest level netlist
modules.
Very similar to Verilog.
Maps non-scan models to their associated scan models.
No DFT model is needed for Verilog primitives.
Example: Verilog “and” maps directly to the built-in primitive
“and” in DFT tools.
2-5 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Creating a DFT Library
Check for an existing library from the vendor.
Use the libcomp utility to make a DFT library from Verilog.
libcomp is a shell command.
Technical marketing or support will help with any library
conversion issues.
2-6 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Automatic Generation of DFT Libraries
Automatically converts Verilog simulation library
Translates and optimizes UDPs
Automated verification of translated models
Reports coverage per model
Reduces the effort in creating an ATPG library
Verilog
simulation
lib libcomp
do_file
ATPG
lib
2-7 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Command Syntax and Structure
Tessent FastScan and Tessent
TestKompress use this command
syntax:
> ADD
(Defines a condition.) 3-2-1 Example
> REPort
(Displays added items.) >ADD Input Constraint -C1
> DELete
(Removes a condition.) >ANAlyze COntrol Signals
> SET/SETup >REPort CLocks
(Defines global settings.)
> WRIte/SAVe
(Generates files.)
ANAlyze Control Signals
(Identifies and defines primary
inputs of control signals.)
3-2-1 command structure:
Minimal typing: no need to type out
the entire command.
– Type the first three letters of the
first word, two letters of the
second, and one letter of the third.
2-8 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
ATPG Tool Flow With Commands
2-9 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Invoking Tessent FastScan
Invocation:
shell> fastscan design.v -verilog \
-lib dft.lib -log transcript.log –replace
2-10 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Invoking Tessent TestKompress in ATPG Mode
Invocation:
shell> testkompress design.v -verilog \
-lib dft.lib –dofile dft_atpg.do \
-log transcript.log –replace
After invocation:
SETUP> set edt off
2-11 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Invoking Tessent TestKompress in ATPG Mode (Cont.)
Why run Tessent TestKompress in Tessent FastScan (atpg)
mode?
Perform this step to ensure there are no basic issues such as
simulation mismatch caused by an incorrect library.
Enables you to make comparisons of test performance on a
design using EDT versus not using EDT.
Optional.
Can use to run ATPG on blocks without Tessent TestKompress
(validate testability).
Can bypass Tessent TestKompress logic.
2-12 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
ATPG Setup
What you have:
A gate-level, scan-inserted netlist (Tessent FastScan or Tessent
TestKompress)
Test Procedure File
– Required if there is already preexisting scan circuitry in your design
– Defines the operation of that preexisting scan circuitry
Setup files:
– Dofiles
• Tessent FastScan/Tessent TestKompress: Contains circuit setup
information specified from the scan insertion tool
• Contains information on test structures inserted into the design
– Test Procedure File
• Tessent FastScan/Tessent TestKompress : Defines operation of scan
circuitry
A DFT library:
– Used by Tessent TestKompress and Tessent FastScan
2-13 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
ATPG Setup (Cont.)
Tessent TestKompress
2-14 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Auto Black Boxing for Incomplete Netlists
CLK
QN
R 000 XXX
PI_1 PO_1
PI_2 PO_2
PI_3 PO_3
D Q
CLK Module M
QN
Undefined Library
Defined Library Model
Models
2-15 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Black Boxes
Copyright 2001-2008 Mentor Graphics Corporation
//
Allows analysis of incomplete
// All Rights Reserved. designs.
//
// THIS WORK CONTAINS TRADE SECRET AND
Isolates analog blocks.
PROPRIETARY INFORMATION WHICH
// IS THE PROPERTY OF MENTOR GRAPHICS
Isolates proprietary IP.
CORPORATION OR ITS LICENSORS AND IS
// SUBJECT TO LICENSE TERMS. Warns of undefined model
//
// Mentor Graphics software executing under x86 Linux.
instances.
// 32 bit version The undefined model is not
//
// Compiling library ... black boxed.
// Reading DFT Library file ../../libraries_1_to_4/adk.atpg
// Finished reading file ../../libraries_1_to_4/adk.atpg Use the ADD BLack Box
// Reading Verilog Netlist ...
// Reading Verilog file module4_1.v
-Auto command to black box
// Warning: Module name 'mux21_macro' near line '4', conflicts all undefined models or
with a lib model, lib model will be ignored
// Finished reading file module4_1.v modules.
// Warning: Following modules are undefined:
// tbuf Use in setup mode.
// picdram
// nand02_tst
// Use "add black box -auto" to treat these as black boxes
//
// command: ADD BLack Box -Auto
2-16 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Black Box Examples
Example to create a black box for module core with tie value
of X (default).
SETUP> ADD BLack Box -module core
Change output behavior of black boxes:
SETUP> ADD BLack Box -instance core1 -pin pin1 1
Restore the original model:
SETUP> DELete BLack Box -module core
SETUP> DELete BLack Box -module core1
OR
SETUP> DELete BLack Box -All
Report on any instance- or module-based black box:
SETUP> REPort BLack Box -All
2-17 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
SETUP
Tessent FastScan or
Tessent TestKompress
2-18 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
SETUP (Cont.)
Setting up the circuit includes several tasks:
Constraining primary inputs.
– Holds specified pins at a constant value during ATPG.
– Define during setup mode.
SETUP> ADD INput Constraints control -C1
//constrain to constant 1
Adding clocks.
– Adds scan or non-scan clock pins to the clock list.
– Any signal that can change the state of a sequential element is
considered to be a clock.
• Clock, set, reset signals.
– Clock must have an off state, and that value must be specified.
SETUP> add clocks 0 clk1
SETUP> add clocks 0 pll_block/clk1 -internal
2-19 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
SETUP (Cont.)
Setting up the circuit includes several tasks:
Analyzing control signals.
– Identifies each control signal (clock, set, reset, read-control, write-
control, etc.) of every sequential element (DFF, latch, RAM, ROM, etc.)
– Optionally defines its primary input as a control signal.
– -Auto_fix argument performs an implicit ADD CLocks command.
– Only traces through simple combinational gates.
– Does not support gated clocks.
– Will not alter a clock definition specified by a preceding add clocks
command.
SETUP> ANAlyze COntrol Signals -Auto
2-20 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
SETUP (Cont.)
Setting up the circuit includes several tasks:
Adding scan groups.
– Defines a scan chain group.
– Test procedure file controls the set of scan chains in the scan chain
group.
– Must specify the name of the test procedure file.
SETUP> add scan groups grp1 file.testproc
Adding scan chains.
– Adds a scan chain to a scan group.
– Defines a scan chain that exists in the design.
SETUP> add scan chains chain1 grp1 my_scan_in[1]
my_scan_out[1]
2-21 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
ATPG in a DC Scan Insertion Flow
2-22 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
ATPG Setup Files
ATPG setup files are:
Used to enter ATPG setup information.
> DOFile <name.dofile>
Created manually or interactively.
Automatically created by DFTAdvisor.
Created from STIL files.
SHELL> stil2mgc -stil cpucore.stp -tpf cpucore.tpf –dofile
cpucore.do
2-23 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
ATPG Setup Dofile
Specifies circuit setup and
scan information for test
pattern generation
Defines the following:
– Clocks
– Scan operation
– Scan chains
– Pin constraints
DOFILE
//
add scan groups grp1 counter_syn_scan.testproc
add scan chains chain1 grp1 scan_in1 scan_out1
add clocks 0 clock4
add clocks 0 clock3
add clocks 0 clock2
add clocks 0 scan_reset
add clocks 0 clock1
add input constraints test_en -C1
~
2-24 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Test Procedure File
Load_Unload
- Defines how to load and unload scan
chains in a scan group.
- Defines how to shift data one position down
the scan chain.
2-25 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Test Procedure File (Cont.)
force_sci force_sci force_pi
measure_sco measure_sco measure_po
CLOCK
0 10 20 30 40 0 10 20 30 40 0 10 20 30 40
Cycle time 0 10 20 30 40 0 10 20 30 40 0 10 20 30 40
0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240
Total time
2-26 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Elements of Scan Timeplates
A timeplate defines a time period corresponding to the ATE
cycle.
Multiple timeplates can be defined as long as timing, period and
the number falls within the limitations of the target ATE.
Non-return input formats are defined with the force statement.
Return formats are defined with the pulse statement using
delay and width variables.
2-27 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Procedures
There are three main procedures for shifting data:
Test_setup — Initializes the device in preparation for test.
(Includes JTAG controller programming)
Load_unload — Shifts data in order to load and unload scan
data into and out of scan chains. (Includes the shift procedure)
Capture — After scan data has been loaded, the capture cycle
applies the circuit tests and prepares for unload.
2-28 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Sequence of Cycles for Structured Test — Mux D
The test_setup procedure The load_unload procedure defines
provides the initialization sequence the stable cycles for shifting data into
to prepare the design for testing. and out of the scan chains.
2-29 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Load_Unload and Shift Procedures
The purpose of the load_unload procedure is to define the shift
process to load and unload the scan chains with pattern data from
ATPG.
The shift procedure defines the clocks and conditions needed to
move the scan data one scan cell position.
The shift procedure uses force_sci and measure_sco as the timing
points for data input and measure output.
The default is (force_sci = force_pi) and (measure_sco = measure_po).
2-30 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
DRC (Tessent FastScan or Tessent TestKompress)
Command:
SETUP> SET SYstem Mode Atpg
2-31 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
DRC
ATPG Command:
SETUP> SET SYstem Mode atpg
This command does the following:
Exits SETUP mode
Performs DRC
Flattens the design
Performs learning analysis
2-32 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
DRC Basics
Passing rules checking is vital for the successful use of the
DFT tools.
Rule violations are handled in four ways:
1. Error:
– Rules checking is terminated and tool remains in SETUP mode.
2. Warning:
– Indicates the number of violations. SETUP> SET DRc Handling
3. Note:
– Summary message that displays number of violations.
4. Ignore:
– No message given.
User-defined handling
of displayed messages
2-33 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
DRC Basics (Cont.)
2-34 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Types of DRCs
RAM rules (A rules)
Checks for testability conditions of embedded RAMs
Clock rules (C rules)
Verifies clock operation
Data rules (D rules)
Checks the stability of the data in the scan chains
Extra rules (E rules)
Checks for potential problems—usually ignored by the tool
Procedure rules (P rules)
Ensures test procedure file is syntactically and functionally
correct
Timing Rules (W rules)
Ensures that the order of events has not changed since leaving
setup mode
2-35 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Tracing Back to the X Source With DFTVisualizer
2-36 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Tracing Back to the X Source With DFTVisualizer (Cont.)
Command
X on the S0 input of
f1_clk_sel
2-37 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Tracing Back to the X Source With DFTVisualizer (Cont.)
Change display to gate-level by selecting Display > Gate Level > Primitive
2-38 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Tracing Back to the X Source With DFTVisualizer (Cont.)
2-39 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Tracing Back to the X Source With DFTVisualizer (Cont.)
2-40 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
View Design Elements in Fixed Design
Constraint fixed;
design loads.
2-41 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Configuration
Define configuration
Commands:
SETUP> SET FAult Type
SETUP> ADD NOfaults
ATPG> SET PAttern Type
ATPG> ADD Faults Note: ATPG Expert adds faults automatically.
2-42 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Generate Patterns
Generate patterns
Command:
ATPG> CREate PAtterns
2-43 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Create Patterns
CREate PAtterns automatically analyzes the design
including explicitly specified settings to generate the most
compact test pattern set with the highest coverage and
lowest runtime.
2-44 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Save Results
Tessent FastScan or
Tessent TestKompress
Save patterns
Command:
ATPG> SAVe PAtterns <filename>
2-45 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Saving Test Patterns
Supports many ASIC vendor
formats
WGL
STIL
Recommended saving Saving Patterns
practices:
-------------------------------------------
ASCII or binary #test_patterns 48
#simulated_patterns 416
– Used later in Tessent FastScan CPU_time (secs) 0.4
or Tessent TestKompress. -------------------------------------------
// command: save patterns pat1_ser.v -procfile -serial -verilog -replace
ASIC vendor format for tester // command: save patterns pat1_par.v -procfile -parallel -verilog -replace
// command: save patterns pat1_ascii -ascii -replace
Verilog test bench // command: exit -d
– Used later for time-based
simulation/verification
Flattened model
– Used later for diagnosis
2-46 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation
Lab 2: Generating Test Patterns
During this lab, you will
2-47 • Tessent: Scan and ATPG: ATPG Flow Copyright © 1999-2009 Mentor Graphics Corporation