Test Procedure File
- Test Procedure File Creation
- Test Procedure File Syntax
- Test Procedure File Structure
- The Procedures
- Additional Support for Test Procedure Files
- Creating Test Procedure Files for End Measure Mode
- Serial Register Load and Unload for LogicBIST and ATPG
- Notes About Using the stil2tessent Tool
- Test Procedure File Commands and Output Formats
测试过程文件(Test Procedure File)指定设计中的扫描电路的工作方式。使用预先前定义的扫描时钟( previously-defined scan clocks)和其他控制信号来指定扫描电路的工作过程。要在设计中操作扫描电路,必须定义扫描电路并提供测试程序文件来描述其工作。设计规则检查(DRC)过程在退出设置模式时执行,它执行详细的检查以确保扫描电路正常工作。
Test Procedure File Creation
您可以使用TessentShell的 patterns-scan环境插入扫描电路并为ATPG操作创建测试过程文件。如果设计中已经包含扫描电路,则需要手动或使用Tessent Shell创建一个测试程序文件,以描述其扫描电路工作过程。
可以使用add_scan_groups
命令在setup模式下指定测试过程文件。非setup模式下,工具还可以通过使用read_procfile
命令或write_patterns
命令读取过程文件。当加载多个测试过程文件时,工具会合并时序和过程数据。
使用stil2tessent工具将STIL过程文件(SPF)转换为dofile和测试过程文件。工具生成一个dofile,用于定义时钟、扫描链、扫描组(scan groups)和引脚约束。工具还创建带有timeplate和标准扫描程序的测试程序文件。标准扫描过程包括:test_setup、load_unload和shift。
以下小节描述了测试程序文件的语法和规则,给出了各种类型的扫描结构的示例,并概述了确定电路是否正常工作的检查方法。
Test Procedure File Syntax
测试过程文件使用常见的语法约定( syntactical conventions ),如粗体和斜体以及保留字符。该文件支持Tcl条件语句。
syntactical conventions
Bold — Indicates a keyword. Enter the keyword exactly as shown.
Italic — Indicates lexical elements such as identifiers, strings, or numbers. Replace the italicized word with the appropriate name or integer.(指示词法元素,如标识符、字符串或数字。将斜体字替换为适当的名称或整数)
| — indicates a logical “OR” as in “select foo OR foo_not”
[ ] — indicate optional elements. Do not include the brackets.
… — indicates a repeatable item or set.
Reserved Characters
如果pin或pathname中使用了保留标点符号(punctuation character),则必须将该名称用引号(“”)括起来。保留标点符号列表见表10-1。
例如,下面的语句是非法的,因为它在引号之外使用了感叹号。
force /inst_my_adder_1/xclk_header!x1!x1/op1[9] 1
信号名包含一个保留的标点符号,感叹号(!),因此必须用引号括起来。正确的语法应该是:
force "/inst_my_adder_1/xclk_header!x1!x1/op1[9]” 1
Using Tcl in the Test Procedure File
过程文件支持Tcl条件语句" if ", " else “和” elseif ",语法如下:
if { tcl_expr } {
procedure file statemets
}
elseif { tcl_expr } {
procedure file statements
}
else {
procedure file statements
}
其中tcl_expr
是任何使用Tcl变量、dofile变量或环境变量的布尔Tcl表达式。就像在过程文件中执行变量替换时一样,不支持其他Tcl语句和定义Tcl变量。所有变量都必须在dofile中或从shell中定义为环境变量。
这些Tcl条件语句的主体应该只包含合法的过程文件语法,而不包含任何其他Tcl语句。Tcl条件语句在过程文件解析器中被视为预处理程序语句。解析完成后,它们不会保存在工具中;只有Tcl " if "表达式的计算所选择的过程文件代码存储在工具中。因此,当使用write_procfile写出过程文件时,不会出现任何Tcl条件语句,也不会出现未使用的过程文件代码。
Introductory Test Procedure File Example
test procedure file的实例如下:
// Comments use "//" characters
//
// set the base time increment for use in all timeplates
set time scale 1.0 ns
// define the strobe time(选通时间) for the measure statements
set strobe_window time 1
// this design uses a single timeplate, named "tp1", for all vectors
timeplate tp1 =
force_pi 0;
measure_po 1;
pulse CLK0_7 2 1;
pulse CLK8_15 2 1;
period 4;
end;
// the shift and load_unload procedures define how the design
// must be configured to allow shifting data through the scan chains.
// the prodedures define the timeplate to use
// and the scan group that it references.
procedure shift =
scan_group grp1;
timeplate tp1;
cycle =
force_sci;
measure_sco;
pulse CLK8_15;
pulse CLK0_&;
end;
end;
procedure load_unload =
scan group grp1;
timeplate tp1;
cycle=
force CLEAR 0;
force CLK0_7 0;
force CLK8_15 0;
force scen1 1;
end;
apply shift 1;
end;
// the capture peocedure is a "non-scan" procedures.
// this procedure describe the timeplate to use for the captures.
// it also defines the number if cycles to use in the capture cycle.
// in this example there is just one cycle
procedure capture =
timeplate tp1;
cycle =
force_pi;
measure_po;
pulse_capture_clock;
end;
end;
Test Procedure File Structure
测试过程文件从#include语句开始,由许多以特定顺序显示的结构元素( structural elements)组成。这些元素中有些是必需的,有些是可选的。
#include "<file_name>";
[set_statement ...]
[alias_definition ...]
[timing_variables ...]
timeplate_definition // include pulse clock statements
alywas_block
procedure_definition
clock control definition