Towards the Imagenets of ML4EDA

Animesh Basak Chowdhury, Shailja Thakur, Hammond Pearce, Ramesh Karri, Siddharth GargarXiv 2023 · DOI

Abstract

The field of Electronic Design Automation (EDA) has long lacked the large-scale, standardized datasets that catalyzed breakthroughs in computer vision and natural language processing. To address this "dearth of open datasets," researchers from NYU and UNSW have introduced VeriGen and OpenABC-D. These benchmarks are designed to serve as the "ImageNet" for ML4EDA, providing high-quality, real-world data for training Large Language Models (LLMs) in hardware description language (HDL) generation and utilizing Graph Convolutional Networks (GCNs) for logic synthesis performance prediction.

Introduction

The process of transforming a high-level hardware description (RTL) into a physical chip layout (GDSII) is notoriously complex. Currently, hardware engineers spend significant time manually translating natural language specifications into Verilog, a process prone to human error. While machine learning (ML) offers a path toward automation, existing models often rely on synthetic data that fails to capture real-world complexity. This paper bridges the gap by providing standardized, large-scale benchmarks to facilitate the development of robust ML tools for hardware design.

Methodology

The researchers developed two distinct datasets targeting different stages of the hardware design flow:

VeriGen: Verilog Generation

VeriGen was created by curating a massive corpus of Verilog code. The team scraped over 2.8 million GitHub repositories and performed OCR on 70 hardware textbooks. A rigorous filtering pipeline using MinHash and Jaccard similarity was implemented to remove duplicates and ensure the inclusion of functional Verilog modules. The resulting dataset includes a Code Corpus (~50,000 cleaned files) and a Book Corpus (pedagogical text).

OpenABC-D: Logic Synthesis

To aid in predicting Power, Performance, and Area (PPA) metrics, the researchers introduced OpenABC-D. Using open-source tools like OpenROAD, Yosys, and ABC, they performed 1,500 synthesis runs on 29 open-source hardware projects. This generated a labeled dataset of 870,000 And-Inverter Graphs (AIGs)—structural representations of logic—mapped to the NanGate 45nm technology library.

Overview of the ML4EDA dataset generation and evaluation framework.

Key Insights and Results

The study yielded several critical insights into the application of ML in EDA:

The "Book Boost" in LLMs

A significant finding was that fine-tuning LLMs on the Book Corpus—formal, pedagogical explanations of hardware logic—improved functional correctness by 3.5%. This suggests that raw code alone is insufficient; structured educational content provides vital context for generating correct hardware logic.

Benchmarking LLM Performance

The researchers evaluated several models, including ChatGPT, CodeGen, and Megatron-LM. Using the Pass@k metric (the probability that at least one of k generated samples is correct), they found that CodeGen-16B-FT (fine-tuned on VeriGen) was the top performer. It consistently surpassed much larger models in generating functionally correct Verilog across basic and advanced tasks.

Performance comparison of various LLMs on Verilog generation tasks using the Pass@n metric.

Synthesis Prediction with GCNs

By treating hardware logic as a graph (AIG), the researchers demonstrated that GCNs can effectively predict synthesis outcomes for unseen hardware designs. This capability allows engineers to skip time-consuming synthesis runs by using ML to identify the most effective optimization "recipes."

Conclusion and Future Work

VeriGen and OpenABC-D represent a major step toward standardized ML4EDA research. However, challenges remain regarding data quality and security, as models may inadvertently learn bugs or vulnerabilities from scraped code. Future work will focus on scaling these datasets through novel data augmentation tools and expanding the synthesis data to include more diverse industrial toolchains and technology libraries.

Summary updated

BibTeX
@misc{chowdhury2023towards,
  author = {Animesh Basak Chowdhury and Shailja Thakur and Hammond Pearce and Ramesh Karri and Siddharth Garg},
  title = {{Towards the Imagenets of ML4EDA}},
  year = {2023},
  eprint = {2310.10560},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.10560},
}
Figure