arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2409.15281cs.ARcs.ET
收藏

LAAG-RV:用于RTL设计验证的LLM辅助断言生成

LAAG-RV: LLM Assisted Assertion Generation for RTL Design Verification

Karthik Maddala, Bhabesh Mali, Chandan Karfa

AI总结:

本文提出基于LLM的LAAG-RV框架,通过自然语言规范生成SVA,并利用一次性Verilog循环和迭代提示修正错误,显著简化了RTL设计验证的断言生成过程。

摘要:

编写SystemVerilog Assertions (SVA) 是验证Register Transfer Level (RTL) 设计中重要但复杂的一步。传统上,专家需要理解设计规范并编写SVA断言,这既耗时又容易出错。然而,随着transformer模型的最新进展,Large Language Models (LLMs) 辅助的设计验证断言生成近期正受到关注。受此启发,我们提出了一种新颖的基于LLM的框架LAAG-RV,用于从设计的自然语言规范生成SVA。我们的框架在生成的SVA中提供了一次性Verilog循环用于信号同步,以提高生成断言的质量。在我们的实验中,我们基于OpenAI GPT-4创建了一个自定义LLM。此外,我们开发了测试用例来验证LLM生成的断言。初步观察显示,一些生成的断言存在问题,并未通过所有测试用例。然而,通过在模拟器中使用源自测试用例失败信息的精心制作的手动提示迭代地提示LLM,该框架能够生成正确的SVA。我们在OpenTitan设计上的结果表明,LLM显著简化了生成断言的过程,使其更高效且不易出错。

英文摘要:

Writing SystemVerilog Assertions (SVA) is an important but complex step in verifying Register Transfer Level (RTL) designs. Conventionally, experts need to understand the design specifications and write the SVA assertions, which is time-consuming and error-prone. However, with the recent advancement of transformer models, the Large Language Models (LLMs) assisted assertion generation for design verification is gaining interest in recent times. Motivated by this, we proposed a novel LLM-based framework, LAAG-RV, to generate SVA from the natural language specifications of the design. Our framework provides a one-time Verilog loop for signal synchronization in the generated SVA to improve the generated assertion quality. For our experiments, we created a custom LLM based on OpenAI GPT-4. Furthermore, we developed test cases to validate the LLM-generated assertions. Initial observations show that some generated assertions contain issues and did not pass all the test cases. However, by iteratively prompting the LLMs using carefully crafted manual prompts derived from test case failures in a simulator, the framework can generate correct SVAs. Our results on OpenTitan designs demonstrate that LLMs significantly simplify the process of generating assertions, making it efficient and less error-prone.

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

↑