dqi_ext.spec 编写指南
本文档说明如何撰写 dqi_ext.spec 文件,用于从报告文件中自动提取设计质量指标(DQI)。
文件格式概览
每一行代表一个待提取的 DQI 条目。
使用 Tab (
\t) 作为字段分隔符。#开头为注释行,将被忽略。
字段定义(共6列)
| Column Index | Name | Description |
|---|---|---|
| 1 | <category>/<DQI_ID> | Category and DQI ID, used for output path and file naming. |
| 2 | Report_path | Report file path. TCL variables like $DESIGN are allowed. |
| 3 | Simple_regex | Regex pattern to extract value. Use capture groups ( ... ) |
| 4 | Only_extract_first | true/false. Whether to extract only the first match. |
| 5 | Default_value | Value to use if no match or file not found. |
| 6 | Complex_match_script | Shell script to override regex extraction. |
示例(Example)
# <category>/<DQI_ID>\tReport_path\tSimple_regex\tOnly_extract_first\tDefault_value\tComplex_match_script361-SCAN_DC/SCAN_DC_INSERT_0001 REPORT/$RPT /^Total number of test points : (\d+)/ true 0 none361-SCAN_DC/SCAN_DC_INSERT_0002 REPORT/$RPT /^Number of Autofix test points: (\d+)/ false 0 none编写注意事项(Notes)
注释与空行
Lines starting with
#are treated as comments.Blank lines will be ignored.
Report_path 中使用变量
You may include
$TCL_VARsuch as$DESIGN,$RPT.The variables will be resolved from sourced Tcl files.
正则表达式字段 Simple_regex
Must include capture group
( ... ).Use slashes
/.../to wrap the regex.Common patterns include
^,\s+,\d+,(\S+).
Complex_match_script 字段
If not
none, this field overrides the regex.The script is executed directly using shell.
Script must output a full
.valline with 4 columns.TCL variables in the script will be expanded.
.val 输出格式
xxxxxxxxxx<VALUE>\t<YYYYMMDD_HHMMSS>\t<ReportPath:LineNo>\tnoneExample:
xxxxxxxxxx5616 20250610_140951 /abs/path/preview_dft_all.rpt:11 none
