NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

AssertLLM: Generating Hardware Verification Assertions from Design Specifications via Multi-LLMs

Wenji Fang, Mengming Li, Min Li, Zhiyuan Yan, Shang Liu, Hongce Zhang, Zhiyao Xie

TL;DR

This paper introduces AssertLLM, a novel framework that automatically generates hardware verification assertions from complete design specification documents, including natural language text and waveform diagrams. By leveraging a multi-LLM approach, AssertLLM significantly improves the accuracy and coverage of generated assertions compared to existing methods and off-the-shelf LLMs.

What Problem Does This Paper Address?

Ensuring that complex hardware designs (like those in VLSI) function as intended is crucial. This is typically done through Assertion-Based Verification (ABV), where engineers write "assertions" – formal statements that check for expected behavior. The challenge is that these assertions are usually derived from design specifications, which are often written in natural language and can be quite lengthy and unstructured. Manually converting these specifications into accurate assertions is a time-consuming and error-prone process. Existing automated methods struggle with full specification documents, often requiring manual extraction of relevant sentences or failing to handle multi-modal information like waveform diagrams. This gap limits the practical application of automated assertion generation.

Methods

AssertLLM tackles this problem by breaking down assertion generation into three key phases, each handled by a specialized Large Language Model (LLM):

  1. Natural Language Analyzer (LLM 1): This LLM processes the natural language parts of the specification document. It's trained to extract structured, signal-specific information (like definition, functionality, and interconnections) using a unified template. This helps overcome the unstructured nature of typical specifications.
  2. Waveform Analyzer (LLM 2): This LLM is designed to interpret waveform diagrams, which are often included in specifications but are difficult for traditional methods to process. It first generates templates to describe observed behaviors and then uses these templates to extract behavioral descriptions from the waveform images. This is a novel approach to extracting assertion-relevant information from visual data.
  3. SVA Generator (LLM 3): This LLM takes the structured information from the first two LLMs and generates SystemVerilog Assertions (SVAs). To ensure accuracy and adherence to SVA syntax, it incorporates Retrieval Augmented Generation (RAG) with a knowledge base of SVA and formal verification techniques. It also uses the overall design architecture diagram to guide the generation process. Assertions are categorized into three types: width, connectivity, and function.

Datasets

The paper evaluates AssertLLM on the "I2C" protocol design, using its complete specification document (in PDF format) and Verilog signal definition files and golden RTL designs. They also evaluate on "ECG" and "Pairing" designs. No new benchmark datasets were introduced; instead, they utilized existing design specifications.

Key Insights and Ideas

  • Multi-LLM for Specialization: Breaking down the complex task of assertion generation into specialized sub-tasks, each handled by a tailored LLM, is more effective than using a single, general-purpose LLM.
  • Waveform Analysis is Crucial: Incorporating waveform diagram analysis is a significant advancement, as these diagrams often contain critical functional behavior information that is otherwise inaccessible to automated tools.
  • RAG for SVA Accuracy: Using Retrieval Augmented Generation (RAG) for the SVA generator significantly improves the syntactic and functional correctness of the generated assertions by grounding the LLM in established verification knowledge.
  • Structured Extraction is Key: The ability to extract structured information from unstructured natural language specifications is fundamental to generating meaningful assertions.
  • Specification Quality Matters: The quality and detail of the input specification document directly impact the quantity and quality of generated assertions, highlighting the importance of well-written specifications.

Key Results

  • AssertLLM generates assertions with an average of 88% passing both syntax checks and functional verification (FPV).
  • The generated assertions achieve an average 97% Cone of Influence (COI) coverage, indicating they effectively cover relevant design logic.
  • Compared to GPT-4o and GPT-3.5, AssertLLM shows a significant improvement. GPT-4o achieved only 36% correctness and 11% coverage when generating from natural language specifications without AssertLLM's specialized techniques, and struggled with waveform analysis. GPT-3.5 could not handle multi-modal specifications directly.
  • For the "I2C" design, AssertLLM generated 65 properties, with 86% being correct and functionally valid.
  • In evaluations on "ECG" and "Pairing" designs, AssertLLM maintained high correctness (91-93%) and coverage (97-100%), demonstrating good generalizability.

Limitations and Future Work

  • Specification Detail Dependency: The authors acknowledge that the quality and detail of the input specification documents significantly influence the number and quality of generated assertions. Less detailed specifications (like for "ECG" and "Pairing") lead to fewer generated assertions.
  • Incomplete Assertions from Waveforms: For waveform-generated SVAs, failures in FPV checks were sometimes attributed to AssertLLM's inability to infer behaviors not explicitly depicted, leading to incomplete assertions.
  • Future Work: The paper suggests that further improvements could be made by enhancing the LLMs' ability to infer implicit behaviors from waveforms and by exploring more sophisticated RAG techniques. The authors also highlight the need for more detailed and structured specification documents to maximize the benefits of such automated tools.

Summary updated

BibTeX
@inproceedings{fang2024assertllm,
  author = {Wenji Fang and Mengming Li and Min Li and Zhiyuan Yan and Shang Liu and Hongce Zhang and Zhiyao Xie},
  title = {{AssertLLM: Generating Hardware Verification Assertions from Design Specifications via Multi-LLMs}},
  booktitle = {ASP-DAC},
  year = {2024},
}
Figure