AGENT SKILL

gen-module

Generate a Verilog module from a natural-language specification

License 许可
MIT
所属仓库
zhoujy22/chip-claw
最近更新
2026-06-15
Stars
★ 2
Forks
0

01 前言 Front Matter

name
gen-module
context
inline
description
Generate a Verilog module from a natural-language specification
user-invocable
true

03 SKILL.md 正文

User wants to generate an RTL module. Follow this workflow:

  1. Parse the specification from $ARGUMENTS
  2. Before designing the module, call rtl_knowledge_search with a query derived from the requested module type, interface protocol, clock/reset style, and verification needs. Include types: coding_rule, template, protocol, testbench, bug_pattern.
  3. Use the retrieved knowledge to design the module interface (ports, parameters) and summarize the micro-architecture.
  4. Write the Verilog implementation following CHIPCLAW.md and the retrieved coding rules/templates.
  5. Write a self-checking testbench with clock generation, reset sequence, stimulus, $display-based pass/fail checks, and $dumpfile/$dumpvars.
  6. Compile both files using rtl_compile to verify correctness.
  7. If compilation fails, call rtl_knowledge_search for relevant bug_pattern entries, fix the code, and re-compile. Repeat until clean or until the failure is clearly blocked.
  8. If rtl_simulate is available, run the testbench and fix any failing checks.

04 同仓库更多 Skills