arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.09867cs.ARcs.AI
收藏

EstRTL:功能估计引导的RTL代码生成

EstRTL: Functional Estimation Guided RTL Code Generation

College of Computer Science and Technology, National University of Defense Technology(国防科技大学计算机科学与技术学院);Defense Innovation Institute, Academy of Military Science (AMS)(军事科学院创新院);School of Computer Science and Technology, Shandong University(山东大学计算机科学与技术学院);Key Laboratory of Advanced Microprocessor Chips and Systems, Changsha, China, and College of Computer Science and Technology, National University of Defense Technology, Changsha, China(先进微处理器芯片与系统重点实验室,长沙,中国,和国防科技大学计算机科学与技术学院,长沙,中国);Defense Innovation Institute, AMS, Beijing, China and Qiyuan Lab, Beijing, China(军事科学院创新院,北京,中国和启元实验室,北京,中国)

Qi Xiong, Renzhi Chen, Bowei Wang, Yuqing Xiong, Libo Huang, Lei Wang

AI总结:

提出EstRTL框架,通过静态功能评分估计,结合生成、评估和修正三阶段范式,提升LLM生成RTL代码的功能正确性,在通用LLM上正确率提升3.2%-9.0%。

摘要:

优化寄存器传输级(RTL)代码在硬件设计中至关重要。大型语言模型(LLM)为RTL代码的自动生成和优化提供了新方法,有望显著加速设计过程并减少人力投入。然而,现有的RTL代码生成方法通常侧重于模型微调和利用各种扩展技术来增强RTL代码生成能力,缺乏对功能正确性的关注。确保生成的RTL代码不仅编译成功,而且在实际硬件实现中按预期运行仍然是一个关键挑战。为解决这一问题,我们提出了EstRTL,一个基于静态功能评分估计的LLM驱动的协作智能体框架,用于RTL代码生成。EstRTL采用三阶段范式:生成、评估和修正。在阶段中,功能评估智能体根据评分和评估结果静态评估生成的代码,并决定是直接输出代码、返回重新生成还是转发给代码修正智能体。该框架可应用于各种专为RTL代码生成设计的LLM,进一步增强生成代码的正确性。通过提供定量评分和可读的需求比较,它提高了AI辅助RTL代码生成的透明度。实验表明,EstRTL将通用LLM的RTL代码生成正确率显著提升了3.2%-9.0%,展示了我们系统的实用价值。代码和实验结果已开源,链接:this https URL。

英文摘要:

Optimizing register transfer level (RTL) code is of vital importance in hardware design. Large language models (LLMs) provide new methods for the automatic generation and optimization of RTL code, offering the potential to significantly accelerate the design process and reduce human effort. However, existing methods for generating RTL code often focus on model fine-tuning and the use of various expansion techniques to enhance the RTL code generation capabilities, lacking attention to the functional correctness. Ensuring that the generated RTL code not only compiles successfully but also behaves as intended in real hardware implementations remains a critical challenge. To address this issue, we propose EstRTL, an LLM-powered collaborative agent framework for RTL code generation based on static functional score estimation. EstRTL operates a three-stage paradigm: Generation, Estimation and Correction. During the stages, the functional estimation agent statically evaluates the generated code based on score and assessment results, and decides whether to output the code directly, return it for regeneration, or forward it to the code correction agent. This framework can be applied to various LLMs that designed for RTL code generation, further enhancing the correctness of the generated code. By providing quantitative scores and human-readable requirements comparisons, it improves the transparency of AI-assisted RTL code generation. Experiments show that EstRTL significantly improves the correctness of RTL code generation by generic LLM by 3.2\%-9.0\%, demonstrating the practical value of our system. The codes and experimental results are open-sourced at link: https://anonymous.4open.science/status/EstRTL-E200/.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑