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
UCAgent是基于大语言模型的自动化任务执行AI代理,支持通用工作流配置和执行。本技能提供配置文件编写规范、自定义Checker开发指南、--emulate-config配置校验工具使用方法,帮助用户快速创建、验证和运行各类任务工作流。
通过脚本把 DUT 基本信息写入 .formal_records.yaml 的 basic_info 字段,并由系统自动渲染 02 基本信息文档。
从 analysis 中提取 RTL_BUG 属性,LLM 通过脚本将 Bug 详细信息写入 .formal_records.yaml。
自动解析环境分析文档和 wrapper.sv,为每个 RTL_BUG 生成 Python 测试函数框架,LLM 填写引脚驱动和断言逻辑。
基于 basic_info.clock_reset 与 extra_config.tcl 渲染 wrapper/checker/formal.tcl。
Internal support skill for formal verification workspaces. This folder carries shared Python helpers and templates used by other formal skills and is not intended for direct user invocation.
| name | func-spec |
| description | 提取和分析被测模块(DUT)的功能规格和形式化检测点 |
本技能指导如何基于给定的基础信息,细化出该 DUT 应该包含的具体功能检测点,通过 update_spec.py 脚本 写入 .formal_records.yaml。
本阶段的唯一事实来源是 .formal_records.yaml.spec。
功能点标签规范、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。
在本工作流中,请优先通过 RunSkillScript 调用技能脚本,不要假设宿主 python3 环境具备所有依赖:
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
03_{DUT}_functions_and_checks.md 是派生产物。
Checker 会验证 YAML 结构完整性,通过后自动重建该文档。
FG-API(环境约束)和 FG-COVERAGE(可达性覆盖)两个功能组。id 必须以 CK- 开头,使用大写字母和横杠(如 CK-CORE-ARITH-RESULT)。style 必须是 Assume / Comb / Seq / Cover 之一。