一键导入
rtl-document
Generate Markdown docs for an RTL module (port/param/FSM tables, synth summary) — 'document this module', 'port table', 'refresh RTL docs'.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate Markdown docs for an RTL module (port/param/FSM tables, synth summary) — 'document this module', 'port table', 'refresh RTL docs'.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Read-only architecture review of RTL vs uArch spec with area/timing/power tradeoffs. Use for post-RTL architecture sign-off or suspected spec mismatch.
Builds Phase 3 SystemC TLM-2.0 bus functional models with AMBA (AXI/AHB/APB) support. Use for 'develop BFM', 'SystemC TLM model', 'bus functional model'.
Encoder RD evaluation of C ref model: BD-PSNR/BD-rate (VCEG-M33) across sequences/QPs — 'RD eval', 'BD-rate', codec algorithm quality comparison.
Validate spec contracts across phase boundaries (P3 uarch to P4 RTL to P5 verify): port widths, memory class, REQ traceability. Use at P4/P5 entry.
Internal reference: p1 spec research policy (agent-loaded; do not invoke).
Full 6-phase RTL pipeline from spec to verified design (P1 research through P6 design note). Triggers: 'design a chip', 'full pipeline', 'autopilot'.
| name | rtl-document |
| description | Generate Markdown docs for an RTL module (port/param/FSM tables, synth summary) — 'document this module', 'port table', 'refresh RTL docs'. |
| user-invocable | true |
| argument-hint | [module-name | --all] |
| allowed-tools | Bash, Read, Write, Edit, Task, Grep, Glob |
<Use_When>
<Do_Not_Use_When>
<Why_This_Exists> RTL documentation written by hand drifts from implementation. Auto-extraction from SV source keeps port tables, parameter lists, and instance trees accurate. The skill splits work between a deterministic parser (objective structure) and the LLM (functional description, FSM semantics, design rationale), making the contract surface explicit and regression-debuggable. </Why_This_Exists>
rtl/**/*.sv.syn/synth_report.txt for area/timing summary.If the prerequisite is missing: WARNING — recommend running /rtl-agent-team:rtl-p4-implement first. Proceed with available artifacts; the orchestrator adapts scope.
<Responsibility_Boundary>
<!-- LLM_FILL: ... --> markers in rendered output mark the contract surface. Replace each marker; never delete.
</Responsibility_Boundary>Apply steps 1-6 to every requested module. When --all is passed, fan out using one task per module in parallel.
<Tool_Usage> Manual-extraction fallback (when verible is unavailable):
Task(subagent_type="rtl-agent-team:rtl-explorer",
prompt="Document RTL module per skills/rtl-document/. Read rtl/{module}/{module}.sv, extract ports/parameters/instances/FSM, apply project naming conventions, and fill the LLM_FILL markers in docs/rtl/{module}.md.")
Synthesis summary:
Task(subagent_type="rtl-agent-team:synthesis-reporter",
prompt="Summarize syn/synth_report.txt and syn/timing_report.txt for the docs/rtl/{module}.md synthesis section.")
</Tool_Usage>
Small datapath module, no FSM, single clock domain. skills/rtl-document/examples/simple_fifo.md Port table only; FSM and D2 sections omitted by render_doc.py because the JSON has empty fsm_candidates and one instance or fewer. AXI-Stream bridge with two clock domains. skills/rtl-document/examples/axi_stream_bridge.md Ports grouped by AXI / APB; Clock Domains table lists both `sys` and `pixel`; D2 block diagram shows the async-FIFO bridge. FSM-heavy codec module with multiple sub-instances. skills/rtl-document/examples/cabac_encoder_excerpt.md FSM table with Mermaid `stateDiagram-v2`; D2 block diagram for the sub-instance tree; functional description references the relevant standard section.<Escalation_And_Stop_Conditions>
extract_module_doc.py returns SV parse error → report file:line; do not fabricate ports. Ask the user to fix the syntax first.fsm_candidates: []. Add an FSM section manually only when a state machine clearly exists and the state register is identifiable.data_i suffix) → record in convention_violations and surface the violation at the top of the generated doc. Do not rewrite the RTL.
</Escalation_And_Stop_Conditions>docs/rtl/{module}.md — per-module documentation./tmp/{module}.json — intermediate extraction (transient; not committed).<Final_Checklist>
docs/rtl/{module}.md exists for every requested module.i_/o_/io_ prefix; clock/reset rows tagged kind=clock|reset.UPPER_SNAKE_CASE.u_ prefix.<!-- LLM_FILL: ... --> markers replaced.syn/synth_report.txt exists.