一键导入
bb-search-protocol
在 wiki/protocols/ 搜索协议知识(UART/AXI4-Lite/UCIe 等),返回匹配的文档路径与摘要。触发场景:(1) bba-architect 写 PRD/MAS 时需查协议规格;(2) 显式 /bb-search-protocol。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
在 wiki/protocols/ 搜索协议知识(UART/AXI4-Lite/UCIe 等),返回匹配的文档路径与摘要。触发场景:(1) bba-architect 写 PRD/MAS 时需查协议规格;(2) 显式 /bb-search-protocol。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 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。
基于 SOC 职业分类
| name | bb-search-protocol |
| description | 在 wiki/protocols/ 搜索协议知识(UART/AXI4-Lite/UCIe 等),返回匹配的文档路径与摘要。触发场景:(1) bba-architect 写 PRD/MAS 时需查协议规格;(2) 显式 /bb-search-protocol。 |
| user-invocable | true |
在项目 wiki/protocols/ 目录里按关键词搜索协议文档,返回匹配文件、行号、片段,供 bba-architect 用 Read 工具读取细节。
bba-architect| arg | type | required | 默认 | 说明 |
|---|---|---|---|---|
| pattern | string | true | — | 关键词(uart / axi4 / ucie) |
| field | string | false | — | 限定字段(baud / timing) |
| max_results | int | false | 20 | 最多返回条数 |
| field | 值 |
|---|---|
artifact_path | — (inline 返回,不写文件) |
matches | [{file:path, line:int, snippet:str}] |
count | int |
valid | bool |
scripts/render_search.py 生成 rg 命令:
rg -i "<pattern>" wiki/protocols/ --include="*.md" -n -A 2 --max-count=<max_results>
如指定 field,叠加 && rg "<field>" 二次过滤。
scripts/run_search.py:
timeout 30 bash -c "<cmd>" > /tmp/protocol_search_<stamp>.txt 2>&1file:line:content 三段格式scripts/parse_results.py:
<file>:<line>:<content> → 一条 match返回 JSON。调用方 (bba-architect) 据 file 列表 Read 详细内容补充 PRD。
| 状态 | 行动 |
|---|---|
| count>0 | 有结果 |
| count==0 | 调用方放宽 pattern 重试;超 3 次记录 gap: <pattern> 入 MAS |
| rg 不可用 | 退到 grep -r |
wiki/protocols/
├── uart.md
├── axi4-lite.md
└── ucie-overview.md (planned, not yet available)
scripts/render_search.py、scripts/run_search.py、scripts/parse_results.pyreferences/protocol_index.md — 已知协议清单