SpecAlign: 一种用于 SystemVerilog 断言生成的语义对齐框架
SpecAlign: A Semantic Alignment Framework for SystemVerilog Assertion Generation
AI总结:
提出 SpecAlign 框架,通过基于蕴含的分类和自一致性投票机制,评估并改进 LLM 生成的 SVA 与自然语言规范之间的语义对齐,无需黄金 RTL。
摘要:
现有的大语言模型(LLM)方法在生成 SystemVerilog 断言(SVA)时主要关注语法有效性和形式验证结果,而生成的断言与自然语言规范之间的语义对齐仍然难以量化。因此,在缺乏黄金 RTL 的情况下,幻觉或未对齐的 SVA 会降低信心并增加调试工作。本文提出了 SpecAlign,一个用于语义评估和优化 LLM 生成的 SVA 的框架。SpecAlign 引入了两个迭代对齐循环,通过基于蕴含的分类来评估自然语言属性和 SVA 是否符合设计规范。我们通过链式思维提示生成多个推理路径,并通过自一致性投票机制聚合它们,从而改进对齐决策。对未对齐的断言进行分析以生成可操作的反馈用于优化。我们进一步定义了一个定量对齐分数来衡量迭代过程中的语义一致性。实验结果表明,SpecAlign 能够有效检测语义不一致性,并在不依赖黄金 RTL 的情况下改进断言对齐,为传统形式验证评估指标提供了可扩展的补充。
英文摘要:
Existing Large Language Model (LLM) approaches to SystemVerilog Assertion (SVA) generation primarily focus on syntactic validity and formal verification outcomes, while semantic alignment between generated assertions and natural language specifications remains difficult to quantify. As a result, hallucinated or misaligned SVAs can reduce confidence and increase debugging efforts in the absence of golden RTL. This paper presents SpecAlign, a framework for semantic evaluation and refinement of LLM-generated SVAs. SpecAlign introduces two iterative alignment loops that assess both natural language properties and SVAs against the design specification using entailment-based classification. We improve alignment decisions by generating multiple reasoning paths using chain-of-thought prompting and aggregating them via a self-consistency voting mechanism. Misaligned assertions are analyzed to generate actionable feedback for refinement. We further define a quantitative alignment score to measure semantic consistency across iterations. Experimental results demonstrate that SpecAlign effectively detects semantic inconsistencies and improves assertion alignment without relying on golden RTL, providing a scalable complement to traditional formal verification evaluation metrics.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。