<一句话说清『这个 skill 做什么 + 何时调用』。把最关键的触发场景放最前面。结尾给 2-3 个用户会说的关键词。>
日本語の概要は準備中です。原文の説明を表示しています。
基于 AST 检查 CDC/RDC 违例:对比 MAS clock_domains 找跨域信号,检查是否被 2ff-sync CBB 保护。触发场景:(1) bba-guru-synthesis 综合前;(2) 显式 /bb-check-cdc。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
读 bb-parse-ast 的 AST + MAS.clock_domains,识别跨时钟域 register-to-register 路径,检查是否通过 2ff 同步器,输出 violation 报告。
bba-guru-synthesisbb-parse-ast(backend=auto 自动降级到 verible/slang)| arg | type | required | 默认 | 说明 |
|---|---|---|---|---|
| file_list | path | true | — | file_list.f |
| ast_path | path | true | — | bb-parse-ast 产出 |
| mas_path | path | true | — | designs/<name>/mas/mas.json |
| design_name | string | true | — | — |
| stamp | string | false | <auto> | — |
| field | 值 |
|---|---|
artifact_path | designs/<name>/cdc/cdc_report.json |
script_path | designs/<name>/cdc/check_cdc_<stamp>.py |
log_path | designs/<name>/cdc/cdc_<stamp>.log |
violations | [{type,from_clk,to_clk,signal,line,waived:bool}] |
clean | bool(unwaived violations==[]) |
valid | bool |
scripts/render_cdc_py.py 渲染:
import json
ast = json.load(open(ast_path))
mas = json.load(open(mas_path))
domains = mas["clock_domains"]
# 1. 抽取所有 always_ff (@posedge clk) blocks
# 2. 对每条赋值,标注其 clock domain (信号→sensitivity clock)
# 3. R-to-R 路径:from_clk != to_clk → 候选 violation
# 4. 检查 sink 之前是否经过 wiki/cbb/2ff-sync 实例
violations = analyze(ast, domains)
json.dump({"violations": violations}, open(out, "w"))
timeout 600 uv run python <script_path> > <log> 2>&1,追加 exit:<rc>。
scripts/parse_cdc.py:
clean = all(not v.waived for v in violations)cdc_report.json返回 JSON。clean=false → bba-guru-synthesis 开 rtl-needs-fix(CDC 不允许 waive)。
| 状态 | 行动 |
|---|---|
| clean=true | 进 yosys |
| clean=false(unwaived) | 开 rtl-needs-fix 退出 |
| pyverilog 解析失败 | 重试 bb-parse-ast --backend verible(或 slang) |
| Phase 2 timeout(600s) | error="CDC_TIMEOUT" |
scripts/render_cdc_py.py、scripts/run_cdc.py、scripts/parse_cdc.pyreferences/2ff_sync_pattern.md — 同步器识别规则Gotcha/cdc_false_positives.md — handshake / gray code 等不视为 violationまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
<一句话说清『这个 skill 做什么 + 何时调用』。把最关键的触发场景放最前面。结尾给 2-3 个用户会说的关键词。>
日本語の概要は準備中です。原文の説明を表示しています。
从粗略 idea 设计芯片或功能模块架构,输出专业架构文档到 spec_arch 目录。Trigger: 芯片架构设计, IC架构, 电路模块设计, 硬件架构. Generate IC/Chip architecture specification from rough ideas.
日本語の概要は準備中です。原文の説明を表示しています。
调用 babel-lsp / 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。
日本語の概要は準備中です。原文の説明を表示しています。
Babel internal issue protocol — close a handoff after downstream agent picked it up or user signed off. Moves designs/<name>/.handoff/<label>.md to .handoff/closed/ (using mv per CLAUDE.md), appends to handoff_log.jsonl.
日本語の概要は準備中です。原文の説明を表示しています。
对抗性代码评审:代码质量 / 可维护性 / 时序风险 / 综合友好度 / MAS 对齐度。默认 ruthless 模式,找 EVERY flaw。触发场景:(1) RTL lint 后;(2) 显式 /bb-code-review。
日本語の概要は準備中です。原文の説明を表示しています。
解析 Verilator coverage.dat + sim log,输出 functional + code coverage 数值,判断是否 100% 达标。触发场景:(1) bb-invoke-verilator 后;(2) 每次回归后;(3) 显式 /bb-collect-coverage。
日本語の概要は準備中です。原文の説明を表示しています。