Endeavour10020 / CircuitOps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CircuitOps

(Notice: This Github repository is currently in the progress of being developed and some files are still missing. We will try to complete it ASAP. Thanks for your patience!)

Introduction

CircuitOps is a data infrastructure to facilitate dataset generation and model deployment in Generative AI (GAI)-based circuit optimization tasks. It mainly has the following contributes:

  1. Shared Intermediate Representation: labeled property graphs (LPGs) backed by relational tables, a flexible way to represent detailed netlist information and suitable for parallel processing;
  2. Tools-agnostic IR generation: parsing standard EDA files and attributes tables to generate LPGs for given netlists, which can be reused for many downstream GAI applications;
  3. Customizable dataset generation: generating a customized dataset for each GAI application by performing on the AI-friendly LPGs;
  4. Inference with gRPC-based data transfer: facilitating the deployment of GAI models into production.

Figure.1 depicts the overview of CircuitOps. Based on the Intermediate Representation of labeled property graphs, CircuitOps consists of two main modules: IR generation and dataset generation. The IR generation module transforms standard EDA files into LPGs that store netlist information and are reused across tasks. The taskspecific dataset is constructed with the dataset generation module using its AI-friendly data structures and interfaces. CircuitOps also provides a gRPC-based data transfer method facilitating inference of GAI models in production deployment.

Markdown Monster icon

Fig. 1: CircuitOps overview. (a) shows the structure of CircuitOps; (b) illustrates the netlist labeled property graph backed by relational tables.

Getting Started

Download the CircuitOps repository as shown below:

git clone --recursive https://github.com/NVlabs/CircuitOps.git
cd CircuitOps

Install CircuitOps

Dependencies

The following dependencies are needed by CircuitOps. OpenROAD is required for EDA tools file parsing and generating properties.

  • python3.7
  • pip3
  • OpenROAD

Install OpenROAD

Refer to the dependencies of the OpenROAD Project and instrcutions here.

We use OpenROAD to read in standard EDA files and generate relational tables as IRs.

TLDR instructions to build OpenROAD is listed below:

cd CircuitOps/src/OpenROAD
mkdir build
cd build
cmake ..
make -j

Install CircuitOps in Bash

From the IRs, CircuitOps uses the relational tables generated from OpenROAD and creates LPGs and datasets. Installation of Python scripts of Circuit ops in described below through a virtual environment and pip. From the CircuitOps top level directory run the following commands:

python3 -m venv circuitops
source circuitops/bin/activate
pip3 install -r requirements.txt

Use CircuitOps

Generate IRs from OpenROAD

Set design and platform

Modify set_design.tcl to name the design and platform. If you need to add more designs, add them to the designs directory and modify the set_design.tcl file appropriately.

Run OpenROAD and TCL scripts to generate relational tables

The following command to generate the relations tables in the ./IRs/ directory.

./path/to/binary/openroad ./src/tcl/generate_tables.tcl

Generate Datasets

cd src/python

python BT_sampling_OpenROAD.py ../../IRs/nangate45/gcd/ ../../datasets/

gRPC-based Data Transfer

Cite this work

About

License:Apache License 2.0


Languages

Language:Python 65.1%Language:Tcl 21.2%Language:CMake 6.3%Language:Makefile 4.5%Language:Verilog 2.0%Language:Shell 0.9%