RTL-Interact:训练面向多任务 RTL 设计的 EDA 交互模型

arXiv cs.AI 论文

摘要

RTL-Interact 是一种多任务后训练框架,用于训练单个专精于 RTL 的大语言模型,使其能够生成 RTL、构建 EDA 检查并利用工具反馈修改设计,同时结合模式感知策略优化(PAPO)进行多任务强化学习。在 CVDP 上,RTL-Interact-32B 的加权 Pass@1 达到 48.7%,Pass@5 达到 68.9%(超越 DeepSeek-V3.2),而 PAPO 将平均工具调用次数减少了 63.8%,且这些模型在 VerilogEval v2 和 RTLLM v2 上的表现优于专精于 RTL 的基线模型。

arXiv:2610.41225v1 Announce Type: new Abstract: Large language models offer a promising route to register-transfer-level (RTL) design, but reliable implementations require checking and revision based on electronic design automation (EDA) tools' feedback. Existing RTL-specialized models often lack learned interaction with such EDA tools or rely on separate generation and repair components. We introduce RTL-Interact, a multi-task post-training framework that trains a single RTL-specialized model to generate RTL, construct task-appropriate EDA checks, and revise implementations using tool feedback. The framework combines automatically constructed multi-task demonstrations with staged supervision from chain-of-thought to tool-integrated reasoning. We further introduce Pattern-Aware Policy Optimization (PAPO) for multi-task reinforcement learning. PAPO augments Group Relative Policy Optimization with correctness-gated rewards that favor concise successful checking while rewarding effective revision, and uses task grouping to preserve coverage across objectives. On CVDP, RTL-Interact-32B achieves 48.7% weighted Pass@1 and 68.9% Pass@5, surpassing its teacher model, DeepSeek-V3.2, while RTL-Interact-8B achieves 44.9% weighted Pass@1. Additionally, we show that PAPO can reduce average tool calls by 63.8% while improving Pass@1. Both models also outperform all RTL-specialized baselines on VerilogEval v2 and RTLLM v2, demonstrating the effectiveness of our method.
查看原文
查看缓存全文

缓存时间: 2026/11/03 09:36

# Training EDA-InteractiveModels for Multi-Task RTL Design
Source: [https://arxiv.org/html/2610.41225](https://arxiv.org/html/2610.41225)
## RTL\-Interact: Training EDA\-Interactive Models for Multi\-Task RTL Design

Wenxuan Shi, Yaoyu Zhu, Di Huang, Chongxiao Li, Xiaoyun Zhang Muxin Song, Yutong Wu, Ziyuan Nan, Pengwei Jin, Tian Zhi, Xishan Zhang Rui Zhang, Xing Hu, Zidong Du, Qi Guo, Yunji Chen Institute of Computing Technology, Chinese Academy of SciencesUniversity of Chinese Academy of SciencesShanghaiTech University

###### Abstract

Large language models offer a promising route to register\-transfer\-level \(RTL\) design, but reliable implementations require checking and revision based on electronic design automation \(EDA\) tools’ feedback\. Existing RTL\-specialized models often lack learned interaction with such EDA tools or rely on separate generation and repair components\. We introduceRTL\-Interact, a multi\-task post\-training framework that trains a single RTL\-specialized model to generate RTL, construct task\-appropriate EDA checks, and revise implementations using tool feedback\. The framework combines automatically constructed multi\-task demonstrations with staged supervision from chain\-of\-thought to tool\-integrated reasoning\. We further introduce Pattern\-Aware Policy Optimization \(PAPO\) for multi\-task reinforcement learning\. PAPO augments Group Relative Policy Optimization with correctness\-gated rewards that favor concise successful checking while rewarding effective revision, and uses task grouping to preserve coverage across objectives\. On CVDP, RTL\-Interact\-32B achieves 48\.7% weighted Pass@1 and 68\.9% Pass@5, surpassing its teacher model, DeepSeek\-V3\.2, while RTL\-Interact\-8B achieves 44\.9% weighted Pass@1\. Additionally, we show that PAPO can reduce average tool calls by 63\.8% while improving Pass@1\. Both models also outperform all RTL\-specialized baselines on VerilogEval v2 and RTLLM v2, demonstrating the effectiveness of our method\.

## 1Introduction

Figure 1:Representative solution processes of \(a\) RTL generation models, such as RTL\-Coder\([Liu et al\., 2023b](https://arxiv.org/html/2610.41225#bib.bib14)\); \(b\) RTL reasoning models, such as CodeV\-R1\([Zhu et al\., 2025](https://arxiv.org/html/2610.41225#bib.bib38)\); and \(c\) our EDA\-interactive RTL model\.Large language models \(LLMs\) offer a promising route to automating register\-transfer\-level \(RTL\) design\. Generating usable RTL requires not only syntactically valid code but also compliance with the functional requirements and implementation constraints stated in a specification\. Electronic design automation \(EDA\) tools provide feedback on whether candidate RTL compiles, behaves as intended in simulation, and meets task\-specific design objectives\. Such feedback allows a model to check and revise its design before submitting a solution\.

Existing RTL\-specialized models improve code generation through domain supervision or EDA\-derived training rewards, but do not explicitly learn to use EDA feedback to revise implementations during inference\([Liu et al\., 2023b](https://arxiv.org/html/2610.41225#bib.bib14);[Zhao et al\., 2024a](https://arxiv.org/html/2610.41225#bib.bib35);[Zhu et al\., 2025](https://arxiv.org/html/2610.41225#bib.bib38)\)\. Tool\-assisted workflows organize generation, checking, and revision through prompting and agent coordination, but rely on the underlying models’ existing RTL generation and repair capabilities\([Thakur et al\., 2023](https://arxiv.org/html/2610.41225#bib.bib27);[Zhao et al\., 2024b](https://arxiv.org/html/2610.41225#bib.bib36)\)\. Other approaches train models to revise RTL using EDA feedback, but require separate generation and repair adapters or cooperating models, adding deployment and coordination complexity\([Cui et al\., 2024](https://arxiv.org/html/2610.41225#bib.bib4);[Yu et al\., 2026](https://arxiv.org/html/2610.41225#bib.bib34)\)\. These limitations motivate training a single RTL\-specialized model for both RTL generation and feedback\-based revision, without separate adapters or cooperating models\. Figure[1](https://arxiv.org/html/2610.41225#S1.F1)contrasts the solution processes of RTL generation and RTL reasoning models with those of EDA\-interactive RTL models\. Achieving this across multiple RTL tasks requires learning task\-appropriate checks and effective revisions while avoiding redundant tool calls\.

To this end, we proposeRTL\-Interact, a post\-training framework for training a single RTL\-specialized model to generate RTL, construct task\-appropriate EDA checks, and revise candidate implementations using EDA feedback\. The framework consists of multi\-task data construction, CoT\-to\-TIR staged supervision, and reinforcement learning \(RL\) with pattern\-aware policy optimization\. Starting from the specification\-RTL pairs in the open\-source dataset, we automatically construct tasks with different code contexts and design objectives, then generate and filter teacher demonstrations using task\-specific checks\. Each tool\-interaction demonstration records the teacher’s candidate implementations, EDA requests, returned feedback, subsequent revisions, and final implementation\.

To develop both RTL reasoning and effective use of EDA feedback, we apply CoT\-to\-TIR staged supervision to improve RTL generation and revision using EDA feedback within the same model\. Tool\-free chain\-of\-thought \(CoT\) examples and tool\-integrated reasoning \(TIR\) demonstrations supervise different solution processes, making their organization an important training choice\. We first train on CoT examples from the open\-source dataset, covering RTL syntax, hardware semantics, and reasoning from specifications to implementations\. We then train on multi\-task TIR demonstrations to teach the model to construct EDA requests and use the returned feedback\. At a matched template\-token budget, this staged approach improves CVDP\([Pinckney et al\., 2025](https://arxiv.org/html/2610.41225#bib.bib23)\)Pass@1 by 1\.0% over TIR\-only supervision\. Separate evaluations also show improvements in both RTL generation and revision using EDA feedback over CoT\-only supervision\.

Multi\-task RL further optimizes these behaviors through interaction with the EDA environment\. A reward based only on final correctness does not distinguish how a correct implementation was checked and revised\. We introduce Pattern\-Aware Policy Optimization \(PAPO\), which incorporates correctness\-gated rewards for EDA\-checking patterns and task grouping into Group Relative Policy Optimization \(GRPO\)\([Shao et al\., 2024](https://arxiv.org/html/2610.41225#bib.bib26)\)\. For solutions that pass final verification, the reward favors concise, successful checking while retaining positive rewards for successful revision\. To maintain training coverage across different objectives, task grouping keeps prescribed task\-group proportions among the samples retained for each policy update\. Across the full RL stage, the 8B model improves CVDP Pass@1 by 5\.4% while reducing the average number of tool calls by 63\.8%\.

On CVDP, RTL\-Interact\-32B surpasses its tool\-enabled teacher, DeepSeek\-V3\.2, achieving 48\.7% weighted Pass@1\. RTL\-Interact\-8B achieves 44\.9%, with both models outperforming other RTL\-specialized models of comparable size\. These gains extend to VerilogEval v2\([Liu et al\., 2023a](https://arxiv.org/html/2610.41225#bib.bib12);[Pinckney et al\., 2024](https://arxiv.org/html/2610.41225#bib.bib22)\)and RTLLM v2, where both model sizes outperform other RTL\-specialized baselines in Pass@1 across code completion and specification\-to\-RTL tasks\.

Our contributions are as follows:

- •We develop a multi\-task post\-training framework that uses task\-specific teacher demonstrations and CoT\-to\-TIR staged supervision to train a single RTL\-specialized model for RTL generation and revision using EDA feedback\.
- •We introduce PAPO, which incorporates correctness\-gated rewards for EDA\-checking patterns and task grouping into GRPO to improve multi\-task RTL performance with fewer tool calls and shorter response length, achieving joint gains in both RTL correctness and EDA interaction efficiency\.
- •Our RTL\-Interact\-32B achieves 48\.7% Pass@1 and 68\.9% Pass@5 on CVDP, surpassing its teacher model DeepSeek\-V3\.2 on both metrics\. Our models also outperform all RTL\-specialized baselines with large gains in Pass@1 on VerilogEval v2 and RTLLM v2\. We will release both models, together with the training data and code\.

## 2Related Work

#### RTL generation model training\.

RTLCoder and CodeV use domain data and supervised fine\-tuning; BetterV adds discriminative guidance, and CraftRTL constructs synthetic data and repair examples\([Liu et al\., 2023b](https://arxiv.org/html/2610.41225#bib.bib14);[Zhao et al\., 2024a](https://arxiv.org/html/2610.41225#bib.bib35);[Pei et al\., 2024](https://arxiv.org/html/2610.41225#bib.bib21);[Liu et al\., 2024a](https://arxiv.org/html/2610.41225#bib.bib13)\)\. CodeV\-R1 combines reasoning distillation with testbench\-based verifiable rewards, while ChipSeek uses hierarchical EDA\-derived rewards to optimize functional correctness and hardware efficiency\([Zhu et al\., 2025](https://arxiv.org/html/2610.41225#bib.bib38);[Chen et al\., 2026b](https://arxiv.org/html/2610.41225#bib.bib3)\)\. These methods primarily use EDA tools to evaluate generated designs\. OurRTL\-Interactinstead learns to use EDA tools during inference to check and revise candidates based on feedback before returning the final RTL, thereby improving RTL task performance\.

#### Tool\-assisted RTL agents and workflows\.

AutoChip organizes iterative generation using compilation and simulation feedback, while RTLFixer combines interactive repair with retrieved guidance\([Thakur et al\., 2023](https://arxiv.org/html/2610.41225#bib.bib27);[Tsai et al\., 2023](https://arxiv.org/html/2610.41225#bib.bib28)\)\. MAGE, VerilogCoder, and LocalV organize generation and debugging through role coordination, graph\-based planning, and information locality, respectively\([Zhao et al\., 2024b](https://arxiv.org/html/2610.41225#bib.bib36);[Ho et al\., 2025](https://arxiv.org/html/2610.41225#bib.bib10);[Lyu et al\., 2026](https://arxiv.org/html/2610.41225#bib.bib17)\)\. ACE\-RTL combines a specialized generator with a general\-purpose reflector\([Deng et al\., 2026](https://arxiv.org/html/2610.41225#bib.bib6)\)\. These approaches primarily organize model capabilities through inference\-time prompting and workflow design\. OurRTL\-Interactinstead strengthens the model’s own ability to generate RTL and revise it using EDA feedback through domain\-specific training, complementing these inference\-time approaches\.

#### Training for tool interaction\.

ReAct interleaves reasoning and actions through prompting and trajectory fine\-tuning, Toolformer learns API use through self\-supervision, and ToRA trains reasoning models on tool\-interaction trajectories\([Yao et al\., 2023](https://arxiv.org/html/2610.41225#bib.bib32);[Schick et al\., 2023](https://arxiv.org/html/2610.41225#bib.bib25);[Gou et al\., 2023](https://arxiv.org/html/2610.41225#bib.bib8)\)\. Within RTL design, OriGen trains separate generation and repair adapters to correct compilation errors, while ChipMATE jointly trains Verilog and Python reference\-model agents for cross\-verification\([Cui et al\., 2024](https://arxiv.org/html/2610.41225#bib.bib4);[Yu et al\., 2026](https://arxiv.org/html/2610.41225#bib.bib34)\)\. These methods learn feedback\-based correction around compiler diagnostics or cross\-language behavioral comparison\. OurRTL\-Interactinstead trains a single model to construct task\-appropriate EDA checks and revise RTL using their feedback across functional and optimization tasks, reducing the deployment overhead for multiple models or adapters\.

## 3Method

### 3\.1Task Formulation and EDA Environment

A taskxxspecifies hardware behavior and may include partial RTL or an existing design\. A policyπθ\\pi\_\{\\theta\}produces final RTLyythrough a trajectoryτ=\(z0,a0,o0,…,zL,y\)\\tau=\(z\_\{0\},a\_\{0\},o\_\{0\},\\ldots,z\_\{L\},y\)withLLtool requests, wherezℓz\_\{\\ell\},aℓa\_\{\\ell\}, andoℓo\_\{\\ell\}denote model\-generated reasoning, tool requests, and environment observations\. Each request specifies a tool and arguments\. The policy conditions on the task and history to reason, request checks, or return RTL satisfying the requirements and implementation constraints\. With no requests, this reduces to direct RTL generation\. Hereℓ\\ellindexes interactions, not tokens\.

The environment exposes simulation, lint\-checking, synthesis\-analysis, and simulation\-based equivalence\-checking interfaces \(Appendix[A](https://arxiv.org/html/2610.41225#A1), Table[6](https://arxiv.org/html/2610.41225#A1.T6)\)\. Icarus Verilog, Verilator, and Yosys provide compilation/simulation, lint\-checking, and synthesis functions\([Icarus Verilog Contributors, 2026](https://arxiv.org/html/2610.41225#bib.bib11);[Verilator Contributors, 2026](https://arxiv.org/html/2610.41225#bib.bib29);[YosysHQ, 2026](https://arxiv.org/html/2610.41225#bib.bib33)\)\. Simulation\-based equivalence checking \(hereafter equivalence checking\) uses CodeV\-R1’s rule\-based testbench generator to compare candidate and reference outputs under shared stimuli\([Zhu et al\., 2025](https://arxiv.org/html/2610.41225#bib.bib38)\)\. These testbenches serve only equivalence checking and are distinct from model\-authored simulation testbenches\. Testbenches and execution logs used for independent final verification are not supplied as model context\.

Figure 2:Overview ofRTL\-Interact: \(a\) multi\-task TIR data construction and RL task selection starting from the CoT dataset; \(b\) CoT\-to\-TIR staged supervision; and \(c\) PAPO with pattern\-aware trajectory rewards and task grouping\. Reward bars are schematic; incorrect final RTL receives zero reward\.
### 3\.2Multi\-Task Data Construction

Figure[2](https://arxiv.org/html/2610.41225#S3.F2)\(a\) summarizes data construction\. We use the open\-source CodeV\-R1\-dataset\([Zhu et al\., 2025](https://arxiv.org/html/2610.41225#bib.bib38)\)for CoT supervision and its specification–RTL pairs as the source for multi\-task TIR data\. We use DeepSeek\-V3\.2 as the teacher for quality scoring and TIR trajectory distillation\. The teacher scores pairs along four dimensions: specification–implementation alignment, hardware\-semantic precision, behavioral reasoning value, and the ability to derive discriminating checks\. Pairs above the quality threshold form a shared source pool \(scoring prompt and threshold in Appendix[A\.1](https://arxiv.org/html/2610.41225#A1.SS1)\)\. Each distilled trajectory retains the teacher’s reasoning, tool requests, actual observations, subsequent revisions, and final RTL\. Below, we describe the data construction and trajectory acceptance criteria for each task\.

#### Generation: constructing an implementation from a specification\.

Given a specification, the teacher writes candidate RTL and a simulation testbench, then uses simulation diagnostics to revise the design as needed\. We retain trajectories whose final RTL passes the teacher\-authored testbench and is synthesizable by Yosys\.

#### Completion: recovering logic in an existing design\.

An LLM identifies core logic in the reference RTL, which we mask while retaining the surrounding design and interfaces as context\. The teacher fills in the missing logic, checks the completed design through the simulation interface, and revises it using the returned feedback\. We retain a trajectory only if its final RTL passes equivalence checking against the unmasked reference RTL, using the checker described in Section[3\.1](https://arxiv.org/html/2610.41225#S3.SS1)\. Generation and completion thus share a simulation interface but impose different implementation constraints\.

#### Optimization: improving a design while preserving its behavior\.

We run EDA checks on the reference designs in the shared source pool and select those with lint warnings or relatively high synthesis\-based implementation costs\. These designs define tasks with explicit lint or implementation\-metric objectives\. The teacher iteratively modifies each design using the corresponding diagnostics and equivalence\-checking feedback\. We retain a trajectory only if its final RTL passes equivalence checking against the original design and meets the requested improvement: making a non\-clean design lint\-clean, or exceeding the prescribed improvement threshold for the target synthesis\-based PPA proxy\. These task\-specific acceptance criteria yield 13,480 TIR trajectories\. Appendix[A\.1](https://arxiv.org/html/2610.41225#A1.SS1)provides further data details\.

#### RL task selection\.

Let𝒟TIR\\mathcal\{D\}\_\{\\mathrm\{TIR\}\}denote the task pool corresponding to the retained TIR demonstrations\. We sample five attempts per task using the two\-stage SFT model and letcSFT​\(x\)∈\{0,…,5\}c\_\{\\mathrm\{SFT\}\}\(x\)\\in\\\{0,\\ldots,5\\\}count successful attempts\. Functional correctness is checked by comparing the student’s final RTL against the reference RTL with the same equivalence checker used for completion and optimization data\. Optimization success additionally requires the specified improvement\. We exclude tasks solved in all five attempts:

𝒟RL=\{x∈𝒟TIR:cSFT​\(x\)<5\}\.\\mathcal\{D\}\_\{\\mathrm\{RL\}\}=\\\{x\\in\\mathcal\{D\}\_\{\\mathrm\{TIR\}\}:c\_\{\\mathrm\{SFT\}\}\(x\)<5\\\}\.\(1\)This retains approximately 8K tasks for fresh policy rollouts, excluding tasks already solved consistently by the student\.

### 3\.3Staged Supervision for a Single Policy

Table 1:Controlled CoT/TIR supervision on 8B\. Tool use is the share of trajectories containing a tool request; Avg\. tool turn is the mean number of tool\-call turns in trajectories\. Token counts denote the total number of chat\-template tokens processed across all training epochs; for sequential configurations, the budget is shared across both stages\.ConfigurationEpochsCVDPP@1 \(%\)TooluseAvg\.tool turnBase model017\.21\.6%0\.0CoT \(450M tokens\)323\.80\.0%0\.0TIR \(450M tokens\)324\.896\.0%4\.0CoT \(900M tokens\)326\.50\.0%0\.0TIR \(900M tokens\)328\.598\.0%3\.7Naive mix \(900M tokens\)328\.279\.8%2\.7TIR→\\rightarrowCoT \(900M tokens\)325\.50\.0%0\.0CoT→\\rightarrowTIR \(900M tokens\)329\.597\.4%4\.3

We use CoT\-to\-TIR staged supervision \(Figure[2](https://arxiv.org/html/2610.41225#S3.F2)\(b\)\)\. The CoT stage reinforces RTL syntax, hardware knowledge, and reasoning from specifications to implementations through direct specification–reasoning–code examples\. Building on this initialization, TIR supervision teaches the same model to construct EDA requests and use the returned feedback to check and revise its implementation\.

Table[1](https://arxiv.org/html/2610.41225#S3.T1)compares supervision configurations at matched template\-token budgets\. The total budgets are 450M or 900M chat\-template tokens across all training epochs\. For the 900M\-token mixed and sequential configurations, CoT and TIR each contribute 450M tokens; sequential configurations differ only in stage order\. CoT→\\toTIR yields 97\.4% tool use, versus 0\.0% for TIR→\\toCoT, supporting this order for retaining tool\-use behavior\. At the same 900M\-token budget, CoT→\\toTIR reaches 29\.5% Pass@1, exceeding TIR\-only training \(28\.5%\) and naive CoT/TIR mixing \(28\.2%\)\. These results support CoT\-to\-TIR staged supervision for direct RTL generation and feedback\-guided revision; Section[4\.4](https://arxiv.org/html/2610.41225#S4.SS4)evaluates both abilities separately using the full\-data checkpoints\.

### 3\.4Pattern\-Aware Policy Optimization

We introduce Pattern\-Aware Policy Optimization \(PAPO\) to distinguish trajectories with the same final correctness but different EDA\-checking histories\. Here, a checking pattern characterizes whether a trajectory succeeds on its first check, succeeds after feedback\-driven revision, or lacks a successful task\-appropriate check\. Starting from the two\-stage SFT model, PAPO combines correctness\-gated, pattern\-conditioned rewards with task\-grouped policy updates within GRPO\([Shao et al\., 2024](https://arxiv.org/html/2610.41225#bib.bib26)\)\(Figure[2](https://arxiv.org/html/2610.41225#S3.F2)\(c\)\)\.

At updatekk, letℬkF\\mathcal\{B\}\_\{k\}^\{\\mathrm\{F\}\}andℬkO\\mathcal\{B\}\_\{k\}^\{\\mathrm\{O\}\}contain the retained generation/completion and optimization trajectories, respectively\. For trajectoryτi\\tau\_\{i\}sampled for taskxix\_\{i\}, PAPO uses the following objective and reward:

𝒥PAPO​\(θ\)=∑g∈\{F,O\}ωg,k\|ℬkg\|∑i∈ℬkg⏟task\-grouped updates​1\|ℳi\|​∑t∈ℳici,t​min⁡\{ρi,t​A^i,clip⁡\(ρi,t,1−ε−,1\+ε\+\)​A^i\},\\mathcal\{J\}\_\{\\mathrm\{PAPO\}\}\(\\theta\)=\\underbrace\{\\sum\_\{g\\in\\\{\\mathrm\{F\},\\mathrm\{O\}\\\}\}\\frac\{\\omega\_\{g,k\}\}\{\|\\mathcal\{B\}\_\{k\}^\{g\}\|\}\\sum\_\{i\\in\\mathcal\{B\}\_\{k\}^\{g\}\}\}\_\{\\text\{task\-grouped updates\}\}\\frac\{1\}\{\|\\mathcal\{M\}\_\{i\}\|\}\\sum\_\{t\\in\\mathcal\{M\}\_\{i\}\}c\_\{i,t\}\\min\\\!\\left\\\{\\rho\_\{i,t\}\\widehat\{A\}\_\{i\},\\;\\operatorname\{clip\}\\\!\\left\(\\rho\_\{i,t\},1\-\\varepsilon\_\{\-\},1\+\\varepsilon\_\{\+\}\\right\)\\widehat\{A\}\_\{i\}\\right\\\},\(2\)A^i=Rxi​\(τi\)−R¯xiσxi\+ϵ,Rx​\(τ\)=Vx​\(y\)​\[1\+δpx​\(τ\)\]⏟correctness\-gated,pattern\-conditioned reward\.\\widehat\{A\}\_\{i\}=\\frac\{R\_\{x\_\{i\}\}\(\\tau\_\{i\}\)\-\\bar\{R\}\_\{x\_\{i\}\}\}\{\\sigma\_\{x\_\{i\}\}\+\\epsilon\},\\qquad R\_\{x\}\(\\tau\)=\\underbrace\{V\_\{x\}\(y\)\\left\[1\+\\delta\_\{p\_\{x\}\(\\tau\)\}\\right\]\}\_\{\\begin\{subarray\}\{c\}\\text\{correctness\-gated,\}\\\\ \\text\{pattern\-conditioned reward\}\\end\{subarray\}\}\.\(3\)Equation \([3](https://arxiv.org/html/2610.41225#S3.E3)\) connects the checking pattern to the advantage used in Equation \([2](https://arxiv.org/html/2610.41225#S3.E2)\)\. Definitions of the standard policy\-update quantities are provided in Appendix[A\.2](https://arxiv.org/html/2610.41225#A1.SS2)\.

#### Pattern\-aware trajectory rewards\.

Binary final\-correctness rewards cannot distinguish EDA\-checking histories\. We therefore condition rewards on the EDA\-checking patternpx​\(τ\)p\_\{x\}\(\\tau\)through adjustmentδpx​\(τ\)\\delta\_\{p\_\{x\}\(\\tau\)\}, gated by final verification \(Equation \([3](https://arxiv.org/html/2610.41225#S3.E3)\)\)\. A checking round comprises the checks needed to assess a candidate against its task objective\.*Immediate Self\-check Resolution \(ISR\)*succeeds in one task\-appropriate checking round;*Feedback\-driven Refinement Success \(FRS\)*uses multiple checking rounds and ends with a successful self\-check;*Unsuccessful Self\-checking \(US\)*covers missing, incomplete, or unsuccessful final checks\. Self\-check success is distinct from independent final verification\. Independent final verification requires functional correctness against the reference and any specified optimization improvement forVx​\(y\)=1V\_\{x\}\(y\)=1; otherwise reward is zero\. These rewards distinguish EDA\-checking histories among final\-correct solutions, favoring concise successful checking while retaining positive rewards for successful revision\. Appendix[B](https://arxiv.org/html/2610.41225#A2)gives matching rules and reward values\.

#### Task grouping\.

Random sampling from the imbalanced RL pool may bias training toward more frequent task types\. We therefore use task grouping to maintain prescribed proportions among the retained trajectories in each update, continuing sampling until each group meets its quota\. Generation and completion share a functional\-correctness objective and a simulation interface; optimization adds an improvement objective and uses synthesis\-analysis and equivalence\-checking interfaces\. Sampling quotas keep the retained optimization shareαk=\|ℬkO\|/\(\|ℬkF\|\+\|ℬkO\|\)\\alpha\_\{k\}=\|\\mathcal\{B\}\_\{k\}^\{\\mathrm\{O\}\}\|/\(\|\\mathcal\{B\}\_\{k\}^\{\\mathrm\{F\}\}\|\+\|\\mathcal\{B\}\_\{k\}^\{\\mathrm\{O\}\}\|\)near the targetα\\alpha, up to integer rounding\. In Equation \([2](https://arxiv.org/html/2610.41225#S3.E2)\),ωF,k=1−αk\\omega\_\{\\mathrm\{F\},k\}=1\-\\alpha\_\{k\}andωO,k=αk\\omega\_\{\\mathrm\{O\},k\}=\\alpha\_\{k\}express these sample proportions in the batch average; they are not applied again\.

## 4Experiments

Table 2:CVDP non\-agentic code\-generation results \(%\)\. Entries are Pass@1/Pass@5; Overall is weighted by category size\. Size denotes total model parameters; – indicates undisclosed size\. Tool marks whether EDA tools are available\. Best and second\-best results for each metric are shown inboldandunderlined, respectively; ties share the same formatting\.†\\daggermarks the tool\-using distillation teacher; ChipMATE uses its V\+P cross\-verification workflow\.ModelSizeToolOverallCID002CID003CID004CID007CID016*General\-purpose frontier models*Claude\-Sonnet\-4\.5–✗46\.6/59\.644\.3/53\.248\.2/61\.549\.1/60\.039\.5/62\.553\.7/68\.6✓51\.5/63\.646\.8/55\.356\.9/66\.754\.2/61\.843\.5/70\.057\.1/74\.3GPT\-5\.2–✗41\.5/57\.636\.6/50\.045\.1/57\.742\.9/61\.835\.0/57\.552\.0/71\.4✓51\.5/63\.942\.8/55\.351\.8/61\.550\.9/61\.863\.5/82\.561\.7/74\.3GLM\-4\.7355B✗40\.1/61\.337\.7/56\.438\.2/62\.834\.9/50\.937\.0/65\.062\.3/82\.9✓41\.5/62\.338\.7/57\.444\.9/66\.738\.5/56\.436\.0/57\.552\.6/80\.0LongCat\-Flash\-Thinking560B✗38\.1/57\.034\.7/51\.138\.5/60\.333\.5/49\.133\.5/60\.058\.9/74\.3✓39\.5/58\.633\.0/50\.043\.3/60\.334\.9/54\.538\.0/67\.557\.1/74\.3MiniMax\-M2\.1230B✗33\.3/53\.629\.8/50\.039\.0/60\.334\.5/56\.421\.0/40\.042\.3/60\.0✓37\.9/56\.334\.9/53\.242\.8/57\.736\.4/56\.432\.5/57\.543\.4/60\.0Qwen3\-Max\-Preview–✗34\.6/46\.429\.8/40\.441\.0/53\.834\.2/43\.624\.5/40\.045\.7/57\.1✓33\.7/49\.029\.4/40\.439\.2/55\.130\.5/40\.028\.5/52\.544\.0/68\.6Gemini\-2\.5\-Pro–✗39\.1/57\.935\.7/52\.136\.9/55\.135\.6/56\.432\.0/57\.566\.3/82\.9✓38\.2/57\.933\.2/46\.837\.9/60\.340\.0/61\.827\.5/52\.561\.7/82\.9*RTL\-specialized models*CodeV\-R1\([Zhu et al\., 2025](https://arxiv.org/html/2610.41225#bib.bib38)\)7B✗31\.7/46\.432\.3/47\.942\.3/59\.029\.1/45\.517\.0/25\.026\.9/40\.0✓23\.2/42\.720\.9/40\.434\.6/53\.827\.3/50\.98\.0/22\.515\.4/34\.3ChipSeek\-R1\([Chen et al\., 2026b](https://arxiv.org/html/2610.41225#bib.bib3)\)7B✗20\.4/33\.120\.4/31\.927\.7/39\.720\.0/36\.414\.0/25\.012\.0/25\.7✓21\.5/32\.821\.5/29\.827\.7/42\.324\.4/40\.015\.0/22\.510\.9/20\.0SiliconMind\-V1\([Chen et al\., 2026a](https://arxiv.org/html/2610.41225#bib.bib2)\)8B✗33\.7/51\.330\.6/46\.841\.5/59\.033\.5/54\.522\.0/35\.038\.3/60\.0✓33\.7/52\.031\.3/46\.840\.5/59\.034\.9/52\.722\.0/40\.036\.6/62\.9InCoder\([Yang et al\., 2026](https://arxiv.org/html/2610.41225#bib.bib31)\)32B✗24\.4/46\.025\.1/45\.724\.4/48\.727\.3/41\.814\.0/32\.529\.7/62\.9✓28\.1/47\.730\.0/47\.931\.0/53\.828\.7/47\.316\.0/30\.029\.1/54\.3ChipMATE\([Yu et al\., 2026](https://arxiv.org/html/2610.41225#bib.bib34)\)V: 9BP: 9B✓23\.8/36\.123\.8/33\.030\.3/43\.624\.4/38\.214\.5/25\.019\.4/37\.1*Distillation teacher*DeepSeek\-V3\.2†671B✗36\.8/57\.334\.5/54\.338\.7/60\.336\.4/49\.132\.0/57\.545\.1/71\.4✓46\.7/65\.238\.5/55\.348\.2/64\.144\.4/65\.560\.0/80\.053\.7/77\.1*Our models*Qwen3 \(base\)8B✗18\.9/36\.114\.3/30\.917\.4/34\.622\.9/38\.218\.5/37\.529\.1/48\.6RTL\-Interact \(SFT\)8B✓39\.5/60\.633\.6/48\.946\.2/64\.137\.1/65\.544\.5/67\.538\.3/68\.6RTL\-Interact \(RL\)8B✓44\.9/63\.237\.0/56\.447\.7/61\.546\.5/65\.552\.5/77\.548\.6/65\.7Qwen3 \(base\)32B✗27\.2/47\.722\.8/41\.531\.5/47\.428\.0/49\.126\.5/52\.529\.1/57\.1RTL\-Interact \(SFT\)32B✓42\.5/64\.638\.9/57\.445\.1/61\.539\.6/63\.644\.5/82\.548\.0/71\.4RTL\-Interact \(RL\)32B✓48\.7/68\.940\.6/60\.650\.5/65\.448\.0/69\.156\.0/80\.058\.9/85\.7

This section aims to answer the following research questions:

RQ1 \(Overall Performance\):How effective is the RTL\-Interact training framework across RTL benchmarks?

RQ2 \(PAPO Ablation\):Do pattern\-aware rewards and task grouping improve RTL performance?

RQ3 \(Training Stages\):How do the training stages affect RTL generation and feedback\-guided revision?

RQ4 \(Interaction Efficiency\):How does RL change tool use and response length?

### 4\.1Evaluation Setup

#### Benchmarks\.

We use CVDP’s non\-agentic split\([Pinckney et al\., 2025](https://arxiv.org/html/2610.41225#bib.bib23)\): 302 problems covering completion, specification\-to\-RTL, modification, optimization, and debugging\. VerilogEval v2\([Liu et al\., 2023a](https://arxiv.org/html/2610.41225#bib.bib12);[Pinckney et al\., 2024](https://arxiv.org/html/2610.41225#bib.bib22)\)provides 156 problems each for code completion \(CC\) and specification\-to\-RTL \(SR\); RTLLM v2\([Lu et al\., 2024](https://arxiv.org/html/2610.41225#bib.bib16);[Liu et al\., 2024b](https://arxiv.org/html/2610.41225#bib.bib15)\)contains 50 specification\-to\-RTL tasks\.

#### Baselines\.

We select CodeV\-R1\-7B, ChipSeek\-R1\-Qwen2\.5, SiliconMind\-V1\-8B, and InCoder\-32B as RTL\-specialized baselines and include ChipMATE’s V\+P workflow on CVDP\. We include the DeepSeek\-V3\.2 teacher\([DeepSeek\-AI, 2025](https://arxiv.org/html/2610.41225#bib.bib5)\), Qwen3\-8B/32B bases\([Yang et al\., 2025](https://arxiv.org/html/2610.41225#bib.bib30)\), and our SFT checkpoints\. Table[2](https://arxiv.org/html/2610.41225#S4.T2)also compares seven general\-purpose frontier models selected around the teacher’s release; Appendix[A\.3](https://arxiv.org/html/2610.41225#A1.SS3.SSS0.Px2)lists them and their references\.

#### Evaluation protocol\.

Except for ChipMATE’s V\+P workflow, baselines are evaluated with and without the same EDA interfaces\. We use five responses per problem at temperature 0\.7 and top\-pp0\.95, reporting Pass@1/Pass@5 and category\-weighted CVDP scores\. All four RTL\-specialized baselines cover both tool settings and VerilogEval v2 splits\. ChipSeek uses the released Qwen2\.5 checkpoint under our shared protocol\. Further training and evaluation details are provided in Appendix[A](https://arxiv.org/html/2610.41225#A1)\.

### 4\.2Main Results \(RQ1\)

Table 3:VerilogEval v2 and RTLLM v2 results \(%\)\. CC and SR denote code completion and specification\-to\-RTL\. Tools indicate EDA\-tool availability\. Size denotes total model parameters\. Best and second\-best results in each metric areboldandunderlined; ties at displayed precision share formatting\.†\\daggermarks the distillation teacher\.VerilogEval v2 CCVerilogEval v2 SRRTLLM v2ModelSizeP@1P@5ToolsP@1P@5ToolsP@1/P@5Tools*RTL\-specialized models*CodeV\-R1\([Zhu et al\., 2025](https://arxiv.org/html/2610.41225#bib.bib38)\)7B54\.771\.2✗53\.367\.3✗64\.4/78\.0✗51\.073\.7✓63\.378\.2✓74\.4/82\.0✓ChipSeek\-R1\([Chen et al\., 2026b](https://arxiv.org/html/2610.41225#bib.bib3)\)7B64\.471\.2✗64\.571\.2✗74\.0/82\.0✗64\.770\.5✓54\.470\.5✓71\.2/76\.0✓SiliconMind\-V1\([Chen et al\., 2026a](https://arxiv.org/html/2610.41225#bib.bib2)\)8B69\.980\.1✗69\.280\.8✗70\.0/84\.0✗62\.780\.1✓64\.782\.7✓54\.8/76\.0✓InCoder\([Yang et al\., 2026](https://arxiv.org/html/2610.41225#bib.bib31)\)32B62\.273\.1✗61\.574\.4✗59\.2/76\.0✗62\.178\.2✓66\.078\.2✓66\.0/84\.0✓*Distillation teacher*DeepSeek\-V3\.2†671B76\.585\.9✗71\.585\.9✗75\.6/86\.0✗67\.984\.6✓78\.887\.8✓68\.8/82\.0✓*Our models*Qwen3 \(base\)8B46\.562\.8✗53\.769\.2✗45\.2/62\.0✗RTL\-Interact \(SFT\)8B73\.886\.5✓72\.484\.6✓76\.4/86\.0✓RTL\-Interact \(RL\)8B75\.483\.3✓75\.184\.6✓77\.6/86\.0✓Qwen3 \(base\)32B64\.077\.6✗70\.383\.3✗64\.4/80\.0✗RTL\-Interact \(SFT\)32B76\.786\.5✓72\.786\.5✓76\.0/88\.0✓RTL\-Interact \(RL\)32B80\.387\.2✓77\.286\.5✓77\.2/88\.0✓

RTL\-Interact\-32B surpasses its tool\-enabled distillation teacher on CVDP\.RTL\-Interact\-32B achieves 48\.7% Pass@1 and 68\.9% Pass@5, exceeding the tool\-enabled DeepSeek\-V3\.2 teacher by 2\.0% and 3\.7%, respectively \(Table[2](https://arxiv.org/html/2610.41225#S4.T2)\)\. It also achieves the highest overall CVDP Pass@5 among the compared models\. On VerilogEval v2 CC, the 32B model reaches 80\.3% Pass@1 and 87\.2% Pass@5, exceeding the teacher in both tool settings \(Table[3](https://arxiv.org/html/2610.41225#S4.T3)\)\.

Both RTL\-Interact model sizes outperform the evaluated RTL\-specialized baselines of comparable size in Pass@1 across all three benchmarks\.On CVDP, RTL\-Interact\-8B reaches 44\.9%/63\.2% Pass@1/Pass@5, exceeding the 7B–8B RTL\-specialized baselines, while the 32B model exceeds InCoder\-32B\. Both also lead their corresponding baselines on both VerilogEval v2 splits and RTLLM v2 \(Tables[2](https://arxiv.org/html/2610.41225#S4.T2)–[3](https://arxiv.org/html/2610.41225#S4.T3)\)\. The 32B model reaches 77\.2%/86\.5% Pass@1/Pass@5 on VerilogEval v2 SR\. On RTLLM v2, 8B and 32B reach 77\.6%/86\.0% and 77\.2%/88\.0% Pass@1/Pass@5, respectively, exceeding all evaluated baselines in Pass@1\. Relative to SFT, RL yields CVDP Pass@1 gains of 5\.4% and 6\.2% for 8B and 32B, with Pass@1 gains on VerilogEval v2 and RTLLM v2\.

### 4\.3Ablation of PAPO \(RQ2\)

Both pattern\-aware rewards and task grouping contribute to RTL performance\.We examine the two components of PAPO on RTL\-Interact\-8B \(Table[4](https://arxiv.org/html/2610.41225#S4.T4)\)\. The*w/o pattern\-aware reward*variant replaces the trajectory reward with binary final\-verification reward while retaining task grouping\. The*w/o task grouping*variant retains pattern\-aware rewards but samples tasks randomly from the RL dataset, without enforcing task\-group proportions among the trajectories retained for each update\.

Table 4:RL component ablations for RTL\-Interact\-8B on CVDP\. All configurations use tools; entries are Pass@1/Pass@5 \(%\)\. Bold marks the best value for each metric, including ties\.ConfigurationOverallCID002CID003CID004CID007CID016Full method44\.9/63\.237\.0/56\.447\.7/61\.546\.5/65\.552\.5/77\.548\.6/65\.7w/o pattern\-aware reward39\.7/59\.936\.6/55\.346\.2/64\.140\.7/61\.834\.0/57\.538\.9/62\.9w/o task grouping41\.8/60\.336\.0/52\.147\.9/65\.444\.0/65\.541\.5/60\.040\.6/62\.9

The full method leads in overall Pass@1/Pass@5, with gains of 5\.2%/3\.3% over*w/o pattern\-aware reward*and 3\.1%/2\.9% over*w/o task grouping*\. We use an optimization\-task share ofα=0\.3\\alpha=0\.3among samples retained for each policy update; Appendix[C](https://arxiv.org/html/2610.41225#A3)compares task\-group proportions\.

### 4\.4Direct Generation and Feedback\-Guided Revision \(RQ3\)

Table 5:Direct generation and single\-shot revision success \(%\) on 100 tasks\. All checkpoints are 8B\.CheckpointDirectgenerationWith EDAfeedbackBase17\.014\.0CoT\-SFT23\.019\.0CoT→\\toTIR SFT27\.026\.0PAPO26\.035\.0

Staged supervision improves generation and feedback\-guided revision, while RL further strengthens revision\.Constructing candidate RTL and revising it using EDA feedback are two important capabilities for tool\-assisted RTL design\. We evaluate these capabilities separately on 100 selected CVDP tasks spanning all five categories\. In direct generation, each model receives only the original task description and generates one RTL solution\. In feedback\-guided revision, all models receive the same fixed failing implementation and its EDA diagnostic for each task, then produce one revised implementation\. Neither setting permits tool calls, allowing us to assess generation and revision separately from tool\-use decisions\. We compare the Qwen3\-8B base, full CoT, two\-stage SFT, and PAPO checkpoints using the CVDP evaluator\. Detailed experimental settings and procedures are provided in Appendix[A\.3](https://arxiv.org/html/2610.41225#A1.SS3)\.

Two\-stage SFT raises generation/revision success from Base’s 17\.0%/14\.0% to 27\.0%/26\.0%, also exceeding CoT’s 23\.0%/19\.0% \(Table[5](https://arxiv.org/html/2610.41225#S4.T5)\)\. Together with the matched\-budget study, this supports staged supervision for both abilities\. RL further raises revision success to 35\.0% while retaining comparable generation performance\.

112002004004006006007297293535404045455050RL stepPass@1 \(%\)1212151518182121Length \(k tokens\)RTL\-Interact\-8B

111001002002003003004004004994993535404045455050RL stepPass@1 \(%\)1212151518182121Length \(k tokens\)RTL\-Interact\-32B

Pass@1Mean response length

Figure 3:RL training dynamics for 8B and 32B\. Pale solid lines show the series before smoothing\.
### 4\.5Interaction Efficiency \(RQ4\)

RL reduces tool calls and response length while improving RTL performance\.Figure[3](https://arxiv.org/html/2610.41225#S4.F3)shows that mean response length decreases by 28\.8% for 8B and 33\.5% for 32B over RL training\. On CVDP, RTL\-Interact\-8B’s mean tool calls per trajectory decrease from 4\.7 to 1\.7, a 63\.8% reduction, while the truncation rate drops from 33\.7% to 15\.2%, a decrease of 18\.5%\. Detailed trajectory statistics are provided in Appendix[A\.4](https://arxiv.org/html/2610.41225#A1.SS4), Table[7](https://arxiv.org/html/2610.41225#A1.T7)\. Together with the accuracy gains in Section[4\.2](https://arxiv.org/html/2610.41225#S4.SS2), these results show that improved RTL performance does not require more tool calls or longer responses\. As a complementary observation, the first and total thinking lengths increase to2\.8×2\.8\\timesand1\.5×1\.5\\timestheir SFT values, respectively, indicating that fewer tool calls coexist with more explicit thinking text\.

## 5Discussion and Conclusion

We presentRTL\-Interact, a post\-training framework that combines multi\-task data construction, CoT\-to\-TIR staged supervision, and PAPO to train a single model for RTL generation, autonomous EDA\-tool use, and feedback\-guided revision\. Both model sizes outperform evaluated RTL\-specialized baselines of comparable size in Pass@1 on CVDP, VerilogEval v2, and RTLLM v2; the 32B model also surpasses its tool\-enabled teacher on CVDP\. However, this study focuses on module\-level RTL tasks and does not yet establish a protocol for repository\-level development, where cross\-module dependencies, build configurations, and system\-level verification must be handled jointly\. CoT and synthesized TIR data may retain errors, with TIR quality constrained by the teacher’s capabilities and the coverage of automated checks\. Future work will develop repository\-level training environments and benchmarks and strengthen validation of synthesized trajectories\.

## Reproducibility Statement

API and diagnostic archives retain responses and scores; diagnostic protocols also preserve frozen inputs\. Appendix[A](https://arxiv.org/html/2610.41225#A1)documents data construction, decontamination, training hyperparameters, evaluation settings, and the information exposed through each tool interface\.

## AI Use Statement

We used DeepSeek\-V3\.2 for quality scoring of specification\-RTL pairs and for synthesizing tool\-integrated reasoning \(TIR\) trajectories for generation, completion, and optimization tasks, as described in Section[3\.2](https://arxiv.org/html/2610.41225#S3.SS2)and Appendix[A\.1](https://arxiv.org/html/2610.41225#A1.SS1)\.

AI tools also assisted literature search, writing, translation, LaTeX, and review, as well as parts of prompt design and code implementation\. The authors are responsible for experimental records, references, and claims\.

## References

- Anthropic \(2025\)Anthropic\.Introducing Claude Sonnet 4\.5, 2025\.URL[https://www\.anthropic\.com/news/claude\-sonnet\-4\-5](https://www.anthropic.com/news/claude-sonnet-4-5)\.
- Chen et al\. \(2026a\)Mu\-Chi Chen, Yu\-Hung Kao, Po\-Hsuan Huang, Shao\-Chun Ho, Hsiang\-Yu Tsou, I\-Ting Wu, En\-Ming Huang, Yu\-Kai Hung, Wei\-Po Hsin, Cheng Liang, Chia\-Heng Tu, Shih\-Hao Hung, and H\. T\. Kung\.SiliconMind\-V1: Multi\-agent distillation and debug\-reasoning workflows for verilog code generation\.*arXiv preprint arXiv:2603\.08719*, 2026a\.URL[https://arxiv\.org/abs/2603\.08719](https://arxiv.org/abs/2603.08719)\.
- Chen et al\. \(2026b\)Zhirong Chen, Kaiyan Chang, Zhuolin Li, Cangyuan Li, Xinyang He, Chujie Chen, Mengdi Wang, Haobo Xu, Yinhe Han, Huawei Li, and Ying Wang\.ChipSeek: Optimizing verilog generation via EDA\-integrated reinforcement learning\.In*Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\)*, pp\. 25180–25201, 2026b\.doi:10\.18653/v1/2026\.acl\-long\.1154\.URL[https://aclanthology\.org/2026\.acl\-long\.1154/](https://aclanthology.org/2026.acl-long.1154/)\.
- Cui et al\. \(2024\)Fan Cui, Chenyang Yin, Kexing Zhou, Youwei Xiao, Guangyu Sun, Qiang Xu, Qipeng Guo, Yun Liang, Xingcheng Zhang, Demin Song, and Dahua Lin\.OriGen: Enhancing RTL code generation with code\-to\-code augmentation and self\-reflection\.In*Proceedings of the 43rd IEEE/ACM International Conference on Computer\-Aided Design*, pp\. 1–9\. ACM, 2024\.doi:10\.1145/3676536\.3676830\.URL[https://doi\.org/10\.1145/3676536\.3676830](https://doi.org/10.1145/3676536.3676830)\.
- DeepSeek\-AI \(2025\)DeepSeek\-AI\.DeepSeek\-V3\.2: Pushing the frontier of open large language models\.*arXiv preprint arXiv:2512\.02556*, 2025\.URL[https://arxiv\.org/abs/2512\.02556](https://arxiv.org/abs/2512.02556)\.
- Deng et al\. \(2026\)Chenhui Deng, Zhongzhi Yu, Guan\-Ting Liu, Nathaniel Pinckney, and Haoxing Ren\.ACE\-RTL: When agentic context evolution meets RTL\-specialized LLMs\.*arXiv preprint arXiv:2602\.10218v1*, 2026\.URL[https://arxiv\.org/abs/2602\.10218v1](https://arxiv.org/abs/2602.10218v1)\.
- Gemini Team \(2025\)Gemini Team\.Gemini 2\.5: Pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities\.*arXiv preprint arXiv:2507\.06261*, 2025\.URL[https://arxiv\.org/abs/2507\.06261](https://arxiv.org/abs/2507.06261)\.
- Gou et al\. \(2023\)Zhibin Gou, Zhihong Shao, Yeyun Gong, Yelong Shen, Yujiu Yang, Minlie Huang, Nan Duan, and Weizhu Chen\.Tora: A tool\-integrated reasoning agent for mathematical problem solving\.*arXiv preprint arXiv:2309\.17452*, 2023\.
- Guo et al\. \(2024\)Daya Guo, Qihao Zhu, Dejian Yang, Zhenda Xie, Kai Dong, Wentao Zhang, Guanting Chen, Xiao Bi, Y\. Wu, Y\. K\. Li, Fuli Luo, Yingfei Xiong, and Wenfeng Liang\.DeepSeek\-Coder: When the large language model meets programming—the rise of code intelligence\.*arXiv preprint arXiv:2401\.14196*, 2024\.URL[https://arxiv\.org/abs/2401\.14196](https://arxiv.org/abs/2401.14196)\.
- Ho et al\. \(2025\)Chia\-Tung Ho, Haoxing Ren, and Brucek Khailany\.VerilogCoder: Autonomous verilog coding agents with graph\-based planning and abstract syntax tree \(AST\)\-based waveform tracing tool\.In*Proceedings of the AAAI Conference on Artificial Intelligence*, 2025\.URL[https://arxiv\.org/abs/2408\.08927](https://arxiv.org/abs/2408.08927)\.
- Icarus Verilog Contributors \(2026\)Icarus Verilog Contributors\.Getting started with icarus verilog, 2026\.URL[https://steveicarus\.github\.io/iverilog/usage/getting\_started\.html](https://steveicarus.github.io/iverilog/usage/getting_started.html)\.Official documentation, accessed September 10, 2026\.
- Liu et al\. \(2023a\)Mingjie Liu, Nathaniel Pinckney, Brucek Khailany, and Haoxing Ren\.Verilogeval: Evaluating large language models for verilog code generation\.In*IEEE/ACM International Conference on Computer\-Aided Design \(ICCAD\)*, 2023a\.
- Liu et al\. \(2024a\)Mingjie Liu, Yun\-Da Tsai, Wenfei Zhou, and Haoxing Ren\.CraftRTL: High\-quality synthetic data generation for verilog code models with correct\-by\-construction non\-textual representations and targeted code repair\.*arXiv preprint arXiv:2409\.12993*, 2024a\.URL[https://arxiv\.org/abs/2409\.12993](https://arxiv.org/abs/2409.12993)\.
- Liu et al\. \(2023b\)Shang Liu, Wenji Fang, Yao Lu, Qijun Zhang, Hongce Zhang, and Zhiyao Xie\.Rtlcoder: Outperforming gpt\-3\.5 in design rtl generation with our open\-source dataset and lightweight solution\.*arXiv preprint arXiv:2312\.08617v1*, 2023b\.URL[https://arxiv\.org/abs/2312\.08617v1](https://arxiv.org/abs/2312.08617v1)\.
- Liu et al\. \(2024b\)Shang Liu, Yao Lu, Wenji Fang, Mengming Li, and Zhiyao Xie\.OpenLLM\-RTL: Open dataset and benchmark for LLM\-aided design RTL generation \(invited\)\.In*IEEE/ACM International Conference on Computer\-Aided Design \(ICCAD\)*, 2024b\.URL[https://zhiyaoxie\.com/files/ICCAD24\_OpenLLM\.pdf](https://zhiyaoxie.com/files/ICCAD24_OpenLLM.pdf)\.
- Lu et al\. \(2024\)Yao Lu, Shang Liu, Qijun Zhang, and Zhiyao Xie\.RTLLM: An open\-source benchmark for design RTL generation with large language model\.In*29th Asia and South Pacific Design Automation Conference \(ASP\-DAC\)*, pp\. 722–727, 2024\.URL[https://arxiv\.org/abs/2308\.05345](https://arxiv.org/abs/2308.05345)\.
- Lyu et al\. \(2026\)Hanqi Lyu, Di Huang, Yaoyu Zhu, Kangcheng Liu, Bohan Dou, Chongxiao Li, Pengwei Jin, Shuyao Cheng, Rui Zhang, Zidong Du, Qi Guo, Xing Hu, and Yunji Chen\.LocalV: Exploiting information locality for IP\-level verilog generation\.*arXiv preprint arXiv:2602\.00704v1*, 2026\.URL[https://arxiv\.org/abs/2602\.00704v1](https://arxiv.org/abs/2602.00704v1)\.
- Meituan LongCat Team \(2025\)Meituan LongCat Team\.Introducing LongCat\-Flash\-Thinking: A technical report\.*arXiv preprint arXiv:2509\.18883*, 2025\.URL[https://arxiv\.org/abs/2509\.18883](https://arxiv.org/abs/2509.18883)\.
- MiniMax \(2025\)MiniMax\.MiniMax M2\.1: Significantly enhanced multi\-language programming, built for real\-world complex tasks, 2025\.URL[https://www\.minimax\.io/news/minimax\-m21](https://www.minimax.io/news/minimax-m21)\.
- OpenAI \(2025\)OpenAI\.Introducing GPT\-5\.2, 2025\.URL[https://openai\.com/index/introducing\-gpt\-5\-2/](https://openai.com/index/introducing-gpt-5-2/)\.
- Pei et al\. \(2024\)Zehua Pei, Huiling Zhen, Mingxuan Yuan, Yu Huang, and Bei Yu\.BetterV: Controlled verilog generation with discriminative guidance\.In*Proceedings of the 41st International Conference on Machine Learning*, volume 235 of*Proceedings of Machine Learning Research*, pp\. 40145–40153, 2024\.URL[https://proceedings\.mlr\.press/v235/pei24e\.html](https://proceedings.mlr.press/v235/pei24e.html)\.
- Pinckney et al\. \(2024\)Nathaniel Pinckney, Christopher Batten, Mingjie Liu, Haoxing Ren, and Brucek Khailany\.Revisiting verilogeval: A year of improvements in large\-language models for hardware code generation\.*arXiv preprint arXiv:2408\.11053*, 2024\.
- Pinckney et al\. \(2025\)Nathaniel Pinckney, Chenhui Deng, Chia\-Tung Ho, Yun\-Da Tsai, Mingjie Liu, Wenfei Zhou, Brucek Khailany, and Haoxing Ren\.Comprehensive verilog design problems: A next\-generation benchmark dataset for evaluating large language models and agents on rtl design and verification\.*arXiv preprint arXiv:2506\.14074*, 2025\.
- Qwen Team \(2025\)Qwen Team\.Qwen3\-Max\-Preview, 2025\.URL[https://qwen\.ai/blog?id=241398b9cd6353de490b0f82806c7848c5d2777d&from=research\.latest\-advancements\-list](https://qwen.ai/blog?id=241398b9cd6353de490b0f82806c7848c5d2777d&from=research.latest-advancements-list)\.
- Schick et al\. \(2023\)Timo Schick, Jane Dwivedi\-Yu, Roberto Dessi, Roberta Raileanu, Maria Lomeli, Eric Hambro, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom\.Toolformer: Language models can teach themselves to use tools\.*Advances in Neural Information Processing Systems*, 36, 2023\.
- Shao et al\. \(2024\)Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, Y\. K\. Li, Y\. Wu, and Daya Guo\.Deepseekmath: Pushing the limits of mathematical reasoning in open language models\.*arXiv preprint arXiv:2402\.03300*, 2024\.
- Thakur et al\. \(2023\)Shailja Thakur, Jason Blocklove, Hammond Pearce, Benjamin Tan, Siddharth Garg, and Ramesh Karri\.AutoChip: Automating HDL generation using LLM feedback\.*arXiv preprint arXiv:2311\.04887*, 2023\.URL[https://arxiv\.org/abs/2311\.04887](https://arxiv.org/abs/2311.04887)\.
- Tsai et al\. \(2023\)Yun\-Da Tsai, Mingjie Liu, and Haoxing Ren\.RTLFixer: Automatically fixing RTL syntax errors with large language models\.*arXiv preprint arXiv:2311\.16543*, 2023\.URL[https://arxiv\.org/abs/2311\.16543](https://arxiv.org/abs/2311.16543)\.
- Verilator Contributors \(2026\)Verilator Contributors\.Verilator arguments, 2026\.URL[https://verilator\.org/guide/latest/exe\_verilator\.html](https://verilator.org/guide/latest/exe_verilator.html)\.Official documentation, accessed September 10, 2026\.
- Yang et al\. \(2025\)An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, et al\.Qwen3 technical report\.*arXiv preprint arXiv:2505\.09388*, 2025\.
- Yang et al\. \(2026\)Jian Yang, Wei Zhang, Jiajun Wu, Junhang Cheng, Shawn Guo, Haowen Wang, et al\.InCoder\-32B: Code foundation model for industrial scenarios\.*arXiv preprint arXiv:2603\.16790*, 2026\.URL[https://arxiv\.org/abs/2603\.16790](https://arxiv.org/abs/2603.16790)\.
- Yao et al\. \(2023\)Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao\.ReAct: Synergizing reasoning and acting in language models\.In*International Conference on Learning Representations*, 2023\.URL[https://arxiv\.org/abs/2210\.03629](https://arxiv.org/abs/2210.03629)\.
- YosysHQ \(2026\)YosysHQ\.Yosys open synthesis suite, 2026\.URL[https://github\.com/YosysHQ/yosys](https://github.com/YosysHQ/yosys)\.Official project documentation, accessed September 10, 2026\.
- Yu et al\. \(2026\)Zhongkai Yu, Yichen Lin, Chenyang Zhou, Yuwei Zhang, Kun Zhou, Junxia Cui, Haotian Ye, Zhengding Hu, Zaifeng Pan, Ruiyi Wang, Yujie Zhao, Hejia Zhang, Jingbo Shang, Jishen Zhao, and Yufei Ding\.ChipMATE: Multi\-agent training via reinforcement learning for enhanced RTL generation\.*arXiv preprint arXiv:2605\.12857*, 2026\.URL[https://arxiv\.org/abs/2605\.12857](https://arxiv.org/abs/2605.12857)\.
- Zhao et al\. \(2024a\)Yang Zhao, Di Huang, Chongxiao Li, Pengwei Jin, Muxin Song, Yinan Xu, Ziyuan Nan, Mingju Gao, Tianyun Ma, Lei Qi, Yansong Pan, Zhenxing Zhang, Rui Zhang, Xishan Zhang, Zidong Du, Qi Guo, and Xing Hu\.CodeV: Empowering LLMs with HDL generation through multi\-level summarization\.*arXiv preprint arXiv:2407\.10424*, 2024a\.URL[https://arxiv\.org/abs/2407\.10424](https://arxiv.org/abs/2407.10424)\.
- Zhao et al\. \(2024b\)Yujie Zhao, Hejia Zhang, Hanxian Huang, Zhongming Yu, and Jishen Zhao\.MAGE: A multi\-agent engine for automated RTL code generation\.*arXiv preprint arXiv:2412\.07822*, 2024b\.
- Zhipu AI \(2025\)Zhipu AI\.GLM\-4\.7: Advancing the coding capability, 2025\.URL[https://z\.ai/blog/glm\-4\.7](https://z.ai/blog/glm-4.7)\.
- Zhu et al\. \(2025\)Yaoyu Zhu, Di Huang, Hanqi Lyu, Xiaoyun Zhang, Chongxiao Li, Wenxuan Shi, Yutong Wu, Jianan Mu, Jinghua Wang, Yang Zhao, Pengwei Jin, Shuyao Cheng, Shengwen Liang, Xishan Zhang, Rui Zhang, Zidong Du, Qi Guo, Xing Hu, and Yunji Chen\.Codev\-r1: Reasoning\-enhanced verilog generation\.*arXiv preprint arXiv:2505\.24183v1*, 2025\.URL[https://arxiv\.org/abs/2505\.24183v1](https://arxiv.org/abs/2505.24183v1)\.

## Appendix ATraining and Evaluation Details

### A\.1Data Construction and Filtering

We use 87,321 CoT examples from the open\-source CodeV\-R1\-dataset\([Zhu et al\., 2025](https://arxiv.org/html/2610.41225#bib.bib38)\)\. We use its specification–RTL pairs as the source pool for multi\-task TIR construction\. DeepSeek\-V3\.2 performs quality scoring and TIR trajectory distillation\.

#### Quality\-scoring prompt\.

Before constructing any of the three task types, the teacher acts as an LLM judge for the shared instruction–RTL pool\. Each pair receives a validity label \(Pass,Review, orReject\) and four integer scores from 0 to 4:

1. 1\.*Specification–implementation alignment*: whether the specification defines the observable behavior and the RTL implements it;
2. 2\.*Hardware\-semantic precision*: whether timing, state, finite width, signedness, and related hardware semantics must be handled precisely;
3. 3\.*Behavioral reasoning value*: whether multiple behavioral rules must be coordinated rather than mechanically transcribed; and
4. 4\.*Verifiability and error discrimination*: whether checks can be derived from the specification to distinguish correct behavior from plausible implementation errors\.

The prompt also requests evidence for every score, concrete specification or code issues, up to two discriminating checks, difficulty, and confidence\. OnlyPasspairs with a total score above 10 enter the shared candidate pool for generation, completion, and optimization tasks; the score ranks candidates and is not treated as a probability of correctness\. The complete prompt is included in the supplementary artifact\.

#### TIR composition\.

Teacher outputs are executed and filtered according to each task objective\. For generation, the final design must pass simulation with the teacher’s own testbench and be synthesizable by Yosys\. For completion, an LLM identifies core logic in the reference RTL, which is masked while the surrounding design is retained\. The teacher’s completed design must pass equivalence checking against the unmasked reference\. For optimization, EDA tools first screen the source pool for designs with lint diagnostics or comparatively high synthesis cost\. A retained trajectory must preserve reference behavior through equivalence checking and either make the design lint\-clean or improve the specified synthesis metric beyond the filtering threshold\. Both completion and optimization use the reference\-based equivalence checker reused from CodeV\-R1\. The resulting 13,480 TIR trajectories comprise approximately 9K generation, 3K completion, and 1\.5K optimization examples\.

#### RL task pool\.

RL candidates come from TIR tasks whose teacher trajectories satisfy the task\-specific acceptance criteria above\. We sample five attempts per task from the two\-stage SFT model and retain tasks for which fewer than five attempts succeed\. Functional correctness is determined by the same equivalence checker, comparing final RTL with the reference design; optimization also requires the specified improvement\. The same checker provides the final functional\-correctness decision during RL\. This yields approximately 8K tasks: about 7K generation/completion tasks and 1K optimization tasks\.

#### Decontamination\.

Inspired by thenn\-gram decontamination approach of[Guo et al\. \(2024\)](https://arxiv.org/html/2610.41225#bib.bib9), we use a 15\-gram overlap scan between the training problems and the CVDP, VerilogEval v2, and RTLLM v2 test problems\. No overlapping training problems were identified by this procedure\.

### A\.2Training Configuration

#### Trajectory serialization and training targets\.

For training, the trajectory is serialized into model outputs interleaved with tool observations\. Tokens in the reasoning, tool requests, and final RTL are model outputs; tool observations provide context for subsequent generation but are not prediction targets\. Section[3\.4](https://arxiv.org/html/2610.41225#S3.SS4)assigns a reward using the final RTLyyand the checking history recorded in the tool requests and observations, then uses this reward to update the same policyπθ\\pi\_\{\\theta\}\.

The SFT stages use eight NVIDIA A100 GPUs, a batch size of 64, and a learning rate of10−510^\{\-5\}\. CoT training runs for three epochs, followed by five epochs of TIR training\. The base checkpoints are Qwen3\-8B and Qwen3\-32B\.

For multi\-task RL, the reported 8B and 32B runs use a constant learning rate of10−610^\{\-6\}, 32 prompts per rollout batch, eight samples per prompt, and a global batch size of 256\. The retained generation/completion and optimization prompt groups use per\-update quotas targeting a 7:3 ratio, rounded to integer group counts\. Rollout temperature is 1\.0 with a 30,000\-token response cap\. GRPO uses clipping parameters 0\.2/0\.28 and no KL loss\. Adam usesβ1=0\.9\\beta\_\{1\}=0\.9,β2=0\.98\\beta\_\{2\}=0\.98,ϵ=10−8\\epsilon=10^\{\-8\}, weight decay 0\.01, and seed 1234\. Pattern\-aware rewards are enabled for the reported RTL\-Interact runs\. The binary\-reward ablation uses the same initialization, data, optimizer, rollout configuration, and number of training steps; only the pattern\-dependent reward weights are disabled\.

#### Policy\-update quantities\.

For trajectoryτi\\tau\_\{i\}sampled for taskxix\_\{i\},ℳi\\mathcal\{M\}\_\{i\}contains the indices of model\-generated tokens, excluding tool observations\. Herettindexes tokens in the serialized trajectory, rather than the tool interactions indexed byℓ\\ellin Section[3\.1](https://arxiv.org/html/2610.41225#S3.SS1)\. Letui,tu\_\{i,t\}be the token at positionttandhi,th\_\{i,t\}its preceding context, including the task, previous model outputs, and tool observations\. The policy ratio in Equation \([2](https://arxiv.org/html/2610.41225#S3.E2)\) is

ρi,t=πθ​\(ui,t∣hi,t\)πold​\(ui,t∣hi,t\),\\rho\_\{i,t\}=\\frac\{\\pi\_\{\\theta\}\(u\_\{i,t\}\\mid h\_\{i,t\}\)\}\{\\pi\_\{\\mathrm\{old\}\}\(u\_\{i,t\}\\mid h\_\{i,t\}\)\},\(4\)whereπold\\pi\_\{\\mathrm\{old\}\}is the policy before the update\. The parametersε−\\varepsilon\_\{\-\}andε\+\\varepsilon\_\{\+\}specify the lower and upper clipping thresholds\. We retain the fixed rollout correction

ci,t=clip⁡\(πold​\(ui,t∣hi,t\)πroll​\(ui,t∣hi,t\),0,2\),c\_\{i,t\}=\\operatorname\{clip\}\\\!\\left\(\\frac\{\\pi\_\{\\mathrm\{old\}\}\(u\_\{i,t\}\\mid h\_\{i,t\}\)\}\{\\pi\_\{\\mathrm\{roll\}\}\(u\_\{i,t\}\\mid h\_\{i,t\}\)\},0,2\\right\),\(5\)whereπroll\\pi\_\{\\mathrm\{roll\}\}generates the rollout and no gradient is propagated throughci,tc\_\{i,t\}\.

Letℐx\\mathcal\{I\}\_\{x\}index theGGtrajectories sampled for the same taskxx\. The reward statistics used to compute their advantages are

R¯x=1G​∑j∈ℐxRx​\(τj\),σx=Stdj∈ℐx⁡\[Rx​\(τj\)\]\.\\bar\{R\}\_\{x\}=\\frac\{1\}\{G\}\\sum\_\{j\\in\\mathcal\{I\}\_\{x\}\}R\_\{x\}\(\\tau\_\{j\}\),\\qquad\\sigma\_\{x\}=\\operatorname\{Std\}\_\{j\\in\\mathcal\{I\}\_\{x\}\}\\\!\\left\[R\_\{x\}\(\\tau\_\{j\}\)\\right\]\.\(6\)The constantϵ\\epsilonstabilizes division by the standard deviation\. Reward normalization is performed within the same task, rather than across all tasks belonging to the same task group\.

Token losses are averaged over model\-generated tokens within each trajectory and then over retained trajectories\. The same rollout correction and loss reduction are used in the binary\-reward baseline\.

### A\.3Evaluation Configuration

For the main benchmark evaluations, we cap model\-generated responses at 32K tokens, excluding tool outputs\. We allow at most 6 tool calls per trajectory for functional tasks—generation, completion, modification, and bug fixing—and 10 for optimization tasks\. A response is counted as truncated if it reaches the response\-length limit\.

Unless stated otherwise, Pass@1/Pass@5 results use five samples per problem, temperature 0\.7, and top\-pp0\.95\. CVDP averages are weighted by category sizes\(94,78,55,40,35\)\(94,78,55,40,35\), totaling 302\. Withnnsamples andccpassing samples, we use

Pass​@​k^=1−\(n−ck\)\(nk\),n≥k\.\\widehat\{\\mathrm\{Pass@\}k\}=1\-\\frac\{\\binom\{n\-c\}\{k\}\}\{\\binom\{n\}\{k\}\},\\qquad n\\geq k\.\(7\)
#### Generation and revision protocol \(Section[4\.4](https://arxiv.org/html/2610.41225#S4.SS4)\)\.

We freeze 100 tasks before comparative inference using source\-balanced selection with seed 20260909, one task per name\-based family, and preference for behavioral/lint failures rather than uniform random sampling\. Archived tool\-use trajectories from GLM\-4\.6, MiniMax\-M2, DeepSeek\-V4\-Flash, and a binary\-reward 8B RL checkpoint \(step 499\) supply 25 failing candidates each\. The completion/generation/modification/optimization/debugging counts are 24/28/11/20/17\. Candidates are intermediate RTL submissions that fail independent CVDP evaluation; diagnostics are reproduced with Icarus Verilog \(47 compilation and 33 behavioral failures\) or Verilator \(20 lint failures\)\. Behavioral checks must also pass available archived CVDP\-passing implementations\. Every revision model receives the same candidate, diagnostic, and archived model\-authored testbench when present; hidden scoring tests remain unavailable\. This diagnostic study uses temperature 1, top\-pp1, shared task\-derived seeds, and initially one response per task/model/setting with a 32K\-token generation budget\.

#### General\-purpose baselines\.

The CVDP frontier baselines are Claude\-Sonnet\-4\.5\([Anthropic, 2025](https://arxiv.org/html/2610.41225#bib.bib1)\), GPT\-5\.2\([OpenAI, 2025](https://arxiv.org/html/2610.41225#bib.bib20)\), GLM\-4\.7\([Zhipu AI, 2025](https://arxiv.org/html/2610.41225#bib.bib37)\), LongCat\-Flash\-Thinking\([Meituan LongCat Team, 2025](https://arxiv.org/html/2610.41225#bib.bib18)\), MiniMax\-M2\.1\([MiniMax, 2025](https://arxiv.org/html/2610.41225#bib.bib19)\), Qwen3\-Max\-Preview\([Qwen Team, 2025](https://arxiv.org/html/2610.41225#bib.bib24)\), and Gemini\-2\.5\-Pro\([Gemini Team, 2025](https://arxiv.org/html/2610.41225#bib.bib7)\)\. These checkpoints were selected around the teacher’s release, reflecting the earlier start of our experiments\.

#### Information boundary\.

Table 6:Five evaluated RTL task categories and four model\-facing EDA interfaces\. Checkmarks denote tool access in our environment, rather than restrictions on where an EDA tool can be useful\. Equivalence checking uses the original RTL supplied in an optimization task; hidden benchmark tests are never exposed through these interfaces\.TaskSimulationLintcheckingSynthesisanalysisEquivalencecheckingGeneration✓———Completion✓———Modification✓———Debugging✓———Optimization—✓✓✓

Functional interaction requests contain model\-generated RTL and a model\-generated testbench\. The hidden/reference scoring testbench is not provided by that interface\. For optimization, the original design is part of the task and is available for equivalence checking\. Workflow systems may use different checking information or budgets, so their published scores are not inserted into our same\-interface table\.

#### Controlled supervision comparison\.

In Table[1](https://arxiv.org/html/2610.41225#S3.T1), the 450M\-token budget corresponds to 150M chat\-template tokens per epoch for three epochs; the 900M\-token budget doubles this total\. The 17\.2% Base result belongs to this controlled protocol and is not substituted for the 18\.9% tool\-free main\-table baseline\. Avg\. tool turn reports the mean number of tool\-call turns over all evaluated trajectories, including zero for trajectories without tool calls\. Tool\-call turns are distinct from the task\-specific checking rounds defined below\.

### A\.4Interaction Statistics

Table 7:CVDP interaction statistics for RTL\-Interact\-8B before and after RL\. Tool calls and thinking lengths are means per trajectory; thinking lengths are measured in characters\. First and total thinking lengths refer to the first thinking segment and the sum of all thinking segments, respectively\. Truncation means reaching the response\-length limit\. Changes are reported in percentage points \(pp\) for truncation rate and as a relative percentage for tool calls\.MetricSFTRLChangeTool calls4\.71\.7−63\.8%\-63\.8\\%Truncation rate33\.7%15\.2%−18\.5\-18\.5ppFirst thinking length11,45331,6192\.8×2\.8\\timesTotal thinking length30,87344,8381\.5×1\.5\\times

## Appendix BChecking Rounds and Pattern Rewards

#### Checking rounds\.

The unit of checking reflects the task objective\. For functional tasks, one round consists of simulating the candidate with a model\-authored testbench\. For optimization, one round combines a task\-appropriate optimization check \(lint or synthesis analysis\) with a self\-equivalence check against the original design\. Thus two tool calls can constitute one optimization checking round\. In both cases, final correctness is determined independently by the reference\-based verifier\.

#### Matching rules and weights\.

Letnnbe the number of checking rounds andpj∈\{0,1\}p\_\{j\}\\in\\\{0,1\\\}indicate whether roundjjsucceeds\. For functional tasks, success means that the model\-authored simulation check passes\. For optimization, it requires successful task\-appropriate optimization and equivalence checks\. Among task\-appropriate checking histories, ISR requiresn=1n=1andp1=1p\_\{1\}=1; FRS requiresn\>1n\>1andpn=1p\_\{n\}=1\. An earlier successful check does not qualify a trajectory for FRS if its final self\-check fails\. US covers histories that do not meet either condition, including missing or incomplete checks and the use of an optimization tool unrelated to the task objective\.

For both functional and optimization tasks, letpx​\(τ\)∈\{ISR,FRS,US\}p\_\{x\}\(\\tau\)\\in\\\{\\mathrm\{ISR\},\\mathrm\{FRS\},\\mathrm\{US\}\\\}denote the matched checking pattern\. The pattern adjustment in Equation \([3](https://arxiv.org/html/2610.41225#S3.E3)\) is

δpx​\(τ\)=\{\+0\.5,ISR,\+0\.2,FRS,−0\.2,US\.\\delta\_\{p\_\{x\}\(\\tau\)\}=\\begin\{cases\}\+0\.5,&\\text\{ISR\},\\\\ \+0\.2,&\\text\{FRS\},\\\\ \-0\.2,&\\text\{US\}\.\\end\{cases\}\(8\)ThusRx​\(τ\)=Vx​\(y\)​\[1\+δpx​\(τ\)\]R\_\{x\}\(\\tau\)=V\_\{x\}\(y\)\[1\+\\delta\_\{p\_\{x\}\(\\tau\)\}\]gives final\-correct trajectories rewards of 1\.5, 1\.2, and 0\.8, respectively\. The value 1\.0 is the base correctness reward before the pattern adjustment, not an additional unpenalized US category\. For all tasks, a failed final verification gives zero reward regardless of checking history\.

#### Reward ablation\.

The binary ablation removes the pattern\-conditioned successful rewards while retaining the final correctness gate\. It tests the whole reward design, not each rule separately\. There is no reported ablation against a tuned length penalty, so the paper does not claim superiority to every cost\-aware reward\.

## Appendix CTask\-Group Proportion Analysis

We varyα\\alpha, the optimization\-task share among samples retained for each policy update, with generation and completion sharing the remaining1−α1\-\\alpha\. We compareα∈\{0\.2,0\.3,0\.4\}\\alpha\\in\\\{0\.2,0\.3,0\.4\\\}for RTL\-Interact\-8B on CVDP\. Figure[4](https://arxiv.org/html/2610.41225#A3.F4)shows thatα=0\.3\\alpha=0\.3yields the highest overall Pass@1 and Pass@5 among the three tested settings, reaching 44\.9% and 63\.2%, respectively\. We use this proportion in the full method\.

0\.20\.30\.440405050606042\.242\.244\.944\.942\.642\.659\.659\.663\.263\.261\.961\.9Optimization shareα\\alphaPass rate \(%\)Pass@1Pass@5Figure 4:CVDP Pass@1/Pass@5 \(%\) versus the optimization shareα\\alphaamong samples retained for each RL update; the functional share is1−α1\-\\alpha\.Table 8:Endpoint results for generation\-only RL on RTL\-Interact\-8B\. Values are Pass@1/Pass@5\.Task categorySFTGeneration\-onlyRLCID00233\.4/55\.338\.5/53\.2CID00340\.5/53\.849\.0/62\.8CID00435\.3/58\.247\.3/63\.6CID00723\.0/52\.526\.5/50\.0CID01638\.3/62\.950\.3/71\.4Overall34\.8/56\.042\.6/59\.3

## Appendix DAdditional Generation\-Only Transfer Results

The generation\-only run starts from its own SFT checkpoint\. Pass@1 rises from 34\.8% to 42\.6% overall, with gains of 5\.1%, 8\.5%, 12\.0%, 3\.5%, and 12\.0% on completion, specification\-to\-RTL, modification, optimization, and debugging, respectively\. This transfer pattern is consistent with benefits across functional tasks sharing an interaction interface\. Optimization also changes the objective and correctness conditions, however, so this comparison does not isolate the causal effect of using a different tool\. Optimization Pass@5 decreases from 52\.5% to 50\.0%, and completion Pass@5 decreases from 55\.3% to 53\.2%\. All these endpoints are retained in Table[4](https://arxiv.org/html/2610.41225#A3.F4); no intermediate category trajectory is inferred from them\.

2020303040405050DebuggingOptimizationModificationSpec\-to\-RTLCompletion\+5\.1 pp\+8\.5 pp\+12\.0 pp\+3\.5 pp\+12\.0 ppCVDP Pass@1 \(%\)SFTGeneration\-only RLFigure 5:Measured endpoint changes in the separate 8B generation\-only run\. Segments connect SFT and RL results within a category; they are not training\-time curves\. Labels show Pass@1 gains in percentage points \(pp\)\. This run has a different SFT initialization from the full multi\-task run\.
## Appendix EEvaluation Prompts

We provide the common prompt templates used across all evaluated benchmarks, with and without tool access\.\{problem\_description\}is replaced with the task description, and\{task\_specific\_tool\_definitions\}contains the tool interfaces available for the corresponding task\. We display the message contents by role, omitting chat\-template delimiters\. Line wrapping is adjusted for readability\.

### E\.1Tool\-Free Prompt

Prompt 1: Tool\-free evaluationSystem[⬇](data:text/plain;base64,WW91IGFyZSBhIFZlcmlsb2cgUlRMIGRlc2lnbmVyIHRoYXQgb25seSB3cml0ZXMgY29kZSB1c2luZyBjb3JyZWN0ClZlcmlsb2cgc3ludGF4Lg==)YouareaVerilogRTLdesignerthatonlywritescodeusingcorrectVerilogsyntax\.User[⬇](data:text/plain;base64,UXVlc3Rpb246Cntwcm9ibGVtX2Rlc2NyaXB0aW9ufQoKRW5jbG9zZSB5b3VyIGNvZGUgd2l0aCBbQkVHSU5dIGFuZCBbRE9ORV0uIE9ubHkgb3V0cHV0IHRoZSBjb2RlIHNuaXBwZXQKYW5kIGRvIE5PVCBvdXRwdXQgYW55dGhpbmcgZWxzZS4KCkFuc3dlcjo=)Question:\{problem\_description\}Encloseyourcodewith\[BEGIN\]and\[DONE\]\.OnlyoutputthecodesnippetanddoNOToutputanythingelse\.Answer:

### E\.2Tool\-Enabled Prompt

Prompt 2: Tool\-enabled evaluationSystem[⬇](data:text/plain;base64,WW91IGFyZSBhIFZlcmlsb2cgY29kaW5nIGV4cGVydCB3aG8gd2lsbCB3cml0ZSBWZXJpbG9nIGNvZGUgYWZ0ZXIgY2FyZWZ1bCBjb25za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Y29udGV4dCBsaW1pdC4KQWZ0ZXIgdGhpbmtpbmcsIHdoZW4geW91IGZpbmFsbHkgcmVhY2ggYSBjb25jbHVzaW9uLCBlbmNsb3NlIHRoZSBmaW5hbCB2ZXJpbG9nIGNvZGUgaW4gdmVyaWxvZyBjb2RlIGJsb2NrIHdpdGhpbiBjb2RlIHRhZ3MuIGkuZS4sCmBgYHZlcmlsb2cKbW9kdWxlIHRvcF9tb2R1bGUoaW4sIG91dCwgLi4uKTsKICAuLi4KZW5kbW9kdWxlCmBgYAoKCiMgVG9vbHMKCllvdSBtYXkgY2FsbCBvbmUgb3IgbW9yZSBmdW5jdGlvbnMgdG8gYXNzaXN0IHdpdGggdGhlIHVzZXIgcXVlcnkuCgpZb3UgYXJlIHByb3ZpZGVkIHdpdGggZnVuY3Rpb24gc2lnbmF0dXJlcyB3aXRoaW4gPHRvb2xzPjwvdG9vbHM+IFhNTCB0YWdzOgo8dG9vbHM+Cnt0YXNrX3NwZWNpZmljX3Rvb2xfZGVmaW5pdGlvbnN9CjwvdG9vbHM+CgpGb3IgZWFjaCBmdW5jdGlvbiBjYWxsLCByZXR1cm4gYSBqc29uIG9iamVjdCB3aXRoIGZ1bmN0aW9uIG5hbWUgYW5kIGFyZ3VtZW50cyB3aXRoaW4gPHRvb2xfY2FsbD48L3Rvb2xfY2FsbD4gWE1MIHRhZ3M6Cjx0b29sX2NhbGw+CnsibmFtZSI6IDxmdW5jdGlvbi1uYW1lPiwgImFyZ3VtZW50cyI6IDxhcmdzLWpzb24tb2JqZWN0Pn0KPC90b29sX2NhbGw+)YouareaVerilogcodingexpertwhowillwriteVerilogcodeaftercarefulconsideration\.Yourgoalistodeliverfunctionallycorrect,synthesizable,andefficientRTLthatmeetstheuser’srequirements\.Principles:\-Reasoncarefullyaboutthespecification,interfaces,andcornercases\.\-Validatebehavioranditerateasneededusinganyavailabletools\.\-IverilogCompatibility:UserobustVerilog\-2001orSystemVerilog\-2012constructs\.\-Youshouldprefer‘logic‘,‘always\_ff‘,and‘always\_comb‘\.\-AvoidcomplexSystemVerilogfeaturesthathavelimitedsupportiniverilog\(e\.g\.,specializedinterfaces,programblocks,ornestedstructassignments\)\.\-Preferclean,portableRTL:separatecombinational/sequentiallogic,avoidunintendedlatches,avoidunsynthesizableconstructsindesigncode\.\-Useclearresets,parameterizewidthswhenappropriate,andwritereadable,well\-commentedcode\.\-Whenatestbenchisrequestedorrequired\(e\.g\.bytools\),followtheserules:1\.Clearlystatetheexpectedbehavior/resultsinthetestbench\(e\.g\.ascomments\)\.2\.Ensurethetestbenchchecksthatsimulationoutputsexactlymatchtheexpectedresults;anymismatchmeansthedesignisstillbuggy\.3\.Ifthemodulehasaresetsignal,includeproperresettestinginthetestbench\.4\.Providesufficientanddiversestimulus:covernormalcases,boundaryconditions,andcornercases\(e\.g\.0,maximumvalues,negativenumbers,sign\-bitcases,etc\.\)insteadoftestingonlyasinglescenario\.5\.Use$displayfortextualchecks\.Ifyouemiterrors,surfacethemclearly\.6\.DONOTuse‘$monitor‘orprintsignalseveryclockcycle\.Thiswillexceedthecontextlimit\.Afterthinking,whenyoufinallyreachaconclusion,enclosethefinalverilogcodeinverilogcodeblockwithincodetags\.i\.e\.,‘‘‘verilogmoduletop\_module\(in,out,\.\.\.\);\.\.\.endmodule‘‘‘\#ToolsYoumaycalloneormorefunctionstoassistwiththeuserquery\.Youareprovidedwithfunctionsignatureswithin<tools\></tools\>XMLtags:<tools\>\{task\_specific\_tool\_definitions\}</tools\>Foreachfunctioncall,returnajsonobjectwithfunctionnameandargumentswithin<tool\_call\></tool\_call\>XMLtags:<tool\_call\>\{"name":<function\-name\>,"arguments":<args\-json\-object\>\}</tool\_call\>User[⬇](data:text/plain;base64,RGVzaWduIGEgZnVuY3Rpb25hbGx5IGNvcnJlY3QsIHN5bnRoZXNpemFibGUsIGFuZCBlZmZpY2llbnQgVmVyaWxvZyBtb2R1bGUgZm9yIHRoZSBmb2xsb3dpbmcgcHJvYmxlbS4KVXNlIGFueSBhdmFpbGFibGUgdG9vbHMgZHVyaW5nIHRoZSBwcm9jZXNzIHRvIHZhbGlkYXRlIGFuZCByZWZpbmUgeW91ciBkZXNpZ24gaWYgeW91IHRoaW5rIGl0J3MgbmVlZGVkLgoKVGhlIHByb2JsZW0gaXMgYXMgZm9sbG93czoKe3Byb2JsZW1fZGVzY3JpcHRpb259)Designafunctionallycorrect,synthesizable,andefficientVerilogmoduleforthefollowingproblem\.Useanyavailabletoolsduringtheprocesstovalidateandrefineyourdesignifyouthinkit’sneeded\.Theproblemisasfollows:\{problem\_description\}

## Appendix FCase Study: Response Trajectories

Below are the original problem and response trajectories of the 8B Base, SFT, and RL models on the RTLLM v2freq\_divbyeventask\. Input prompts are omitted\. Within each response turn, reasoning and tool\-call contents are summarized and marked\[Summary\]inside their respective tags\. Tool feedback and final answers are reproduced without summarization\.

Original problem: Even\-frequency divider[⬇](data:text/plain;base64,UGxlYXNlIGFjdCBhcyBhIHByb2Zlc3Npb25hbCB2ZXJpbG9nIGRlc2lnbmVyLgoKRnJlcXVlbmN5IGRpdmlkZXIgdGhhdCBkaXZpZGVzIHRoZSBpbnB1dCBjbG9jayBmcmVxdWVuY3kgYnkgZXZlbiBudW1iZXJzLiBUaGlzIG1vZHVsZSBnZW5lcmF0ZXMgYSBkaXZpZGVkIGNsb2NrIHNpZ25hbCBieSB0b2dnbGluZyBpdHMgb3V0cHV0IGV2ZXJ5IHNwZWNpZmllZCBudW1iZXIgb2YgaW5wdXQgY2xvY2sgY3ljbGVzLgoKTW9kdWxlIG5hbWU6CiAgICBmcmVxX2RpdmV2ZW4KCklucHV0IHBvcnRzOgogICAgY2xrOiBJbnB1dCBjbG9jayBzaWduYWwgdGhhdCB3aWxsIGJlIGRpdmlkZWQuCiAgICByc3RfbjogQWN0aXZlLWxvdyByZXNldCBzaWduYWwgdG8gaW5pdGlhbGl6ZSB0aGUgbW9kdWxlLgoKT3V0cHV0IHBvcnRzOgogICAgY2xrX2RpdjogRGl2aWRlZCBjbG9jayBv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VzLgoKR2l2ZSBtZSB0aGUgY29tcGxldGUgY29kZS4=)Pleaseactasaprofessionalverilogdesigner\.Frequencydividerthatdividestheinputclockfrequencybyevennumbers\.Thismodulegeneratesadividedclocksignalbytogglingitsoutputeveryspecifiednumberofinputclockcycles\.Modulename:freq\_divevenInputports:clk:Inputclocksignalthatwillbedivided\.rst\_n:Active\-lowresetsignaltoinitializethemodule\.Outputports:clk\_div:Dividedclockoutputsignal\.Implementation:Thefrequencydividerusesacounter\(‘cnt‘\)tocountthenumberofclockcycles\.The‘NUM\_DIV‘parameterspecifiesthedivisionfactor,whichmustbeanevennumber\.\-Whentheresetsignal\(‘rst\_n‘\)islow,thecounterandthedividedclocksignal\(‘clk\_div‘\)areinitializedtozero\.\-Oneachpositiveedgeoftheinputclock\(‘clk‘\),ifthecounterislessthanhalfof‘NUM\_DIV\-1‘,thecounterincrementswithoutchangingthedividedclockoutput\.\-Whenthecounterreachesthespecifiedlimit,itresetstozeroandtogglesthe‘clk\_div‘outputsignal,effectivelydividingthefrequencyoftheinputclockbytheevennumberspecifiedby‘NUM\_DIV‘\.Counter:\-Thecounterisa4\-bitregister\(‘cnt‘\)thattracksthenumberofclockcycles\.Givemethecompletecode\.

Base\-8B[⬇](data:text/plain;base64,PT09PT0gTU9ERUwgUkVTUE9OU0UgdDAgPT09PT0KCjx0aGluaz4KW1N1bW1hcnldClRoZSBtb2RlbCBjb25zaWRlcnMgY29uZmxpY3RpbmcgaW50ZXJwcmV0YXRpb25zIG9mIHRoZSBjb3VudGVyIGxpbWl0IGFuZCByZXBlYXRlZGx5IGNvbmZ1c2VzIHRoZSBpbnRlcnZhbCBiZXR3ZWVuIG91dHB1dCB0b2dnbGVzIHdpdGggdGhlIGZ1bGwgb3V0cHV0IHBlcmlvZC4gSXQgdWx0aW1hdGVseSBjaG9vc2VzIHRvIHRvZ2dsZSBhdCBOVU1fRElWIC0gMSwgaW5jb3JyZWN0bHkgdHJlYXRpbmcgdGhpcyBhcyBkaXZpc2lvbiBieSBOVU1fRElWLgo8L3RoaW5rPgoKW0JFR0lOXQptb2R1bGUgZnJlcV9kaXZldmVuICgKICAgIGlucHV0IGNsaywKICAgIGlucHV0IHJzdF9uLAogICAgb3V0cHV0IHJlZyBjbGtfZGl2Cik7CgpwYXJhbWV0ZXIgTlVNX0RJViA9IDQ7IC8vIE11c3QgYmUgZXZlbgpyZWcgWzM6MF0gY250OwoKYWx3YXlzIEAocG9zZWRnZSBjbGsgb3IgbmVnZWRnZSByc3RfbikgYmVnaW4KICAgIGlmICghcnN0X24pIGJlZ2luCiAgICAgICAgY250IDw9IDQnZDA7CiAgICAgICAgY2xrX2RpdiA8PSAxJ2IwOwogICAgZW5kIGVsc2UgYmVnaW4KICAgICAgICBpZiAoY250ID09IE5VTV9ESVYgLSAxKSBiZWdpbgogICAgICAgICAgICBjbnQgPD0gNCdkMDsKICAgICAgICAgICAgY2xrX2RpdiA8PSB+Y2xrX2RpdjsKICAgICAgICBlbmQgZWxzZSBiZWdpbgogICAgICAgICAgICBjbnQgPD0gY250ICsgMTsKICAgICAgICBlbmQKICAgIGVuZAplbmQKCmVuZG1vZHVsZQpbRE9ORV0=)=====MODELRESPONSEt0=====<think\>\[Summary\]Themodelconsidersconflictinginterpretationsofthecounterlimitandrepeatedlyconfusestheintervalbetweenoutputtoggleswiththefulloutputperiod\.ItultimatelychoosestotoggleatNUM\_DIV\-1,incorrectlytreatingthisasdivisionbyNUM\_DIV\.</think\>\[BEGIN\]modulefreq\_diveven\(inputclk,inputrst\_n,outputregclk\_div\);parameterNUM\_DIV=4;//Mustbeevenreg\[3:0\]cnt;always@\(posedgeclkornegedgerst\_n\)beginif\(\!rst\_n\)begincnt<=4’d0;clk\_div<=1’b0;endelsebeginif\(cnt==NUM\_DIV\-1\)begincnt<=4’d0;clk\_div<=~clk\_div;endelsebegincnt<=cnt\+1;endendendendmodule\[DONE\]

RTL\-Interact\-8B \(SFT\)[⬇](data:text/plain;base64,PT09PT0gTU9ERUwgUkVTUE9O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ogY2xlYXIgY291bnRlciBhbmQgb3V0cHV0CiAgICAgICAgICAgIGNudCAgICAgIDw9IDQnYjA7CiAgICAgICAgICAgIGNsa19kaXYgIDw9IDEnYjA7CiAgICAgICAgZW5kIGVsc2UgYmVnaW4KICAgICAgICAgICAgaWYgKGNudCA9PSBDTlRfTUFYKSBiZWdpbgogICAgICAgICAgICAgICAgLy8gUmVhY2hlZCB0aGUgbGltaXQ6IHJlc2V0IGNvdW50ZXIgYW5kIHRvZ2dsZSBvdXRwdXQKICAgICAgICAgICAgICAgIGNudCAgICAgIDw9IDQnYjA7CiAgICAgICAgICAgICAgICBjbGtfZGl2ICA8PSB+Y2xrX2RpdjsKICAgICAgICAgICAgZW5kIGVsc2UgYmVnaW4KICAgICAgICAgICAgICAgIC8vIE5vcm1hbCBjb3VudGluZywga2VlcCBvdXRwdXQgdW5jaGFuZ2VkCiAgICAgICAgICAgICAgICBjbnQgICAgICA8PSBjbnQgKyAxOwogICAgICAgICAgICBlbmQKICAgICAgICBlbmQKICAgIGVuZAoKZW5kbW9kdWxlCmBgYAo8L2Fuc3dlcj4=)=====MODELRESPONSEt0=====<think\>\[Summary\]Themodelresolvesthehalf\-periodinterpretation:divisionbyNUM\_DIVrequirestogglingeveryNUM\_DIV/2inputcycles\.ItselectsCNT\_MAX=NUM\_DIV/2\-1witha4\-bitcounterandactive\-lowreset,thenpreparesaninitialsimulation\.</think\><answer\></answer\><tool\_call\>\[Summary\]Function:verilog\_simulatorArgumentcode:SubmittheDUTusingCNT\_MAX=NUM\_DIV/2\-1andatestbenchforNUM\_DIV=4\.Checkoutputtimingandresetinitialization;printALL\_TESTS\_PASSEDwhentheerrorcountiszero\.</tool\_call\>=====TOOLRESPONSEt0\_tool0\.json=====Testcompleted\.Errorcount=0ALL\_TESTS\_PASSEDcandidate\.sv:70:$finishcalledat220\(1s\)=====MODELRESPONSEt1=====<think\>\[Summary\]Afterthefirstself\-checkpasses,themodelplansbroaderparametercoverageandadditionalresetchecksusingmultipleDUTinstances\.</think\><answer\></answer\><tool\_call\>\[Summary\]Function:verilog\_simulatorArgumentcode:SubmitthesamedividerlogicwithatestbenchinstantiatingNUM\_DIV=2,4,6,and8\.Checktheexpectedoutputperiodsandresetbehavior;printALL\_TESTS\_PASSEDwhennoerrorsaredetected\.</tool\_call\>=====TOOLRESPONSEt1\_tool0\.json=====Testcompleted\.Errorcount=0ALL\_TESTS\_PASSEDcandidate\.sv:77:$finishcalledat220\(1s\)=====MODELRESPONSEt2=====<think\>\[Summary\]Afterthemulti\-parameterself\-checkpasses,themodelrevisitsthespecificationandrechecksthethresholdcalculation,counterwidth,andresetbehavior\.Itretainsthesameimplementationandpreparesanotherverificationcallbeforereturningthefinalcode\.</think\><answer\></answer\><tool\_call\>\[Summary\]Function:verilog\_simulatorArgumentcode:SubmitthedividerandanothertestbenchforNUM\_DIV=4,repeatingverificationafterthepreviouscheckspassed\.PrintALL\_TESTS\_PASSEDwhentheerrorcountiszero\.</tool\_call\>=====TOOLRESPONSEt2\_tool0\.json=====Testcompleted\.Errorcount=0ALL\_TESTS\_PASSEDcandidate\.sv:64:$finishcalledat220\(1s\)=====MODELRESPONSEt3=====<think\>\[Summary\]ThemodelpreparesthefinalDUT\-onlyimplementation,includingexplanatorycommentsandomittingthetestbench\.</think\><answer\>‘‘‘verilog/\*\*\*Frequencydividerthatdividestheinputclockfrequencybyanevennumber\.\*\*@paramNUM\_DIVDivisionfactor\(mustbeanevennumber\)\*@paramclkInputclocksignal\*@paramrst\_nActive\-lowreset\(0=initialize,1=normaloperation\)\*@paramclk\_divDividedclockoutput\*\*Themoduleusesa4\-bitcountertocountinputclockcycles\.Whenthe\*counterreaches\(NUM\_DIV/2\)\-1,itresetsandtogglestheoutput,producing\*aclockwithperiod=NUM\_DIV\*Tclk\.\*/modulefreq\_diveven\#\(parameterNUM\_DIV=4//mustbeanevennumber\)\(inputwireclk,inputwirerst\_n,outputregclk\_div\);//Halfofthedivisionfactor\(integerdivision,NUM\_DIViseven\)localparamHALF\_DIV=NUM\_DIV/2;//CountermaximumvaluelocalparamCNT\_MAX=HALF\_DIV\-1;//4\-bitcounterasspecifiedreg\[3:0\]cnt;always@\(posedgeclkornegedgerst\_n\)beginif\(\!rst\_n\)begin//Active\-lowreset:clearcounterandoutputcnt<=4’b0;clk\_div<=1’b0;endelsebeginif\(cnt==CNT\_MAX\)begin//Reachedthelimit:resetcounterandtoggleoutputcnt<=4’b0;clk\_div<=~clk\_div;endelsebegin//Normalcounting,keepoutputunchangedcnt<=cnt\+1;endendendendmodule‘‘‘</answer\>

RTL\-Interact\-8B \(RL\)[⬇](data:text/plain;base64,PT09PT0gTU9ERUwgUkVTUE9OU0UgdDAgPT09PT0KCjx0aGluaz4KW1N1bW1hcnldClRoZSBtb2RlbCBleGFtaW5lcyB0aGUgaGFsZi1wZXJpb2QgaW50ZXJwcmV0YXRpb24gYW5kIGludGVnZXIgZGl2aXNpb24sIHRoZW4gc2VsZWN0cyBIQUxGID0gKE5VTV9ESVYgLSAxKS8yLiBJdCBkZXZlbG9wcyBhIHRlc3RiZW5jaCB3aXRoIG11bHRpcGxlIERVVCBpbnN0YW5jZXMgdG8gY2hlY2sgZGl2aXNpb24gZmFjdG9ycyAyLCA0LCA2LCBhbmQgOCBpbiBhIHNpbmdsZSBzaW11bGF0aW9uIGNhbGwuCjwvdGhpbms+Cgo8YW5zd2VyPgo8L2Fuc3dlcj4KCjx0b29sX2NhbGw+CltTdW1tYXJ5XQpGdW5jdGlvbjogdmVyaWxvZ19zaW11bGF0b3IKQXJndW1lbnQgY29kZTogU3VibWl0IHRoZSBEVVQgdXNpbmcgSEFMRiA9IChOVU1fRElWIC0gMSkvMiBhbmQgYSB0ZXN0YmVuY2ggaW5zdGFudGlhdGluZyBOVU1fRElWID0gMiwgNCwgNiwgYW5kIDguIE1lYXN1cmUgb3V0cHV0IHBlcmlvZHMgYW5kIGNvbXBhcmUgdGhlbSB3aXRoIHRoZSBleHBlY3RlZCB2YWx1ZXMgaW4gb25lIHNp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ICAvLyBJbnRlcm5hbCByZWdpc3RlciBmb3IgY2xrX2RpdgoKICAgIC8vIEhBTEYgPSAoTlVNX0RJViAtIDEpIC8gMiAgKGludGVnZXIgZGl2aXNpb24pCiAgICBsb2NhbHBhcmFtIEhBTEYgPSAoTlVNX0RJViAtIDEpIC8gMjsKCiAgICBhbHdheXMgQChwb3NlZGdlIGNsayBvciBuZWdlZGdlIHJzdF9uKSBiZWdpbgogICAgICAgIGlmICghcnN0X24pIGJlZ2luCiAgICAgICAgICAgIC8vIFJlc2V0OiBjbGVhciBjb3VudGVyIGFuZCBvdXRwdXQKICAgICAgICAgICAgY250ICAgICAgICA8PSA0J2IwOwogICAgICAgICAgICBjbGtfZGl2X3JlZyA8PSAxJ2IwOwogICAgICAgIGVuZCBlbHNlIGJlZ2luCiAgICAgICAgICAgIGlmIChjbnQgPCBIQUxGKSBiZWdpbgogICAgICAgICAgICAgICAgLy8gSW5jcmVtZW50IGNvdW50ZXIsIGtlZXAgb3V0cHV0IHVuY2hhbmdlZAogICAgICAgICAgICAgICAgY250IDw9IGNudCArIDEnYjE7CiAgICAgICAgICAgIGVuZCBlbHNlIGJlZ2luCiAgICAgICAgICAgICAgICAvLyBDb3VudGVyIHJlYWNoZWQgdGhlIGxpbWl0OiByZXNldCBpdCBhbmQgdG9nZ2xlIHRoZSBvdXRwdXQKICAgICAgICAgICAgICAgIGNudCAgICAgICAgPD0gNCdiMDsKICAgICAgICAgICAgICAgIGNsa19kaXZfcmVnIDw9IH5jbGtfZGl2X3JlZzsKICAgICAgICAgICAgZW5kCiAgICAgICAgZW5kCiAgICBlbmQKCiAgICBhc3NpZ24gY2xrX2RpdiA9IGNsa19kaXZfcmVnOwplbmRtb2R1bGUKYGBgCjwvYW5zd2VyPg==)=====MODELRESPONSEt0=====<think\>\[Summary\]Themodelexaminesthehalf\-periodinterpretationandintegerdivision,thenselectsHALF=\(NUM\_DIV\-1\)/2\.ItdevelopsatestbenchwithmultipleDUTinstancestocheckdivisionfactors2,4,6,and8inasinglesimulationcall\.</think\><answer\></answer\><tool\_call\>\[Summary\]Function:verilog\_simulatorArgumentcode:SubmittheDUTusingHALF=\(NUM\_DIV\-1\)/2andatestbenchinstantiatingNUM\_DIV=2,4,6,and8\.Measureoutputperiodsandcomparethemwiththeexpectedvaluesinonesimulation;printALL\_TESTS\_PASSEDwhentheerrorcountiszero\.</tool\_call\>=====TOOLRESPONSEt0\_tool0\.json=====ALL\_TESTS\_PASSEDcandidate\.sv:88:$finishcalledat220000\(1ps\)=====MODELRESPONSEt1=====<think\>\[Summary\]Afterreceivingasuccessfulself\-check,themodelpreparesthefinalDUT\-onlyimplementationwiththesamethreshold,omittingthetestbench\.</think\><answer\>‘‘‘verilog//Frequencydividerthatdividestheinputclockfrequencybyanevennumber\.modulefreq\_diveven\#\(parameterNUM\_DIV=4//Mustbeanevennumber\)\(inputwireclk,//Inputclockinputwirerst\_n,//Active\-lowresetoutputwireclk\_div//Dividedclockoutput\);reg\[3:0\]cnt;//4\-bitcounterregclk\_div\_reg;//Internalregisterforclk\_div//HALF=\(NUM\_DIV\-1\)/2\(integerdivision\)localparamHALF=\(NUM\_DIV\-1\)/2;always@\(posedgeclkornegedgerst\_n\)beginif\(\!rst\_n\)begin//Reset:clearcounterandoutputcnt<=4’b0;clk\_div\_reg<=1’b0;endelsebeginif\(cnt<HALF\)begin//Incrementcounter,keepoutputunchangedcnt<=cnt\+1’b1;endelsebegin//Counterreachedthelimit:resetitandtoggletheoutputcnt<=4’b0;clk\_div\_reg<=~clk\_div\_reg;endendendassignclk\_div=clk\_div\_reg;endmodule‘‘‘</answer\>

相似文章

Alpha-RTL:用于 RTL 硬件优化的测试时训练

arXiv cs.LG

Alpha-RTL (TTT-RTL) 引入了一种用于 RTL 硬件优化的测试时训练框架,利用带有 EDA 反馈的强化学习来优化 LLM 生成的设计。它在基准测试上实现了显著的 PPA 减少。