三个可用于项目环境的验证工作流
这里不按 API 名称罗列功能,而是从验证工程师每天实际损失时间的环节出发:先说明事故现场,再展示插件缩短了哪一步,最后明确它目前做不到什么。
1
协议检查器
项目可用的通道级检查器
接口 timeout 或 scoreboard mismatch 后,直接查看哪个规则在哪个周期、哪条信号上被破坏,同时保留成功 transfer;选中结果即可跳回波形中的故障位置。内置 profile 覆盖 ready/valid、request/acknowledge、AXI4/AXI4-Lite AW/W/B/AR/R、ACE AC/CR/CD channel、AXI4-Stream、APB、AHB-Lite、Avalon-ST/MM、Wishbone B4 和 TileLink decoupled channel。
生产痛点
scoreboard mismatch 或 timeout 只能说明 transfer 失败;手工对齐 valid、ready 和所有 payload sideband,很难迅速确定第一个破坏协议的周期。
实录中的具体案例
实录中的 ready/valid 接口在 stalled 期间改变 payload,完成一次transfer,随后又在后续 handshake 前撤销 valid。插件给出带精确时间的 payload-changed、valid-dropped 和成功 transfer。
- 输入
- 一份波形和一个信号叶名匹配 profile 的接口 scope;也可显式覆盖各 role 路径。
- 位置
examples/tcl-protocol-decoder/plugin.json
- GitHub 文件夹
svcomplex-dev/svw-plugins/plugins/protocol-decoder
- 加载
svw waveform.vcd --plugin examples/tcl-protocol-decoder/plugin.json
- 实际操作
:plugins exec ready-valid top.dut_if 200ns 2us
- Agent/MCP/JSON 共用动作
svw agent sample/tutorial_protocol.vcd plugin-run examples/tcl-protocol-decoder/plugin.json check '{"profile":"ready-valid","clock":"top.clk","start":0,"end":65,"roles":{"valid":"top.valid","ready":"top.ready"}}'
- 产出
- 选中问题后按 Enter/g,在原生波形中定位对应信号和时间;o 可将证据发布为原生报表。
适用边界: 它是 channel 级 handshake/稳定性检查器,不是完整的 AXI/ACE/TileLink compliance 产品。ordering、burst、cache 和 coherence 仍需专用 VIP 或项目规则。
播放真实实录 — 协议检查器
播放统一 headless 动作实录 — 协议检查器
2
X / Z 未知态定位
项目可用的有界分诊工具
在可见范围内找出当前信号的每个 X、Z 或混合未知态区间,同时给出持续时间和精确值。扫描按页进行,达到 transition 预算时会明确标记 partial。
生产痛点
reset 或错误恢复后,某条 bus 可能只在很短区间变成 X。在长波形中靠目视滚动很慢,而且容易从错误的 transition 开始追根。
实录中的具体案例
实录选中 top.instruction_bus,找到从 tick 35 开始的 X 区间和紧随其后的 Z 区间,再把所选证据显露到原生波形。
- 输入
- 原生 signal panel 中当前选中的任意数字信号;先缩放到关心区间可限定扫描范围。
- 位置
examples/tcl-x-detective/plugin.json
- GitHub 文件夹
svcomplex-dev/svw-plugins/plugins/x-detective
- 加载
svw waveform.vcd --plugin examples/tcl-x-detective/plugin.json
- 实际操作
Select a signal, then use j/k and Enter or g
- Agent/MCP/JSON 共用动作
svw agent sample/tutorial_demo.vcd plugin-run examples/tcl-x-detective/plugin.json scan '{"signal":"top.instruction_bus","start":0,"end":100,"class":"X","min_duration":"2ns"}'
- 产出
- panel 列出未知态区间;Enter/g 会将原生信号和波形 cursor 跳到所选区间。
适用边界: 它负责圈定未知态区间,不会单独证明是哪个 driver 引入 X。跳转后应继续使用 svw 原生 Trace-X/driver 证据追根。扫描范围限于当前可见区间和 2,048 个 transition。
播放真实实录 — X / Z 未知态定位
播放统一 headless 动作实录 — X / Z 未知态定位
3
回归失败分诊
项目可用的 JUnit 工作流
在波形旁加载有界的回归失败报告,查看 assertion、protocol 和未知态失败,并从所选测试失败直接跳到精确波形时间。
生产痛点
nightly regression 可能在一个系统里留下数百个失败,波形却在另一个工具中。验证工程师必须反复复制 test 名和时间戳,才能开始检查失败周期。
实录中的具体案例
内置报告包含 tick 120、245 和 390 的 reset、protocol 和未知态失败。实录选中 error_injection,将原生波形直接移到 390。
- 输入
- 失败 testcase 带整数 svw.time property 的 JUnit XML;可选 JUnit baseline 用于 new/common/fixed 分类。
- 位置
examples/tcl-failure-triage/plugin.json
- GitHub 文件夹
svcomplex-dev/svw-plugins/plugins/failure-triage
- 加载
SVW_PLUGIN_CONFIG_TRIAGE_FILE=failures.junit.xml svw waveform.vcd --plugin examples/tcl-failure-triage/plugin.json
- 实际操作
Use j/k to select a failure, then press Enter or g
- Agent/MCP/JSON 共用动作
svw agent sample/tutorial_demo.vcd plugin-run examples/tcl-failure-triage/plugin.json triage '{"file":"examples/tcl-failure-triage/failures.junit.xml","limit":256}'
- 产出
- 所选失败时间会在原生波形中显露;添加 baseline 后,同一窗口会变为回归差异视图。
<testcase classname="cpu.basic" name="error_injection">
<properties><property name="svw.time" value="390"/></properties>
<failure message="response bus contains X"/>
</testcase>
适用边界: JUnit 中每个失败 testcase 必须显式携带整数波形 tick;不会把测试的墙钟耗时猜成仿真时间。自由格式 UVM/simulator log 仍需exporter。超过 4 MiB、4,096 条记录或字段非法的文件会被拒绝。
播放真实实录 — 回归失败分诊
播放统一 headless 动作实录 — 回归失败分诊
插件只会在用户显式提供 manifest 时加载;波形和 session 文件不会自动激活 Tcl 代码。如果 tclsh 不在 PATH,请设置 SVW_TCLSH。