AssertionForge: Enhancing Formal Verification Assertion Generation with Structured Representation of Specifications and RTL
Yunsheng Bai, Ghaith Bany Hamad, Syed Suhaib, Haoxing Ren · 2025
Read AssertionForge: Enhancing Formal Verification Assertion Generation with Structured Representation of Specifications and RTL by Yunsheng Bai, Ghaith Bany Hamad, Syed Suhaib, Haoxing Ren (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-19174.txt.
Introduction
Yunsheng Bai and co-authors help in a 2025 study language models write the check statements that formally verify chip designs. Such assertions are usually drawn from spec documents alone, which miss the wiring detail in the design code itself. Their system, AssertionForge, first builds a knowledge graph from the spec.
It then fuses in facts mined from the register-transfer code, using a hardware-specific schema, and draws varied contexts from the merged graph to prompt the model. On four designs, the assertions came out clearly better than a spec-only rival's. Grounding generation in both documents and code, they argue, is the fix for thin specs.
Catalog record
| CREATOR | Yunsheng Bai, Ghaith Bany Hamad, Syed Suhaib, Haoxing Ren |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 70 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2503-19174
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
AssertionForge: Enhancing Formal Verification Assertion Generation with Structured Representation of Specifications and RTL Yunsheng Bai, Ghaith Bany Hamad, Syed Suhaib, Haoxing Ren Abstract Generating SystemVerilog Assertions (SVAs) from natural language specifications remains a major challenge in formal verification (FV) due to the inherent ambiguity and incompleteness of specifications. Existing LLM-based approaches, such as AssertLLM , focus on extracting information solely from specification documents, often failing to capture essential internal signal interactions and design details present in the RTL code, leading to incomplete or incorrect assertions. We propose a novel approach that constructs a Knowledge Graph (KG) from both specifications and RTL, using a hardware-specific schema with domain-specific entity and relation types. We create an initial KG from the specification and then systematically fuse it with information extracted from the RTL code, resulting in a unified, comprehensive KG. This combined representation enables a more thorough understanding of the design and allows for a multi-resolution context synthesis process which is designed to extract diverse verification contexts from the KG. Experiments on five designs demonstrate that our method significantly enhances SVA quality over prior methods. This structured representation not only improves FV but also paves the way for future research in tasks like code generation and design understanding. I Introduction Formal Verification (FV) is a critical process in the VLSI design flow, ensuring that increasingly complex hardware designs conform to their specifications [ 11 ] . Among FV techniques, Assertion-Based Verification (ABV) uses SystemVerilog Assertions (SVAs), which are formal properties that describe expected design behavior, to verify functional correctness [ 58 ] . To be effective, these assertions must encapsulate both the high-level design intent, as described (often ambiguously) in natural language specifications [ 19 ] , and the low-level implementation details codified in Register-Transfer Level (RTL) code. Verification engineers traditionally bridge this gap by mentally synthesizing information from both sources, a process that is difficult to automate yet essential for producing high-quality SVAs—assertions that are syntactically correct, functionally accurate, and provide comprehensive coverage of critical design properties. Recently, Large Language Models (LLMs) have shown promise in generating SVAs from natural language specifications, thanks to their advanced text comprehension and coding capabilities. Methods like AssertLLM [ 18 ] decompose the SVA generation task into phases, using customized LLMs to extract structural specifications, map signal definitions, and generate assertions by prompting the LLM with contextual information from specifications about relevant signals. These approaches demonstrate the feasibility of using LLMs for generating SVAs, but they remain fundamentally limited in their ability to capture the full design context. The limitations stem from their approach to utilizing sources of verification information. Specification-focused approaches like AssertLLM extract design intent from the often ambiguous and incomplete specifications [ 19 , 3 , 16 , 21 , 52 ] , and thus miss crucial implementation details found exclusively in the RTL, leading to plausible but functionally incorrect assertions. Conversely, RTL-focused approaches can capture implementation details but lack understanding of original design intent and high-level functionality, producing assertions that verify implementation without validating adherence to specifications. We hypothesize that explicitly constructing a structured, interconnected mental model of the design—one that links design intent with RTL behavior—will provide a more robust foundation for assertion generation. This mirrors how verification engineers manually synthesize information from multiple sources to write meaningful assertions. Compared to unstructured retrieval-based approaches [ 18 , 33 ] . such a mental model enables more precise tracing of intent to implementation and facilitates deeper reasoning, allowing the LLM to identify signal dependencies and complex interactions. However, building such a model is challenging, requiring structured knowledge extraction from specifications, analysis of RTL control flows, and alignment between abstract requirements and implementation details. In this paper, we present AssertionForge , a novel approach that constructs a unified Knowledge Graph (KG) from specifications and RTL, thereby actively “forging” assertions by bridging the semantic gap between high-level specifications and RTL implementation, enabling discovery of complex multi-signal interactions often obscured in linear text. The KG is built in two stages: entity-relation extraction from the specification via an LLM and structural parsing of RTL via a Verilog parser. With the unified KG constructed, the next step is crafting effective prompts for LLMs to generate high-quality test plans and SVAs. We propose a multi-resolution context synthesis process that progressively narrows focus from broad design overviews to fine-grained signal interactions: (1) LLM-based global summarization provides a high-level view of the specification and RTL; (2) Signal-specific retriever extracts relevant snippets from the specification and RTL; (3) Guided Random Walk with Adaptive Sampling (GRW-AS) explores the KG, tracing structured paths that connect the target signal to critical design elements. To ensure concise yet informative prompts, an LLM-based pruning mechanism filters and refines the retrieved text and graph-derived paths, balancing diversity and relevance before guiding final SVA generation. Our contributions are summarized as follows: • We propose a novel KG-based approach, AssertionForge , that integrates information from both natural language specifications and RTL code into a unified structured representation for SVA generation. • We develop a multi-resolution context synthesis process, which constructs verification-critical prompts by providing context as global summaries, signal-specific snippets, and structured paths from the KG. • We demonstrate that our method significantly enhances SVA quality through experiments on five designs, achieving superior results compared to existing LLM-based methods. II Related Work II-A Formal Verification and SVA Generation LLM-based approaches for SystemVerilog Assertion (SVA) generation have gained traction [ 44 , 38 , 29 , 4 , 37 , 28 , 2 , 36 , 31 , 47 ] , with AssertLLM [ 18 ] automating assertion extraction from specifications. Non-LLM methods include GOLDMINE [ 57 ] , HARM [ 20 ] , A-Team [ 15 ] , and AutoSVA [ 43 ] , which use data mining, static analysis, templates, etc. for assertion generation. However, these approaches often struggle with complex specifications, suffer from limited coverage, or depend heavily on simulation stimuli quality. Recent RTL-guided SVA works include [ 27 ] and [ 54 ] . Our work focuses on advancing LLM-based SVA generation, exploring how structured representation and context-aware prompting can improve assertion quality. II-B LLM for Knowledge Graph Construction and Understanding Traditional methods for Knowledge Graph (KG) [ 25 , 1 ] construction rely on non-LLM approaches requiring manual effort and domain-specific ontologies [ 39 , 9 , 62 , 63 ] . Recent advancements leverage LLMs for KG construction, automatically inferring entities and relationships [ 56 , 45 , 7 , 64 ] . LLM-based graphs and KGs have gained popularity across domains [ 30 , 46 ] , with Microsoft’s GraphRAG demonstrating their application in question answering [ 17 ] . KGs enhance LLM-based NLP tasks including question answering, dialogue systems, and reasoning [ 60 , 49 , 53 , 35 , 59 ] by improving knowledge-grounded responses and contextual understanding. Our approach adapts these advancements to hardware verification by integrating specifications and RTL code into a knowledge-rich graph. III Methodology In this section, we introduce our novel approach, AssertionForge (Figure 1 ), for generating high-quality SystemVerilog Assertions (SVAs) from both natural language specifications and RTL code. Fig. 1: Overview of AssertionForge . Our method is structured into a three-stage process: First, we construct