一键导入
rtl-ip-instantiate
Generate convention-compliant SV wrapper for third-party IP (memory, PLL, PHY, DSP) — 'instantiate IP', 'IP wrapper', 'integrate third-party IP'.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate convention-compliant SV wrapper for third-party IP (memory, PLL, PHY, DSP) — 'instantiate IP', 'IP wrapper', 'integrate third-party IP'.
用 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-ip-instantiate |
| description | Generate convention-compliant SV wrapper for third-party IP (memory, PLL, PHY, DSP) — 'instantiate IP', 'IP wrapper', 'integrate third-party IP'. |
| user-invocable | true |
| argument-hint | [ip-name | path/to/ip-descriptor.xml] |
| allowed-tools | Bash, Read, Write, Edit, Task, Grep, Glob |
<Use_When>
<Do_Not_Use_When>
rtl-p5s-func-verify after this skill.
</Do_Not_Use_When><Why_This_Exists> IP instantiation is error-prone: wrong port widths, missing tie-offs, and parameter mismatches cause subtle bugs that survive lint. Automated wrapper generation from the authoritative IP descriptor eliminates transcription errors and documents every connection explicitly, making the mapping auditable. </Why_This_Exists>
docs/ip/{ip_name}.xml (IP-XACT) or equivalent datasheet.rtl/ip_wrappers/ (existing wrappers) or .claude/rules/rtl-coding-conventions.md.If missing: WARNING — halt and ask user for IP descriptor location before generating.
| Path | Role | |------|------| | `templates/ip-wrapper-template.sv` | SV wrapper scaffold with `u_` instance, `logic`-only ports, `// TIED:` and `// PARAM:` comment patterns. | | `scripts/gen_instantiation.py` | Deterministic wrapper skeleton generator: parses the vendor module header (ANSI ports/parameters, CamelCase/ALL-CAPS names allowed), emits a convention-compliant wrapper (`i_`/`o_`/`io_` prefixes, `clk`/`rst_n` naming, parameter pass-through with UPPER_SNAKE_CASE rename, `--tie PORT=VALUE[:reason]` tie-offs + documentation table). Stdlib-only. | | `references/ip-instantiate-conventions.md` | Port-prefix rules, vendor-to-project mapping table, tie-off/param comment format, anti-patterns. | | `examples/` | Worked example: `vendor_sram_2p/` (vendor 2-port SRAM stub + raw generated skeleton, regeneration-synced) and `sram_2p_wrapper/` (hand-tuned deliverable with clock merge, functional names, polarity adaptation, documented tie-offs). |<Responsibility_Boundary>
gen_instantiation.py) handle deterministic skeleton generation — vendor-name translation, parameter pass-through, tie-off scaffolding; lint validation (Verible + slang) runs via Bash CLI.// TIED: reason comment; no silent unconnected ports.
</Responsibility_Boundary>Apply steps 1-6 to every requested IP — do not stop after the first.
<Tool_Usage>
Task(subagent_type="rtl-agent-team:rtl-explorer",
prompt="Read rtl/ip_wrappers/ and docs/ for existing wrapper patterns. Summarise: "
"port naming convention (i_/o_/io_ prefixes), clock naming ({domain}_clk), "
"reset naming ({domain}_rst_n), instance naming (u_ prefix).")
Task(subagent_type="rtl-agent-team:rtl-architect",
prompt="Read IP descriptor at docs/ip/{ip_name}.xml (or datasheet). List all ports, "
"required tie-offs, and parameter settings. Design wrapper interface: map vendor "
"port names to project convention (i_/o_/io_ prefixes, {domain}_clk, {domain}_rst_n).")
Task(subagent_type="rtl-agent-team:rtl-coder",
prompt="Write rtl/ip_wrappers/{ip_name}_wrapper.sv. Instantiate {ip_name} as u_{ip_name} "
"with all ports connected per architect spec. Use logic only (no reg/wire). "
"Port prefixes: i_ input, o_ output, io_ bidirectional. "
"Clock: {domain}_clk, reset: {domain}_rst_n. "
"Tied ports: // TIED: reason. Parameters: // PARAM: description.")
</Tool_Usage>
SRAM IP with 32 vendor ports; IP-XACT at docs/ip/sram.xml; project uses AXI4-Lite. rtl-explorer confirms i_/o_ prefix style; rtl-architect maps vendor clk→sys_clk, rst_n→sys_rst_n, din→i_sram_din; rtl-coder writes wrapper with u_sram instance and logic types; lint passes. PLL IP with test-mode ports that must be tied off. All functional ports connected; test-mode ports tied to constants with `// TIED: unused test mode input` comments; parameter DATA_WIDTH documented with `// PARAM: AXI data bus width`. IP has port width mismatch — vendor provides 36-bit data bus, project interface is 32-bit. rtl-architect flags mismatch to user; wrapper generation halted pending user resolution decision; no auto-truncation performed.<Escalation_And_Stop_Conditions>
rtl/ip_wrappers/{ip_name}_wrapper.sv — convention-compliant wrapper module.<Final_Checklist>
// TIED: reason comments.i_/o_/io_ prefixes (NOT _i/_o suffix).clk or {domain}_clk naming (NOT clk_i).rst_n or {domain}_rst_n naming (NOT rst_ni).u_ prefix (e.g., u_{ip_name}).logic types only — no reg/wire.// PARAM: comments.rtl/ip_wrappers/{ip_name}_wrapper.sv.
</Final_Checklist>