From silicon-crew
Converts CRG requirement tables (subsystem, IP, clock/reset signals, notes) into clock tree and reset tree design tables with PLL count recommendations and architecture reports. Outputs Excel files compatible with cr_tree_diag_gen for topology diagram generation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/silicon-crew:crg-req-to-designThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
将 **CRG 需求表**(子系统、IP、时钟/复位信号名、备注/频率)自动转换为 **时钟树设计表** 和 **复位树设计表**,并推荐 PLL 数量与时钟树架构。
将 CRG 需求表(子系统、IP、时钟/复位信号名、备注/频率)自动转换为 时钟树设计表 和 复位树设计表,并推荐 PLL 数量与时钟树架构。
生成的设计表可直接作为 cr_tree_diag_gen 的输入,形成完整 pipeline:
需求表 → crg_req_to_design → 设计表 → cr_tree_diag_gen → drawio / excalidraw
200MHz、3Mhz、20/25MHz 等格式,自动归一化为 MHz_clk、_rst_n 等)自动区分时钟与复位pad、xtal、osc)或备注("外部"/"输入")识别外部时钟源SRC0、DIV、DIV_WIDTH、DIV_DFLT,生成符合 cr_tree_diag_gen 格式的时钟树设计表PORESETn 为根,自动为所有子系统复位信号生成输出节点| 列名 | 别名 | 说明 |
|---|---|---|
| 子系统 | subsystem, 模块, block | 所属子系统(支持 Excel 合并单元格) |
| IP | ip, 模块名 | 所属 IP(可选) |
| 时钟复位需求 | signal, 信号名, name, 时钟/复位 | 信号名(如 core_clk) |
| 备注 | note, 频率, freq, remark, 注释 | 频率、说明等(如 200MHz) |
运行后会在输出目录生成 3 个文件:
| 文件 | 说明 |
|---|---|
clock_design.xlsx | 时钟树设计表(兼容 cr_tree_diag_gen) |
reset_design.xlsx | 复位树设计表(兼容 cr_tree_diag_gen) |
crg_report.txt | PLL 推荐与时钟树架构报告 |
# 基本用法
python ${CLAUDE_PLUGIN_ROOT}/skills/crg-req-to-design/scripts/main.py <req_table.xlsx> [output_dir]
# 示例
python ${CLAUDE_PLUGIN_ROOT}/skills/crg-req-to-design/scripts/main.py examples/input/req_table.xlsx output/
在 .kimi/mcp.json 中添加:
{
"mcpServers": {
"crg-req-to-design": {
"command": "python3",
"args": ["${CLAUDE_PLUGIN_ROOT}/skills/crg-req-to-design/mcp_server.py"]
}
}
}
暴露工具:
| Tool | 功能 |
|---|---|
crg_req_to_design | 需求表 → 时钟设计表 + 复位设计表 + 架构报告 |
调用参数:
{
"input_path": "/path/to/req_table.xlsx",
"output_dir": "/path/to/output"
}
返回生成文件列表、PLL 推荐和分频链路摘要。
# 1. 生成设计表
python ${CLAUDE_PLUGIN_ROOT}/skills/crg-req-to-design/scripts/main.py req_table.xlsx output/
# 2. 生成时钟树拓扑图
python ${CLAUDE_PLUGIN_ROOT}/skills/cr-tree-diag-gen/scripts/main.py output/clock_design.xlsx clock_tree.drawio
# 3. 生成复位树拓扑图
python ${CLAUDE_PLUGIN_ROOT}/skills/cr-tree-diag-gen/scripts/main.py output/reset_design.xlsx reset_tree.drawio
本 skill 独立运行只需:
pip install pandas openpyxl
若启用 MCP Server,还需:
pip install mcp
本 skill 只负责前半段:需求表 → 设计表 + 报告。
如需生成可视化拓扑图(.drawio / .excalidraw),需调用 cr_tree_diag_gen skill 处理生成的设计表。
需求表
↓
【crg_req_to_design】 → clock_design.xlsx + reset_design.xlsx + crg_report.txt
↓
【cr_tree_diag_gen】 → .drawio / .excalidraw
调用顺序:
crg_req_to_design,传入需求表路径clock_design.xlsx 和 reset_design.xlsxcr_tree_diag_gen,将上述设计表作为输入,生成拓扑图格式兼容:crg_req_to_design 生成的设计表列名、顺序、格式与 cr_tree_diag_gen 的输入标准完全一致,可直接传递,无需手动调整。
div ∈ [1, 64]|pad_freq / div - tgt_freq| / tgt_freq ≤ 5%,认为该时钟可由 pad 分频得到PORESETn(或第一个复位信号)作为 input 根节点nTRST、nSRST 等调试复位作为独立 inputoutput,SRC0 = PORESETnpad_clk 会被视为独立输入节点;如需合并,请在需求表中统一命名或于设计表中手动合并Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub siliconpeasant/silicon-agents --plugin silicon-crew