OpenLS-DGF: An Adaptive Open-Source Dataset Generation Framework for Machine-Learning Tasks in Logic Synthesis

Liwei Ni, Rui Wang, Miao Liu, Xingyu Meng, Xiaoze Lin, Junfeng Liu, Guojie Luo, Zhufei Chu, Weikang Qian, Xiaoyan Yang, Biwei Xie, Xingquan Li, Huawei Li

TL;DR

This paper introduces OpenLS-DGF, a novel framework for generating adaptive logic synthesis datasets. It addresses the need for versatile datasets that can support multiple machine learning tasks in EDA, moving beyond task-specific datasets. The framework generates the OpenLS-D-v1 dataset, which has been demonstrated to be effective for circuit classification, ranking, QoR prediction, and probabilistic prediction.

What Problem Does This Paper Address?

The field of Electronic Design Automation (EDA), particularly logic synthesis, is increasingly leveraging machine learning (ML) techniques. However, existing ML approaches in EDA often rely on datasets tailored for specific tasks (e.g., logic optimization, technology mapping). This limits their reusability and the ability to develop generalized ML models for the broader logic synthesis domain. Researchers need a comprehensive and adaptive dataset generation framework that can produce datasets suitable for a variety of downstream ML tasks, facilitating more robust research and development.

Methods

The core of this work is the OpenLS-DGF framework, which automates the generation of logic synthesis datasets. It encompasses three fundamental stages of logic synthesis: Boolean representation, logic optimization, and technology mapping. The framework consists of seven distinct steps:

  1. Generic Technology Circuit Synthesis: Input designs are translated into a Generic Technology Circuit (GTG) format using Yosys.
  2. And-Inverter Graph (AIG) Generation: GTG is converted into AIGs, a standard representation for logic optimization.
  3. Logic Optimization Recipes: A diverse set of optimization sequences (1000 per design) are applied to AIGs to generate variants, exploring the Quality of Results (QoR) space.
  4. Logic Blasting: AIGs are converted into other Boolean network types (OIG, XAG, MIG, PRIMARY, GTG) using the LSILS tool, preserving topological structure.
  5. Technology Mapping: Gate-level netlists are generated for ASIC and FPGA targets using standard cell libraries and FPGA configurations.
  6. Static Timing Analysis (STA): Timing information for ASIC netlists and depth for FPGA netlists are computed.
  7. Dataset Packing: All generated data is organized and packaged into PyTorch files using a specialized circuit engine.

The circuit engine is a key component that acts as an intermediary between the generated data and downstream ML tasks. It can faithfully reconstruct Boolean circuit information and facilitates adaptive sub-dataset extraction.

Datasets

The primary dataset introduced is OpenLS-D-v1.

  • It comprises 46 combinational designs from established benchmarks (IWLS2005, IWLS2015, OpenCores).
  • It contains over 966,000 Boolean circuits, generated from 1,000 distinct synthesis recipes per design.
  • The dataset includes 7,000 Boolean networks across 7 logic types, along with 7,000 ASIC and 7,000 FPGA netlists.
  • It preserves QoRs in JSON format.

The paper also references existing datasets like OpenABC-D, DeepGate, and Gamora for comparison.

Key Insights and Ideas

  • Adaptive Dataset Generation is Crucial: The paper strongly advocates for adaptive frameworks that can generate datasets catering to multiple ML tasks, rather than task-specific ones.
  • QoR Sensitivity: The study highlights that technology-independent metrics (like node size and depth) of Boolean networks do not always directly correlate with the QoR of their corresponding ASIC netlists. ASIC technology mapping is sensitive to local structures, leading to dispersed QoR distributions even for functionally equivalent circuits.
  • Diverse Boolean Representations Matter: Different Boolean representations of the same design can exhibit significantly different physical properties, underscoring the need to consider multiple representations in dataset generation.
  • Circuit Engine as a Bridge: The proposed circuit engine is vital for managing the complex dataset and enabling seamless integration with various ML frameworks and downstream tasks.

Key Results

The OpenLS-D-v1 dataset and the OpenLS-DGF framework were evaluated on four downstream tasks:

  • Circuit Classification: Achieved approximately 99.8% test accuracy using a GCN-based model.
  • Circuit Ranking: Demonstrated high accuracy and effective pair-wise ranking predictions, with models achieving up to 99.49% accuracy.
  • QoR Prediction: Showed high predictive accuracy for area (MAPE around 1.06%) and reasonable accuracy for timing (MAPE around 6.50%) across different variants of unseen recipes, designs, and combinations.
  • Probabilistic Prediction: The paper notes that DeepGate outperforms GraphSAGE in prediction error and time across various dataset scales.

Limitations and Future Work

  • Limitations:
    • The paper focuses on combinational circuits and does not discuss sequential circuits.
  • While the framework is adaptive, the current implementation of downstream tasks is not resource-intensive and uses only a fraction of the system's capacity.
  • Future Work:
    • Enhance the efficiency of the dataset generation flow.
  • Benchmark specific ML tasks for logic synthesis more extensively.
  • Integrate the developed ML models directly into the logic synthesis flow to improve circuit performance.

Summary updated

BibTeX
@article{ni2024openls,
  author = {Liwei Ni and Rui Wang and Miao Liu and Xingyu Meng and Xiaoze Lin and Junfeng Liu and Guojie Luo and Zhufei Chu and Weikang Qian and Xiaoyan Yang and Biwei Xie and Xingquan Li and Huawei Li},
  title = {{OpenLS-DGF: An Adaptive Open-Source Dataset Generation Framework for Machine-Learning Tasks in Logic Synthesis}},
  journal = {IEEE Trans. Comput. Aided Des. Integr. Circuits Syst.},
  year = {2024},
  url = {https://openreview.net/forum?id=3lmuvCMx0l},
}
Figure