Stats
Actions
Tags
From silicon-crew
Converts Excel clock/reset timing tables into hierarchical Draw.io and Excalidraw diagrams with MUX support, root-source edge coloring, and frequency annotations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/silicon-crew:cr-tree-diag-genThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
时钟/复位树链路图生成器。将 Excel 表格转换为 Draw.io 或 Excalidraw 格式的拓扑图。
examples/input/clock_table.xlsxexamples/input/reset_table.xlsxexamples/input/sub_clock_table.xlsxexamples/output/clock_tree.drawioexamples/output/clock_tree.excalidrawexamples/output/reset_tree.drawioexamples/output/reset_tree.excalidrawexamples/output/sub_clock_tree.drawioexamples/output/sub_clock_tree.excalidrawmcp_server.pyscripts/__init__.pyscripts/excalidraw_renderer.pyscripts/graph.pyscripts/layout.pyscripts/main.pyscripts/parser.pyscripts/renderer.pyscripts/styles.py时钟/复位树链路图生成器。将 Excel 表格转换为 Draw.io 或 Excalidraw 格式的拓扑图。
.drawio(diagrams.net)和 .excalidraw(excalidraw.com)当用户需要:
| 列名 | 说明 | 示例 |
|---|---|---|
| NAME | 信号名 | core_clk |
| ATTR | 属性:input/internal/output/na | output |
| SRC0 | 父时钟0(主源) | pll_mux_clk |
| SRC1 | 父时钟1(MUX 第二输入) | pad_src_clk |
| MUX_DFLT | MUX 默认值 | 0 |
| DIV | 分频器 | 2 |
| DIV_WIDTH | 分频器位宽 | 4 |
| DIV_DFLT | 分频器默认值 | 1 |
| OCC | OCC 控制 | Y |
| ICG | ICG 控制 | Y |
| ICG_DFLT | ICG 默认值 | 1 |
| NOTE | 注释/频率 | 1000MHz |
| 列名 | 说明 | 示例 |
|---|---|---|
| NAME | 信号名 | core_rst_n |
| ATTR | 属性:input/internal/output | output |
| SRC0 | 父复位0 | por_rst_n |
| SRC1~SRC3 | 额外输入(AND 门) | soft_rst_n |
| SOFT_DFLT | 软件默认值 | 1 |
# 同时生成 drawio + excalidraw
python3 cr_tree_diag_gen/main.py input.xlsx
# 指定输出路径(只生成一种格式)
python3 cr_tree_diag_gen/main.py input.xlsx output.drawio
python3 cr_tree_diag_gen/main.py input.xlsx output.excalidraw
通过 cr_tree_diag_gen 工具直接生成:
{
"input_path": "/path/to/clock_table.xlsx",
"output_dir": "/path/to/output"
}
返回生成文件列表。
| 文件 | 打开方式 |
|---|---|
*_tree.drawio | https://app.diagrams.net |
*_tree.excalidraw | https://excalidraw.com(直接拖入) |
| 类型 | 颜色 | 说明 |
|---|---|---|
| source_input | 绿 #27ae60 | 外部输入时钟 |
| source_internal | 灰 #7f8c8d | 内部生成时钟 |
| na | 橙 #f39c12 | 中间节点(非 output) |
| output | 浅蓝 #aed6f1 | 最终输出时钟 |
| div | 白 #ffffff | 分频器 |
| occ | 紫 #f5eef8 | 时钟门控控制器 |
| icg | 绿 #d5f5e3 | 时钟门控 |
| mux | 紫 #e8daef | 多路选择器 |
| rst_and | 黄 #fff3bf | 复位与门 |
| reg | 蓝 #d6eaf8 | 寄存器节点 |
| soft | 橙 #fdebd0 | 软件控制节点 |
pip install pandas openpyxl
在 .kimi/mcp.json 中添加:
{
"mcpServers": {
"cr-tree-diag-gen": {
"command": "python3",
"args": ["/path/to/cr_tree_diag_gen/mcp_server.py"]
}
}
}
| Tool | 功能 |
|---|---|
cr_tree_diag_gen | xlsx → drawio + excalidraw |
cr_tree_diag_gen_drawio | xlsx → drawio only |
cr_tree_diag_gen_excalidraw | xlsx → excalidraw only |
SOFT_DFLT 列 → 复位树,否则 → 时钟树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