/vibe-soc:crg-design-genfrom Vibe SoC
Generates clock/reset design tables, PLL reports, and Draw.io/Excalidraw topology diagrams from CRG requirement tables. Merges crg-req-to-design and cr-tree-diag-gen into a two-stage pipeline.
Ships in Vibe SoC. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
crg-design-gen)Merged from crg-req-to-design + cr-tree-diag-gen.
Turn a CRG requirement table into clock/reset design tables, a PLL/architecture report, and a design workbook. After review, turn design tables into Draw.io / Excalidraw topology diagrams.
crg-gen has been removed from the vibe_soc repository.
需求表 (req)
→ crg_req_to_design # stage 1:设计表 + PLL 报告 + crg workbook
→ [人工评审 design xlsx]
→ cr_tree_diag_gen # stage 2:拓扑图
One-shot draft (unreviewed, exploration only):
crg_req_pipeline(req.xlsx, with_diagram=true)
→ design 表 + 报告 + 可选图(summary 标 UNREVIEWED)
Tool names stay stable so existing agent prompts keep working.
| Tool | 作用 |
|---|---|
crg_req_to_design | 需求表 → clock_design.xlsx / reset_design.xlsx / crg_report.txt / <design>_crg.xlsx |
cr_tree_diag_gen | 设计表 → drawio + excalidraw |
cr_tree_diag_gen_drawio | 仅 Draw.io |
cr_tree_diag_gen_excalidraw | 仅 Excalidraw |
crg_req_pipeline | stage1 + 可选 stage2(默认 with_diagram=false) |
Register the bundled stdio server:
{
"mcpServers": {
"crg-design-gen": {
"command": "python3",
"args": ["/path/to/crg-design-gen/mcp_server.py"]
}
}
}
python3 crg-design-gen/scripts/design_main.py \
path/to/req_table.xlsx [output_dir]
.xlsx / .xls / .csvoutput/ (CLI) or <input-stem>_design/ (MCP)| 文件 | 用途 |
|---|---|
<design>_crg.xlsx | 主交付,沿用历史 crg-gen 工作簿格式 |
clock_design.xlsx | 树图用精简时钟表(从 clk_gen 抽出) |
reset_design.xlsx | 树图用精简复位表 |
crg_report.txt | PLL/架构说明 |
README_CRG_HANDOFF.txt | 交接说明 |
| 列名 | 别名 | 说明 |
|---|---|---|
| 子系统 | subsystem, 模块, block | 所属子系统(支持 Excel 合并单元格) |
| IP | ip, 模块名 | 所属 IP(可选) |
| 时钟复位需求 | signal, 信号名, name, 时钟/复位 | 信号名(如 core_clk) |
| 备注 | note, 频率, freq, remark | 频率、说明等(如 200MHz) |
<design>_crg.xlsx sheets| Sheet | 内容 |
|---|---|
top_info | design name / protocol / addr / design_hier…(可改) |
clk_gen | 全列(含 Clock source / Groups / ICG_* / DIV_*…) |
rst_gen | 全列(含 REG_NAME / SYNC / INOUT…) |
user_defined_reg | 空表头,填寄存器 |
user_defined_intp | 空表头 |
user_code | 空表头 |
user_sdc | 空表头 |
Auto-filled: pad clocks get Clock source = source get_ports {name} and default Clock Groups0; test_mode / clk_gen_rst_n boilerplate rows are added.
Domain reset outputs default to SYNC=N (CRG does source combining only; sync release is not in CRG). Do not flip this to SYNC=Y just to simplify integration.
# both formats
python3 crg-design-gen/scripts/tree_main.py path/to/clock_design.xlsx
# one format
python3 crg-design-gen/scripts/tree_main.py path/to/clock_design.xlsx clock_tree.drawio
python3 crg-design-gen/scripts/tree_main.py path/to/reset_design.xlsx reset_tree.excalidraw
clock_design.xlsx / reset_design.xlsx (same source as the PRIMARY workbook)<input-stem>_diagram/ (MCP) or examples/output/ (CLI when no path is given)Table type is auto-detected: a SOFT_DFLT column means reset tree, otherwise clock tree.
| 列名 | 说明 | 示例 |
|---|---|---|
| NAME | 信号名 | core_clk |
| ATTR | input / internal / output / na | output |
| SRC0 | 父时钟 0 | pll_mux_clk |
| SRC1 | 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 |
| 文件 | 打开方式 |
|---|---|
*_tree.drawio | https://app.diagrams.net |
*_tree.excalidraw | https://excalidraw.com(直接拖入) |
| 入口 | 说明 |
|---|---|
scripts/design_main.py | 需求 → CRG 设计工作簿 + 精简设计表 |
scripts/tree_main.py | slim 设计表 → 图 |
scripts/crg_config_writer.py | 写 workbook 的库 |
# stage 1
python3 crg-design-gen/scripts/design_main.py \
crg-design-gen/examples/input/req_table_complex.xlsx output/
# stage 2
python3 crg-design-gen/scripts/tree_main.py output/clock_design.xlsx
python3 crg-design-gen/scripts/tree_main.py output/reset_design.xlsx
Edit and review <design>_crg.xlsx in place, including any register, RTL,
or SDC notes in its handoff sheets.
200MHz, 3Mhz, 20/25MHz_clk, _rst_n, …)pip install pandas openpyxl
For the MCP server:
pip install mcp
div ∈ [1, 64] from every pad clock|pad_freq / div - tgt_freq| / tgt_freq ≤ 5%PORESETn (or the first reset) is the input rootnTRST / nSRST stay independent inputsoutput with SRC0 = PORESETn| 类型 | 颜色 | 说明 |
|---|---|---|
| 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 | 软件控制节点 |
20/25MHz keep the first frequency as primary; the full string stays in NOTEtest_mode / clk_gen_rst_n inputs with no outgoing edges are hidden in diagramsexamples/input/clock_table.xlsx (opens in a new tab)examples/input/req_table_complex.xlsx (opens in a new tab)examples/input/reset_table.xlsx (opens in a new tab)examples/input/reset_table_complex.xlsx (opens in a new tab)examples/input/sub_clock_table.xlsx (opens in a new tab)examples/output/clock_tree.drawio (opens in a new tab)examples/output/clock_tree.excalidraw (opens in a new tab)examples/output/reset_tree.drawio (opens in a new tab)examples/output/reset_tree.excalidraw (opens in a new tab)examples/output/sub_clock_tree.drawio (opens in a new tab)examples/output/sub_clock_tree.excalidraw (opens in a new tab)mcp_server.py (opens in a new tab)scripts/__init__.py (opens in a new tab)scripts/crg_config_writer.py (opens in a new tab)scripts/design_main.py (opens in a new tab)scripts/excalidraw_renderer.py (opens in a new tab)scripts/graph.py (opens in a new tab)scripts/layout.py (opens in a new tab)scripts/parser.py (opens in a new tab)scripts/pll_recommender.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
crg, clock-reset-design, pll-report, topology-diagram, drawio, excalidraw
npx claudepluginhub siliconpeasant/vibe_soc --plugin vibe-soc13 skills in this plugin
/dft-genCheck DFT frontend readiness (test_mode/scan/test_rst hooks), generate DFT collateral under de/dft/, and package inputs for soc_dft (VC SpyGlass TestMAX). Exclusive skill of soc-dft-engineer.
/excel-yml-genGenerate YAML and Verilog register-file artifacts from a structured Excel register workbook. Use when the approved register source is an Excel sheet./gen-asic-memmap从 Excel memory map 生成芯片地址映射 YAML 与 C/SV sysmap header。Use when building SoC address map from a memmap workbook.Other plugins' skills for the same job