This is the source code of the paper submitted to AAAI 2026: DynamicRTL: RTL Representation Learning for Dynamic Circuit Behavior (arXiv:2511.09593).
The repository contains the source code for the training and evaluation of the DR-GNN model, and the baseline models for comparison and ablation experiments. The circuit dynamic dataset introduced in the paper is preprocessed and provided in .npz format.
- What we provide: a pre-processed circuit dynamics dataset in NumPy
.npzformat underdataset_npz/. - Subsets in repo:
graphs-200.npz,labels-200.npz,graphs-2000.npz,labels-2000.npz(for quick smoke tests). - Full set download: Google Drive folder: https://drive.google.com/drive/folders/18-jEWtzbFD719yQPGcUyb8fB72HiEias?usp=drive_link
graphs*.npz: dictionarydesignskeyed by design name. Each entry contains:x: node features (type one-hot, width, etc.)edge_index,edge_type: graph topologysim_res: simulation traces; each trace becomes an independent samplehas_sim_res: trace availability flagpower,slack,area: physical attributes per trace
labels*.npz: dictionarylabelsaligned withdesigns, carrying supervision targetyfor pre-training.
- Default split is design-disjoint train/val (90/10) in
NpzParser(--trainval_splitadjustable in code). - To use a specific split or custom files, pass
--data_dir,--graph_npz_name, and--label_npz_nameto the training scripts.
conda create --name test_req python=3.11.9
conda activate test_req
pip install -r requirements_torch.txt
pip install -r requirements_PyG.txtTo train and evaluate the model on pre-training tasks.
bash train.shTo train and evaluate the model on downstream tasks after pre-training.
bash train_downstream.shsrc/train.py,src/trainer.py: DR-GNN pre-training (branch-hit classification and transition-rate regression).src/train_downstream.py,src/trainer_downstream.py: downstream fine-tuning for power/area/slack and assertion prediction.src/model_arch.py,src/gdrtl_arch/: encoders/decoders used for dynamic representation learning.src/model_downstream.py: task-specific heads (assertion MLPs, power GNN readout).src/npz_parser.py: converts.npzpairs into torch-geometricDataobjects with per-trace samples.src/utils/: helpers for logging, metrics, and CDFG utilities.
You can use the RTL2CDFG tool to convert RTL design files into CDFGs.
And then you can use CDFG2RTL tool to guarantee the correctness of the conversion.

@inproceedings{ma2026dynamicrtl,
title = {{DynamicRTL}: {RTL} Representation Learning for Dynamic Circuit Behavior},
author = {Ma, Ruiyang and Zhou, Yunhao and Wang, Yipeng and Liu, Yi and Shi, Zhengyuan and Zheng, Ziyang and Chen, Kexin and He, Zhiqiang and Yan, Lingwei and Chen, Gang and Xu, Qiang and Luo, Guojie},
booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence (AAAI)},
year = {2026}
}
