Skip to content

magicYang1573/DynamicRTL

Repository files navigation

DynamicRTL: RTL Representation Learning for Dynamic Circuit Behavior

1. Introduction

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.

Overview

2. Dataset

File structure

  • graphs*.npz: dictionary designs keyed by design name. Each entry contains:
    • x: node features (type one-hot, width, etc.)
    • edge_index, edge_type: graph topology
    • sim_res: simulation traces; each trace becomes an independent sample
    • has_sim_res: trace availability flag
    • power, slack, area: physical attributes per trace
  • labels*.npz: dictionary labels aligned with designs, carrying supervision target y for pre-training.

Splits and loading

  • Default split is design-disjoint train/val (90/10) in NpzParser (--trainval_split adjustable in code).
  • To use a specific split or custom files, pass --data_dir, --graph_npz_name, and --label_npz_name to the training scripts.

3. Requirements and Usage

conda create --name test_req python=3.11.9
conda activate test_req
pip install -r requirements_torch.txt
pip install -r requirements_PyG.txt

To train and evaluate the model on pre-training tasks.

bash train.sh

To train and evaluate the model on downstream tasks after pre-training.

bash train_downstream.sh

Project layout

  • src/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 .npz pairs into torch-geometric Data objects with per-trace samples.
  • src/utils/: helpers for logging, metrics, and CDFG utilities.

4. Data pre-processing

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. CDFG-RTL

5. Citation

@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}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •