形式化属性验证(FPV)已经存在数十年,并已被证明能有效发现复杂的 RTL 缺陷。然而,形式化属性(例如以 SystemVerilog Assertions(SVA)编写的属性)编写起来既耗时又容易出错,即使对经验丰富的用户也是如此。先前工作曾尝试通过提高抽象层级来减轻这一负担,即从高层规范生成 SVA。但这并未消除推理并编写详细硬件行为所需的人工工作。受异构硬件时代对 FPV 需求增长以及大语言模型(LLM)进展的推动,我们着手探索 LLM 是否能够捕捉 RTL 行为并生成正确的 SVA 属性。首先,我们设计了一个基于 FPV 的评估框架,用于衡量 SVA 的正确性和完整性。随后,我们迭代评估 GPT4,以制定一组合法性和语义规则,从而通过提示引导其创建更好的 SVA。我们扩展了开源 AutoSVA 框架:除了增强其既有的活性属性流程外,还集成了我们改进的、基于 GPT4 的流程以生成安全性属性。最后,我们的用例评估了:(1)在复杂开源 RTL 上,GPT4 生成的 SVA 的 FPV 覆盖率;(2)使用生成的 SVA 提示 GPT4 从头创建 RTL。通过这些实验,我们发现 GPT4 即使针对存在缺陷的 RTL 也能生成正确的 SVA,而不会照搬设计错误。特别是,它生成的 SVA 暴露了 RISC-V CVA6 核心中的一个缺陷,而该缺陷在先前工作的评估中未被发现。
英文摘要:
Formal property verification (FPV) has existed for decades and has been shown to be effective at finding intricate RTL bugs. However, formal properties, such as those written as SystemVerilog Assertions (SVA), are time-consuming and error-prone to write, even for experienced users. Prior work has attempted to lighten this burden by raising the abstraction level so that SVA is generated from high-level specifications. However, this does not eliminate the manual effort of reasoning and writing about the detailed hardware behavior. Motivated by the increased need for FPV in the era of heterogeneous hardware and the advances in large language models (LLMs), we set out to explore whether LLMs can capture RTL behavior and generate correct SVA properties.
First, we design an FPV-based evaluation framework that measures the correctness and completeness of SVA. Then, we evaluate GPT4 iteratively to craft the set of syntax and semantic rules needed to prompt it toward creating better SVA. We extend the open-source AutoSVA framework by integrating our improved GPT4-based flow to generate safety properties, in addition to facilitating their existing flow for liveness properties. Lastly, our use cases evaluate (1) the FPV coverage of GPT4-generated SVA on complex open-source RTL and (2) using generated SVA to prompt GPT4 to create RTL from scratch.
Through these experiments, we find that GPT4 can generate correct SVA even for flawed RTL, without mirroring design errors. Particularly, it generated SVA that exposed a bug in the RISC-V CVA6 core that eluded the prior work's evaluation.
Veri-Sure: Multi-Agent RTL Code Generation with Temporal Tracing, Slicing and Formal Verification
School of Physics and Astronomy, The University of Edinburgh, Edinburgh, UK(物理与天文学院,爱丁堡大学,爱丁堡,英国);State Key Laboratory of Analog and Mixed-Signal VLSI, University of Macau, Macau(模拟与混合信号VLSI国家重点实验室,澳门大学,澳门);School of Science and Engineering, The Chinese University of Hong Kong, Shenzhen, Shenzhen, China(科学与工程学院,香港中文大学(深圳))
Think with Self-Decoupling and Self-Verification: Automated RTL Design with Backtrack-ToT
State Key Lab of Processors, Institute of Computing Technology, CAS(处理器重点实验室,计算技术研究所,中国科学院);University of Chinese Academy of Sciences(中国科学院大学);Beijing Normal University(北京师范大学);Peking University(北京大学);Chinese University of Hong Kong(香港中文大学)
From Indiscriminate to Targeted: Functionally Critical Signal-Driven Assertion Generation using LLMs for Efficient RTL Verification
State Key Lab of Processors, Institute of Computing Technology, CAS(处理器国家重点实验室,中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);Beijing University of Posts and Telecommunications(北京邮电大学);Beijing Normal University(北京师范大学);Tencent(腾讯);The Chinese University of Hong Kong(香港中文大学)
Comprehensive Verilog Design Problems: A Next-Generation Benchmark Dataset for Evaluating Large Language Models and Agents on RTL Design and Verification
AutoINV: Automated Invariant Generation Framework for Formal Verification on High-Level Synthesis Designs
The Hong Kong University of Science and Technology(香港科技大学);Indian Institute of Technology Goa(印度理工学院果阿分校);The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州))
From Concept to Practice: an Automated LLM-aided UVM Machine for RTL Verification
School of Integrated Circuits, Southeast University(东南大学集成电路学院);National Center of Technology Innovation for EDA(国家EDA技术创新中心);College of Economics, Shenzhen University(深圳大学经济学院);School of Computer Science and Engineering, Sun Yat-sen University(中山大学计算机科学与工程学院);Department of Computer Science, University of York(约克大学计算机科学系);Department of Computer Science, City University of Hong Kong(香港城市大学计算机科学系)
When Fuzzing Meets Understanding: LLM-Driven Semantic Test Generation for RTL Verification
Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);School of Advanced Interdisciplinary Sciences, University of Chinese Academy of Sciences(中国科学院大学前沿交叉科学学院)
Rtl2lean: Automated RTL-to-Lean Translation with Hierarchical Theorem Generation and Lemma Reuse
State Key Lab of Processors, Institute of Computing Technology, CAS(处理器国家重点实验室,中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);NorthChina University of Science and Technology(华北理工大学)
AssertGen: Enhancement of LLM-aided Assertion Generation through Cross-Layer Signal Bridging
State Key Lab of Processors, Institute of Computing Technology, CAS(处理器重点实验室,计算技术研究所,中国科学院);University of Chinese Academy of Sciences(中国科学院大学);School of Integrated Circuits, Nanjing University(南京大学集成电路学院);School of Information and Physical Sciences, University of Newcastle(纽卡斯尔大学信息与物理科学学院)
AssertFix: Empowering Automated Assertion Fix via Large Language Models
State Key Lab of Processors, Institute of Computing Technology, CAS(处理器国家重点实验室,中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);School of Information and Physical Sciences, University of Newcastle(纽卡斯尔大学信息与物理科学学院)
针对 LLM 生成的错误 SVA 仍需人工修复的问题,本文提出 AssertFix 框架,自动定位相关 RTL、诊断根因、分类错误并应用专用策略修复断言,在 Opencore 上提升修复率与验证覆盖率。