DynamicRTL: RTL Representation Learning for Dynamic Circuit Behavior

Ruiyang Ma, Yunhao Zhou, Yipeng Wang, Yi Liu, Zhengyuan Shi, Ziyang Zheng, Kexin Chen, Zhiqiang He, Lingwei Yan, Gang Chen, Qiang Xu, Guojie Luo

TL;DR

Traditional machine learning models for hardware design focus entirely on static circuit structures, completely missing how circuits behave at runtime. This paper introduces DR-GNN, the first framework designed to learn Register Transfer Level (RTL) circuit representations that capture both static structure and multi-cycle dynamic execution behaviors. By pre-training on a massive new dataset of 63,000 simulation traces, DR-GNN achieves state-of-the-art accuracy on verification and power estimation tasks while scaling effortlessly to large-scale designs.

What Problem Does This Paper Address?

Graph Neural Networks (GNNs) have become a popular tool for Electronic Design Automation (EDA), helping engineers predict circuit quality, area, and functionality. However, existing models suffer from a major blind spot: they are trained exclusively on static information, such as hardware source code or gate-level netlists.

Circuits are inherently dynamic systems driven by clock cycles and changing input sequences. Without accounting for runtime behavior, static models struggle with critical downstream tasks like hardware verification, assertion checking, and dynamic power estimation. Bridging this gap is challenging because a circuit's behavior can change drastically depending on its inputs, and representing the sheer variety of hardware operators (over 30+ in standard RTL) inside a neural network often leads to unmanageable model complexity.

Methods

The authors present DR-GNN (DynamicRTL-GNN), which introduces three key innovations to model circuit dynamics:

  1. Operator-Level CDFG: Instead of using a software-like statement-level graph or a massive, flattened bit-level netlist, the authors represent circuits using an operator-level Control Data Flow Graph (CDFG). This preserves high-level hardware semantics while accurately mapping data flow across clock cycles.
Comparison between statement-level and operator-level CDFG
  1. Semi-Decoupled Operator Aggregation: To prevent the model from blowing up while trying to learn unique behaviors for more than 30 different RTL operators, DR-GNN groups them into five categories based on their characteristics (Unary, Binary, Multary, Condition, and Register). Operators within a group share aggregation weights but use attention mechanisms to differentiate their specific functions.
  2. Position-Aware Operator Messaging: In hardware, the order of operands matters (e.g., $a - b$ is not the same as $b - a$). The authors integrate rotary position embeddings into a Heterogeneous Graph Transformer (HGT) architecture, allowing the network to remain sensitive to operand positions during message passing.

The overall architecture is trained using a multi-task pre-training strategy focused on predicting branch hit probabilities and variable toggle rates across multi-cycle execution traces.

Overview of the DR-GNN architecture

Datasets

Because no benchmark existed for this type of research, the authors collected and released the first comprehensive dynamic circuit dataset:

  • 6,300+ diverse Verilog designs: Sourced from open-source repositories, including RISC-V components, SoC modules, accelerators, and custom IP blocks.
  • 63,000 simulation traces: Each circuit was simulated under 10 different random input sequences using a commercial hardware simulator to record cycle-by-cycle wire and register states.

Key Insights and Ideas

  • The Software vs. Hardware Graph Gap: Previous attempts borrowed code-representation techniques from software engineering (like statement-level control flow graphs). However, software executes serially, whereas hardware executes concurrently every clock cycle. Moving to an operator-level graph is what allows DR-GNN to capture true hardware concurrency.
  • Pre-training on Dynamics Yields Foundational Representations: By forcing the network to learn simple runtime metrics (like how often a wire flips or which branch is taken), the model develops an intuitive "understanding" of circuit functionality. This knowledge transfers exceptionally well to entirely different tasks like power estimation.
  • RTL Abstraction Beats Netlist Flattening: While netlists provide fine-grained structural details, they are massive. Operating at the RTL level allows DR-GNN to avoid the memory bottlenecks that cause lower-level gate models to crash on large designs.

Key Results

DR-GNN was evaluated on both pre-training and downstream transfer-learning tasks, outperforming established baselines like GCN, GAT, and Design2Vec:

  • Pre-training Accuracy: Achieved 94.80% accuracy on branch hit prediction and 94.25% accuracy on variable toggle rate prediction.
  • Dynamic Power Estimation: When transferred to power estimation, DR-GNN achieved a high correlation coefficient ($R = 0.95$) and a low Mean Absolute Percentage Error ($\text{MAPE} = 0.20$), outperforming MasterRTL and HGVC.
  • Scalability: On large-scale circuits containing up to 304,000 netlist nodes, lower-level models like DeepSeq2 failed due to out-of-memory errors. DR-GNN successfully processed these designs in under a second.
  • Assertion Prediction: Effectively predicted complex multi-variable assertions (e.g., $v_1 < v_2$ or bitwise operations like $v_1 \& v_2 == 0$) with up to 91.67% accuracy.

Limitations and Future Work

While DR-GNN excels at predicting approximate value ranges and inequalities, it struggles to predict exact numerical values of variables (for instance, showing lower accuracy on specific assertions like $v \neq 2$).

The authors note that future work will focus on integrating more advanced temporal logic supervisions during the pre-training phase, which should help the model capture even deeper sequential dependencies and exact state transitions.

Summary updated

BibTeX
@inproceedings{ma2026dynamicrtl,
  author = {Ruiyang Ma and Yunhao Zhou and Yipeng Wang and Yi Liu and Zhengyuan Shi and Ziyang Zheng and Kexin Chen and Zhiqiang He and Lingwei Yan and Gang Chen and Qiang Xu and Guojie Luo},
  title = {{DynamicRTL: RTL Representation Learning for Dynamic Circuit Behavior}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i1.37051},
}
Figure