通过子任务聚焦微调大语言模型与迭代提示实现自动高质量Verilog断言生成
Automatic High-quality Verilog Assertion Generation through Subtask-Focused Fine-Tuned LLMs and Iterative Prompting
AI总结:
本文提出基于子任务聚焦微调LLM和迭代提示的自动SVA生成流程,使功能正确断言增加7.3倍、无语法错误断言增加26%,有效简化FPV流程。
摘要:
形式化属性验证(FPV)使用SystemVerilog断言(SVA),对于确保设计相对于规范的完备性至关重要。然而,编写SVA是一项费力的工作,且学习曲线陡峭。在这项工作中,我们提出了一种基于大语言模型(LLM)的流程,用于从设计规范文档自动生成高质量SVA,命名为\ToolName。我们引入了一种新颖的子任务聚焦微调方法,该方法有效解决了基线LLM产生的功能不正确断言的问题,使功能正确断言的数量显著增加了7.3倍。认识到语法和语义错误普遍存在,我们还开发了一种迭代细化方法,通过系统地重新提示LLM来纠正已识别的问题,从而增强LLM的初始输出。这一过程进一步由一个定制编译器加强,该编译器生成有意义的错误消息,引导LLM提高准确性。实验表明,使用这种方法,无语法错误的断言数量增加了26%,展示了其简化FPV流程的潜力。
英文摘要:
Formal Property Verification (FPV), using SystemVerilog Assertions (SVA), is crucial for ensuring the completeness of design with respect to the specification. However, writing SVA is a laborious task and has a steep learning curve. In this work, we present a large language model (LLM) -based flow to automatically generate high-quality SVA from the design specification documents, named \ToolName. We introduce a novel sub-task-focused fine-tuning approach that effectively addresses functionally incorrect assertions produced by baseline LLMs, leading to a remarkable 7.3-fold increase in the number of functionally correct assertions. Recognizing the prevalence of syntax and semantic errors, we also developed an iterative refinement method that enhances the LLM's initial outputs by systematically re-prompting it to correct identified issues. This process is further strengthened by a custom compiler that generates meaningful error messages, guiding the LLM towards improved accuracy. The experiments demonstrate a 26\% increase in the number of assertions free from syntax errors using this approach, showcasing its potential to streamline the FPV process.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。