高级检索

    Faver:基于函数抽象验证的RTL生成ReAct推理框架

    Faver: Function-Abstracted Verification for RTL Generation with ReAct Reasoning

    • 摘要: 基于大语言模型(LLM)的寄存器传输级(RTL)代码生成是近年来受到广泛关注的研究方向,因为它旨在突破当前芯片设计流程中自动化程度最低的环节。然而,高层规格描述与RTL之间存在显著语义鸿沟,同时训练数据有限,导致现有模型在生成正确性方面仍面临较大挑战。一种自然的思路是借鉴人工设计经验,将设计与验证相结合,但RTL测试数据相较设计数据更加稀缺,使该方法对LLM并不友好。相比之下,LLM在Python/C等高层语言中表现出更强能力,这类语言更适合功能描述,似乎更有潜力用于RTL验证。但高层语言与RTL之间仍存在巨大的语义差异,并且在时空粒度上存在明显差别。基于高层语言对RTL进行验证,需要LLM不仅理解高层功能语义,还必须确保底层时序行为与电路执行一致,这并非易事。针对上述问题,提出 Faver:基于函数抽象验证的RTL生成ReAct推理框架,作为一种函数抽象可验证中间件,用于简化LLM驱动的RTL生成与验证流程。通过将更适合LLM处理的代码结构与基于规则的模板相结合,Faver对电路验证细节进行解耦,使LLM能够专注于功能本身。实验结果表明,在SFT模型和开源模型上,Faver可将RTL生成正确率提升最高达14%。

       

      Abstract: Register Transfer Level (RTL) code generation based on large language models (LLMs) has emerged as a promising research direction, as it targets the least automated stage in current chip design workflows. However, the substantial semantic gap between high-level specifications and RTL, combined with limited training data, poses significant challenges for generation accuracy. A natural approach is to leverage human design experience by integrating design and verification, yet RTL test data are even scarcer than design data, making this strategy less LLM-friendly. In contrast, LLMs exhibit stronger capabilities in high-level languages such as Python or C, which are more suitable for functional specification and appear promising for RTL verification. Nevertheless, a large semantic gap remains, with notable differences in spatiotemporal granularity between high-level languages and hardware code. Verifying RTL using Python or similar high-level languages requires the LLM not only to understand high-level functional semantics but also to ensure that low-level timing and operational details match the circuit behavior, which is nontrivial. To address this challenge, we propose Faver: Function-Abstracted Verification for RTL Generation with ReAct Reasoning, a middleware framework that streamlines RTL verification in LLM-based workflows. By combining LLM-friendly code structures with rule-based templates, Faver decouples circuit verification details, enabling the LLM to focus on functionality itself. Experimental results on both SFT and open-source models show that Faver can improve RTL generation accuracy by up to 14%.

       

    /

    返回文章
    返回