Giter Club home page Giter Club logo

abc_py's Introduction

abc_py

A simple Python interface for logic synthesis framework abc. You are welcome to cite Keren Zhu, Mingjie Liu, Hao Chen, Zheng Zhao and David Z. Pan,"Exploring Logic Optimizations with Reinforcement Learning and Graph Convolutional Network," 2nd ACM/IEEE Workshop on Machine Learning for CAD (MLCAD), Nov. 2020.


Install

abc

abc

abc_py requires a static library for abc, and to make it shareable. -fPIC flag needs to be added to gcc or Clang. The easiest way is to edit the Makefile of abc and add the flag. ABC has an option in Makefile to do this, please check their documentations for details.

CC   := gcc -fPIC
CXX  := g++ -fPIC

Then compile the abc

make libabc.a

Note that ABC is defining several macros at build. Please check their Makafile and define them too in CMakeLists.txt, otherwise there might be errors when including the headers.

pybind11

pybind11

Please see the official document for installing the pybind11.

Makefile Configure

The project is tested with cmake 3.13.2. cmake Export CXX to the compiler you like. The tested is made on g++ 6.3.0 and 9.2.0.

Correctly set the path to abc directory. Either export to system variable ABC_DIR or add flag to cmake cmake -DABC_DIR=<path>. Make sure the libabc.a is inside ${ABC_DIR}.

Set the path to pybind11. Either export to system variable PYBIND11_DIR or add flag to cmake cmake -DPYBIND11_DIR=<path>.

The cmake will automatically find the system Python. To use the other Python, add cmake flags cmake -DPYTHON_INCLUDE_DIR=<path> -DPYTHON_LIBRARIES=<static libarary>. For example, -DPYTHON_INCLUDE_DIR=<path>/include/python3.7m -DPYTHON_LIBRARIES=<path>/lib/libpython3.7m.a

Build

mkdir build
cd build
cmake ..
make
cd ../../
pip install abc_py

Usage

import abc\_py like the standard Python library.


Contact.

Keren Zhu, The University of Texas at Austin UTDA

Please let me know if there is any issue or suggestions.

abc_py's People

Contributors

krzhu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.