Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
136bae2
Refactor(Typo): Typo update in read_aiger comment
wjrforcyber Sep 16, 2023
6e1323c
Refactor(Typo): Typo update in bblif comment
wjrforcyber Sep 16, 2023
7ec8f17
Refactor(Typo): Typo update in write_aiger message
wjrforcyber Sep 17, 2023
e1db615
Merge branch 'master' into typo
wjrforcyber Sep 17, 2023
05c897a
Refactor(Typo): Typo in read_aiger
wjrforcyber Sep 17, 2023
eae19f7
Refactor(Typo): Typo in strash
wjrforcyber Sep 18, 2023
3781c1d
Refactor(Typo): Link is NOT FOUND page(not available), change to the …
wjrforcyber Sep 24, 2023
ecf6255
Refactor(Typo):Missing a parameter fUseLutLib and use fSaveBest twice
wjrforcyber Sep 26, 2023
fb6a472
Merge remote-tracking branch 'upstream/master' into typo
wjrforcyber Oct 7, 2023
c2fdb86
Refactor(Typo): Typo in ACD
wjrforcyber Oct 7, 2023
864f96b
Adding decomposition of mapping into LUT structures before returning …
aletempiac Apr 16, 2024
ac9cfc7
Update pdrCore.c
sirandreww Apr 21, 2024
043a2ff
Adding new XX decomposition to &if
aletempiac Apr 23, 2024
39ed8b3
Cleaning code
aletempiac May 2, 2024
714ab45
Adding deriving LUTs to if
aletempiac May 2, 2024
5708841
Merge remote-tracking branch 'origin/master' into yosys-flow
aletempiac May 2, 2024
fb97997
New command &putontop to create large AIGs.
alanminko May 4, 2024
d109372
Adding delay-driven LUT decomposition to &if
aletempiac May 7, 2024
ae92ea0
Merge pull request #297 from aletempiac/yosys-flow
alanminko May 7, 2024
3c56ccb
Add warning when trying to CEC AIGs with xor-gates.
alanminko May 8, 2024
c194c11
New way to generate counter-examples.
alanminko May 9, 2024
f04f9c4
Updating counter-example generation.
alanminko May 9, 2024
66c7f67
New command "resub_core".
alanminko May 14, 2024
554da94
New command &odc to study observability don't-cares.
alanminko May 14, 2024
daf3313
New aliases.
alanminko May 14, 2024
6ad6539
New command &genrel to generate relations for windows in the AIG.
alanminko May 15, 2024
c906dfb
Upgrading "twoexact" to read relations in an updated format.
alanminko May 15, 2024
2c02ae8
Updating the previous commit.
alanminko May 15, 2024
d9a08eb
New command &window to extract windows from an AIG.
alanminko May 16, 2024
5fc62b8
Code to dump resub instances.
alanminko May 16, 2024
3fd4291
Suggested fix.
alanminko May 16, 2024
9a89447
Updating instructions for AIG construction.
alanminko May 16, 2024
3616fd8
New command "resub_unate" and various changes.
alanminko May 17, 2024
c64f927
Various changes and bug fixes.
alanminko May 19, 2024
8ec95e8
Bug fix.
alanminko May 19, 2024
0cb945e
Enabling support of boxes in &nf.
alanminko May 21, 2024
1118674
Compilation problem.
alanminko May 21, 2024
23f351c
Bug fix in word-level abstraction.
alanminko May 23, 2024
795fee8
Bug fix in &genrel.
alanminko May 23, 2024
6e459fa
Merge pull request #289 from sirandreww/master
alanminko May 23, 2024
161963a
Merge branch 'master' of github.com:berkeley-abc/abc
alanminko May 23, 2024
34c2ed7
up stream changes
xiaoqingxu08 May 23, 2024
1e58dc6
Merge pull request #299 from moonshotxx/test
alanminko May 24, 2024
fb4988b
New API to print internal nodes.
alanminko May 28, 2024
17b1ec7
Bug fix.
alanminko May 29, 2024
806a996
Updating the print-out after the bug fix.
alanminko May 30, 2024
a6bf511
Change Scl_Pair_t_ member types to long to allow for large liberty fi…
mikesinouye Jun 13, 2024
24d4203
Adding switch "i" in "show" to display original AIG IDs of mapped nodes.
alanminko Jun 16, 2024
7beda11
Merge pull request #302 from mikesinouye/scl
alanminko Jun 17, 2024
2d70deb
Corner-case bug fix.
alanminko Jun 18, 2024
6c62604
Make `lbool` explicitly signed
rocallahan Jun 28, 2024
13998ba
Allowing the genlib reader to skip gates larger than the given size.
alanminko Jul 10, 2024
ae2e3f9
Adding command &genmux.
alanminko Jul 12, 2024
c7ac6be
Updating parameters.
alanminko Jul 12, 2024
d7a623c
New API for swicthing activity estimation.
alanminko Jul 17, 2024
5450779
Improved SOP to BDD conversion.
alanminko Jul 21, 2024
d036ba5
Updating usage messages of QBF commands.
alanminko Jul 24, 2024
6262dcf
Merge pull request #303 from rocallahan/signed-lbool
alanminko Jul 24, 2024
fe3b5bf
chore: `__builtin_popcount` to replace BitCount8
coastalwhite Jul 24, 2024
f8a6432
Implementation of functional abstraction.
alanminko Jul 25, 2024
b5f4afa
Duplicating AIG after synthesis.
alanminko Jul 26, 2024
849adb2
chore: add `__builtin_popcount` for MSVC
coastalwhite Jul 26, 2024
93388c0
Experiments with DSD.
alanminko Jul 27, 2024
3e1979f
Experimental features of &scorr.
alanminko Jul 28, 2024
96edf40
Allow for disabling variable ordering in "lutmin".
alanminko Jul 28, 2024
2011cbc
One more file to be committed.
alanminko Jul 28, 2024
70563cd
Adds option to unamap network using a non static version of the library
QuantamHD Jul 31, 2024
572b80b
Updating windows makefile by removing unused package.
alanminko Aug 1, 2024
9062ed9
Experiments with circuit generators.
alanminko Aug 1, 2024
4f68f08
Compilation problem.
alanminko Aug 1, 2024
35d67f6
The same problem in another place.
alanminko Aug 1, 2024
279a909
Merge pull request #310 from QuantamHD/ethan_fixing_things_2
alanminko Aug 1, 2024
a06dde4
Merge pull request #309 from coastalwhite/chore-popcount-intrinsics
alanminko Aug 1, 2024
3491773
Suggested changes to improve thread safety.
alanminko Aug 1, 2024
c62bfec
Trying to fix the compilation issue.
alanminko Aug 1, 2024
9f864eb
Trying to fix the compilation issue.
alanminko Aug 1, 2024
53c2525
Remove support for `int` sizes other than 32 bits
rocallahan Jul 25, 2024
ab858c5
Replace `#define`s with enum constants and inline functions in `exor.h`
rocallahan Jul 25, 2024
1954e2f
Updating DSD profiling procedures.
alanminko Aug 2, 2024
8f0cbbd
Compiler warning.
alanminko Aug 2, 2024
1ac5f64
Compiler warning.
alanminko Aug 2, 2024
3286179
Merge pull request #307 from rocallahan/exor-defines
alanminko Aug 2, 2024
7d88bf2
New command to detect presence of a function in the AIG.
alanminko Aug 2, 2024
b25d9c4
Changing interface of &genrel.
alanminko Aug 3, 2024
43426f0
Updates to history printing.
alanminko Aug 3, 2024
037971d
Migrating &stochsyn to generic concurrency interface.
alanminko Aug 4, 2024
1963422
Experiments with detecting multipliers.
alanminko Aug 6, 2024
e0a9c29
Instead of throwing C++ exceptions, just print an error message and a…
rocallahan Aug 6, 2024
43adbc7
New command for LUT cascade decomposition.
alanminko Aug 6, 2024
b23f998
Merge pull request #313 from rocallahan/no-exceptions
alanminko Aug 6, 2024
fe0bb59
do not include -lrt or -ldl on platform that do not support them
josuah Jul 8, 2022
f5f317d
Skip -ldl on NetBSD; it does not exist. Skip -lrt on NetBSD; it is
thorpej Mar 3, 2024
a692c0d
Support out of tree builds
RCoeurjoly Apr 11, 2024
10b9da7
Makefile: break apart steps in `make clean`
xobs Oct 19, 2019
23435fc
Export version
mmicko Jul 25, 2022
15ec302
Define S_IREAD|IWRITE macros using IRUSR|IWUSR
mohamed Aug 3, 2020
6d52a1e
fold: Option (-s) to make sequential cleanup optional
jix Jun 7, 2023
57c3bd3
Patch to support WASI builds
povik Aug 7, 2024
adbcb91
Add '-p' option to 'constr' to allow fully removing constraints
jix Aug 5, 2022
68c9924
Fix archive reproducibility
lf- Jun 27, 2024
1383c76
Pull YosysHQ read_cex/write_cex changes
povik Aug 7, 2024
eef8c01
Fix Assertion using &if: `pCutSet->nCuts > 0'
davidar Mar 31, 2024
3e65b25
Apply patch to If_ObjPerformMappingChoice too
davidar Apr 1, 2024
e334586
Additional fix for large liberty files
mmicko Sep 8, 2022
e62e8ac
pdr -X to write CEXes immediately
jix Feb 2, 2024
c8d64b8
Fix pdr timing output
jix Feb 7, 2024
5444cf2
Improved anytime pdr
jix Feb 27, 2024
afbeccb
Handle edge case in Gia_ManTransferTiming
povik Aug 7, 2024
f0b070e
Fix types in call to atomic_store_explicit
povik Aug 7, 2024
2a8ea11
Remove extra asserts in buffering code
povik Aug 7, 2024
2d26778
Include `stdbool.h` for portability of atomic calls
povik Aug 7, 2024
95f1837
Ongoing development related to Boolean decomposition.
alanminko Aug 7, 2024
e6b36cb
Merge pull request #315 from YosysHQ/povik/yosyshq-build
alanminko Aug 8, 2024
0129b4c
Merge pull request #316 from YosysHQ/povik/yosyshq-commands
alanminko Aug 8, 2024
dce6e48
Merge pull request #317 from YosysHQ/povik/fix-transfer-timing
alanminko Aug 8, 2024
762a123
Merge pull request #318 from YosysHQ/povik/fix-atomic_store-call
alanminko Aug 8, 2024
71b409b
Merge pull request #319 from YosysHQ/povik/rm-buffering-asserts
alanminko Aug 8, 2024
4156a88
Extending &funtrace to trace functions found in an AIG.
alanminko Aug 9, 2024
35a1bbb
Ongoing development related to Boolean decomposition.
alanminko Aug 10, 2024
71c4e23
Adding cut print-out in &funtrace.
alanminko Aug 11, 2024
e824cca
Fixing a serious bug in bit-blasting when multiplier argments have di…
alanminko Aug 11, 2024
807f6dd
Experiments with detecting multipliers.
alanminko Aug 11, 2024
ec8419c
Revert "Improved anytime pdr"
povik Aug 12, 2024
39f6fbb
Revert "Fix pdr timing output"
povik Aug 12, 2024
de8620d
Revert "pdr -X to write CEXes immediately"
povik Aug 12, 2024
81fcf84
Updating "lutexact" to support single-rail LUT cascade.
alanminko Aug 12, 2024
324ceea
Merge pull request #320 from YosysHQ/povik/revert-pdr
alanminko Aug 13, 2024
c239168
Adding BLIF dumping to "lutexact".
alanminko Aug 14, 2024
e2b7750
Experiments with bit-blasting.
alanminko Aug 14, 2024
1a62954
Adding command to read ROM data.
alanminko Aug 14, 2024
c099e62
Adding a switch to complement the primary outputs of an AIG.
alanminko Aug 14, 2024
2055b1b
Adding an option to dump satisfying assignments into a BLIF file.
alanminko Aug 14, 2024
732abf5
Compiler warnings.
alanminko Aug 17, 2024
03b786a
Experiments with adder-based circuits.
alanminko Aug 17, 2024
5e35510
New APIs for AIG package.
alanminko Aug 18, 2024
af77b80
Regrouping recently added code.
alanminko Aug 18, 2024
49a4895
Adds unit testing framework to ABC
QuantamHD Sep 13, 2023
d93a12e
Rename Github Actions job to `build-posix-cmake`
rocallahan Aug 23, 2024
034492b
Merge pull request #322 from rocallahan/unit-tests
alanminko Aug 24, 2024
64ed5b8
Merge pull request #323 from rocallahan/workflow-name
alanminko Aug 24, 2024
bcf292f
Refactor(Resub): Clear markB at the beginning
wjrforcyber Aug 28, 2024
252afb1
Refactor(Resub): Clear mark A/B
wjrforcyber Aug 28, 2024
cb294bb
Save cell mapping as new 'M' AIGER extension
povik Aug 28, 2024
9371696
Merge pull request #326 from wjrforcyber/resub_markB
alanminko Aug 28, 2024
786a39a
Make casts explicit
povik Aug 28, 2024
5d6a568
Merge pull request #327 from YosysHQ/povik/aiger-cell-mapping
alanminko Aug 28, 2024
cd71108
Perf improvement in satsolver
heshpdx Sep 3, 2024
ad8f8a2
Convert the other divide to a multiply
heshpdx Sep 3, 2024
03d9293
Updating &funtrace to trace function of the primary outputs of the AIG.
alanminko Sep 4, 2024
3de73f2
Updating internal cut manager to prefer cuts with high fanin fanout c…
alanminko Sep 5, 2024
3ddd461
Updating "read_lib" to output all gates when gain-based modeling is u…
alanminko Sep 6, 2024
0d10253
Another way of writing primary outputs in Verilog.
alanminko Sep 6, 2024
9c152b7
Trasferring equivalence in the special-case usage of &scorr.
alanminko Sep 13, 2024
0a5057f
github actions:
sterin Sep 14, 2024
4c4e298
GitHub Actions: updated cmake to use macos-latest instead of macos-11
sterin Sep 15, 2024
db245f5
Merge pull request #333 from sterin/master
alanminko Sep 15, 2024
db735b6
Increase buffer size in filename append utility to support more liber…
mikesinouye Sep 18, 2024
ee5acbb
Use <limits.h>'s PATH_MAX macro instead of fixed size.
mikesinouye Sep 18, 2024
5bd5216
Add #include <stdlib.h> for Windows build support.
mikesinouye Sep 18, 2024
8179c73
Try support for Windows again.
mikesinouye Sep 18, 2024
35a8768
ttopt bugfix
MyskYko Sep 22, 2024
3f7a308
Merge pull request #335 from MyskYko/fix_ttopt
alanminko Sep 23, 2024
9539306
Merge pull request #334 from mikesinouye/multilib
alanminko Sep 23, 2024
4369321
Bug fix.
alanminko Sep 28, 2024
6004b7b
Adding API for inserting danginling flop.
alanminko Oct 1, 2024
a78d358
Extending &funtrace to dump and load precomputed library.
alanminko Oct 1, 2024
af1de4f
Improved bit-blasting of some word-level operators.
alanminko Oct 1, 2024
2e33843
Updating "lutexact" to run on symmetric functions.
alanminko Oct 7, 2024
707442e
Bug fix in &scorr.
alanminko Oct 8, 2024
46f2300
Performance improvements in ACD
aletempiac Oct 15, 2024
52c842b
Cleaning code
aletempiac Oct 15, 2024
d1f78b3
Bug fix (just in the code; it does not affect the execution)
aletempiac Oct 15, 2024
baf4ddb
Bug fix (just in the code; it does not affect the execution)
aletempiac Oct 15, 2024
74e7c64
Bug fix in &scorr
alanminko Oct 21, 2024
f1773bd
Procedure to detect node equivalences across two AIGs.
alanminko Oct 21, 2024
a239dd8
Merge pull request #328 from heshpdx/master
alanminko Oct 21, 2024
498ec53
Merge pull request #340 from aletempiac/acd_improvements
alanminko Oct 21, 2024
743f3a7
Merge pull request #250 from wjrforcyber/typo
alanminko Oct 21, 2024
cb2140d
Adding PI/PO name transfer after mapping+retiming.
alanminko Oct 21, 2024
ecd9480
Fixing assertion failures in &put.
alanminko Oct 23, 2024
091ff4e
Adding generation of random functions to "lutexact"
alanminko Nov 6, 2024
c787e32
Adding postiive minterm count for random functions generated by "lute…
alanminko Nov 6, 2024
aeb9772
Updates to LUT cascade synthesis.
alanminko Nov 11, 2024
f2e4ceb
Update to "lutexact".
alanminko Nov 11, 2024
b5a76d8
Compilation problem.
alanminko Nov 11, 2024
3aff0af
Adding command for generating sorters.
alanminko Nov 12, 2024
1f3cf0a
Experiment with "scorr".
alanminko Nov 17, 2024
14168eb
Updating command "rungen" to generate random functions.
alanminko Nov 28, 2024
01c9a65
map: Add Mio_Library_t* parameter to Abc_NtkMap
QuantamHD Dec 2, 2024
c315d9e
Merge pull request #347 from QuantamHD/map_param
alanminko Dec 2, 2024
c12ea9a
Merge remote-tracking branch 'upstream/master' into update_abc2
QuantamHD Dec 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.gitcommit export-subst
* text=auto

*.c text
Expand Down
1 change: 1 addition & 0 deletions .gitcommit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$Format:%H$
14 changes: 9 additions & 5 deletions .github/workflows/build-posix-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:

jobs:

build-posix:
build-posix-cmake:
strategy:
matrix:
os: [macos-11, ubuntu-latest]
os: [macos-latest, ubuntu-latest]
use_namespace: [false, true]

runs-on: ${{ matrix.os }}
Expand All @@ -22,7 +22,7 @@ jobs:
steps:

- name: Git Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -44,6 +44,10 @@ jobs:
run: |
cmake --build build

- name: Run Unit Tests
run: |
ctest --output-on-failure

- name: Test Executable
run: |
./build/abc -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec"
Expand All @@ -60,7 +64,7 @@ jobs:
cp build/abc build/libabc.a staging/

- name: Upload pacakge artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: package
name: package-cmake-${{ matrix.os }}-${{ matrix.use_namespace }}
path: staging/
6 changes: 3 additions & 3 deletions .github/workflows/build-posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:

- name: Git Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
cp abc libabc.a staging/

- name: Upload pacakge artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: package
name: package-posix-${{ matrix.os }}-${{ matrix.use_namespace }}
path: staging/
6 changes: 3 additions & 3 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:

- name: Git Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
copy UpgradeLog.htm staging/

- name: Upload pacakge artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: package
name: package-windows
path: staging/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ lib/m114*
lib/bip*
docs/
.vscode/
.cache/

src/ext*
src/xxx/
Expand Down
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,17 @@ add_library(libabc-pic EXCLUDE_FROM_ALL ${ABC_SRC})
abc_properties(libabc-pic PUBLIC)
set_property(TARGET libabc-pic PROPERTY POSITION_INDEPENDENT_CODE ON)
set_property(TARGET libabc-pic PROPERTY OUTPUT_NAME abc-pic)

if(NOT DEFINED ABC_SKIP_TESTS)
enable_testing()
include(FetchContent)
FetchContent_Declare(
googletest
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
# Specify the commit you depend on and update it regularly.
URL "https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip"
)
FetchContent_MakeAvailable(googletest)
include(GoogleTest)
add_subdirectory(test)
endif()
22 changes: 16 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ AR := ar
LD := $(CXX)

MSG_PREFIX ?=
ABCSRC = .
ABCSRC ?= .
VPATH = $(ABCSRC)

$(info $(MSG_PREFIX)Using CC=$(CC))
$(info $(MSG_PREFIX)Using CXX=$(CXX))
Expand Down Expand Up @@ -41,7 +42,7 @@ default: $(PROG)
ARCHFLAGS_EXE ?= ./arch_flags

$(ARCHFLAGS_EXE) : arch_flags.c
$(CC) arch_flags.c -o $(ARCHFLAGS_EXE)
$(CC) $< -o $(ARCHFLAGS_EXE)

INCLUDES += -I$(ABCSRC)/src

Expand Down Expand Up @@ -138,11 +139,11 @@ endif

# LIBS := -ldl -lrt
LIBS += -lm
ifneq ($(OS), FreeBSD)
ifneq ($(OS), $(filter $(OS), FreeBSD OpenBSD NetBSD))
LIBS += -ldl
endif

ifneq ($(findstring Darwin, $(shell uname)), Darwin)
ifneq ($(OS), $(filter $(OS), FreeBSD OpenBSD NetBSD Darwin))
LIBS += -lrt
endif

Expand All @@ -152,7 +153,7 @@ ifdef ABC_USE_LIBSTDCXX
endif

$(info $(MSG_PREFIX)Using CFLAGS=$(CFLAGS))
CXXFLAGS += $(CFLAGS) -std=c++17
CXXFLAGS += $(CFLAGS) -std=c++17 -fno-exceptions

SRC :=
GARBAGE := core core.* *.stackdump ./tags $(PROG) arch_flags
Expand All @@ -174,26 +175,32 @@ DEP := $(OBJ:.o=.d)
# implicit rules

%.o: %.c
@mkdir -p $(dir $@)
@echo "$(MSG_PREFIX)\`\` Compiling:" $(LOCAL_PATH)/$<
$(VERBOSE)$(CC) -c $(OPTFLAGS) $(INCLUDES) $(CFLAGS) $< -o $@

%.o: %.cc
@mkdir -p $(dir $@)
@echo "$(MSG_PREFIX)\`\` Compiling:" $(LOCAL_PATH)/$<
$(VERBOSE)$(CXX) -c $(OPTFLAGS) $(INCLUDES) $(CXXFLAGS) $< -o $@

%.o: %.cpp
@mkdir -p $(dir $@)
@echo "$(MSG_PREFIX)\`\` Compiling:" $(LOCAL_PATH)/$<
$(VERBOSE)$(CXX) -c $(OPTFLAGS) $(INCLUDES) $(CXXFLAGS) $< -o $@

%.d: %.c
@mkdir -p $(dir $@)
@echo "$(MSG_PREFIX)\`\` Generating dependency:" $(LOCAL_PATH)/$<
$(VERBOSE)$(ABCSRC)/depends.sh "$(CC)" `dirname $*.c` $(OPTFLAGS) $(INCLUDES) $(CFLAGS) $< > $@

%.d: %.cc
@mkdir -p $(dir $@)
@echo "$(MSG_PREFIX)\`\` Generating dependency:" $(LOCAL_PATH)/$<
$(VERBOSE)$(ABCSRC)/depends.sh "$(CXX)" `dirname $*.cc` $(OPTFLAGS) $(INCLUDES) $(CXXFLAGS) $< > $@

%.d: %.cpp
@mkdir -p $(dir $@)
@echo "$(MSG_PREFIX)\`\` Generating dependency:" $(LOCAL_PATH)/$<
$(VERBOSE)$(ABCSRC)/depends.sh "$(CXX)" `dirname $*.cpp` $(OPTFLAGS) $(INCLUDES) $(CXXFLAGS) $< > $@

Expand All @@ -207,7 +214,10 @@ depend: $(DEP)

clean:
@echo "$(MSG_PREFIX)\`\` Cleaning up..."
$(VERBOSE)rm -rvf $(PROG) lib$(PROG).a $(OBJ) $(GARBAGE) $(OBJ:.o=.d)
$(VERBOSE)rm -rvf $(PROG) lib$(PROG).a
$(VERBOSE)rm -rvf $(OBJ)
$(VERBOSE)rm -rvf $(GARBAGE)
$(VERBOSE)rm -rvf $(OBJ:.o=.d)

tags:
etags `find . -type f -regex '.*\.\(c\|h\)'`
Expand Down
2 changes: 2 additions & 0 deletions abc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ alias resyn2rs "b; rs -K 6; rw; rs -K 6 -N 2; rf; rs -K 8; b; rs -K 8 -N 2; r
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"
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"
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"
alias &resyn2rs "&put; resyn2rs; &get"
alias &compress2rs "&put; compress2rs; &get"

# use this script to convert 1-valued and DC-valued flops for an AIG
alias fix_aig "logic; undc; strash; zero"
Expand Down
20 changes: 12 additions & 8 deletions abclib.dsp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions readmeaig
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,27 @@ Using GIA Package in ABC
- For each object in the design annotated with the constructed AIG node (pNode), remember its AIG node ID by calling Gia_ObjId(pMan,pNode).
- Quit the AIG package using Gia_ManStop().
The above process should not produce memory leaks.




Using MiniAIG Package

- Add #include "miniaig.h".
- Start the AIG package using Mini_AigStart().
- Assign primary inputs using Mini_AigCreatePi().
- Assign flop outputs using Mini_AigCreatePi().
(It is important to create all PIs first, before creating flop outputs.)
(Flop control logic, if present, should be elaborated into AND gates. For example, to represent a flop enable, create the driver of enable signal, which can be a PI or an internal node, and then add logic for <flop_input_new> = MUX( <enable>, <flop_input>, <flop_output> ). The output of this logic feeds into the flop.
- Construct AIG in a topological order using Mini_AigAnd(), Mini_AigOr(), etc.
- If constant-0 or constant-1 functions are needed, use 0 or 1.
- Create primary outputs using Mini_AigCreatePo().
- Create flop inputs using Mini_AigCreatePo().
(It is important to create all POs first, before creating register inputs.)
- Set the number of flops by calling Mini_AigSetRegNum().
- The AIG may contain internal nodes without fanout and/or internal nodes fed by constants.
- Dump AIG in internal MiniAIG binary format using Mini_AigDump() and read it into ABC using "&read -m file.mini"
- Dump AIG in standard AIGER format (https://fmv.jku.at/aiger/index.html) using Mini_AigerWrite() and read it into ABC using "&read file.aig"
- For each object in the design represented using MiniAIG, it may be helpful to save the MiniAIG literal returned by Mini_AigAnd(), Mini_AigOr(), etc when constructing that object.
- Quit the AIG package using Mini_AigStop().
The above process should not produce memory leaks.
2 changes: 1 addition & 1 deletion src/aig/aig/aigShow.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ void Aig_ManShow( Aig_Man_t * pMan, int fHaig, Vec_Ptr_t * vBold )
char FileNameDot[200];
FILE * pFile;
// create the file name
sprintf( FileNameDot, "%s", Extra_FileNameGenericAppend(pMan->pName, ".dot") );
sprintf( FileNameDot, "%s", Extra_FileNameGenericAppend(pMan->pName ? pMan->pName : (char *)"unknown", ".dot") );
// check that the file can be opened
if ( (pFile = fopen( FileNameDot, "w" )) == NULL )
{
Expand Down
5 changes: 5 additions & 0 deletions src/aig/aig/aigUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -1169,8 +1169,13 @@ void Aig_ManRandomTest1()
***********************************************************************/
unsigned Aig_ManRandom( int fReset )
{
#ifdef _MSC_VER
static unsigned int m_z = NUMBER1;
static unsigned int m_w = NUMBER2;
#else
static __thread unsigned int m_z = NUMBER1;
static __thread unsigned int m_w = NUMBER2;
#endif
if ( fReset )
{
m_z = NUMBER1;
Expand Down
23 changes: 21 additions & 2 deletions src/aig/gia/gia.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,12 @@ struct Gia_Man_t_
Gia_Dat_t * pUData;
// retiming data
Vec_Str_t * vStopsF;
Vec_Str_t * vStopsB;
Vec_Str_t * vStopsB;
// iteration with boxes
int iFirstNonPiId;
int iFirstPoId;
int iFirstAndObj;
int iFirstPoObj;
};


Expand Down Expand Up @@ -549,9 +554,11 @@ static inline int Gia_ObjFaninIdp( Gia_Man_t * p, Gia_Obj_t * pObj, int
static inline int Gia_ObjFaninLit0( Gia_Obj_t * pObj, int ObjId ) { return Abc_Var2Lit( Gia_ObjFaninId0(pObj, ObjId), Gia_ObjFaninC0(pObj) ); }
static inline int Gia_ObjFaninLit1( Gia_Obj_t * pObj, int ObjId ) { return Abc_Var2Lit( Gia_ObjFaninId1(pObj, ObjId), Gia_ObjFaninC1(pObj) ); }
static inline int Gia_ObjFaninLit2( Gia_Man_t * p, int ObjId ) { return (p->pMuxes && p->pMuxes[ObjId]) ? p->pMuxes[ObjId] : -1; }
static inline int Gia_ObjFaninLit( Gia_Obj_t * pObj, int ObjId, int n ){ return n ? Gia_ObjFaninLit1(pObj, ObjId) : Gia_ObjFaninLit0(pObj, ObjId);}
static inline int Gia_ObjFaninLit0p( Gia_Man_t * p, Gia_Obj_t * pObj) { return Abc_Var2Lit( Gia_ObjFaninId0p(p, pObj), Gia_ObjFaninC0(pObj) ); }
static inline int Gia_ObjFaninLit1p( Gia_Man_t * p, Gia_Obj_t * pObj) { return Abc_Var2Lit( Gia_ObjFaninId1p(p, pObj), Gia_ObjFaninC1(pObj) ); }
static inline int Gia_ObjFaninLit2p( Gia_Man_t * p, Gia_Obj_t * pObj) { return (p->pMuxes && p->pMuxes[Gia_ObjId(p, pObj)]) ? p->pMuxes[Gia_ObjId(p, pObj)] : -1; }
static inline int Gia_ObjFaninLitp( Gia_Man_t * p, Gia_Obj_t * pObj, int n ){ return n ? Gia_ObjFaninLit1p(p, pObj) : Gia_ObjFaninLit0p(p, pObj);}
static inline void Gia_ObjFlipFaninC0( Gia_Obj_t * pObj ) { assert( Gia_ObjIsCo(pObj) ); pObj->fCompl0 ^= 1; }
static inline int Gia_ObjFaninNum( Gia_Man_t * p, Gia_Obj_t * pObj ) { if ( Gia_ObjIsMux(p, pObj) ) return 3; if ( Gia_ObjIsAnd(pObj) ) return 2; if ( Gia_ObjIsCo(pObj) ) return 1; return 0; }
static inline int Gia_ObjWhatFanin( Gia_Man_t * p, Gia_Obj_t * pObj, Gia_Obj_t * pFanin ) { if ( Gia_ObjFanin0(pObj) == pFanin ) return 0; if ( Gia_ObjFanin1(pObj) == pFanin ) return 1; if ( Gia_ObjFanin2(p, pObj) == pFanin ) return 2; assert(0); return -1; }
Expand Down Expand Up @@ -1243,7 +1250,16 @@ static inline int Gia_ObjCellId( Gia_Man_t * p, int iLit ) { re
for ( i = 0; (i < Gia_ManRegNum(p)) && ((pObjRi) = Gia_ManCo(p, Gia_ManPoNum(p)+i)) && ((pObjRo) = Gia_ManCi(p, Gia_ManPiNum(p)+i)); i++ )
#define Gia_ManForEachRoToRiVec( vRoIds, p, pObj, i ) \
for ( i = 0; (i < Vec_IntSize(vRoIds)) && ((pObj) = Gia_ObjRoToRi(p, Gia_ManObj(p, Vec_IntEntry(vRoIds, i)))); i++ )


#define Gia_ManForEachObjWithBoxes( p, pObj, i ) \
for ( i = p->iFirstAndObj; (i < p->iFirstPoObj) && ((pObj) = Gia_ManObj(p, i)); i++ )
#define Gia_ManForEachObjReverseWithBoxes( p, pObj, i ) \
for ( i = p->iFirstPoObj - 1; (i >= p->iFirstAndObj) && ((pObj) = Gia_ManObj(p, i)); i-- )
#define Gia_ManForEachCiIdWithBoxes( p, Id, i ) \
for ( i = 0; (i < p->iFirstNonPiId) && ((Id) = Gia_ObjId(p, Gia_ManCi(p, i))); i++ )
#define Gia_ManForEachCoWithBoxes( p, pObj, i ) \
for ( i = p->iFirstPoId; (i < Vec_IntSize(p->vCos)) && ((pObj) = Gia_ManCo(p, i)); i++ )

////////////////////////////////////////////////////////////////////////
/// FUNCTION DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1671,6 +1687,7 @@ extern int Gia_SweeperRun( Gia_Man_t * p, Vec_Int_t * vProbeIds,
extern float Gia_ManEvaluateSwitching( Gia_Man_t * p );
extern float Gia_ManComputeSwitching( Gia_Man_t * p, int nFrames, int nPref, int fProbOne );
extern Vec_Int_t * Gia_ManComputeSwitchProbs( Gia_Man_t * pGia, int nFrames, int nPref, int fProbOne );
extern Vec_Int_t * Gia_ManComputeSwitchProbs2( Gia_Man_t * pGia, int nFrames, int nPref, int fProbOne, int nRandPiFactor );
extern Vec_Flt_t * Gia_ManPrintOutputProb( Gia_Man_t * p );
/*=== giaTim.c ===========================================================*/
extern int Gia_ManBoxNum( Gia_Man_t * p );
Expand Down Expand Up @@ -1712,6 +1729,7 @@ extern word Gia_ManRandomW( int fReset );
extern void Gia_ManRandomInfo( Vec_Ptr_t * vInfo, int iInputStart, int iWordStart, int iWordStop );
extern char * Gia_TimeStamp();
extern char * Gia_FileNameGenericAppend( char * pBase, char * pSuffix );
extern Vec_Ptr_t * Gia_GetFakeNames( int nNames, int fCaps );
extern void Gia_ManIncrementTravId( Gia_Man_t * p );
extern void Gia_ManCleanMark01( Gia_Man_t * p );
extern void Gia_ManSetMark0( Gia_Man_t * p );
Expand All @@ -1738,6 +1756,7 @@ extern Vec_Int_t * Gia_ManReverseLevel( Gia_Man_t * p );
extern Vec_Int_t * Gia_ManRequiredLevel( Gia_Man_t * p );
extern void Gia_ManCreateValueRefs( Gia_Man_t * p );
extern void Gia_ManCreateRefs( Gia_Man_t * p );
extern void Gia_ManCreateLitRefs( Gia_Man_t * p );
extern int * Gia_ManCreateMuxRefs( Gia_Man_t * p );
extern int Gia_ManCrossCut( Gia_Man_t * p, int fReverse );
extern Vec_Int_t * Gia_ManCollectPoIds( Gia_Man_t * p );
Expand Down
12 changes: 12 additions & 0 deletions src/aig/gia/giaAiger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,18 @@ void Gia_AigerWriteS( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, in
Vec_StrFree( vStrExt );
if ( fVerbose ) printf( "Finished writing extension \"m\".\n" );
}
// write cell mapping
if ( Gia_ManHasCellMapping(p) )
{
extern Vec_Str_t * Gia_AigerWriteCellMappingDoc( Gia_Man_t * p );
fprintf( pFile, "M" );
vStrExt = Gia_AigerWriteCellMappingDoc( p );
Gia_FileWriteBufferSize( pFile, Vec_StrSize(vStrExt) );
fwrite( Vec_StrArray(vStrExt), 1, Vec_StrSize(vStrExt), pFile );
Vec_StrFree( vStrExt );
if ( fVerbose ) printf( "Finished writing extension \"M\".\n" );

}
// write placement
if ( p->pPlacement )
{
Expand Down
Loading
Loading