Documente Academic
Documente Profesional
Documente Cultură
Product Tutorial
The purpose of this tutorial is to familiarize you with the steps required to process a
Full-Scan design using SynTest products. You will learn how to:
Synthesize a scan chain into a non-scan design
Extract scan information from a design
Generate test vectors
To complete the full-scan run, you will perform the following steps and procedures:
Create new directories for file organization
Compile a cell library and netlist
Do testability analysis
Do full-scan selection
Do full-scan synthesis and debug
Do scan extraction
Do scan verification
Generate and translate test vectors
Fault test the design
Logic test the design
This knowledge forms the foundation for the concepts and skills you will need to integrate
the SynTest tools into your work environment.
Assumptions
It is assumed that:
Syntest software has been installed. Further installation and user setup information
can be found in the Quick Installation Procedure in the SynTest Users Guide,
chapter 1.
You have a basic understanding of Unix Workstation and variables.
The directories and files needed for the tutorials are shown in . You will be using the same
design, s27, for all three tutorials, and you will also run a full-scan test on the design with
memory.
syntest
tutorials
syntest.def
Full Partial
Scan Scan
fscan pscan
libsrc libsrc
netsrc netsrc Boundary
s27lib.v s27lib.v
Full Scan
s27.v Scan s27.v
s27.map s27.map
s27.dft ripple_rom s27.dft bscan
frun s27.psi
libsrc netsrc
netsrc prun
s27lib.v libsrc
ripple_rom.tdl s27.v
example.v
init_rom.v
ripple_rom.map example.pin brun
s27.dft
s27rom.rom example.lib
ripple_rom.pso s27.map
run_rom example.bsc
Files/Directories Function
libsrc Directory containing lib.v files (Verilog source file for libraries)
*.dft File containing information that sets condition for testability analysis.
*.map Files describes relationship between generic memory cell and scannable memory cell.
*.pso File contains a list of cells to be converted to scan, and .psi file information.
*.psi File contains a list of cells to be converted to scan required for partial scan.
*.pin Pin list file used by boundary-scan.
The schematic representation of the s27.v design is shown in Figure 1-2. Its Verilog
structural netlist and cell library are shown in Figure 1-3 and Figure 1-4 respectively.
I10
I14 I5
G10 G5
G14 D Q
G0
FD1
I11 I17
I8
CP
I6 G11 G17
G8 G17
G6
D Q
FD1
CP
I15
I9
G15
G9
I12
G1 G12
I13 I7
G13 G7
D Q
FD1
CLK CP
G2
I16
G16
G3
// File : s27.v
// Created: Fri May 24 11:43:39 1996
In this section, you will create directories to be used to organize the design files. The
directories you will create are:
lib, directory used to store cell library definitions
designs, directory used to store design database information
123, directory used to store testability analysis (TurboCheck) output files (asic123)
fscan, directory used to store test pattern generation (TurboScan) results (asicgen)
dbg, directory used to store scan verification output files (scandbg)
1. Change to the syntest/ directory and source the .syntest script file . From the Shell
prompt,
a) cd $SYNTEST
b) source .syntest
Sourcing this file sets Unix variables for SynTest. The .syntest file is shown in
Figure 1-5.
2. Change your current working directory to fscan/ (this directory is under $SYNTEST/
tutorial). From the syntest/ directory Shell prompt,
cd tutorials/fscan
3. Examine the design files (netlist and cell library). From the Shell prompt,
more netsrc/s27.v
You will see a Verilog structural netlist file for the s27 design as shown in Figure 1-3.
more libsrc/s27lib.v
You will see a Cell library file for the s27 design as shown in Figure 1-4.
4. Create the required directories using the mkdir command. From the Shell prompt,
mkdir lib designs 123 fscan dbg
This action will create five directories: lib, designs, 123, fscan, and dbg.
NOTE
The lib and designs directories are created for use by
Syntest applications such as expin, and are included in
the default search order.
The design netlist and cell library translating, compiling, and linking and expanding flow is
shown in Figure 1-6.
syntest.def
syntest.def primitive.def
library cells.sdb
design.sdb
Step2
Netlist Linker expin
& Expander
design.x.sdb
design.c.sdb
design.conp
- Note -
The expanded design outputs are s27.c.sdb, s27.x.sdb, and s27.conp.
vlogin translates and complies the Verilog .v netlist and library into SynTest intermediate
format (.sdb).
1. Convert and compile the input s27.v and s27lib.v files. From the Shell prompt,
This action will generate the design sdb files for each module in the netlist and the cell sdb
files for each cell in the library file.
Since only one module, s27, exists in the netlist s27.v, only one module .sdb of the netlist is
created. The -opath option redirects the compiled .sdb files of the netlist to the designs sub-
directory.
For the part of the translation and compilation of the netlist, The -nf, -drc, and -opath lib
options, which are used for compiling .sdb files of the library typically, are turn-on
automatically by setting this option -lib.
The -nf and -drc options disable faulting within the library cells and run design-rule-check
separately.
The -opath option outputs the .sdb files into the lib sub-directory created for this run. Since
one .sdb file is created for each cell in the library, the directory organization eliminates
cluttering the main design directory with many files.
1 - 10 SynTest Tutorials
Full-Scan Tutorial
NOTE
If your library has already been compiled, you can
simply create a soft link ("ln -s <library directory> lib")
to the compiled library, and skip the library translation
and compilation step.
SynTest Tutorials 1 - 11
Full-Scan Tutorial
The design must be linked and expanded (flattened) before you can perform testability
analysis, synthesis or run the test vector generation programs.
The expin utility is used to link and expand the design. This program reads:
top-level and sub-module .sdb files
cell library .sdb files
syntest.def and primitive.def files (required files located in the $SYNTEST/designs
directory. See Creating the Syntest Database and Libraries, Chapter 3 for a
discussion of these files)
expin s27
This command execution will create three new design files in the same directory as the
specified source file, or in the directory specified with the -opath option. The files are:
s27.c.sdb, contains design linked and flattened down to the library cell level. This
file will be used by the testability synthesis application (scansyn)
s27.x.sdb, contains the design linked and flattened down to the Syntest primitive
level. This file will be used by the testability analysis application and test vectors
generation (asic123 & asicgen)
s27.conp, contains design connectivity information used to link the .c.sdb to .x.sdb
files. If missing, errors may occur.
1 - 12 SynTest Tutorials
Full-Scan Tutorial
Expanded: ./designs/s27.x.sdb
* Library Cell FD1
* Library Cell IV
* Library Cell AN2
* Library Cell OR2
* Library Cell ND2
* Library Cell NR2
Expanded: ./designs/s27.c.sdb
SynTest Tutorials 1 - 13
Full-Scan Tutorial
In this section, you will use the testability analysis program, asic123 (TurobCheck), to do
the following:
Determine the controllability and observability for the design using full-scan
Generate reports detailing controllability and observability
s27.x.sdb
s27.psi (optional, required only for partial-scan)
(optional) s27.conp
s27.dft (optional file)
asic123
s27.clk.rpt
s27.123.rpt
1 - 14 SynTest Tutorials
Full-Scan Tutorial
NOTE
The .dft file is SynTest template file used to set logic values at primary inputs and memory
elements for the testability analysis program to generate more accurate feedback. The
conditions set in this file can be modified to check problems in normal mode
(before synthesis), shift, hold, and capture mode.
The asic123 program searches for this file by default. This program also reads a .def file for
older releases. The .dft file is now used in place of the .def file.
See more details of a .dft file in File Reference & Examples chapter 10.
more s27.dft
SynTest Tutorials 1 - 15
Full-Scan Tutorial
The -o option in asic123 redirects the output report to the 123 directory, under the prefix
name s27. The processing messages generated are saved to the report file, s27.123.rpt,
shown in Figure 1-11 to Figure 1-15.
NOTE
If you run several iterations of asic123 using different
options, you can store them using different target
filenames or subdirectories.
1 - 16 SynTest Tutorials
Full-Scan Tutorial
SynTest Tutorials 1 - 17
Full-Scan Tutorial
1 - 18 SynTest Tutorials
Full-Scan Tutorial
SynTest Tutorials 1 - 19
Full-Scan Tutorial
MEAN - - 68 -
STANDARD DEVIATION - - 49 -
1 - 20 SynTest Tutorials
Full-Scan Tutorial
SynTest Tutorials 1 - 21
Full-Scan Tutorial
Before synthesizing scan into your design, you must select scan elements and list them in a
file. This file, created by scansel, determines the scan order for scan chains. The scan
selection flow is shown in Figure 1-17.
s27.x.sdb
(optional, required only
s27.psi for partial-scan)
scansel
s27.sel1.pso
The processing messages are shown in Figure 1-18 and Figure 1-19.
1 - 22 SynTest Tutorials
Full-Scan Tutorial
Options selected:
-level 2: effort level is 2.
-acyclic: Break Self & Global Loops.
-fscan: Do Full-Scan Scan Selection.
-o s27: report file will be saved to s27.sel.rpt.
SynTest Tutorials 1 - 23
Full-Scan Tutorial
NOTE
The default ordering of scan elements is organized by
the hierarchical order of module in your design.You can
rearrange the order by copying the .pso file to a different
name, then reorder the flip-flops in the appropriate
ordering. This is usually sufficient for most purposes.
MUST_SCAN I5;
MUST_SCAN I6;
MUST_SCAN I7;
The purpose of scan synthesis is to replace non-scan flip flop with scan flip flop.
1 - 24 SynTest Tutorials
Full-Scan Tutorial
SynTest Tutorials 1 - 25
Full-Scan Tutorial
The processing messages (or the s27.syn.rpt report file) are shown in Figure 1-22.
Scansyn replaces the memory elements with scan elements and inserts the scan-decoder in
the netlist first, then enables the utilities vlogin and expin to modify the .sdb, and created the
relevant data and files. In the end, scansyn system-calls the option -extract-only
automatically to self-test if the scan-chain(s) is stitched successfully. The referenced
detailed process is in Figure 1-22 to Figure 1-25. All the data of the modified scan design is
named as s27_s0.*.
1 - 26 SynTest Tutorials
Full-Scan Tutorial
=============================================
Object Error Status after Hierarchical Repair
=============================================
- No error found after repair.
SynTest Tutorials 1 - 27
Full-Scan Tutorial
======================================================
Report
======================================================
Synthesis Status
------------------------------------------
Replaced Memory Cells : 3
Inserted Delay Cells : 0
Reset Error
Found : 0
Fixed : 0
Skiped : 0
1 - 28 SynTest Tutorials
Full-Scan Tutorial
Transparent Error
Found : 0
Fixed : 0
Skiped : 0
Bidi Error
Found : 0
Fixed : 0
Skiped : 0
Bus Error
Found : 0
Fixed : 0
Skiped : 0
RAM Error
Found : 0
Fixed : 0
Skiped : 0
SynTest Tutorials 1 - 29
Full-Scan Tutorial
1 - 30 SynTest Tutorials
Full-Scan Tutorial
SynTest Tutorials 1 - 31
Full-Scan Tutorial
Initializing ...
Beside replacing non-scan flip-flops and Latches in the design with their scannable
counterparts, scansyn also does rule checks and makes necessary changes to the design.
2. Run scan debug to check if the scan chain(s) works by inserting some flush test vectors.
1 - 32 SynTest Tutorials
Full-Scan Tutorial
The outputs report files created under the sub-directory dbg/ are shown in Figure 1-28 and
Figure 1-29.
SynTest Tutorials 1 - 33
Full-Scan Tutorial
(File continued)
1 - 34 SynTest Tutorials
Full-Scan Tutorial
SynTest Tutorials 1 - 35
Full-Scan Tutorial
Figure 1-30 illustrates the s27 design flow during design synthesis, debug, and netlist
conversion processes.
s27.x.sdb
s27.dft
s27.c.sdb
s27.map
s27.sel1.pso
scansyn Synthesize
scansyn_lib
s27_s0.x.sdb
s27_s0.c.sdb
s27.syn.rpt
s27_s0.sdb
s27.syn.log
s27_s0.conp
s27_s0.syn.rpt
s27_s0.cmd
s27_s0.syn1.pso
SCAN_DECODER_CLASS.sdb
scan_decoder.v
Debug scandbg
lsdb Netlist
Conversion
s27_s0.dbg.rpt
s27_s0.vhd
s27_s0.v
s27_s0.edif
1 - 36 SynTest Tutorials
Full-Scan Tutorial
If you may need a Verilog netlist of the synthesized version of the design, you will need to
use the lsdb utility to translate the sdb files created by scansyn (s27_s0.x.sdb).
1. Convert the s27 scannable SynTest database to a Verilog netlist. From the Shell prompt,
The -verilog option creates a Verilog netlist (-vhdl, -edif and -tdl are also supported).
The -hierarchy option creates a hierarchical netlist which will reconstruct the original
design hierarchy.
The -timescale option allows insertion of a timescale directive in Verilog for simulation
purposes.
The -o option directs the output to the filename you specify.
more s27_s0.v
SynTest Tutorials 1 - 37
Full-Scan Tutorial
// File : s27_s0.v
// Created: Thu Jan 1 15:23:16 1998
// By : lsdb version V2.1.0 of 12/23/97 09:14:47
// lsdb -verilog s27_s0
// sdb verison 230
//
// (c) 1991-1998, SynTest Technologies, Inc.
// File : s27_s0.v
// Created: Thu Jan 1 15:23:16 1998
// By : lsdb version V2.1.0 of 12/23/97 09:14:47
// lsdb -verilog s27_s0
// sdb verison 230
//
// (c) 1991-1998, SynTest Technologies, Inc.
1 - 38 SynTest Tutorials
Full-Scan Tutorial
After your design is synthesized to include scan, you can then generate and translate test
patterns. In this section, you will :
Use the test pattern generation utility, asicgen (TurboScan tool), to generate the test
patterns for the s27 design
Use the Unix ln command to create an internal link
Use the test pattern translation utility, tpout, to translate the test patterns into a
Verilog test-bench
The asicgen utility reads the synthesized output files from the scansyn utility, they are:
s27_s0.x.sdb file, the design compiled and flattened to the SynTest primitive level
s27_s0.dft, file contains an entry regarding "%ATPG_CONSTRAINTS" which
outlines any logic pre-conditioning for the design to run in hold mode
s27_s0.x.sdb
s27_s0.dft
asicgen
s27_s0.rpt
s27_s0.tp
s27_s0.int
s27_s0.hdt
s27_s0.pso
s27_s0.red
s27_s0.udt
SynTest Tutorials 1 - 39
Full-Scan Tutorial
// File : ./s27_s0.dft
( File continued)
// (c) 1991-1995, SynTest Technologies, Inc.
// Connect Scan Chain
// Scan instruction sequence before scan, during scan, and %CONNECT_SCAN chain_1 MDFF
after scan {
%SEQUENCE shift_seq %SCAN_PORT
{ {
%FORCE CLK = 010; %SCAN_IN = SCAN_IN;
%FORCE STI_TM1 = 111; %SCAN_OUT = SCAN_OUT;
%CYCLE_LENGTH = 3; %DEFAULT = SCAN_;
} }
%SEQUENCE hold_seq %SCAN_CLOCK_1
{ {
%FORCE CLK = 000; %CLOCK = CLK;
%FORCE STI_TM1 = 000; %GLOBAL_CLOCK = CLK;
%CYCLE_LENGTH = 1; }
} %SCAN_INSTANCES_FILE
%SEQUENCE capture_seq {
{ %FILE_NAME = "s27_s0.ext1.pso";
%FORCE CLK = 010; }
%FORCE STI_TM1 = 000; %SCAN_INSTRUCTION
%CYCLE_LENGTH = 1; {
} %INSTRUCTION = instruction1;
// Instruction }
%INSTRUCTION instruction1 }
{ // Test Generation Constraints
%MODE = "scan"; %ATPG_CONSTRAINTS
%SHIFT = shift_seq; {
%HOLD = hold_seq; %ATPG_MODE "FULL_SCAN"
%CAPTURE = capture_seq; {
} %FORCE CLK = 0;
// Read Mapping_cell File }
%READ_MAP }
{ // Scan Decoder
%FILE_NAME = "s27.map"; %SCAN_DECODER
} {
// Connect Scan Chain %CONTROL_PORT_1 = STI_TM1;
%CONTROL_PORT_2 = STI_TM2;
}
The -post_fscan option sets all the default options, such like -dont_scan_loop, for full-
scan test pattern generation on the synthesized netlist.
The -o option redirects the output to the fscan subdirectory.
1 - 40 SynTest Tutorials
Full-Scan Tutorial
The asicgen processing messages are shown in Figure 1-35, Figure 1-36, and Figure 1-37.
SynTest Tutorials 1 - 41
Full-Scan Tutorial
This circuit has 8 test patterns and contains 112 UNCOLLAPSED faults of which
112 (100.00%) faults were Hard detected (HD).
0 ( 0.00%) data faults were Potentially testable (PT).
0 ( 0.00%) clock/enable faults were Potentially untestable (PU).
0 ( 0.00%) Untestable (UT) faults were Ignored (IG) or Tied to VCC/GND.
0 ( 0.00%) Untestable (UT) faults were Uncontrollable.
0 ( 0.00%) Untestable (UT) faults were Blocked (Unobservable).
0 ( 0.00%) Untestable (UT) faults were due to circuit design.
0 ( 0.00%) faults were Undetected (UD).
1 - 42 SynTest Tutorials
Full-Scan Tutorial
This circuit has 8 test patterns and contains 112 UNCOLLAPSED faults of which
112 (100.00%) faults were Hard detected (HD).
0 ( 0.00%) data faults were Potentially testable (PT).
0 ( 0.00%) clock/enable faults were Potentially untestable (PU).
0 ( 0.00%) Untestable (UT) faults were Ignored (IG) or Tied to VCC/GND.
0 ( 0.00%) Untestable (UT) faults were Uncontrollable.
0 ( 0.00%) Untestable (UT) faults were Blocked (Unobservable).
0 ( 0.00%) Untestable (UT) faults were due to circuit design.
0 ( 0.00%) clock/enable faults were Aborted for backtrack count exceeding 10000.
0 ( 0.00%) data faults were Aborted for backtrack count exceeding 10000.
SynTest Tutorials 1 - 43
Full-Scan Tutorial
S
SS C
TC AIII
IA N567
_N ____
C T_ GOPPP
LGGGGMIIII1UPPP
K01231N5677TOOO
-STEM-
1 S LHLHHLHLLL---+-
2 S LLLLLLHHHL+----
3 S LLHHLHLLHL----+
4 S LHHLHLHLHH+++-+
5 S LLLLHLLHHH++--+
6 S LLHLLLHLLL+---+
7 S LHLHLHHLLL+-+--
8 S LLHHLLLHLL+----
The s27_s0.hdt, s27_s0.int, and s27_s0.pso files are shown in Figure 1-39.
(file continued)
/0 /1 CP I6 I CLK
/0 /1 CP I7 I G0
/0 /1 CP I5 /1 Z I15 I G1
/0 /1 CLK /0 /1 SCAN_IN I G2
/0 B I10 /0 /1 STI_TM1 I G3
/0 /1 D I6 /0 /1 Q I5 I STI_TM1
/0 /1 Z I17 /0 /1 Z I SCAN_IN
/0 A I11 SCANSYN_BUF_0 S I5 I1
/0 B I13 /0 /1 G3 S I6 I1
/0 B I16 /0 /1 G0 S I7 I1
/0 B I15 /0 /1 G1 O G17
/0 A I15 /0 /1 G2 O SCAN_OUT
/1 A I8 /0 /1 TE I5
/0 /1 Z I8 /0 Z I16
/0 /1 TI I6 /0 /1 TE I6 The s27_s0.int File
/0 /1 TI I7 /0 /1 Q I7
/0 /1 Z I10 /0 /1 TE I7 MUST_SCAN 24 I5;
/0 Z I9 /1 Z I12 MUST_SCAN 44 I6;
/0 B I12 /1 Z I11 MUST_SCAN 64 I7;
/0 A I10 /1 Z I13
/1 B I8
In this section, you will run a logic simulation to verify the logic using the test vectors,
s27_s0.tp, generated by asicgen. You will again use asicgen to run the logic simulation.
1 - 44 SynTest Tutorials
Full-Scan Tutorial
This utility requires a test pattern with a .stm file. This file can be a user defined or can be a
copy of .tp file. For this simulation, you will make a copy from the s27_s0.tp file.
cp s27_s0.tp s27_s0.stm
SynTest Tutorials 1 - 45
Full-Scan Tutorial
Now you can use the test vector to run the fault simulation using asicgen with -fsim option.
Asicgen requires a test pattern with a .stm file. This file can be a user defined or can be a
copy of .tp file.
1 - 46 SynTest Tutorials
Full-Scan Tutorial
SynTest Tutorials 1 - 47
Full-Scan Tutorial
This circuit has 8 test patterns and contains 112 UNCOLLAPSED faults of which
112 (100.00%) faults were Hard detected (HD).
0 ( 0.00%) data faults were Potentially testable (PT).
0 ( 0.00%) clock/enable faults were Potentially untestable (PU).
0 ( 0.00%) Untestable (UT) faults were Ignored (IG) or Tied to VCC/GND.
0 ( 0.00%) Untestable (UT) faults were Uncontrollable.
0 ( 0.00%) Untestable (UT) faults were Blocked (Unobservable).
0 ( 0.00%) Untestable (UT) faults were due to circuit design.
0 ( 0.00%) faults were Undetected (UD).
1 - 48 SynTest Tutorials
Full-Scan Tutorial
The test pattern files created by asicgen are stored in the fscan sub-directory. Before
translating these files, you must create internal links to these files.
1. Create links to the test pattern files. From the Shell prompt,
a) ln -s fscan/s27_s0.tp .
b) ln -s fscan/s27_s0.int .
2. Translate the test pattern to a Verilog serial format. From the Shell prompt,
SynTest Tutorials 1 - 49
Full-Scan Tutorial
The Verilog driver file, s27_s0.drv.v, controls a Verilog simulation of the full set of patterns
generated by asicgen. It reads the scan test data and compares the expected data both from
s27_s0.vector file. This verification process in Verilog can be used to completely verify the
pattern set before taping out the design. The s27_s0.drv.v is shown in Figure 1-44, Figure 1-
45, and Figure 1-46.
1 - 50 SynTest Tutorials
Full-Scan Tutorial
SynTest Tutorials 1 - 51
Full-Scan Tutorial
1 - 52 SynTest Tutorials
Full-Scan Tutorial
SynTest Tutorials 1 - 53
Full-Scan Tutorial
1 - 54 SynTest Tutorials
Full-Scan Tutorial
The frun script shown in can be used to run the full-scan test with the same result as the
previous interactive run.
#!/bin/csh -f
##1) Create Directory Structure
mkdir designs lib 123 fscan dbg
frun <CR>
SynTest Tutorials 1 - 55
Full-Scan Tutorial
Expanded: ./designs/s27.x.sdb
1 - 56 SynTest Tutorials
Full-Scan Tutorial
SynTest Tutorials 1 - 57
Full-Scan Tutorial
1 - 58 SynTest Tutorials
Full-Scan Tutorial
MEAN - - 68 -
STANDARD DEVIATION - - 49 -
Options selected:
-level 2: effort level is 2.
-acyclic: Break Self & Global Loops.
-fscan: Do Full-Scan Scan Selection.
-o s27: report file will be saved to s27.sel.rpt.
SynTest Tutorials 1 - 59
Full-Scan Tutorial
=============================================
Object Error Status after Hierarchical Repair
=============================================
- No error found after repair.
======================================================
Report
======================================================
1 - 60 SynTest Tutorials
Full-Scan Tutorial
Synthesis Status
------------------------------------------
Replaced Memory Cells : 3
Inserted Delay Cells : 0
Reset Error
Found : 0
Fixed : 0
Skiped : 0
Transparent Error
Found : 0
Fixed : 0
Skiped : 0
Bidi Error
Found : 0
Fixed : 0
Skiped : 0
Bus Error
Found : 0
Fixed : 0
Skiped : 0
RAM Error
Found : 0
Fixed : 0
Skiped : 0
SynTest Tutorials 1 - 61
Full-Scan Tutorial
Normal | 0
Shift | 1
Hold | X
Capture | X
------------------------------------------
Scan-Chain 1 - chain_1:
SCAN_IN : SCAN_IN
SCAN_OUT : SCAN_OUT
CLOCK : CLK
SHIFT :
FORCE : CLK ---> 010
FORCE : STI_TM1 ---> 111
INSTANCES : 3 ---> 3 scan objects
1 - 62 SynTest Tutorials
Full-Scan Tutorial
success!!
Simulation Complete!!
Scan-Chain 1 - chain_1:
SCAN_IN : SCAN_IN
SCAN_OUT : SCAN_OUT
CLOCK : CLK
SHIFT :
FORCE : CLK ---> 010
FORCE : STI_TM1 ---> 111
INSTANCES : 3 ---> 3 scan objects
SynTest Tutorials 1 - 63
Full-Scan Tutorial
Simulation Complete!!
1 - 64 SynTest Tutorials
Full-Scan Tutorial
This circuit has 8 test patterns and contains 112 UNCOLLAPSED faults of which
112 (100.00%) faults were Hard detected (HD).
0 ( 0.00%) data faults were Potentially testable (PT).
0 ( 0.00%) clock/enable faults were Potentially untestable (PU).
0 ( 0.00%) Untestable (UT) faults were Ignored (IG) or Tied to VCC/GND.
0 ( 0.00%) Untestable (UT) faults were Uncontrollable.
0 ( 0.00%) Untestable (UT) faults were Blocked (Unobservable).
0 ( 0.00%) Untestable (UT) faults were due to circuit design.
0 ( 0.00%) faults were Undetected (UD).
SynTest Tutorials 1 - 65
Full-Scan Tutorial
This circuit has 8 test patterns and contains 112 UNCOLLAPSED faults of which
112 (100.00%) faults were Hard detected (HD).
0 ( 0.00%) data faults were Potentially testable (PT).
0 ( 0.00%) clock/enable faults were Potentially untestable (PU).
0 ( 0.00%) Untestable (UT) faults were Ignored (IG) or Tied to VCC/GND.
0 ( 0.00%) Untestable (UT) faults were Uncontrollable.
0 ( 0.00%) Untestable (UT) faults were Blocked (Unobservable).
0 ( 0.00%) Untestable (UT) faults were due to circuit design.
0 ( 0.00%) clock/enable faults were Aborted for backtrack count exceeding 10000.
0 ( 0.00%) data faults were Aborted for backtrack count exceeding 10000.
1 - 66 SynTest Tutorials
Full-Scan Tutorial
Scan information :
Chain 1, Length is 3
Scan-in pin = SCAN_IN
Scan-out pin = SCAN_OUT
Sequence information :
Shift sequence
CLK = 010
STI_TM1 = 1
Hold sequence
CLK = 0
Capture sequence
CLK = 010
Clock information :
Number of vectors = 8
Length of a vector = 15
SynTest Tutorials 1 - 67
Full-Scan Tutorial
In this section, you will run the full-scan test on the Ripple_Rom design. This design is an
8-bit ripple counter which drives the address lines of a ROM. The process and steps are
similar to the s27 design.
In this section, you will create directories to be used to organize the design files. The
directories you will create are:
lib, directory used to store cell library definitions
designs, directory used to store design database information.
123, directory usedd to store testability analysis (TurboCheck) output files (asic123)
fscan, directory used to store test pattern generation (TurboScan) results (asicgen)
dbg, directory used to store scan verification output files (scandbg)
1. Change to the syntest/ directory and source the .syntest script file . From the Shell
prompt,
a) cd $SYNTEST
b) source .syntest
3. Create the required directories using the mkdir command. From the Shell prompt,
mkdir lib designs 123 fscan dbg
This action will create five directories: lib, designs, 123, fscan, and dbg.
NOTE
The lib and designs directories are created for use by
Syntest applications such as expin, and are inluded in
the default search order.
1 - 68 SynTest Tutorials
Full-Scan Tutorial
The design netlist and cell library translating, compiling, and linking and expanding flow is
shown in Figure 1-49.
design.v
syntest.def primitive.def
vlogin
design .sdb
expin
design.x.sdb
design.c.sdb
design.conp
SynTest Tutorials 1 - 69
Full-Scan Tutorial
To run s27rom flow, you have to convert your memory behavior models and rom codes
(Figure 1-50) into SynTest rom format (Figure 1-51).
initial
begin
$readmemb(sim_rom.rom, mem);
end // sim_rom.rom file for Verilog simulation
always @(CS or A) // binary mapping
begin 000 001 010 011 100 101 110 111
Q = mem[A];
end The original rom
endmodule codes for Verilog
simulation
The behavior memory model in Verilog format
1 - 70 SynTest Tutorials
Full-Scan Tutorial
module init_rom ( q0, q1, q2, a0, a1, a2, ce, re ); # s27rom.rom file
output q0, q1, q2; # binary explicit mapping
input a0, a1, a2, ce, re; .r I27.I0
.i 3
ROM8x3 I0 ( .Q0(q0), .o 3
.Q1(q1), .p 8
.Q2(q2), 000 000
.A0(a0), 001 001
.A1(a1), 010 010
.A2(a2), 011 011
.D0(1b0), 100 100
.D1(1b0), 101 101
.D2(1b0), 110 110
.CS(cs), 111 111
.RWB(1b1)
); The mapping rom codes
and I1 ( cs, ce, re );
endmodule
Figure 1-51 Mapping Rom Model and Binary Rom Codes in SynTest Format
The Verilog cell library file and the Verilog netlist file are shown in Figure 1-52 and Figure
1-53.
SynTest Tutorials 1 - 71
Full-Scan Tutorial
1 - 72 SynTest Tutorials
Full-Scan Tutorial
module s27rom (G17, CLK, G0, G1, G2, G3, rom_init, a0, a1, a2 );
output G17;
input CLK, G0, G1, G2, G3, rom_init, a0, a1, a2;
wire G5, G10, G6, G11, G7;
wire G13, G14, G8, G15, G12;
wire G16, G9;
// modified circuit for rom by syntest 01/14/98
wire G51, G61, G71, normal, read_rom;
wire q5, q6, q7;
FD1 I5 (.Q(G5), .D(G10), .CP(CLK));
FD1 I6 (.Q(G6), .D(G11), .CP(CLK));
FD1 I7 (.Q(G7), .D(G13), .CP(CLK));
IV I14 (.Z(G14), .A(G0));
IV I17 (.Z(G17), .A(G11));
AN2 I8 (.Z(G8), .A(G14), .B(G61));
OR2 I15 (.Z(G15), .A(G12), .B(G8));
OR2 I16 (.Z(G16), .A(G3), .B(G8));
ND2 I9 (.Z(G9), .A(G16), .B(G15));
NR2 I10 (.Z(G10), .A(G14), .B(G11));
NR2 I11 (.Z(G11), .A(G51), .B(G9));
NR2 I12 (.Z(G12), .A(G1), .B(G71));
NR2 I13 (.Z(G13), .A(G2), .B(G12));
// modified circuit for rom by syntest 01/14/98
TX I20 ( .Z(G51), .A(G5), .E(normal) );
TX I21 ( .Z(G61), .A(G6), .E(normal) );
TX I22 ( .Z(G71), .A(G7), .E(normal) );
IV I23 ( .Z(normal), .A(read_rom) );
TX I24 ( .Z(G51), .A(q5), .E(read_rom) );
TX I25 ( .Z(G61), .A(q6), .E(read_rom) );
TX I26 ( .Z(G71), .A(q7), .E(read_rom) );
init_rom I27 ( .q0(q5), .q1(q6), .q2(q7),
.a0(a0), .a1(a1), .a2(a2),
.ce(rom_init), .re(read_rom)
);
AN2 I28 ( .Z(read_rom), .A(CLK_bar), .B(rom_init) );
IV I29 ( .Z(CLK_bar), .A(CLK) );
endmodule
You will use vlogin to compile the Verilog netlist and cell library files into SynTest
intermediate format (.sdb). Detailed information regarding this utility can be found in
Command Reference, Chapter 11 and Creating the Syntest Database and Libraries,
Chapter 3.
4. Compile the library, s27lib.v and init_rom.v. From the Shell prompt,
SynTest Tutorials 1 - 73
Full-Scan Tutorial
This action will generate a cell sdb files for each cell in the library file. The processing
messages are shown in Figure 1-54.
The -nf option disables faulting within the library cells, and -drc performs connectivity
design rule checks on the cells. The two option are typically used for library compilation and
enabled automatically by turning on the option -lib.
The other option which is on always when -lib is specified is -opath lib. This option outputs
the .sdb files into the lib sub-directory created for this run. Since one .sdb file is created for
each cell in the library, the directory organization eliminates cluttering the main design
directory with many files.
File: libsrc/s27lib.v
Parsed: TX (interface only)
Parsed: IV (interface only)
Parsed: BU (interface only)
Parsed: AN2 (interface only)
Parsed: ND2 (interface only)
Parsed: OR2 (interface only)
Parsed: NR2 (interface only)
Parsed: EO (interface only)
Parsed: MUX21H (interface only)
Parsed: FD1 (interface only)
Parsed: FD1S (interface only)
***** Pass Two *****
File: libsrc/s27lib.v
Created: lib/TX.sdb ================ VLOGIN V2.0.0 r01 (10/28/97 15:19:49) ================
Created: lib/IV.sdb
Created: lib/BU.sdb Copyright (c), 1991-1997, SynTest Technologies, Inc. All rights reserved.
Created: lib/AN2.sdb
Created: lib/ND2.sdb TIME: Sun Feb 8 16:02:33 1998
Created: lib/OR2.sdb
Created: lib/NR2.sdb File: libsrc/init_rom.v
Created: lib/EO.sdb Parsed: init_rom (interface only)
Created: lib/MUX21H.sdb ***** Pass Two *****
Created: lib/FD1.sdb File: libsrc/init_rom.v
Created: lib/FD1S.sdb
This action will create the design module sdb files, s27rom.sdb. The processing
messages are shown in Figure 1-55.
1 - 74 SynTest Tutorials
Full-Scan Tutorial
The -opath option redirects the compiled .sdb files to the designs sub-directory.
File: netsrc/s27rom.v
Parsed: s27rom (interface only)
***** Pass Two *****
File: netsrc/s27rom.v
Created: designs/s27rom.sdb
The design must be linked and expanded (flattened) before you can perform synthesis or run
the test vector generation programs.
The expin utility is used to link and expand the design. This program reads:
top-level and sub-module .sdb files
cell library .sdb files
syntest.def and primitive.def files (required files located in the $SYNTEST/designs
directory. See Creating the Syntest Database and Libraries, Chapter 3 for a
discussion of these files). In this example the primitive.def file has been modified to
describe the 8X3 ROM.
expin s27rom
This command execution will create three new design files in the sub-directory designs. The
files are:
s27rom.c.sdb, contains design linked and flattened down to the library cell level.
This file will be used by the scan synthesis application (scansyn)
s27rom.x.sdb, contains the design linked and flattened down to the Syntest primitive
level. This file will be used by the testability analysis application and test patterns
generation (asic123 & asicgen)
s27rom.conp, contains design connectivity information used to link the .c.sdb to
.x.sdb files. If missing, errors may occur.
SynTest Tutorials 1 - 75
Full-Scan Tutorial
Expanded: ./designs/s27rom.x.sdb
* Library Cell FD1
* Library Cell IV
* Library Cell AN2
* Library Cell OR2
* Library Cell ND2
* Library Cell NR2
* Library Cell TX
* Library Cell init_rom
Expanded: ./designs/s27rom.c.sdb
In this section, you will use the testability analysis program, asic123 (TurobCheck), to do
the following:
Determine the controllability and observability for the design using full-scan with a
rom
Generate reports detailing controllability and observability
1 - 76 SynTest Tutorials
Full-Scan Tutorial
more s27rom.dft
SynTest Tutorials 1 - 77
Full-Scan Tutorial
The -o option in asic123 redirects the output report to the 123 directory, under the prefix
name s27rom. The processing messages generated are saved to the report file
s27rom.123.rpt, shown in Figure 1-58 to Figure 1-61.
1 - 78 SynTest Tutorials
Full-Scan Tutorial
SynTest Tutorials 1 - 79
Full-Scan Tutorial
1 - 80 SynTest Tutorials
Full-Scan Tutorial
MEAN - - 12 -
STANDARD DEVIATION - - 7 -
SynTest Tutorials 1 - 81
Full-Scan Tutorial
1 - 82 SynTest Tutorials
Full-Scan Tutorial
Before synthesizing scan into your design, you must select scan elements and list them in a
file. This file, created by scansel, determines the scan order for scan chains.
The processing messages and the list of flip-flops file are the same as Figure 1-18, Figure 1-
19, and Figure 1-20.
The purpose of scan synthesis is to replace non-scan flip flop with scan flip flop.
SynTest Tutorials 1 - 83
Full-Scan Tutorial
cp s27rom.rom s27_rom.rom
The processing messages are shown in Figure 1-63 and Figure 1-64.
1 - 84 SynTest Tutorials
Full-Scan Tutorial
=============================================
Object Error Status after Hierarchical Repair
=============================================
- No error found after repair.
======================================================
Report
======================================================
SynTest Tutorials 1 - 85
Full-Scan Tutorial
1 - 86 SynTest Tutorials
Full-Scan Tutorial
Expanded: SCAN_DECODER_CLASS
Expanded: ./scansyn_lib/s27rom_s0.x.sdb
SynTest Tutorials 1 - 87
Full-Scan Tutorial
Initializing ...
Beside replacing non-scan flip-flops and Latches in the design with their scanable
counterparts, scansyn also does rule checks and makes necessary changes to the design.
1 - 88 SynTest Tutorials
Full-Scan Tutorial
The outputs report files created under the sub-directory dbg/ are shown in Figure 1-67 and
Figure 1-68.
Copyright (c), 1991-1997, SynTest Technologies, Inc. All rights reserved. (File continued)
LEVELIZATION END TIME : Wed Feb 11 18:35:33 1998 [NAME] [STATUS] [PSO-FILE] [INV]
SynTest Tutorials 1 - 89
Full-Scan Tutorial
LEVELIZATION END TIME : Wed Feb 11 18:36:17 1998 ---------------------------- CHAIN STATUS ------------------------------
Figure 1-69 illustrates the s27rom design flow during design synthesis, debug, and netlist
conversion processes.
1 - 90 SynTest Tutorials
Full-Scan Tutorial
s27rom.x.sdb
s27rom.dft
s27rom.c.sdb
s27rom.map
s27rom.sel1.pso
s27rom.rom
scansyn Synthesize
scansyn_lib
s27rom_s0.x.sdb
s27rom_s0.c.sdb
s27rom.syn.rpt
s27rom_s0.sdb
s27rom.syn.log
s27rom_s0.conp
s27rom_s0.syn.rpt
s27rom_s0.cmd s27rom_s0.rom
s27rom_s0.syn1.pso
SCAN_DECODER_CLASS.sdb
scan_decoder.v
Debug scandbg
lsdb Netlist
Conversion
s27rom_s0.dbg.rpt
s27rom_s0.vhd
s27rom_s0.v
s27rom_s0.edif
SynTest Tutorials 1 - 91
Full-Scan Tutorial
If you may need a Verilog netlist of the synthesized version of the design, you will need to
use the lsdb utility to translate the sdb files created by scansyn (s27rom_s0.x.sdb).
1. Convert the s27rom scannable SynTest database to a Verilog netlist. From the Shell
prompt,
The -verilog option creates a Verilog netlist (-vhdl, -edif and -tdl are also supported).
The -hierarchy option creates a hierarchical netlist which will reconstruct the original
design hierarchy.
The -timescale option allows insertion of a timescale directive in Verilog for simulation
purposes.
The -o option directs the output to the filename
more s27rom_s0.v
1 - 92 SynTest Tutorials
Full-Scan Tutorial
// File : s27rom_s0.v
// Created: Sun Feb 8 17:09:45 1998
// By : lsdb version V2.1.0 of 12/23/97 09:14:47
// lsdb -verilog s27rom_s0
// sdb verison 230
//
// (c) 1991-1998, SynTest Technologies, Inc.
SynTest Tutorials 1 - 93
Full-Scan Tutorial
// File : s27rom_s0.v
// Created: Sun Feb 8 17:09:45 1998
// By : lsdb version V2.1.0 of 12/23/97 09:14:47
// lsdb -verilog s27rom_s0
// sdb verison 230
//
// (c) 1991-1998, SynTest Technologies, Inc.
1 - 94 SynTest Tutorials
Full-Scan Tutorial
After your design is synthesized to include scan, you can then generate and translate test
patterns. In this section, you will :
Use the test pattern generation utility, asicgen (TurboScan tool), to generate the test
patterns for the s27rom design
Use the Unix ln command to create an internal link
Use the test pattern translation utility, tpout, to translate the test patterns into a
Verilog test-bench
The asicgen utility reads the synthesized output files from the scansyn utility, they are:
s27rom_s0.x.sdb file, the design compiled and flattened to the SynTest primitive
level
s27rom_s0.dft, file contains an entry regarding "%ATPG_CONSTRAINTS" which
outlines any logic pre-conditioning for the design to run in hold mode
s27rom_s0.rom, file contains the binary rom codes, which are copied from the
original file s27rom.rom
s27rom_s0.x.sdb
s27rom_s0.dft
s27rom_s0.rom
asicgen
s27rom_s0.rpt
s27rom_s0.tp
s27rom_s0.int
s27rom_s0.hdt
s27rom_s0.pso
s27rom_s0.red
s27rom_s0.udt
SynTest Tutorials 1 - 95
Full-Scan Tutorial
// File : s27rom_s0.dft
// (c) 1991-1995, SynTest Technologies, Inc. ( File continued)
1 - 96 SynTest Tutorials
Full-Scan Tutorial
The asicgen processing messages are shown in Figure 1-75 and Figure 1-76.
SynTest Tutorials 1 - 97
Full-Scan Tutorial
This circuit has 9 test patterns and contains 115 faults of which
95 ( 82.61%) faults were Hard detected (HD).
0 ( 0.00%) data faults were Potentially testable (PT).
0 ( 0.00%) clock/enable faults were Potentially untestable (PU).
1 ( 0.87%) Untestable (UT) faults were Ignored (IG) or Tied to VCC/GND.
0 ( 0.00%) Untestable (UT) faults were Uncontrollable.
0 ( 0.00%) Untestable (UT) faults were Blocked (Unobservable).
19 ( 16.52%) Untestable (UT) faults were due to circuit design.
0 ( 0.00%) clock/enable faults were Aborted for backtrack count exceeding 150.
0 ( 0.00%) data faults were Aborted for backtrack count exceeding 150.
This circuit has 9 test patterns and contains 180 UNCOLLAPSED faults of which
155 ( 86.11%) faults were Hard detected (HD).
0 ( 0.00%) data faults were Potentially testable (PT).
0 ( 0.00%) clock/enable faults were Potentially untestable (PU).
3 ( 1.67%) Untestable (UT) faults were Ignored (IG) or Tied to VCC/GND.
0 ( 0.00%) Untestable (UT) faults were Uncontrollable.
0 ( 0.00%) Untestable (UT) faults were Blocked (Unobservable).
22 ( 12.22%) Untestable (UT) faults were due to circuit design.
0 ( 0.00%) clock/enable faults were Aborted for backtrack count exceeding 150.
0 ( 0.00%) data faults were Aborted for backtrack count exceeding 150.
1 - 98 SynTest Tutorials
Full-Scan Tutorial
r S
o SS C
m TC AIII
_ IA N567
i _N ____
C n T_ GOPPP
LGGGGiaaaMIIII1UPPP
K0123t0121N5677TOOO
-STEM-
1 S LLLLLHLHHLLHLL---++
2 S LLHHLHLLHLHLHH++---
3 S LHLLHHHLLLLHHL+-+--
4 S LHLHHHLLLLHHLL---+-
5 S LLHLLLHLHLHHHL+---+
6 S LLLLLLLLHLLLLL+----
7 S LLHLLLHLHHLLHL----+
8 S LHHLHLHLHHLLHH++--+
9 S LLLHHLLHHLHLLH++---
SynTest Tutorials 1 - 99
Full-Scan Tutorial
The test pattern files created by asicgen are stored in the fscan sub-directory. Before
translating these files, you must create internal links to these files.
1. Create links to the test pattern files. From the Shell prompt,
a) ln -s fscan/s27rom_s0.tp .
b) ln -s fscan/s27rom_s0.int .
2. Translate the test pattern to a Verilog serial format. From the Shell prompt,
The Verilog driver file, s27rom_s0.drv.v, controls a Verilog simulation of the full set of
patterns generated by asicgen. It reads the scan test data and compares the expected data
both from s27rom_s0.vector file. This verification process in Verilog can be used to
completely verify the pattern set before taping out the design. The s27rom_s0.drv.v is shown
from Figure 1-79 to Figure 1-82.
(file continued)
.STI_TM1 ( STI_STI_TM1 ) ,
.SCAN_IN ( STI_SCAN_IN ) ); begin
//------------------------------------------------------- #1.00;
//-- Init variables -- work_vector[1] = shift_1[phase];
//------------------------------------------------------- if (ppi > CHAIN1_LEN) work_vector[11] =
task init_variables; 1b0;
begin else work_vector[11] = si1_vector[ppi];
shift_1 = 3b010;
cap_1 = 3b010; #997.00;
scan_out[1] = 2; if (phase == SHIFT_PHASE && in != 1 &&
strobe_so = FALSE; cycle != SHIFT_CYCLE)
strobe_po = FALSE; strobe_so = TRUE;
po_mismatch = 0; phase = phase + 1;
so_mismatch = 0; #2.00;
end end
endtask ppi = ppi - 1;
//------------------------------------------------------- end
//-- Main routine -- end
//------------------------------------------------------- endtask
initial
begin task hold_sequence;
init_variables; begin
num_shift_cycle = SHIFT_CYCLE; work_vector = pi_vector;
for (in = 1; in <= NUM_VEC; in = in + 1) work_vector[1] = 1b0;
begin phase = 1;
#1000.00; // settle vectors while (phase <= HOLD_PHASE)
shift_sequence; begin
$display(\nSimulation processing test vector #1.00;
%0d\n, in); #997.00;
vec_print = in; if (phase == HOLD_PHASE)
hold_sequence; strobe_po = TRUE;
ppo = 0; phase = phase + 1;
inst = 1; #2.00;
capture_sequence; end
reshift_sequence; end
end endtask
num_shift_cycle = SHIFT_CYCLE - 1;
shift_sequence; // scan out the very last pattern task capture_sequence;
$display(\n*** Test vectors simulated : %d, begin
NUM_VEC); work_vector = pi_vector;
$display(*** Number of PO mismatch : %d, phase = 1;
po_mismatch); while (phase <= CAP_PHASE)
$display(*** Number of SO mismatch : %d, begin
so_mismatch); #1.00;
$finish; work_vector[1] = cap_1[phase];
end #997.00;
//------------------------------------------------------- phase = phase + 1;
//-- Sequence tasks -- #2.00;
//------------------------------------------------------- end
task shift_sequence; end
begin endtask
work_vector = pi_vector;
work_vector[10] = 1b1; task reshift_sequence;
ppi = SHIFT_CYCLE; begin
for (cycle = 1; cycle <= num_shift_cycle; cycle = pre_work_vector = work_vector;
cycle + 1) work_vector = pi_vector;
begin work_vector[10] = 1b1;
phase = 1; work_vector[1] = pre_work_vector[1];
while (phase <= SHIFT_PHASE) phase = 1;
(file continued)
while (phase <= SHIFT_PHASE)
begin begin
#1.00; compare_po;
#997.00; if (error)
if (phase == SHIFT_PHASE) begin
strobe_so = TRUE; print_po_mismatch;
phase = phase + 1; po_mismatch = po_mismatch + 1;
#2.00; end
end strobe_po = FALSE;
end end
endtask #1.00;
end
//-------------------------------------------------------
//-- Set clock values -- task compare_so;
//------------------------------------------------------- begin
assign #200.00 STI_CLK = work_vector[1]; i = CHAIN1_LEN - ppo;
//------------------------------------------------------- if (i <= 0) so_expected[1] = 1bx;
//-- Set input values -- else so_expected[1] = so1_expected[i];
//------------------------------------------------------- error = FALSE;
assign #100.00 STI_G0 = work_vector[2]; for (i=1; i <= SO_LEN && error === FALSE;
assign #100.00 STI_G1 = work_vector[3]; i=i+1)
assign #100.00 STI_G2 = work_vector[4]; begin
assign #100.00 STI_G3 = work_vector[5]; if (so_expected[i] !== 1bx && so_expected[i]
assign #100.00 STI_rom_init = work_vector[6]; !== 1bz)
assign #100.00 STI_a0 = work_vector[7]; if (so_expected[i] !==
assign #100.00 STI_a1 = work_vector[8]; sim_response[scan_out[i]]) error = TRUE;
assign #100.00 STI_a2 = work_vector[9]; end
assign #100.00 STI_STI_TM1 = work_vector[10]; ppo = ppo + 1;
assign #100.00 STI_SCAN_IN = end
work_vector[11]; endtask
//-------------------------------------------------------
//-- Get output values -- task print_so_mismatch;
//------------------------------------------------------- begin
always $write(*** SO mismatch at vector %0d,,
begin vec_print, scan out number %0d,, inst, time
fork %0d\n, $time);
#900.00 sim_response[1] = STI_G17 ; bit_count = 1;
#900.00 sim_response[2] = STI_SCAN_OUT ; for (i = 1; i <= SO_LEN; i = i + 1)
#1000.00; begin
join if (so_expected[i] !== 1bx && so_expected[i]
end !== 1bz)
//------------------------------------------------------- begin
//-- Compare expected outputs to simulation if (so_expected[i] !==
results -- sim_response[scan_out[i]])
//------------------------------------------------------- $write(scan chain #%0d expected = %b sim-
always #999.00 ulated = %b\n,
begin bit_count, so_expected[i],
if (strobe_so) // compare scan out sim_response[scan_out[i]]);
begin end
compare_so; bit_count = bit_count + 1;
if (error) end
begin $write(\n);
print_so_mismatch; end
so_mismatch = so_mismatch + 1; endtask
end
inst = inst + 1; task compare_po;
strobe_so = FALSE; begin
end error = FALSE;
if (strobe_po) // compare primary output for (i=1; i <= PO_LEN && error === FALSE;
i=i+1)
begin
if (po_expected[i] !== 1bx && po_expected[i] !== 1bz)
if (po_expected[i] !== sim_response[i]) error = TRUE;
end
end
endtask
task print_po_mismatch;
begin
$write(*** PO mismatch at vector %0d,, vec_print, time %0d\n, $time);
bit_count = 1;
for (i = 1; i <= PO_LEN; i = i + 1)
begin
if (po_expected[i] !== 1bx && po_expected[i] !== 1bz)
begin
if (po_expected[i] !== sim_response[i])
$write(PO #%0d expected = %b simulated = %b\n,
bit_count, po_expected[i], sim_response[i]);
end
bit_count = bit_count + 1;
end
$write(\n);
end
endtask
include s27rom_s0.vector
endmodule
initial
begin pi_vector = 11b00000001000;
po_expected = 2b10;
pi_vector = 11b00011110001; si1_vector = 3b100;
po_expected = 2b11; #12000.00;
si1_vector = 3b101;
#12000.00; so1_expected = 3b000;
#7000.00;
so1_expected = 3b000;
#7000.00; pi_vector = 11b01111000100;
po_expected = 2b11;
pi_vector = 11b01011100001; si1_vector = 3b111;
po_expected = 2b00; #12000.00;
si1_vector = 3b100;
#12000.00; so1_expected = 3b100;
#7000.00;
so1_expected = 3b010;
#7000.00; pi_vector = 11b00100010110;
po_expected = 2b10;
pi_vector = 11b00010101001; si1_vector = 3b000;
po_expected = 2b00; #12000.00;
si1_vector = 3b100;
#12000.00; so1_expected = 3b000;
#7000.00;
so1_expected = 3b010;
#7000.00; pi_vector = 11b00010011011;
po_expected = 2b10;
pi_vector = 11b00010100001; si1_vector = 3b110;
po_expected = 2b11; #12000.00;
si1_vector = 3b101;
#12000.00; so1_expected = 3b111;
#7000.00;
so1_expected = 3b000;
#7000.00; pi_vector = 11b01001000100;
po_expected = 2b11;
pi_vector = 11b00000110101; si1_vector = 3b011;
po_expected = 2b11; #12000.00;
si1_vector = 3b011;
#12000.00; so1_expected = 3b101;
#7000.00;
so1_expected = 3b001;
#7000.00; pi_vector = 11b01101100000;
po_expected = 2b10;
pi_vector = 11b00101001101; si1_vector = 3b100;
po_expected = 2b01; #12000.00;
si1_vector = 3b011;
#12000.00; so1_expected = 3b101;
#7000.00;
so1_expected = 3b011;
#7000.00; end
The run_rom script shown in can be used to run the full-scan test including a ripple rom
with the same result as the previous interactive run.
#!/bin/csh -f
# Create Directory Structure
mkdir designs lib 123 fscan dbg
# Do testability analysis
asic123 -fscan s27rom -o 123/s27rom
# Do full-scan selection
scansel -fscan s27rom
# Do full-scan ATPG
asicgen -post_fscan s27rom_s0 -weighted 0 -o fscan/s27rom_s0
# Do pattern conversion
ln -s fscan/s27rom_s0.tp .
ln -s fscan/s27rom_s0.int .
tpout -vlog -fscan s27rom_s0
run_rom <CR>
File: netsrc/s27rom.v
Created: designs/s27rom.sdb
Expanded: ./designs/s27rom.x.sdb
MEAN - - 12 -
STANDARD DEVIATION - - 7 -
Options selected:
-level 2: effort level is 2.
-acyclic: Break Self & Global Loops.
-fscan: Do Full-Scan Scan Selection.
-o s27rom: report file will be saved to s27rom.sel.rpt.
=============================================
Object Error Status after Hierarchical Repair
=============================================
- No error found after repair.
======================================================
Report
======================================================
Synthesis Status
------------------------------------------
Replaced Memory Cells : 3
Inserted Delay Cells : 0
Reset Error
Found : 0
Fixed : 0
Skiped : 0
Found : 0
Fixed : 0
Skiped : 0
Transparent Error
Found : 0
Fixed : 0
Skiped : 0
Bidi Error
Found : 0
Fixed : 0
Skiped : 0
Bus Error
Found : 0
Fixed : 0
Skiped : 0
RAM Error
Found : 0
Fixed : 0
Skiped : 0
Scan-Chain 1 - chain_1:
SCAN_IN : SCAN_IN
SCAN_OUT : SCAN_OUT
CLOCK : CLK
SHIFT :
FORCE : CLK ---> 010
FORCE : STI_TM1 ---> 111
INSTANCES : 3 ---> 3 scan objects
Simulation Complete!!
Scan-Chain 1 - chain_1:
SCAN_IN : SCAN_IN
SCAN_OUT : SCAN_OUT
CLOCK : CLK
SHIFT :
FORCE : CLK ---> 010
FORCE : STI_TM1 ---> 111
INSTANCES : 3 ---> 3 scan objects
Simulation Complete!!
This circuit has 9 test patterns and contains 115 faults of which
95 ( 82.61%) faults were Hard detected (HD).
0 ( 0.00%) data faults were Potentially testable (PT).
0 ( 0.00%) clock/enable faults were Potentially untestable (PU).
1 ( 0.87%) Untestable (UT) faults were Ignored (IG) or Tied to VCC/GND.
0 ( 0.00%) Untestable (UT) faults were Uncontrollable.
0 ( 0.00%) Untestable (UT) faults were Blocked (Unobservable).
19 ( 16.52%) Untestable (UT) faults were due to circuit design.
0 ( 0.00%) clock/enable faults were Aborted for backtrack count exceeding 150.
0 ( 0.00%) data faults were Aborted for backtrack count exceeding 150.
This circuit has 9 test patterns and contains 180 UNCOLLAPSED faults of which
155 ( 86.11%) faults were Hard detected (HD).
0 ( 0.00%) data faults were Potentially testable (PT).
0 ( 0.00%) clock/enable faults were Potentially untestable (PU).
3 ( 1.67%) Untestable (UT) faults were Ignored (IG) or Tied to VCC/GND.
0 ( 0.00%) Untestable (UT) faults were Uncontrollable.
0 ( 0.00%) Untestable (UT) faults were Blocked (Unobservable).
22 ( 12.22%) Untestable (UT) faults were due to circuit design.
0 ( 0.00%) clock/enable faults were Aborted for backtrack count exceeding 150.
0 ( 0.00%) data faults were Aborted for backtrack count exceeding 150.
Scan information :
Chain 1, Length is 3
Scan-in pin = SCAN_IN
Scan-out pin = SCAN_OUT
Sequence information :
Shift sequence
CLK = 010
STI_TM1 = 1
Hold sequence
CLK = 0
Capture sequence
CLK = 010
Clock information :
Number of vectors = 9
Length of a vector = 19
Product Tutorial
The purpose of this tutorial is to familiarize you with the steps required to process a
Partial-Scan design using SynTest products. You will learn how to:
Synthesize a scan chain into a non-scan design
Extract scan information from a design
To complete the full-scan run, you will perform the following steps and procedures:
Create new directories for file organization
Compile a cell library and netlist
Do testability analysis
Do partial-scan selection
Do partial-scan synthesis and debug
Do scan extraction
Do scan verification
Generate and translate test vectors
Fault test the design
Logic test the design
This knowledge forms the foundation for the concepts and skills you will need to integrate
the SynTest tools into your work environment.
Assumptions
It is assumed that:
Syntest software has been installed. Further installation and user setup information
can be found in the Quick Installation Procedure in the SynTest Users Guide,
chapter 1.
You have a basic understanding of Unix Workstation and variables.
The directories and files needed for the tutorials are shown in Figure 2-1. You will be using
the same design, s27, for all three tutorials.
syntest
tutorials syntest.def
Full Partial
Scan Scan
fscan pscan
libsrc libsrc
netsrc netsrc Boundary
s27lib.v s27lib.v
Full Scan
s27.v Scan s27.v
s27.map s27.map
s27.dft ripple_rom s27.dft bscan
frun s27.psi
libsrc netsrc
netsrc prun
s27lib.v libsrc
ripple_rom.tdl s27.v
example.v
init_rom.v
ripple_rom.map example.pin brun
s27.dft
s27rom.rom example.lib
ripple_rom.pso s27.map
run_rom example.bsc
Files/Directories Function
libsrc Directory containing lib.v files (Verilog source file for libraries)
*.dft File containing information that sets condition for testability analysis.
*.map Files describing relationship between generic memory cell and scannable memory
cell.
*.pso File containing a list of cells to be converted to scan, and .psi file information.
*.psi File containing a list of cells to be converted to scan required for partial scan.
run_rom Script file to run a full-scan synthesis for the Ripple Rom design.
The schematic representation of the s27.v design is shown in Figure 2-2. Its Verilog
structural netlist and cell library are shown in Figure 2-3 and Figure 2-4 respectively.
I10
I14 I5
G10 G5
G14 D Q
G0
FD1
I11 I17
I8
CP
I6 G11 G17
G8 G17
G6
D Q
FD1
CP
I15
I9
G15
G9
I12
G1 G12
I13 I7
G13 G7
D Q
FD1
CLK CP
G2
I16
G16
G3
In this section, you will create directories to be used to organize the design files. The
directories you will create are:
lib, directory used to store cell library definitions
designs, directory used to store design database information
123, directory used to store testability analysis (TurboCheck) output files (asic123)
pscan, directory used to store test pattern generation (TurboScan) results (asicgen)
dbg, directory used to store scan verification output files (scandbg)
1. Change to the syntest/ directory and source the .syntest script file . From the Shell
prompt,
a) cd $SYNTEST
b) source .syntest
Sourcing this file sets Unix variables for SynTest. The .syntest file is shown in
Figure 2-5.
2. Change your current working directory to pscan/ (this directory is under $SYNTEST/
tutorial). From the syntest/ directory Shell prompt,
cd tutorials/pscan
3. Examine the design file (netlist and cell library). From the Shell prompt,
more netsrc/s27.v
You will see a Verilog structural netlist file for the s27 design as shown in Figure 2-3.
more libsrc/s27lib.v
You will see a Cell library file for the s27 design as shown in Figure 2-4.
4. Create the required directories using the mkdir command. From the Shell prompt,
This action will create five directories: lib, designs, 123, pscan, and dbg.
NOTE
The lib and designs directories are created for use by
Syntest applications such as expin, and are inluded in
the default search order.
The design netlist and cell library translating, compiling, and linking and expanding flow is
shown in Figure 2-6.
syntest.def
syntest.def primitive.def
library cells.sdb
design.sdb
Step2
Netlist Linker expin
& Expander
design.x.sdb
design.c.sdb
design.conp
- Note -
The expanded design outputs are s27.c.sdb, s27.x.sdb, and s27.conp.
vlogin translates and complies the Verilog .v netlist and library into SynTest intermediate
format (.sdb).
1. Convert and compile the input s27.v and s27lib.v files. From the Shell prompt,
This action will generate the design sdb files for each module in the netlist and the cell sdb
files for each cell in the library file.
Since only one module, s27, exists in the netlist s27.v, only one module .sdb of the netlist is
created. The -opath option redirects the compiled .sdb files of the netlist to the designs sub-
directory.
For the part of the translation and compilation of the netlist, The -nf, -drc, and -opath lib
options, which are used for compiling .sdb files of the library typically, are turned on
automatically by setting this option -lib.
The -nf and -drc options disable faulting within the library cells and run design-rule-check
seperately.
The -opath option outputs the .sdb files into the lib sub-directory created for this run. Since
one .sdb file is created for each cell in the library, the directory organization eliminates
cluttering the main design directory with many files.
2 - 10 SynTest Tutorials
Partial-Scan Tutorials
SynTest Tutorials 2 - 11
Partial-Scan Tutorials
NOTE
If your library has already been compiled, you can
simply create a soft link ("ln -s <library directory> lib")
to the compiled library, and skip the library translation
and compilation step.
The design must be linked and expanded (flattened) before you can perform testability
analysis, synthesis or run the test vector generation programs.
The expin utility is used to link and expand the design. This program reads:
top-level and sub-module .sdb files
cell library .sdb files
syntest.def and primitive.def files (required files located in the $SYNTEST/designs
directory. See Creating the Syntest Database and Libraries, Chapter 3 for a
discussion of these files)
expin s27
This command execution will create three new design files in the same directory as the
specified source file, or in the directory specified with the -opath option. The files are:
s27.c.sdb, contains design linked and flattened down to the library cell level. This
file will be used by the testability synthesis application (scansyn)
s27.x.sdb, contains the design linked and flattened down to the Syntest primitive
level. This file will be used by the testability analysis application and test vectors
generation (asic123 & asicgen)
s27.conp, contains design connectivity information used to link the .c.sdb to .x.sdb
files. If missing, errors may occur.
2 - 12 SynTest Tutorials
Partial-Scan Tutorials
Expanded: ./designs/s27.x.sdb
* Library Cell FD1
* Library Cell IV
* Library Cell AN2
* Library Cell OR2
* Library Cell ND2
* Library Cell NR2
Expanded: ./designs/s27.c.sdb
SynTest Tutorials 2 - 13
Partial-Scan Tutorials
In this section, you will use the testability analysis program, asic123 (TurboCheck), to do
the following:
Determine the controllability and observability for the design using full-scan
Generate reports detailing controllability and observability
s27.x.sdb
s27.psi (optional, required only for partial-scan)
(optional) s27.conp
s27.dft (optional file)
asic123
s27.clk.rpt
s27.123.rpt
2 - 14 SynTest Tutorials
Partial-Scan Tutorials
NOTE
The .dft file is SynTest template file used to set logic values at primary inputs and memory
elements for the testability analysis program to generate more accurate feedback. The
conditions set in this file can be modified to check problems in normal mode
(before synthesis), shift, hold, and capture mode.
The asic123 program searches for this file by default. This program also reads a .def file for
older releases. The .dft file is now used in place of the .def file.
See more details of a .dft file in File Reference & Examples chapter 10.
more s27.dft
SynTest Tutorials 2 - 15
Partial-Scan Tutorials
The -o option in asic123 redirects the output report to the 123 directory, under the prefix
name s27. The processing messages generated are saved to the report file, s27.123.rpt,
shown in Figure 2-11 to Figure 2-14.
NOTE
If you run several iterations of asic123 using different
options, you can store them using different target
filenames or subdirectories.
2 - 16 SynTest Tutorials
Partial-Scan Tutorials
**** The following flip-flops cannot be set to 0 (~0) or 1 (~1), observed (~B)
or clock port stuck at 0/1 (~P) :
1) ~0 ~1 ~p Q I5.I1
2) ~p Q I6.I1
3) ~p Q I7.I1
SynTest Tutorials 2 - 17
Partial-Scan Tutorials
2 - 18 SynTest Tutorials
Partial-Scan Tutorials
MEAN - - 0 -
STANDARD DEVIATION - - 0 -
SynTest Tutorials 2 - 19
Partial-Scan Tutorials
2 - 20 SynTest Tutorials
Partial-Scan Tutorials
Before synthesizing scan into your design, you must select scan elements and list them in a
file. This file, created by scansel, determines the scan order for scan chains. The scan
selection flow is shown in Figure 2-16.
s27.x.sdb
s27.psi
s27.c.sdb
scansel
s27.sel1.pso
s27.sel.rpt
Figure 2-17 shows the content of the .psi file. The file is used in scan selection to select the
user-defined MUST_SCAN memory cells as scannable elements and leave the
DONT_SCAN cells as non-scannable ones. When scansel detects the .psi file, it genreates a
.pso file based on .psi file for scan synthesis and debugging.
DONT_SCAN I5.I1;
MUST_SCAN I6.I1; Set the memory element I5.I1 as
MUST_SCAN I7.I1;
DONT_SCAN.
SynTest Tutorials 2 - 21
Partial-Scan Tutorials
scansel s27
Copyright (c), 1991-1996, SynTest Technologies, Inc. All rights ( File continued )
reserved.
Options selected:
Start circuit graph creation at TIME Sun Feb 8 17:46:49 1998
-level 2: effort level is 2.
-acyclic: Break Self & Global Loops. 2 memory elements are specified as MUST_SCAN
-o s27: report file will be saved to s27.sel.rpt.
End circuit graph creation at TIME Sun Feb 8 17:46:49 1998
Process s27 ...
Start scan element selection ...
CPU TIME = 0:00:00
START TIME = Sun Feb 8 17:46:45 1998
Start circuit graph reduction at TIME Sun Feb 8 17:46:49 1998
Read in and check circuit at TIME Sun Feb 8 17:46:45 1998
Reading scan file - s27.psi ... End circuit graph reduction at TIME Sun Feb 8 17:46:49 1998
2 - 22 SynTest Tutorials
Partial-Scan Tutorials
s27.sel1.pso, file produced by the -pscan option containing a list of flip-flops from
the design (with netlist default order)
s27.sel.rpt, processing messages report file
NOTE
The default ordering of scan elements is organized by
the hierarchical order of modules in your design.You
can rearrange the order by copying the .pso file to a
different name, then reorder the flip-flops in the
appropriate ordering. This is usually
sufficient for most purposes.
DONT_SCAN I5;
MUST_SCAN 17 I6; The elements which are set to
MUST_SCAN 24 I7;
be DONT_SCAN
The purpose of scan synthesis is to replace non-scan flip flops with scan flip flops.
SynTest Tutorials 2 - 23
Partial-Scan Tutorials
a .map file containing mapping information between generic and scanable memory
cell. The s27.map is shown in Figure 2-20.
The processing messages (or the s27.syn.rpt report file) are shown in Figure 2-21.
2 - 24 SynTest Tutorials
Partial-Scan Tutorials
SynTest Tutorials 2 - 25
Partial-Scan Tutorials
(Messages continued)
============= SCANSYN V2.0.0 r01 (01/08/98 10:18:02) ============ DRC Error Status
------------------------------------
Copyright (c), 1991-1997, SynTest Technologies, Inc. All rights reserved. Set Error
Found : 0
TIME: Sun Feb 8 17:49:23 1998 Fixed : 0
Skiped : 0
Options selected: -pscan -o s27.syn.rpt
Reset Error
Found : 0
- Reading top level netlist ./designs/s27.sdb ... Fixed : 0
Skiped : 0
- Reading expanded netlist ./designs/s27.x.sdb ...
Shift Clock Error
- Reading cell-level netlist ./designs/s27.c.sdb ... Found : 0
Fixed : 0
- Setting up hierarchical information ... Skiped : 0
- Init forced value simulation data structure ...
Capture Clock Error
- Create directory ./scansyn_lib. Found : 0
- Replace 2 memory elements to scan elements. Fixed : 0
- Insert 0 delay cells. Skiped : 0
- Start building scan synthesis table ...
Transparent Error
- Start Hierarchical Repair Process ... Found : 0
Fixed : 0
Skiped : 0
- Copy ./designs/s27.sdb => ./scansyn_lib/s27_s0.sdb.
Bidi Error
- Start Building Scan Decoder ... Found : 0
Fixed : 0
- Start executing synthesis commands ... Skiped : 0
- Please read s27.syn.log for messages. Bus Error
Found : 0
- Executing commands in ./scansyn_lib/s27_s0.cmd ... Fixed : 0
Skiped : 0
- Generating new cell level pso file s27_s0.syn1.pso ...
Cross Coupled Error
- Generating new dft file s27_s0.dft... Found : 0
- In %SEQUENCE shift_seq, Add %FORCE STI_TM1 = 111; Fixed : 0
Skiped : 0
=============================================
Object Error Status after Hierarchical Repair RAM Error
============================================= Found : 0
- No error found after repair. Fixed : 0
Skiped : 0
- Expanding synthesized design s27_s0.sdb ...
Tri-State Pad Error
- Extract scan chain from s27_s0 ... Found : 0
please refer to s27_s0.syn.rpt. Fixed : 0
Skiped : 0
2 - 26 SynTest Tutorials
Partial-Scan Tutorials
Expanded: SCAN_DECODER_CLASS
Expanded: ./scansyn_lib/s27_s0.x.sdb
SynTest Tutorials 2 - 27
Partial-Scan Tutorials
Initializing ...
Beside replacing non-scan flip-flops, and latches in the design with their scannable
counterparts, scansyn also does rule checks and makes necessary changes to the design.
The outputs report files created under the sub-directory dbg/, s27_s0.1.dbg.rpt,
s27_s0.2.dbg.rpt, s27_s0.1.dbg.tp, and s27_s0.2.dbg.tp are shown in Figure 2-24, Figure 2-
25, and Figure 2-26, respectively.
2 - 28 SynTest Tutorials
Partial-Scan Tutorials
(Messages continued)
========== SCANDBG V2.0.0 r01 (11/07/97 11:24:04)============
SHIFT :
Copyright (c), 1991-1997, SynTest Technologies, Inc. All rights reserved.
FORCE : CLK ---> 010
FORCE : STI_TM1 ---> 111
TIME: Sun Feb 8 17:52:12 1998
INSTANCES : 2 ---> 2 scan objects
SynTest Tutorials 2 - 29
Partial-Scan Tutorials
(Messages continued)
=========== SCANDBG V2.0.0 r01 (11/07/97 11:24:04)===========
SHIFT :
Copyright (c), 1991-1997, SynTest Technologies, Inc. All rights reserved.
FORCE : CLK ---> 010
FORCE : STI_TM1 ---> 111
TIME: Sun Feb 8 17:52:39 1998
INSTANCES : 2 ---> 2 scan objects
2 - 30 SynTest Tutorials
Partial-Scan Tutorials
S S
SS C SS C
TC A TC A
IA N IA N
_N _ _N _
C T_GO C T_GO
LGGGGMI1U LGGGGMI1U
K01231N7T K01231N7T
-STEM- -STEM-
1 LXXXXHHXX 1 LXXXXHLXX
2 HXXXXHHXX 2 HXXXXHLXX
3 LXXXXHHXX 3 LXXXXHLXX
4 LXXXXHLXX 4 LXXXXHHXX
5 HXXXXHL++ 5 HXXXXHHX-
6 LXXXXHL++ 6 LXXXXHHX-
7 LXXXXHH++ 7 LXXXXHLX-
8 HXXXXHHX- 8 HXXXXHL++
9 LXXXXHHX- 9 LXXXXHL++
10 LXXXXHHX- 10 LXXXXHL++
11 HXXXXHHX+ 11 HXXXXHLX-
12 LXXXXHHX+ 12 LXXXXHLX-
s27_s0.1.dbg.tp s27_s0.2.dbg.tp
SynTest Tutorials 2 - 31
Partial-Scan Tutorials
Figure 2-27 illustrates the s27 design flow during design synthesis, debug, and netlist
conversion processes.
s27.x.sdb
s27.dft
s27.c.sdb
s27.map
s27.sel1.pso
scansyn Synthesize
scansyn_lib
s27_s0.x.sdb
s27_s0.c.sdb
s27.syn.rpt
s27_s0.sdb
s27.syn.log
s27_s0.conp
s27_s0.syn.rpt
s27_s0.cmd
s27_s0.syn1.pso
SCAN_DECODER_CLASS.sdb
scan_decoder.v
Debug scandbg
lsdb Netlist
Conversion
s27_s0.dbg.rpt
s27_s0.vhd
s27_s0.v
s27_s0.edif
2 - 32 SynTest Tutorials
Partial-Scan Tutorials
If you may need a Verilog netlist of the synthesized version of the design, you will need to
use the lsdb utility to translate the sdb files created by scansyn (s27_s0.x.sdb).
1. Convert the s27 scanable to a Verilog netlist. From the Shell prompt,
The -verilog option creates a Verilog netlist (-vhdl, -edif and -tdl are also supported).
The -hierarchy option creates a hierarchical netlist which will reconstruct the original
design hierarchy.
The -timescale option allows insertion of a timescale directive in Verilog for simulation
purposes.
The -o option directs the output to the filename s27_s0.v
more s27_s0.v
SynTest Tutorials 2 - 33
Partial-Scan Tutorials
// File : s27_s0.v
// Created: Sun Feb 8 17:56:36 1998
// By : lsdb version V2.1.0 of 12/23/97 09:14:47
// lsdb -verilog s27_s0
// sdb verison 230
//
// (c) 1991-1998, SynTest Technologies, Inc.
// File : s27_s0.v
// Created: Sun Feb 8 17:56:36 1998
// By : lsdb version V2.1.0 of 12/23/97 09:14:47
// lsdb -verilog s27_s0
// sdb verison 230
//
// (c) 1991-1998, SynTest Technologies, Inc.
2 - 34 SynTest Tutorials
Partial-Scan Tutorials
After your design is synthesized to include scan, you can then generate and translate test
patterns. In this section, you will :
Use the test pattern generation utility, asicgen (TurboScan), to generate the test
patterns for the s27 design
Use the Unix ln command to create an internal link
Use the test pattern translation utility, tpout, to translate the test patterns into a
Verilog test-bench
The asicgen utility reads the synthesized output files from the scansyn utility, they are:
s27_s0.x.sdb file, the design compiled and flattened to the SynTest primitive level
s27_s0.dft, file contains an entry regarding "%ATPG_CONSTRAINTS" which
outlines any logic pre-conditioning for the design to run in hold mode
s27_s0.x.sdb
s27_s0.dft
asicgen
s27_s0.rpt
s27_s0.tp
s27_s0.int
s27_s0.hdt
s27_s0.pso
s27_s0.red
s27_s0.udt
SynTest Tutorials 2 - 35
Partial-Scan Tutorials
( File continued)
// File : s27_s0.dft
// (c) 1991-1995, SynTest Technologies, Inc.
%SCAN_PORT
{
/* scan data is shifted thru these two ports */
// Scan instruction sequence %SCAN_IN = SCAN_IN;
%SEQUENCE shift_seq %SCAN_OUT = SCAN_OUT;
{ %DEFAULT = SCAN_;
%FORCE CLK = 010; }
%FORCE STI_TM1 = 111; %SCAN_CLOCK_1
//%CYCLE_LENGTH = 3; <---- Now you dont {
need specify this construct. /* The port providing shift clock */
} %CLOCK = CLK;
%SEQUENCE hold_seq %GLOBAL_CLOCK = CLK;
{ }
%FORCE CLK = 000; %SCAN_INSTANCES_FILE
} {
%SEQUENCE capture_seq %FILE_NAME = s27_s0.ext1.pso;
{ }
%FORCE CLK = 010; %SCAN_INSTRUCTION
} {
%INSTRUCTION = instruction1;
}
// Instruction }
%INSTRUCTION instruction1
{
%MODE = scan; // Test Generation Constraints
%SHIFT = shift_seq; // For full-scan test pattern generation
%HOLD = hold_seq; %ATPG_CONSTRAINTS
%CAPTURE = capture_seq; {
} %ATPG_MODE PARTIAL_SCAN
{
%CLOCK CLK = 010;
// Read Mapping_cell File }
%READ_MAP }
{
%FILE_NAME = s27.map;
} // Scan Decoder
%SCAN_DECODER
{
// Connect Scan Chain %CONTROL_PORT_1 = STI_TM1;
// Define a scan chain with type MDFF and name chain_1 %CONTROL_PORT_2 = STI_TM2;
%CONNECT_SCAN chain_1 MDFF }
{
2 - 36 SynTest Tutorials
Partial-Scan Tutorials
The -post_pscan option sets all defaults options, such like -dont_scan_loop, for partial-
scan test pattern generation.
The -o option redirects the output to the pscan sub-directory.
The asicgen processing messages are shown in Figure 2-32 to Figure 2-34.
SynTest Tutorials 2 - 37
Partial-Scan Tutorials
2 - 38 SynTest Tutorials
Partial-Scan Tutorials
SynTest Tutorials 2 - 39
Partial-Scan Tutorials
* TARGET_SCAN_COUNT 3;
Selecting partial-scan objects ...
Select 2 scan elements
**** Incremental Partial Scan has selected maximal number of scan elements. ****
This circuit has 780 test patterns and 2 scan_ins and 2 scan_outs,
and contains 56 faults of which
54 ( 96.43%) faults were Hard detected (HD).
0 ( 0.00%) data faults were Potentially testable (PT).
2 ( 3.57%) clock/enable faults were Potentially untestable (PU).
0 ( 0.00%) Untestable (UT) faults were Ignored (IG) or Tied to VCC/GND.
0 ( 0.00%) Untestable (UT) faults were Uncontrollable.
0 ( 0.00%) Untestable (UT) faults were Blocked (Unobservable).
0 ( 0.00%) Untestable (UT) faults were due to circuit design.
0 ( 0.00%) clock/enable faults were Aborted for backtrack count exceeding 100.
0 ( 0.00%) data faults were Aborted for backtrack count exceeding 100.
This circuit has 780 test patterns and 2 scan_ins and 2 scan_outs,
and contains 108 UNCOLLAPSED faults of which
106 ( 98.15%) faults were Hard detected (HD).
0 ( 0.00%) data faults were Potentially testable (PT).
2 ( 1.85%) clock/enable faults were Potentially untestable (PU).
0 ( 0.00%) Untestable (UT) faults were Ignored (IG) or Tied to VCC/GND.
0 ( 0.00%) Untestable (UT) faults were Uncontrollable.
0 ( 0.00%) Untestable (UT) faults were Blocked (Unobservable).
0 ( 0.00%) Untestable (UT) faults were due to circuit design.
0 ( 0.00%) clock/enable faults were Aborted for backtrack count exceeding 100.
0 ( 0.00%) data faults were Aborted for backtrack count exceeding 100.
2 - 40 SynTest Tutorials
Partial-Scan Tutorials
S
SS C .............................................-
TC AII 747 N S LLLHHLHHL--+-
IA N67 748 N S LLHHLLHLH--+-
_N ___ 749 N S HLHHLLHLH--+-
C T_ GOPP 750 N S LLHHLLHLH--+-
LGGGGMIII1UPP 751 N S LHHLHLLHH+-+-
K01231N677TOO 752 N S HHHLHLLHH++-+
-STEM- 753 N S LHHLHLLHH++-+
1 I S LLHHHHLHHX+XX 754 N S LHLLLLHHH++-+
2 N S HLHHHHLHH++-+ 755 N S HHLLLLHHH++-+
3 N S LLHHHHLHH++-+ 756 N S LHLLLLHHH++-+
4 N S LHLLLLLHH++-+ 757 N S LHLLLHLHH++-+
5 N S HHLLLLLHH++-+ 758 N S HHLLLHLHH+---
6 N S LHLLLLLHH++-+ 759 N S LHLLLHLHH+---
7 N S LHLLHHLHH++-+ 760 N S LHHLHHHHH+---
8 N S HHLLHHLHH+--- 761 N S HHHLHHHHH+-+-
9 N S LHLLHHLHH+--- 762 N S LHHLHHHHH+-+-
10 N S LLHHLHHLL+--- 763 N S LLHHLHHLL+-+-
11 N S HLHHLHHLL--+- 764 N S HLHHLHHLL-+++
12 N S LLHHLHHLL--+- 765 N S LLHHLHHLL-+++
13 N S LLLLHHHLH--+- 766 N S LHLHHHLHH++++
14 N S HLLLHHHLH-+++ 767 N S HHLHHHLHH++-+
15 N S LLLLHHHLH-+++ 768 N S LHLHHHLHH++-+
16 N S LLLLLLLLH-+++ 769 N S LLHLLHLLH++-+
17 N S HLLLLLLLH-+++ 770 N S HLHLLHLLH+---
18 N S LLLLLLLLH-+++ 771 N S LLHLLHLLH+---
19 N S LLLLHLLLH-+++ 772 N S LLLHLLHHL+---
20 N S HLLLHLLLH-+++ 773 N S HLLHLLHHL+---
21 N S LLLLHLLLH-+++ 774 N S LLLHLLHHL+---
22 N S LHHHHHLLL++++ 775 N S LHHHLLHLH+---
23 N S HHHHHHLLL++-+ 776 N S HHHHLLHLH+---
24 N S LHHHHHLLL++-+ 777 N S LHHHLLHLH+---
25 N S HLLHHHLHL---- 778 N S LLLLLHHLL+---
..............................................- 779 N S HLLLLHHLL--+-
SynTest Tutorials 2 - 41
Partial-Scan Tutorials
The s27_s0.hdt, s27_s0.red , s27_s0.udt, s27_s0.int, and s27_s0.pso files are shown in
Figure 2-36.
(file continued)
# Untested clock/enable faults #Faults were Ignored or Tied to VCC/GND
below: /0 CLK
/0 /1 CP I6 /0 CP I5 /1 A I8
/0 /1 CP I7 /1 B I8
#Faults were Uncontrollable /1 Z I15
/0 /1 Q I5 /0 A I15
/1 Z I17 /0 B I15
The s27_s0.udt File /0 B I16
#Faults were Blocked (Unobservable) /0 Z I9
/1 CLK /0 /1 Z I10
/0 /1 G0 /0 A I10
/0 /1 G1 /0 B I10
/0 /1 G2 /1 Z I12
/0 /1 G3 /0 B I12
/0 /1 STI_TM1 /1 Z I13
/0 /1 SCAN_IN /0 B I13
/1 CP I5
/0 /1 D I6 #Faults were due to circuit design
/0 /1 Q I6 /0 /1 Q I7
/0 /1 TE I6 /0 Z I17
/0 /1 TI I7 /1 Z I11
/0 /1 TE I7 /0 /1 Z SCANSYN_BUF_0
/0 /1 Z I8
Figure 2-36 The s27_s0.hdt, s27_s0.red , s27_s0.udt, s27_s0.int, and s27_s0.pso files
2 - 42 SynTest Tutorials
Partial-Scan Tutorials
The test pattern files created by asicgen are stored in the pscan sub-directory. Before
translating these files, you must create internal links to these files.
1. Create links to the test pattern files. From the Shell prompt,
a) ln -s pscan/s27_s0.tp .
b) ln -s pscan/s27_s0.int .
2. Translate the test pattern to a Verilog serial format. From the Shell prompt,
SynTest Tutorials 2 - 43
Partial-Scan Tutorials
The Verilog driver file, s27_s0.drv.v, controls a Verilog simulation of the full set of patterns
generated by asicgen. It reads the scan test data and compares the expected data both from
s27_s0.vector file. This verification process in Verilog can be used to completely verify the
pattern set before taping out the design. The s27_s0.drv.v is shown in Figure 2-38, Figure 2-
39, and Figure 2-40.
2 - 44 SynTest Tutorials
Partial-Scan Tutorials
(file continued)
// FILE : SynTest Verilog driver file
// NAME : s27_s0.drv.v
// TIME : Tue Feb 17 19:25:54 1998 wire STI_STI_TM1 ;
// OPTIONS : -vlog -pscan wire STI_SCAN_IN ;
//-------------------------------------------------------
timescale 1ns / 10ps //-- Call module --
//-------------------------------------------------------
define TRUE 1 s27_s0 s27_s0_inst (
define FALSE 0 .G17 ( STI_G17 ) ,
.SCAN_OUT ( STI_SCAN_OUT ) ,
module s27_s0_top ; .CLK ( STI_CLK ) ,
//------------------------------------------------------- .G0 ( STI_G0 ) ,
//-- Declare parameters -- .G1 ( STI_G1 ) ,
//------------------------------------------------------- .G2 ( STI_G2 ) ,
parameter .G3 ( STI_G3 ) ,
I_TYPE = 1, .STI_TM1 ( STI_STI_TM1 ) ,
N_TYPE = 2, .SCAN_IN ( STI_SCAN_IN ) );
O_TYPE = 3, //-------------------------------------------------------
SHIFT_PHASE = 3, //-- Init variables --
SHIFT_CYCLE = 2, //-------------------------------------------------------
HOLD_PHASE = 3, task init_variables;
PI_LEN = 7, begin
PO_LEN = 2, shift_1 = 3b010;
SO_LEN = 1, scan_out[1] = 2;
CHAIN1_LEN = 2, strobe_so = FALSE;
NUM_VEC = 780; strobe_po = FALSE;
//------------------------------------------------------- po_mismatch = 0;
//-- Declare statements -- so_mismatch = 0;
//------------------------------------------------------- end
reg [1:SHIFT_PHASE] shift_1; endtask
integer scan_out[1:SO_LEN]; //-------------------------------------------------------
integer strobe_so, strobe_po; //-- Main routine --
integer in, i, error, bit_count; //-------------------------------------------------------
integer cycle, phase; initial
integer so_mismatch, po_mismatch; begin
integer ppi, ppo; init_variables;
integer num_shift_cycle; num_shift_cycle = SHIFT_CYCLE;
integer vec_print; for (in = 1; in <= NUM_VEC; in = in + 1)
integer inst; begin
integer vec_type; #1000.00; // settle vectors
reg [1:PI_LEN] pi_vector; $display(\nSimulation processing test vector %0d\n, in);
reg [1:PO_LEN] po_expected; vec_print = in;
reg [1:SO_LEN] so_expected; if (vec_type === I_TYPE)
reg [1:CHAIN1_LEN] si1_vector; begin
reg [1:CHAIN1_LEN] so1_expected; shift_sequence;
reg [1:PI_LEN] work_vector; hold_sequence;
reg [1:PO_LEN] sim_response; propagate_sequence;
reg [1:PI_LEN] pre_work_vector; end
//------------------------------------------------------- else if (vec_type === N_TYPE)
//-- Declare wires -- begin
//------------------------------------------------------- propagate_sequence;
wire STI_G17 ; end
wire STI_SCAN_OUT ; else if (vec_type === O_TYPE)
wire STI_CLK ; begin
wire STI_G0 ; ppo = 0;
wire STI_G1 ; inst = 1;
wire STI_G2 ; propagate_sequence;
wire STI_G3 ; reshift_sequence;
SynTest Tutorials 2 - 45
Partial-Scan Tutorials
(file continued)
end
end
num_shift_cycle = SHIFT_CYCLE - 1; endtask
shift_sequence; // scan out the very last pattern
$display(\n*** Test vectors simulated : %d, task propagate_sequence;
NUM_VEC); begin
$display(*** Number of PO mismatch : %d, work_vector = pi_vector;
po_mismatch); #1.00;
$display(*** Number of SO mismatch : %d, #997.00;
so_mismatch); #2.00;
$finish; end
end endtask
//-------------------------------------------------------
//-- Sequence tasks -- task reshift_sequence;
//------------------------------------------------------- begin
task shift_sequence; pre_work_vector = work_vector;
begin work_vector = pi_vector;
work_vector = pi_vector; work_vector[6] = 1b1;
work_vector[6] = 1b1; work_vector[1] = pre_work_vector[1];
ppi = SHIFT_CYCLE; phase = 1;
for (cycle = 1; cycle <= num_shift_cycle; cycle = cycle + while (phase <= SHIFT_PHASE)
1) begin
begin #1.00;
phase = 1; #997.00;
while (phase <= SHIFT_PHASE) if (phase == SHIFT_PHASE)
begin strobe_so = TRUE;
#1.00; phase = phase + 1;
work_vector[1] = shift_1[phase]; #2.00;
if (ppi > CHAIN1_LEN) work_vector[7] = 1b0; end
else work_vector[7] = si1_vector[ppi]; end
endtask
#997.00;
if (phase == SHIFT_PHASE && in != 1 && cycle != //-------------------------------------------------------
SHIFT_CYCLE) //-- Set clock values --
strobe_so = TRUE; //-------------------------------------------------------
phase = phase + 1; assign #200.00 STI_CLK = work_vector[1];
#2.00; //-------------------------------------------------------
end //-- Set input values --
ppi = ppi - 1; //-------------------------------------------------------
end assign #100.00 STI_G0 = work_vector[2];
end assign #100.00 STI_G1 = work_vector[3];
endtask assign #100.00 STI_G2 = work_vector[4];
assign #100.00 STI_G3 = work_vector[5];
task hold_sequence; assign #100.00 STI_STI_TM1 = work_vector[6];
begin assign #100.00 STI_SCAN_IN = work_vector[7];
work_vector = pi_vector; //-------------------------------------------------------
work_vector[1] = 1b0; //-- Get output values --
phase = 1; //-------------------------------------------------------
while (phase <= HOLD_PHASE) always
begin begin
#1.00; fork
#997.00; #900.00 sim_response[1] = STI_G17 ;
if (phase == HOLD_PHASE) #900.00 sim_response[2] = STI_SCAN_OUT ;
strobe_po = TRUE; #1000.00;
phase = phase + 1; join
#2.00; end
end //-------------------------------------------------------
end //-- Compare expected outputs to simulation results --
//-------------------------------------------------------
2 - 46 SynTest Tutorials
Partial-Scan Tutorials
SynTest Tutorials 2 - 47
Partial-Scan Tutorials
2 - 48 SynTest Tutorials
Partial-Scan Tutorials
The prun script shown in Figure 2-42 can be used to run the partial-scan test with the same
result as the previous interactive run.
#!/bin/csh -f
##1) Create Directory Structure
mkdir designs lib pscan dbg
prun <CR>
SynTest Tutorials 2 - 49
Partial-Scan Tutorials
2 - 50 SynTest Tutorials
Partial-Scan Tutorials
SynTest Tutorials 2 - 51
Partial-Scan Tutorials
2 - 52 SynTest Tutorials
Partial-Scan Tutorials
SynTest Tutorials 2 - 53
Partial-Scan Tutorials
MEAN - - 29 -
STANDARD DEVIATION - - 34 -
Options selected:
-level 2: effort level is 2.
-acyclic: Break Self & Global Loops.
-o s27: report file will be saved to s27.sel.rpt.
2 - 54 SynTest Tutorials
Partial-Scan Tutorials
WARNING: Could not break all self & global loops due to DONT_SCAN constraint.
SynTest Tutorials 2 - 55
Partial-Scan Tutorials
=============================================
Object Error Status after Hierarchical Repair
=============================================
- No error found after repair.
2 - 56 SynTest Tutorials
Partial-Scan Tutorials
======================================================
Report
======================================================
Synthesis Status
------------------------------------------
Replaced Memory Cells : 2
Inserted Delay Cells : 0
Reset Error
Found : 0
Fixed : 0
Skiped : 0
Transparent Error
Found : 0
Fixed : 0
Skiped : 0
SynTest Tutorials 2 - 57
Partial-Scan Tutorials
Bidi Error
Found : 0
Fixed : 0
Skiped : 0
Bus Error
Found : 0
Fixed : 0
Skiped : 0
RAM Error
Found : 0
Fixed : 0
Skiped : 0
2 - 58 SynTest Tutorials
Partial-Scan Tutorials
Scan-Chain 1 - chain_1:
SCAN_IN : SCAN_IN
SCAN_OUT : SCAN_OUT
CLOCK : CLK
SHIFT :
FORCE : CLK ---> 010
FORCE : STI_TM1 ---> 111
INSTANCES : 2 ---> 2 scan objects
SynTest Tutorials 2 - 59
Partial-Scan Tutorials
success!!
Simulation Complete!!
2 - 60 SynTest Tutorials
Partial-Scan Tutorials
Scan-Chain 1 - chain_1:
SCAN_IN : SCAN_IN
SCAN_OUT : SCAN_OUT
CLOCK : CLK
SHIFT :
FORCE : CLK ---> 010
FORCE : STI_TM1 ---> 111
INSTANCES : 2 ---> 2 scan objects
Simulation Complete!!
SynTest Tutorials 2 - 61
Partial-Scan Tutorials
2 - 62 SynTest Tutorials
Partial-Scan Tutorials
.............
fsim: Weighted pattern [ 1166] ... 54 ( 96.43%) det.
fsim: Weighted pattern [ 1167] ... 54 ( 96.43%) det.
fsim: Weighted pattern [ 1168] ... 54 ( 96.43%) det.
fsim: Weighted pattern [ 1169] ... 54 ( 96.43%) det.
fsim: Weighted pattern [ 1170] ... 54 ( 96.43%) det.
atpg: Pass 1 [ 15] 54 DET ( 96.4%), 0 UNT ( 0.0%), 780 vec
atpg: Pass 1 [ 16] 54 DET ( 96.4%), 0 UNT ( 0.0%), 780 vec
CPU TIME = 0:00:06
* TARGET_SCAN_COUNT 3;
Selecting partial-scan objects ...
Select 2 scan elements
**** Incremental Partial Scan has selected maximal number of scan elements. ****
This circuit has 780 test patterns and 2 scan_ins and 2 scan_outs,
and contains 56 faults of which
54 ( 96.43%) faults were Hard detected (HD).
0 ( 0.00%) data faults were Potentially testable (PT).
2 ( 3.57%) clock/enable faults were Potentially untestable (PU).
0 ( 0.00%) Untestable (UT) faults were Ignored (IG) or Tied to VCC/GND.
0 ( 0.00%) Untestable (UT) faults were Uncontrollable.
0 ( 0.00%) Untestable (UT) faults were Blocked (Unobservable).
0 ( 0.00%) Untestable (UT) faults were due to circuit design.
0 ( 0.00%) clock/enable faults were Aborted for backtrack count exceeding 100.
0 ( 0.00%) data faults were Aborted for backtrack count exceeding 100.
This circuit has 780 test patterns and 2 scan_ins and 2 scan_outs,
and contains 108 UNCOLLAPSED faults of which
SynTest Tutorials 2 - 63
Partial-Scan Tutorials
Scan information :
Chain 1, Length is 2
Scan-in pin = SCAN_IN
Scan-out pin = SCAN_OUT
Sequence information :
Shift sequence
CLK = 010
2 - 64 SynTest Tutorials
Partial-Scan Tutorials
STI_TM1 = 1
Hold sequence
CLK = 0
Capture sequence
CLK = 010
Clock information :
SynTest Tutorials 2 - 65
Partial-Scan Tutorials
2 - 66 SynTest Tutorials