Skip to content

Commit 2e17646

Browse files
authored
Merge pull request #2388 from CAS-Atlantic/ABC-Update
ABC Version Update
2 parents dfa58c1 + 48eda6c commit 2e17646

File tree

599 files changed

+103380
-6603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

599 files changed

+103380
-6603
lines changed

abc/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.3.0...3.13) # ! This line is edited to get rid of a CMake deprecation error
1+
cmake_minimum_required(VERSION 3.3.0...3.13) # ! This line is edited to get rid of a CMake deprecation error
22

33
include(CMakeParseArguments)
44
include(CheckCCompilerFlag)
@@ -47,9 +47,14 @@ if(ABC_USE_NAMESPACE)
4747
set(ABC_USE_NAMESPACE_FLAGS "ABC_USE_NAMESPACE=${ABC_USE_NAMESPACE}")
4848
endif()
4949

50+
if( APPLE )
51+
set(make_env ${CMAKE_COMMAND} -E env SDKROOT=${CMAKE_OSX_SYSROOT})
52+
endif()
53+
5054
# run make to extract compiler options, linker options and list of source files
5155
execute_process(
5256
COMMAND
57+
${make_env}
5358
make
5459
${ABC_READLINE_FLAGS}
5560
${ABC_USE_NAMESPACE_FLAGS}

abc/Makefile

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11

22
CC := gcc
33
CXX := g++
4+
AR := ar
45
LD := $(CXX)
56

67
MSG_PREFIX ?=
78
ABCSRC = .
89

910
$(info $(MSG_PREFIX)Using CC=$(CC))
1011
$(info $(MSG_PREFIX)Using CXX=$(CXX))
12+
$(info $(MSG_PREFIX)Using AR=$(AR))
1113
$(info $(MSG_PREFIX)Using LD=$(LD))
1214

1315
PROG := abc
@@ -16,7 +18,7 @@ OS := $(shell uname -s)
1618
MODULES := \
1719
$(wildcard src/ext*) \
1820
src/base/abc src/base/abci src/base/cmd src/base/io src/base/main src/base/exor \
19-
src/base/ver src/base/wlc src/base/acb src/base/bac src/base/cba src/base/pla src/base/test \
21+
src/base/ver src/base/wlc src/base/wln src/base/acb src/base/bac src/base/cba src/base/pla src/base/test \
2022
src/map/mapper src/map/mio src/map/super src/map/if \
2123
src/map/amap src/map/cov src/map/scl src/map/mpm \
2224
src/misc/extra src/misc/mvc src/misc/st src/misc/util src/misc/nm \
@@ -25,7 +27,7 @@ MODULES := \
2527
src/opt/cut src/opt/fxu src/opt/fxch src/opt/rwr src/opt/mfs src/opt/sim \
2628
src/opt/ret src/opt/fret src/opt/res src/opt/lpk src/opt/nwk src/opt/rwt \
2729
src/opt/cgt src/opt/csw src/opt/dar src/opt/dau src/opt/dsc src/opt/sfm src/opt/sbd \
28-
src/sat/bsat src/sat/xsat src/sat/satoko src/sat/csat src/sat/msat src/sat/psat src/sat/cnf src/sat/bmc src/sat/glucose \
30+
src/sat/bsat src/sat/xsat src/sat/satoko src/sat/csat src/sat/msat src/sat/psat src/sat/cnf src/sat/bmc src/sat/glucose src/sat/glucose2 \
2931
src/bool/bdc src/bool/deco src/bool/dec src/bool/kit src/bool/lucky \
3032
src/bool/rsb src/bool/rpo \
3133
src/proof/pdr src/proof/abs src/proof/live src/proof/ssc src/proof/int \
@@ -59,9 +61,9 @@ ifneq ($(findstring arm,$(shell uname -m)),)
5961
CFLAGS += -DABC_MEMALIGN=4
6062
endif
6163

62-
# compile ABC using the C++ comipler and put everything in the namespace $(ABC_NAMESPACE)
64+
# compile ABC using the C++ compiler and put everything in the namespace $(ABC_NAMESPACE)
6365
ifdef ABC_USE_NAMESPACE
64-
CFLAGS += -DABC_NAMESPACE=$(ABC_USE_NAMESPACE) -fpermissive
66+
CFLAGS += -DABC_NAMESPACE=$(ABC_USE_NAMESPACE) -fpermissive -x c++
6567
CC := $(CXX)
6668
$(info $(MSG_PREFIX)Compiling in namespace $(ABC_NAMESPACE))
6769
endif
@@ -119,11 +121,16 @@ GCC_MINOR=$(word 2,$(subst .,$(space),$(GCC_VERSION)))
119121

120122
$(info $(MSG_PREFIX)Found GCC_VERSION $(GCC_VERSION))
121123
ifeq ($(findstring $(GCC_MAJOR),0 1 2 3),)
122-
$(info $(MSG_PREFIX)Found GCC_MAJOR>=4)
124+
ifeq ($(GCC_MAJOR),4)
125+
$(info $(MSG_PREFIX)Found GCC_MAJOR==4)
123126
ifeq ($(findstring $(GCC_MINOR),0 1 2 3 4 5),)
124127
$(info $(MSG_PREFIX)Found GCC_MINOR>=6)
125128
CFLAGS += -Wno-unused-but-set-variable
126129
endif
130+
else
131+
$(info $(MSG_PREFIX)Found GCC_MAJOR>=5)
132+
CFLAGS += -Wno-unused-but-set-variable
133+
endif
127134
endif
128135

129136
endif
@@ -179,15 +186,15 @@ DEP := $(OBJ:.o=.d)
179186

180187
%.d: %.c
181188
@echo "$(MSG_PREFIX)\`\` Generating dependency:" $(LOCAL_PATH)/$<
182-
$(VERBOSE)$(ABCSRC)/depends.sh $(CC) `dirname $*.c` $(OPTFLAGS) $(INCLUDES) $(CFLAGS) $< > $@
189+
$(VERBOSE)$(ABCSRC)/depends.sh "$(CC)" `dirname $*.c` $(OPTFLAGS) $(INCLUDES) $(CFLAGS) $< > $@
183190

184191
%.d: %.cc
185192
@echo "$(MSG_PREFIX)\`\` Generating dependency:" $(LOCAL_PATH)/$<
186-
$(VERBOSE)$(ABCSRC)/depends.sh $(CXX) `dirname $*.cc` $(OPTFLAGS) $(INCLUDES) $(CXXFLAGS) $< > $@
193+
$(VERBOSE)$(ABCSRC)/depends.sh "$(CXX)" `dirname $*.cc` $(OPTFLAGS) $(INCLUDES) $(CXXFLAGS) $< > $@
187194

188195
%.d: %.cpp
189196
@echo "$(MSG_PREFIX)\`\` Generating dependency:" $(LOCAL_PATH)/$<
190-
$(VERBOSE)$(ABCSRC)/depends.sh $(CXX) `dirname $*.cpp` $(OPTFLAGS) $(INCLUDES) $(CXXFLAGS) $< > $@
197+
$(VERBOSE)$(ABCSRC)/depends.sh "$(CXX)" `dirname $*.cpp` $(OPTFLAGS) $(INCLUDES) $(CXXFLAGS) $< > $@
191198

192199
ifndef ABC_MAKE_NO_DEPS
193200
-include $(DEP)
@@ -210,8 +217,7 @@ $(PROG): $(OBJ)
210217

211218
lib$(PROG).a: $(LIBOBJ)
212219
@echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@)
213-
$(VERBOSE)ar rv $@ $?
214-
$(VERBOSE)ranlib $@
220+
$(VERBOSE)$(AR) rsv $@ $?
215221

216222
lib$(PROG).so: $(LIBOBJ)
217223
@echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@)

abc/README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1-
[![Build Status](https://travis-ci.org/berkeley-abc/abc.svg?branch=master)](https://travis-ci.org/berkeley-abc/abc)
2-
[![Build status](https://ci.appveyor.com/api/projects/status/7q8gopidgvyos00d?svg=true)](https://ci.appveyor.com/project/berkeley-abc/abc)
1+
[![.github/workflows/build-posix.yml](https://github.com/berkeley-abc/abc/actions/workflows/build-posix.yml/badge.svg)](https://github.com/berkeley-abc/abc/actions/workflows/build-posix.yml)
2+
[![.github/workflows/build-windows.yml](https://github.com/berkeley-abc/abc/actions/workflows/build-windows.yml/badge.svg)](https://github.com/berkeley-abc/abc/actions/workflows/build-windows.yml)
3+
[![.github/workflows/build-posix-cmake.yml](https://github.com/berkeley-abc/abc/actions/workflows/build-posix-cmake.yml/badge.svg)](https://github.com/berkeley-abc/abc/actions/workflows/build-posix-cmake.yml)
34

45
# ABC: System for Sequential Logic Synthesis and Formal Verification
56

6-
ABC is always changing but the current snapshot is believed to be stable.
7+
ABC is always changing but the current snapshot is believed to be stable.
8+
9+
## ABC fork with new features
10+
11+
Here is a [fork](https://github.com/yongshiwo/abc.git) of ABC containing Agdmap, a novel technology mapper for LUT-based FPGAs. Agdmap is based on a technology mapping algorithm with adaptive gate decomposition [1]. It is a cut enumeration based mapping algorithm with bin packing for simultaneous wide gate decomposition, which is a patent pending technology.
12+
13+
The mapper is developed and maintained by Longfei Fan and Prof. Chang Wu at Fudan University in Shanghai, China. The experimental results presented in [1] indicate that Agdmap can substantially improve area (by 10% or more) when compared against the best LUT mapping solutions in ABC, such as command "if".
14+
15+
The source code is provided for research and evaluation only. For commercial usage, please contact Prof. Chang Wu at wuchang@fudan.edu.cn.
16+
17+
References:
18+
19+
[1] L. Fan and C. Wu, "FPGA technology mapping with adaptive gate decompostion", ACM/SIGDA FPGA International Symposium on FPGAs, 2023.
720

821
## Compiling:
922

@@ -18,7 +31,7 @@ APIs of ABC compiled as a static library.
1831

1932
To build the demo program
2033

21-
* Copy demo.cc and libabc.a to the working directory
34+
* Copy demo.c and libabc.a to the working directory
2235
* Run `gcc -Wall -g -c demo.c -o demo.o`
2336
* Run `g++ -g -o demo demo.o libabc.a -lm -ldl -lreadline -lpthread`
2437

abc/abc.rc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ alias src_rw "st; rw -l; rwz -l; rwz -l"
132132
alias src_rs "st; rs -K 6 -N 2 -l; rs -K 9 -N 2 -l; rs -K 12 -N 2 -l"
133133
alias src_rws "st; rw -l; rs -K 6 -N 2 -l; rwz -l; rs -K 9 -N 2 -l; rwz -l; rs -K 12 -N 2 -l"
134134
alias resyn2rs "b; rs -K 6; rw; rs -K 6 -N 2; rf; rs -K 8; b; rs -K 8 -N 2; rw; rs -K 10; rwz; rs -K 10 -N 2; b; rs -K 12; rfz; rs -K 12 -N 2; rwz; b"
135+
alias r2rs "b; rs -K 6; rw; rs -K 6 -N 2; rf; rs -K 8; b; rs -K 8 -N 2; rw; rs -K 10; rwz; rs -K 10 -N 2; b; rs -K 12; rfz; rs -K 12 -N 2; rwz; b"
135136
alias compress2rs "b -l; rs -K 6 -l; rw -l; rs -K 6 -N 2 -l; rf -l; rs -K 8 -l; b -l; rs -K 8 -N 2 -l; rw -l; rs -K 10 -l; rwz -l; rs -K 10 -N 2 -l; b -l; rs -K 12 -l; rfz -l; rs -K 12 -N 2 -l; rwz -l; b -l"
137+
alias c2rs "b -l; rs -K 6 -l; rw -l; rs -K 6 -N 2 -l; rf -l; rs -K 8 -l; b -l; rs -K 8 -N 2 -l; rw -l; rs -K 10 -l; rwz -l; rs -K 10 -N 2 -l; b -l; rs -K 12 -l; rfz -l; rs -K 12 -N 2 -l; rwz -l; b -l"
136138

137139
# use this script to convert 1-valued and DC-valued flops for an AIG
138140
alias fix_aig "logic; undc; strash; zero"

0 commit comments

Comments
 (0)