基于大语言模型的自动化SVA生成
Automated SVA Generation with LLMs
AI总结:
本文提出SVA Generator框架,通过AST基础约束注入和自动化监督流程,将自然语言SVA描述转化为可执行的SVA。在不同难度层级上,其语义等价率显著高于通用大语言模型。
摘要:
功能验证仍是现代集成电路开发中的主要成本,系统Verilog断言(SVAs)对基于模拟的监控和形式化属性检查至关重要。然而,手动编写SVAs耗时且易出错。直接提示通用大语言模型(LLMs)也不可靠:生成的属性通常语法无效或语义错误,这在高质量领域训练数据稀缺时更加严重。我们提出了SVA Generator,一个以数据为中心的框架,将自然语言SVA描述(SVADs)转化为可执行的SVAs。它使用基于AST的约束注入和自动化监督流程,通过去重和约束检查确保结构一致性并减少幻觉。为了实现严格评估,我们引入了一个按AST深度分层的基准套件,并通过形式化属性等价性检查来量化语义正确性,与语法有效性分开评估,通过在相同时钟和环境假设下检查生成属性与参考属性之间的相互蕴含关系。在所有难度层级中,SVA Generator在语法通过率(SPR)上与强通用LLM基线相当,而在更深层次上,其语义等价率(SER)显著更高:在D2层级上比最佳通用LLM高24.5个百分点,在D3层级上高26.0个百分点,在D4层级上高17.5个百分点,平均在D2-D4层级上比最佳通用LLM高22.7个百分点。这些结果表明,高保真数据构建和深度分层基准测试是可靠、语义保留的SVA生成的关键。
英文摘要:
Functional verification remains a dominant cost in modern IC development, and SystemVerilog Assertions (SVAs) are critical for simulation-based monitoring and formal property checking. However, writing SVAs by hand is time-consuming and error-prone. Directly prompting general-purpose large language models (LLMs) is also unreliable: the generated properties are often syntactically invalid or semantically incorrect, and the problem is exacerbated by scarce, high-quality domain training data. We present SVA Generator, a data-centric framework that translates natural-language SVA Descriptions (SVADs) into executable SVAs. It uses AST-grounded constraint injection and an automated supervision pipeline that enforces structural consistency and reduces hallucinations via de-duplication and constraint checks. To enable rigorous evaluation, we introduce a benchmark suite stratified by AST depth and use formal property equivalence checking to quantify semantic correctness separately from syntax validity, by checking mutual implication between the generated and reference properties under the same clocking and environment assumptions. Across all difficulty tiers, SVA Generator achieves comparable Syntax Pass Rate (SPR) to strong general LLM baselines, while delivering substantially higher Semantic Equivalence Rate (SER) on deeper tiers: +24.5 pp on D2, +26.0 pp on D3, and +17.5 pp on D4 relative to the best-performing general LLM, corresponding to a +22.7 pp SER improvement on average over D2--D4. These results highlight that high-fidelity data construction and depth-stratified benchmarking are key to reliable, semantics-preserving SVA generation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。