{"slug":"readable-verilog-edit","title":"readable-verilog-edit","summary":"Use when modifying, repairing or annotating existing Verilog. Start from real source, a requested behavior change, a diagnostic, or a failing waveform.","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-12-03T17:18:08.901296Z","repo":{"url":"https://github.com/Eriemon/verilog-generator","stars":348,"forks":23,"license":"Apache-2.0","updatedAt":"2026-12-03T15:34:41Z"},"bodyHtml":"<hr>\n<h2>name: readable-verilog-edit\ndescription: Use when modifying, repairing or annotating existing Verilog. Start from real source, a requested behavior change, a diagnostic, or a failing waveform.</h2>\n<h1>修改与修复已有 RTL</h1>\n<h2>定位和修改</h2>\n<p>对组合长路径、展开循环和深选择器做分级打拍时，读取<a href=\"../readable-verilog-pipeline/SKILL.md\">组合长路径流水化</a>。记录原版的采样边沿、已允许的延迟变化，并把数据与控制侧带一起交给验证。</p>\n<p>涉及<a href=\"../readable-verilog-fsm/SKILL.md\">状态机</a>时先记录原转移表和输出拍序；修改<a href=\"../readable-verilog-always/SKILL.md\">always 块</a>时列出各目标、触发沿和优先级，作为修改前后的比较依据。</p>\n<ol>\n<li>核对目标模块、源码编码、模块头、generate 层次、综合属性及上层连接。将故障写成可重放的条件，沿声明、写入、使用点找到首个偏离规格的赋值。</li>\n<li>检查位宽、符号、重叠驱动、缺省分支、级间有效位及同拍优先级。例如两个独立 <code>if</code> 可能使后一次非阻塞赋值覆盖复位；先确认复位优先，再改为 <code>if … else if</code>。</li>\n<li>做最小修改。保留原编码、无关分组、过程边界、位置绑定、显式初值和接口时序。不得为消告警翻转极性、拆过程、补零或加寄存器。改变握手或增加延迟时，将反例和拟变更的周期关系交<a href=\"../readable-verilog-spec/SKILL.md\">规格</a>确认。</li>\n<li>改名时列出“旧名 → 功能名 → 驱动与消费依据”。私有信号核对全部引用、层次探针和约束；公开端口/参数还需同步父实例具名关联、工程配置和 TB，保持位置语义。外部拼写已锁定时在边界映射；缺调用点则列出未核实范围。</li>\n</ol>\n<h2>注释和版本</h2>\n<p>按<a href=\"../readable-verilog-classify/SKILL.md\">代码分类</a>整理改动范围内的职责分组，检查每个 always 与其紧邻注释是否一一对应。</p>\n<ul>\n<li>正文与区域标题沿用 <code>comment_language</code>；独立请求未定时确认语言（默认 Chinese）。逐模块核对英中头、实际功能及依赖。保留版权、工具注释和历史；单语或短头按文档任务范围补齐。翻译保留参数值、单位、极性和采样沿。</li>\n<li>行为变化同步修订相应条件、延迟与范围说明。仅排版、翻译或补注释默认保留版本；兼容修正建议升次版本，接口、外部时序或架构重大变化建议升主版本。确认后两段同改版本、日期、历史。</li>\n</ul>\n<h2>按任务验收</h2>\n<p>修改 RTL 前同轮读取<a href=\"../readable-verilog-compact/SKILL.md\">代码压缩</a>。对本次修改的过程核对各条件分支和循环体的块边界、未命中路径及执行顺序。合并 case 或 if/else 分支时使用<a href=\"../readable-verilog-branch-simplify/SKILL.md\">分支化简</a>。优化关系判断、相等译码或计数阈值时使用<a href=\"../readable-verilog-compare-optimize/SKILL.md\">比较判断优化</a>。将原块、候选和等价前提交验证。</p>\n<ul>\n<li><strong>行为修复</strong>：对最终文件<a href=\"../readable-verilog-format/SKILL.md\">排版</a>、<a href=\"../readable-verilog-review/SKILL.md\">审查</a>，将最终源码和原失败激励交<a href=\"../readable-verilog-verify/SKILL.md\">验证</a>，重放失败及相邻正常情况。给出根因、改动位置、首个差异周期与复验结果。</li>\n<li><strong>仅注释</strong>：保留原件，只改指定实体的说明，跳过整文件排版。核对宏续行、综合指令、属性和 RTL token，运行 <code>&amp; $py -m verilog_generator comment-check $original $candidate</code>。要求 <code>code_unchanged</code>、<code>comments_changed</code> 同为真；未验证的预处理分支单列。</li>\n</ul>\n","files":[{"path":"scripts/edits/comments.py","sizeBytes":2089,"isText":true},{"path":"SKILL.md","sizeBytes":3616,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-12-03T17:19:32.255939Z","sha256":"FCFD54773D8B6A291B80675336A53F06DD512224A099E69E77680355D9BF1865","sizeBytes":3399},"review":null,"source":{"repositoryUrl":"https://github.com/Eriemon/verilog-generator","path":"skills/readable-verilog-edit","license":"Apache-2.0","commit":"4738a3c74a2b8a4fec46e6abef7abf66f3eaebea","subtreeSha":"1790B9340E1E7FBFF975466EA325A1067AE6738EB2FCD9C1C48F9AEEE3377A84","lastSyncedAt":"2026-12-03T17:18:07.377421Z"},"reviewedAt":"2026-12-03T17:22:35.047981Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/Eriemon/verilog-generator/tree/main/skills/readable-verilog-edit"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install eriemon-verilog-generator@llmmart"},{"target":"git","command":"git clone https://github.com/Eriemon/verilog-generator.git"}]}