Giter Site home page Giter Site logo

culs's Introduction

CULS

CULS is a GPU-based logic synthesis tool developed by the research team supervised by Prof. Evangeline F. Y. Young at The Chinese University of Hong Kong (CUHK).

Dependencies

  • CMake >= 3.8
  • GCC >= 7.5.0
  • CUDA >= 11.4

Building

  • Build as a standalone tool:

    mkdir build && cd build
    cmake ..
    make

    The built binary executable will be named gpuls.

  • Build as a patch of ABC:

    mkdir build && cd build
    cmake .. -DPATCH_ABC=1
    make

    The built binary executable will be named abcg.

    If the readline library is installed in a custom path on your machine, add the option -DREADLINE_ROOT_DIR=<readline_path> when invoking cmake. CULS can still be successfully built even if the readline library is not found.

Getting started

  • Standalone mode

    To interact with the command prompt, run

    ./gpuls

    You can also directly execute a script, e.g.,

    ./gpuls -c "read ../abc/i10.aig; resyn2; write i10_resyn2.aig"
  • ABC patch mode

    The usage is the same as ABC. For instance,

    ./abcg -c "read ../abc/i10.aig; gget; gresyn2; gput; print_stats; cec -n"

Commands

  • Standalone mode

    • read: read an AIG from a file
    • write: dump the internal AIG to a file
    • b: AIG balancing
    • rw: AIG rewriting
    • rf: AIG refactoring
    • rs: AIG resubstitution
    • st: strashing and dangling-node removal
    • resyn2: perform the resyn2 optimization script
    • resyn2rs: perform the resyn2rs optimization script
    • ps: print AIG statistics
    • time: print time statistics
  • ABC patch mode

    Standalone mode commands will be prefixed by g, e.g., grf for AIG refactoring.

    Additionally, there are two commands gget and gput for converting the AIG data structure from ABC to GPU, and from GPU to ABC, respectively, similar to the ABC9 package.

Publications

  • Shiju Lin, Jinwei Liu, Tianji Liu, Martin D.F. Wong, Evangeline F.Y. Young, "NovelRewrite: Node-Level Parallel AIG Rewriting", 59th ACM/IEEE Design Automation Conference (DAC), 2022.
  • Tianji Liu, Evangeline F.Y. Young, "Rethinking AIG Resynthesis in Parallel", 60th ACM/IEEE Design Automation Conference (DAC), 2023.
  • Yang Sun, Tianji Liu, Martin D.F. Wong, Evangeline F.Y. Young, "Massively Parallel AIG Resubstitution", 61st ACM/IEEE Design Automation Conference (DAC), 2024.

Contributors

culs's People

Contributors

tefantasy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

culs's Issues

Considering Level Change During Rewrite

I recently noticed that the gpu src code doesn't consider level increasing during Evaluating the Subgraph, related(rewrite.cu:429):

  if (saved - nodesAdded < 0 || (saved - nodesAdded == 0 && !fUseZeros)) // Subgraph with higher level will be considered in this scope
                continue;
  if (saved - nodesAdded < reduction || (saved - nodesAdded == reduction && rtLevel >= bestLevel))
                continue;

I'm considering to use savedLevel = nodeLevels[id] with condition control:!fUpdateLevel && savedLevel - rtLevel < 0 to avoid level increasing, is that right?

Refactor Failed

Error:

/src/algorithms/refactor.cu:619: void unbindAllKeys(const unsigned long long *, const unsigned int *, int *, int *, int, int, int): block: [0,0,0], thread: [0,0,0] Assertion `*(vReconstructedIds - 1) < nObjs` failed.
*(vReconstructedIds-1): 11528, nObjs: 11487

To reproduce the issue:
./abcg -c "gread ../data/aig_random_control/voter.aig; gtime; grf -K 12; gtime; gps; grf; gtime; gps; grf; gtime; gps; grf; gtime; gps; grf; gtime; gps; gwrite ./test.aig"

generating .aig file

Could you please provide instructions of generating .aig files for larger problem sizes ?

Currently, ../abc/i10.aig is available.

Thanks

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.