circuitnet / CircuitNet

CircuitNet: An Open-Source Dataset for Machine Learning Applications in Electronic Design Automation (EDA)
https://circuitnet.github.io/
BSD 3-Clause "New" or "Revised" License
304 stars 43 forks source link
congestion-prediction dataset deep-learning drc-violation eda ir-drop machine-learning

CircuitNet: An Open-Source Dataset for Machine Learning Applications in Electronic Design Automation (EDA)

Overview

This repository is intended to hosts codes and demos for CircuitNet, we hope this codebase would be helpful for users to reproduce exiting methods. More information about the dataset can be accessed from our web page https://circuitnet.github.io/.


ChangeLog

Prerequisites

Dependencies can be installed using pip:

pip install -r requirements.txt

PyTorch is not included in requirement.txt, and you could install it following the instruction on PyTorch homepage https://pytorch.org/.

DGL is also not included in requirement.txt, and it is required for net delay prediction only. You could install it following the instruction on DGL homepage https://www.dgl.ai/pages/start.html.

Our experiments run on Python 3.9 and PyTorch 1.11. Other versions should work but are not tested.

Congestion, DRC, IR drop prediction

Data Preparation

Please follow the instructions on the download page to set up the CircuitNet dataset for a specific task(Congestion/DRC/IR Drop).

Example Usage:

Change the configure in utils/config.py to fit your file path and adjust hyper-parameter before starting.

Test

Congestion
python test.py --task congestion_gpdl --pretrained PRETRAINED_WEIGHTS_PATH
DRC
python test.py --task drc_routenet --pretrained PRETRAINED_WEIGHTS_PATH --save_path work_dir/drc_routenet/ --plot_roc 
IR Drop
python test.py --task irdrop_mavi --pretrained PRETRAINED_WEIGHTS_PATH --save_path work_dir/irdrop_mavi/ --plot_roc

Train

Congestion
python train.py --task congestion_gpdl --save_path work_dir/congestion_gpdl/
DRC
python train.py --task drc_routenet --save_path work_dir/drc_routenet/
IR Drop
python train.py --task irdrop_mavi --save_path work_dir/irdrop_mavi/

Net Delay prediction (DGL required)

Data Preparation

Graphs for net delay prediction can be built with the following script:

python build_graph.py --data_path DATA_PATH --save_path ./graph

where DATA_PATH is the path to the parent dir of the timing features: nodes, net_edges and pin_positions.

Train

python train.py --checkpoint CHECKPOINT_NAME

where CHECKPOINT_NAME is the name of the dir for saving checkpoint.

Test

python train.py --checkpoint CHECKPOINT_NAME --test_iter TEST_ITERATION

where TEST_ITERATION is the specific iteration for testing, corresponding to the saved checkpoint file name.

License

This repository is released under the BSD 3-Clause. license as found in the LICENSE file.

Citation

If you think our work is useful, please feel free to cite our TCAD paper😆 and ICLR paper.

@ARTICLE{10158384,
  author={Chai, Zhuomin and Zhao, Yuxiang and Liu, Wei and Lin, Yibo and Wang, Runsheng and Huang, Ru},
  journal={IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems}, 
  title={CircuitNet: An Open-Source Dataset for Machine Learning in VLSI CAD Applications with Improved Domain-Specific Evaluation Metric and Learning Strategies}, 
  year={2023},
  doi={10.1109/TCAD.2023.3287970}}
}

@inproceedings{
2024circuitnet,
title={CircuitNet 2.0: An Advanced Dataset for Promoting Machine Learning Innovations in Realistic Chip Design Environment},
author={Xun, Jiang and Chai, Zhuomin and Zhao, Yuxiang and Lin, Yibo and Wang, Runsheng and Huang, Ru},
booktitle={The Twelfth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=nMFSUjxMIl}
}

Contact

For any questions, please do not hesitate to contact us.

Zhuomin Chai: zhuominchai@whu.edu.cn
Xun Jiang: xunjiang@stu.pku.edu.cn
Yuxiang Zhao: yuxiangzhao@stu.pku.edu.cn
Yibo Lin: yibolin@pku.edu.cn