with one click
func-spec
提取和分析被测模块(DUT)的功能规格和形式化检测点
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
提取和分析被测模块(DUT)的功能规格和形式化检测点
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
从 analysis 中提取 RTL_BUG 属性,LLM 通过脚本将 Bug 详细信息写入 .formal_records.yaml。
自动解析环境分析文档和 wrapper.sv,为每个 RTL_BUG 生成 Python 测试函数框架,LLM 填写引脚驱动和断言逻辑。
环境分析技能。Checker 已自动解析日志并生成骨架,LLM 仅需通过脚本填写分析详情。
在 YAML 中编写 SVA 属性检测代码
指导解释覆盖率报告并优化未覆盖死角的技能
功能规格分析与测试点定义阶段及其子阶段专属技能,用于指导{DUT}_functions_and_checks.md的写入工作
| name | func-spec |
| description | 提取和分析被测模块(DUT)的功能规格和形式化检测点 |
本技能指导如何基于给定的基础信息,细化出该 DUT 应该包含的具体功能检测点,通过 update_spec.py 脚本 写入 .formal_records.yaml。
功能点标签规范、Style 标注规则与高级模式示例参见
Guide_Doc/functions_and_checks.md
阅读输入说明、RTL 源码或预生成的文档骨架,理解 DUT 的核心功能。
按照 Guide_Doc/functions_and_checks.md 中的规范,使用 FG-XXX (功能组)、FC-XXX (功能点)、CK-XXX (检测点) 组织层级。
禁止直接编辑 .formal_records.yaml,必须通过 RunSkillScript 调用 update_spec.py:
python3 .ucagent/skills/formal/func-spec/scripts/update_spec.py \
-action add_fg -id FG-API -name "验证环境约束"
python3 .ucagent/skills/formal/func-spec/scripts/update_spec.py \
-action add_fc -fg FG-API -id FC-API-INPUT-CONSTRAINT -desc "定义输入信号的合法约束条件"
python3 .ucagent/skills/formal/func-spec/scripts/update_spec.py \
-action add_ck -fc FC-API-INPUT-CONSTRAINT -id CK-API-INPUT-NO-X -style Assume -desc "输入信号不能为 X 态"
python3 .ucagent/skills/formal/func-spec/scripts/update_spec.py \
-action update -id CK-API-INPUT-NO-X -style Comb -desc "新的描述"
python3 .ucagent/skills/formal/func-spec/scripts/update_spec.py \
-action delete -id CK-API-INPUT-NO-X
用于定义 WIDTH 等硬件常量,会自动同步到 SV 模块头和实例化语句中。
python3 .ucagent/skills/formal/func-spec/scripts/update_spec.py \
-action set_param -id WIDTH -value 64
删除参数:
python3 .ucagent/skills/formal/func-spec/scripts/update_spec.py \
-action delete_param -id WIDTH
用于在 wrapper.sv 中手动声明一些用于观察内部逻辑的信号。
python3 .ucagent/skills/formal/func-spec/scripts/update_spec.py \
-action add_signal -desc "logic [WIDTH-1:0] internal_state"
删除信号(需提供完全匹配的声明字符串):
python3 .ucagent/skills/formal/func-spec/scripts/update_spec.py \
-action delete_signal -desc "logic [WIDTH-1:0] internal_state"
python3 .ucagent/skills/formal/func-spec/scripts/update_spec.py -action show
Checker 会验证 YAML 结构完整性,通过后自动生成 03_{DUT}_functions_and_checks.md 文档。
FG-API(环境约束)和 FG-COVERAGE(可达性覆盖)两个功能组。id 必须以 CK- 开头,使用大写字母和横杠(如 CK-CORE-ARITH-RESULT)。style 必须是 Assume / Comb / Seq / Cover 之一。