ABC: System for Sequential Logic Synthesis and Formal Verification
ABC: System for Sequential Logic Synthesis and Formal Verification
ABC is always changing but the current snapshot is believed to be stable.
To compile the ABC executable, run make. To compile ABC as a static library,
run make libabc.a.
When ABC is used as a static library, Abc_Start() and Abc_Stop() are
provided for starting and quitting a single ABC session in the calling
application. A simple demo program (file src/demo.c) shows how to
create a stand-alone program performing DAG-aware AIG rewriting, by calling
APIs of ABC compiled as a static library.
Independent ABC sessions can run concurrently in different threads on Linux
and macOS. Existing single-threaded applications using Abc_Start() and
Abc_Stop() continue to work unchanged. Concurrent applications should create
one Abc_Frame_t per session with Abc_FrameCreate(), execute commands using
that frame, and release it with Abc_FrameDestroy(); the same frame must not be
used concurrently by multiple threads. Scoped calls to
Abc_FrameEnter()/Abc_FrameLeave() establish the current frame when invoking
APIs outside command execution that depend on it. See src/runabc.c for
single-threaded and concurrent embedding examples. Some obsolete commands still
use shared process state and are not safe to run in concurrent sessions.
Build and run the single-threaded demo from the repository root with:
gcc -Wall -O2 -c src/demo.c -o demo.o
g++ -o demo demo.o libabc.a -lm -ldl -lreadline -lpthread
./demo i10.aigBuild and run the MiniAIG/MiniLUT embedding example with:
gcc -Wall -O2 -Isrc -c src/runabc.c -o runabc.o
g++ -o runabc runabc.o libabc.a -lm -ldl -lreadline -lpthread
./runabc i10.aig
./runabc -t 4 i10.aigThe last command compares four concurrent sessions with a single-threaded
baseline. If ABC is built with ABC_USE_NO_READLINE=1, omit -lreadline.
Explicitly single-threaded configurations may disable thread-local frame
selection with ABC_USE_NO_THREAD_LOCAL=1.
To run the demo program, give it a file with the logic network in AIGER or BLIF. For example:
[...] ~/abc> demo i10.aig
i10 : i/o = 257/ 224 lat = 0 and = 2396 lev = 37
i10 : i/o = 257/ 224 lat = 0 and = 1851 lev = 35
Networks are equivalent.
Reading = 0.00 sec Rewriting = 0.18 sec Verification = 0.41 secThe same can be produced by running the binary in the command-line mode:
[...] ~/abc> ./abc
UC Berkeley, ABC 1.01 (compiled Oct 6 2012 19:05:18)
abc 01> r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec
i10 : i/o = 257/ 224 lat = 0 and = 2396 lev = 37
i10 : i/o = 257/ 224 lat = 0 and = 1851 lev = 35
Networks are equivalent.or in the batch mode:
[...] ~/abc> ./abc -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec"
ABC command line: "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec".
i10 : i/o = 257/ 224 lat = 0 and = 2396 lev = 37
i10 : i/o = 257/ 224 lat = 0 and = 1851 lev = 35
Networks are equivalent.ABC can be compiled with a C or C++ compiler.
make ABC_USE_NAMESPACE=xxx.Build the shared library as position-independent code with:
make ABC_USE_PIC=1 libabc.soABC also supports CMake builds. The default CMake configuration builds the executable and regression tests:
cmake -S . -B build
cmake --build build
ctest --test-dir build --output-on-failurePlease reproduce bugs and unexpected behavior using the latest version of ABC available from https://github.com/berkeley-abc/abc.
If the problem persists, provide the following information:
ldd abc on Linux, or the corresponding dependency report
on another platform, when relevant.find . -type f -exec touch "{}" \; and rebuild.make ABC_USE_NO_READLINE=1.make ABC_USE_NO_PTHREADS=1. Concurrent embedding requires pthread support.ABC_READLINE_LIBRARIES.The following tutorial is kindly offered by Ana Petkovska from EPFL: https://www.dropbox.com/s/qrl9svlf0ylxy8p/ABC_GettingStarted.pdf
ABC includes CMake-based regression tests, which run in continuous integration on supported configurations. The suite is not exhaustive, so bug reports should include a small reproducer whenever possible.
This system is maintained by Alan Mishchenko . Consider also using ZZ framework developed by Niklas Een: https://bitbucket.org/niklaseen/abc-zz (or https://github.com/berkeley-abc/abc-zz)
No open issues yet, or sync has not completed.