基於根本原因驅動的波形追蹤代理人於 RTL 程式碼生成之應用
A Root-Cause-Driven Agent by Tracing Waveform for RTL Code Generation
摘要
本論文提出診斷引導修復(Diagnosis-Guided Repair,DGR)框架,這是一個以波形
為驅動、具備根本原因感知能力的多智能體自動化 Verilog RTL 生成系統。與現有的
直接將原始模擬錯誤回饋給程式碼生成模型的方法不同,DGR 引入專用的 AnalyzerLLM,在任何修復嘗試之前執行可疑信號識別、針對性波形過濾與自然語言逆向推理,產生結構化診斷報告。Coder-LLM 接收此報告作為針對性的修復指令,從而減少無效的重新生成輪次。
在 VerilogEval-Human v2 基準測試上,DGR 使用 Qwen3.5:27B 在 s = 30 時達到
97.44% 的代理通過率(APR),以超過 120B 參數模型的 VerilogCoder(94.2%)、MAGE(95.5%)與 ACE-RTL(95.5%)均被超越。即使在 MAGE 所使用的重新生成預算 s = 5下,DGR 搭配 Qwen3.5:27B 已達到 92.95% 的 APR,以規模遠小於上述系統的開源權重模型接近 MAGE 的結果。DGR 搭配 GPT-OSS:20B 在 s = 30 時獨立達到 95.51% 的APR,與 MAGE 及 ACE-RTL 持平,所用模型規模卻小了一個數量級。AES-128 案例研
究進一步證明,結合推理智能體與 DGR,能夠在無人工介入、無需人工撰寫提示模板
或錯誤清單的情況下,自主生成通過全部五項 NIST 測試向量、並於 TSMC 40 nm 製程
滿足 250 MHz 時序限制的 RTL。
為驅動、具備根本原因感知能力的多智能體自動化 Verilog RTL 生成系統。與現有的
直接將原始模擬錯誤回饋給程式碼生成模型的方法不同,DGR 引入專用的 AnalyzerLLM,在任何修復嘗試之前執行可疑信號識別、針對性波形過濾與自然語言逆向推理,產生結構化診斷報告。Coder-LLM 接收此報告作為針對性的修復指令,從而減少無效的重新生成輪次。
在 VerilogEval-Human v2 基準測試上,DGR 使用 Qwen3.5:27B 在 s = 30 時達到
97.44% 的代理通過率(APR),以超過 120B 參數模型的 VerilogCoder(94.2%)、MAGE(95.5%)與 ACE-RTL(95.5%)均被超越。即使在 MAGE 所使用的重新生成預算 s = 5下,DGR 搭配 Qwen3.5:27B 已達到 92.95% 的 APR,以規模遠小於上述系統的開源權重模型接近 MAGE 的結果。DGR 搭配 GPT-OSS:20B 在 s = 30 時獨立達到 95.51% 的APR,與 MAGE 及 ACE-RTL 持平,所用模型規模卻小了一個數量級。AES-128 案例研
究進一步證明,結合推理智能體與 DGR,能夠在無人工介入、無需人工撰寫提示模板
或錯誤清單的情況下,自主生成通過全部五項 NIST 測試向量、並於 TSMC 40 nm 製程
滿足 250 MHz 時序限制的 RTL。
This thesis proposes Diagnosis-Guided Repair (DGR), a waveform-driven, root-cause-aware multi-agent framework for automated Verilog RTL generation. Unlike existing approaches that feed raw simulation errors directly to the code-generation model, DGR introduces a dedicated Analyzer-LLM that performs suspect signal identification, targeted waveform filtering, and backward natural-language reasoning to produce a structured Diagnostic Report before any repair is attempted. The Coder-LLM receives this report as a targeted repair directive, reducing wasted regeneration rounds.
Evaluated on the VerilogEval-Human v2 benchmark, DGR achieves 97.44% Agentic Pass Rate (APR) at s = 30 using Qwen3.5:27B, surpassing VerilogCoder (94.2%), MAGE (95.5%), and ACE-RTL (95.5%) despite all three relying on models exceeding 120B parameters. Even under the regeneration budget s = 5 used by MAGE, DGR with Qwen3.5:27B reaches 92.95% APR, approaching MAGE’s result with a substantially smaller open-weight model. DGR with GPT-OSS:20B independently achieves 95.51% APR at s = 30, matching MAGE and ACE-RTL while using an open-weight model an order of magnitude smaller. A case study on AES-128 further demonstrates that combining Reasoning Agents with DGR autonomously produces RTL passing all five NIST test vectors and meeting a 250 MHz timing constraint on TSMC 40 nm, with no human-written prompt templates or bug checklists required.
Evaluated on the VerilogEval-Human v2 benchmark, DGR achieves 97.44% Agentic Pass Rate (APR) at s = 30 using Qwen3.5:27B, surpassing VerilogCoder (94.2%), MAGE (95.5%), and ACE-RTL (95.5%) despite all three relying on models exceeding 120B parameters. Even under the regeneration budget s = 5 used by MAGE, DGR with Qwen3.5:27B reaches 92.95% APR, approaching MAGE’s result with a substantially smaller open-weight model. DGR with GPT-OSS:20B independently achieves 95.51% APR at s = 30, matching MAGE and ACE-RTL while using an open-weight model an order of magnitude smaller. A case study on AES-128 further demonstrates that combining Reasoning Agents with DGR autonomously produces RTL passing all five NIST test vectors and meeting a 250 MHz timing constraint on TSMC 40 nm, with no human-written prompt templates or bug checklists required.