SpecAlign: A Semantic Alignment Framework for SystemVerilog Assertion Generation

📅 2026-05-24
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge that SystemVerilog assertions (SVAs) generated by large language models (LLMs) often exhibit semantic inconsistencies with natural language specifications and are difficult to evaluate in the absence of golden RTL references. To this end, the paper proposes SpecAlign, a novel framework that introduces, for the first time, an iterative alignment process without requiring golden RTL. SpecAlign employs a dual-loop mechanism based on semantic entailment classification, integrating chain-of-thought reasoning with self-consistency voting to iteratively refine SVAs and provide actionable feedback. The method innovatively defines a semantic alignment score that significantly enhances consistency between generated assertions and their specifications. Experimental results demonstrate its effectiveness in detecting semantic discrepancies, offering a scalable complementary evaluation approach for formal verification.
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

semantic alignment
SystemVerilog Assertion
natural language specification
LLM hallucination
formal verification
Innovation

Methods, ideas, or system contributions that make the work stand out.

semantic alignment
SystemVerilog assertion
large language models
entailment-based classification
self-consistency voting