用模板和领域语言让大模型精准生成硬件验证测试平台。
HAVEN: Hybrid Automated Verification ENgine for UVM Testbench Synthesis with LLMs
- 用结构化规划+预设模板生成正确时序的UVM组件
- 通过协议感知的DSL实现90.6%代码覆盖率和87.9%功能覆盖率
- 适合需要高可靠性验证的芯片设计团队使用
集成电路验证占开发周期近70%,现有研究尝试用大模型自动生成测试平台以降低开销。然而,由于硬件描述语言(HDL)在训练数据中极少出现,大模型常生成错误代码。为此,我们提出HAVEN(混合自动化验证引擎),避免大模型直接编写HDL。针对UVM测试平台生成,HAVEN利用大模型分析设计规范,生成结构化架构方案,并通过预定义的、协议相关的Jinja2模板生成所有符合总线握手时序的UVM组件。针对UVM序列生成,引入协议感知的领域特定语言(DSL),将序列分解为细粒度步骤类型;先用预设的DSL模式生成高覆盖率序列,再通过迭代调用大模型分析覆盖率缺口报告并生成针对性序列。实验基于19个开源IP设计(覆盖Direct、Wishbone、AXI4-Lite三种接口协议),HAVEN达到平均100%编译成功率、90.6%代码覆盖率和87.9%功能覆盖率,在所有大模型辅助测试平台生成系统中表现最优。
原文摘要 · Abstract (English)
Integrated Circuit (IC) verification consumes nearly 70% of the IC development cycle, and recent research leverages Large Language Models (LLMs) to automatically generate testbenches and reduce verification overhead. However, LLMs have difficulty generating testbenches correctly. Unlike high-level programming languages, Hardware Description Languages (HDLs) are extremely rare in LLMs training data, leading LLMs to produce incorrect code. To overcome challenges when using LLMs to generate Universal Verification Methodology (UVM) testbenches and sequences, wepropose HAVEN (Hybrid Automated Verification ENgine) to prevent LLMs from writing HDL directly. For UVM testbench generation, HAVEN utilizes LLM agents to analyze design specifications to produce a structured architectural plan. The HAVEN Template Engine then combines with predefined and protocol-specific templates to generate all UVM components with correct bus-handshake timing. For UVM sequence generation, HAVEN introduces a Protocol-Aware Sequence Domain-Specific Language (DSL) that decomposes sequences into fine-grained step types. A set of predefined DSL patterns first establishes sequences that achieve a high coverage rate without LLM involvement. HAVEN continues to improve the coverage rate by iteratively leveraging LLM agents to analyze coverage gap reports and compose additional targeted DSL sequences. Unlike previous works, HAVEN is the first system that utilizes pre-defined, protocol-specific Jinja2 templates to generate all UVM components and UVM sequences using our proposed Protocol-Aware DSL and rule-based code generator. Our experimental results on 19 open-source IP designs spanning three interface protocols (Direct, Wishbone, AXI4-Lite) show that HAVEN achieves 100% compilation success, 90.6% code coverage, and 87.9% functional coverage on average, and is SOTA among LLM-assisted testbench generation systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。