Abstract
Estimating the quality of register transfer level (RTL) designs is crucial in the electronic design automation (EDA) workflow, as it enables instant feedback on key metrics like area and delay without the need for time-consuming logic synthesis. While recent approaches have leveraged large language models (LLMs) to derive embeddings from RTL code and achieved promising results, they overlook the structural semantics essential for accurate quality estimation. In contrast, the control data flow graph (CDFG) view exposes the design's structural characteristics more explicitly, offering richer cues for representation learning. In this work, we introduce a novel structure-aware graph self-supervised learning framework, StructRTL, for improved RTL design quality estimation. By learning structure-informed representations from CDFGs, our method significantly outperforms prior art on various quality estimation tasks. To further boost performance, we incorporate a knowledge distillation strategy that transfers low-level insights from post-mapping netlists into the CDFG predictor. Experiments show that our approach establishes new state-of-the-art results, demonstrating the effectiveness of combining structural learning with cross-stage supervision.
Introduction
In modern chip design, engineers utilize Hardware Description Languages (HDLs) like Verilog at the Register Transfer Level (RTL) to define circuit behavior. Determining the physical quality of these designs—specifically Area and Signal Delay—traditionally requires running the code through a full logic synthesis toolchain. However, synthesis is a computationally intensive and time-consuming process, creating a significant bottleneck in the iterative design loop.
Recent attempts to accelerate this process have turned to Large Language Models (LLMs). While LLMs excel at processing sequential text, they often fail to capture the fundamental nature of hardware: a complex web of concurrent logic and data flow. By treating RTL code as a sequence of tokens, LLMs miss the structural semantics critical for physical estimation. StructRTL addresses this "structural gap" by shifting from token-based modeling to a graph-based approach that explicitly represents the architecture of the circuit.
The StructRTL Framework
StructRTL employs a multi-stage pipeline designed to extract and learn from the structural properties of hardware designs.
- CDFG Construction: Instead of raw text, RTL code is converted into a Control Data Flow Graph (CDFG). This representation explicitly maps the movement of data through operators (e.g., adders, subtractors) and registers, preserving the functional connectivity that text-based models obscure.
- Hybrid Architecture: The model utilizes a Graph Isomorphism Network (GIN) to capture local neighborhood features, followed by a Transformer Encoder to model long-range dependencies across the design. To provide the Transformer with a sense of the graph's global topology, Laplacian eigenvectors are integrated as positional embeddings.
- Self-Supervised Pretraining: To build robust representations, StructRTL uses two self-supervised tasks: Masked Node Modeling, where the model predicts hidden component embeddings, and Edge Prediction, where it learns to reconstruct connections between components.
Cross-Stage Knowledge Distillation
A key innovation of StructRTL is its use of Knowledge Distillation (KD) to bridge the abstraction gap between high-level RTL and low-level physical implementation. The authors train a "Teacher" model on post-mapping netlists—a representation much closer to the final physical chip. This teacher then distills its insights into the CDFG-based "Student" model. This process allows the RTL-stage predictor to internalize physical characteristics, such as gate counts and wire lengths, that are typically only visible after synthesis.
Experimental Results
The framework was evaluated on a dataset of 13,200 functional RTL designs synthesized using the Yosys/ABC toolchain and the SkyWater 130nm technology library. StructRTL demonstrates a substantial performance leap over both traditional graph-based baselines and state-of-the-art LLMs.
As shown in the results, StructRTL achieves an $R^2$ score of 0.8676 for Area prediction and 0.8872 for Delay prediction. In contrast, the best-performing LLM baselines (e.g., CodeV-QW-7B) reach $R^2$ scores of approximately 0.81 and 0.76 respectively in the KD setting. Notably, even without the teacher model, the structural graph approach inherently outperforms token-based models, proving that graph representations are superior for hardware quality estimation.
Conclusion
StructRTL establishes a new state-of-the-art in early-stage hardware performance estimation by prioritizing structural learning over simple token sequences. By combining CDFG representations with a hybrid GNN-Transformer architecture and cross-stage knowledge distillation, the framework provides designers with accurate, near-instant feedback. While currently tied to specific open-source synthesis flows, future work aims to extend this approach to commercial process nodes and even earlier design stages.
Summary updated