基于 AST 检查 CDC/RDC 违例:对比 MAS clock_domains 找跨域信号,检查是否被 2ff-sync CBB 保护。触发场景:(1) bba-guru-synthesis 综合前;(2) 显式 /bb-check-cdc。
调用 verible-verilog-lint 检查 SV 源码。src 必须可综合(零 syntax error),tb 允许 verification constructs。发现 src error 时自动修复重检(max 3 iter)。触发:(1) bba-guru-rtl 生成后;(2) RTL 修复重检;(3) 显式 /bb-check-lint。
解析 Verilator coverage.dat + sim log,输出 functional + code coverage 数值,判断是否 100% 达标。触发场景:(1) bb-invoke-verilator 后;(2) 每次回归后;(3) 显式 /bb-collect-coverage。
从 MAS(io_ring/pad_list/clock_plan)+ 综合网表生成 Magic floorplan TCL,交给 bb-invoke-magic 执行。触发场景:(1) bba-guru-pd 综合后做 floorplan;(2) DRC 失败后调整 utilization 重生成;(3) 显式 /bb-create-floorplan。
从 MAS(clock_domains / io_timing / path_exceptions)派生 Synopsys SDC 时序约束文件,OpenSTA 语法校验。触发场景:(1) bba-guru-synthesis 综合前;(2) post-PD timing fail 修订约束;(3) 显式 /bb-create-sdc。
扫描 RTL 目录提取模块层次依赖,拓扑排序后写 file_list.f(叶模块在前,top 在最后),供 Yosys/Verilator 使用。触发场景:(1) bba-guru-rtl 生成 RTL 后生成 file_list;(2) 显式 /bb-find-module-deps。
统一质量门禁:RTL / 综合 / 测试 / PD 四阶段验收。调用共享 gate_runner.py 参数化。触发:(1) bba-guru-* 在阶段结束时调用;(2) 显式 /bb-gate <domain>。
根据 MAS + verification_plan + RTL 接口描述生成 SystemVerilog UVM 或 cocotb 测试平台与 test cases 清单。触发场景:(1) bba-guru-verification 在 plan 完成后;(2) 补充 corner case TB;(3) 显式 /bb-generate-tb。