AutoVeriFix+: 通过轨迹感知因果修复和语义冗余剪枝实现高正确性的RTL生成
AutoVeriFix+: High-Correctness RTL Generation via Trace-Aware Causal Fix and Semantic Redundancy Pruning
AI总结:
AutoVeriFix+通过轨迹感知因果修复和语义冗余剪枝,提升Verilog代码生成的功能正确性与设计效率。
摘要:
大型语言模型(LLMs)在生成高级编程语言如Python和C++的软件代码方面表现出色,但其在硬件描述语言如Verilog上的应用具有挑战性,这主要是由于高质量训练数据的稀缺性。当前使用LLMs生成Verilog代码的方法往往侧重于语法正确性,导致代码存在功能错误。为解决这些挑战,我们提出了AutoVeriFix+,这是一种新的三阶段框架,将高级语义推理与状态空间探索相结合,以提高功能正确性和设计效率。第一阶段中,使用LLM生成高级Python参考模型,以定义预期的电路行为。第二阶段中,另一个LLM生成初始的Verilog RTL候选代码,并迭代修复语法错误。第三阶段中,我们引入了基于约束的测试引擎来深入探索顺序逻辑并识别边缘情况漏洞。通过精确的执行轨迹和内部寄存器快照,AutoVeriFix+为LLM提供了必要的因果上下文以解决复杂的状态转换错误。此外,它还会生成覆盖报告以识别功能冗余的分支,使LLM能够进行语义剪枝以优化面积。实验结果表明,AutoVeriFix+在严格基准上实现了超过80%的功能正确性,达到了VerilogEval-machine数据集上的pass@10分数90.2%。此外,通过轨迹感知优化,它在基准中消除了平均25%的冗余逻辑。
英文摘要:
Large language models (LLMs) have demonstrated impressive capabilities in generating software code for high-level programming languages such as Python and C++. However, their application to hardware description languages, such as Verilog, is challenging due to the scarcity of high-quality training data. Current approaches to Verilog code generation using LLMs often focus on syntactic correctness, resulting in code with functional errors. To address these challenges, we propose AutoVeriFix+, a novel three-stage framework that integrates high-level semantic reasoning with state-space exploration to enhance functional correctness and design efficiency. In the first stage, an LLM is employed to generate high-level Python reference models that define the intended circuit behavior. In the second stage, another LLM generates initial Verilog RTL candidates and iteratively fixes syntactic errors. In the third stage, we introduce a Concolic testing engine to exercise deep sequential logic and identify corner-case vulnerabilities. With cycle-accurate execution traces and internal register snapshots, AutoVeriFix+ provides the LLM with the causal context necessary to resolve complex state-transition errors. Furthermore, it will generate a coverage report to identify functionally redundant branches, enabling the LLM to perform semantic pruning for area optimization. Experimental results demonstrate that AutoVeriFix+ achieves over 80% functional correctness on rigorous benchmarks, reaching a pass@10 score of 90.2% on the VerilogEval-machine dataset. In addition, it eliminates an average of 25% redundant logic across benchmarks through trace-aware optimization.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。