Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
cad47254
Commit
cad47254
authored
Oct 06, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating readme.
parent
71f32fdb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
14 deletions
+33
-14
i10.aig
+0
-0
readme
+30
-11
src/base/main/mainUtils.c
+3
-3
No files found.
i10.aig
0 → 100644
View file @
cad47254
This diff was suppressed by a .gitattributes entry.
readme
View file @
cad47254
...
@@ -15,24 +15,41 @@ the calling application. A simple demo program (file src/demo.c) shows how to
...
@@ -15,24 +15,41 @@ 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
create a stand-alone program performing DAG-aware AIG rewriting, by calling
APIs of ABC compiled as a static library.
APIs of ABC compiled as a static library.
To build demo program
To build
the
demo program
- Copy demo.cc and libabc.a to the working directory
- Copy demo.cc and libabc.a to the working directory
- Run "gcc -Wall -g -c demo.c -o demo.o"
- Run "gcc -Wall -g -c demo.c -o demo.o"
- Run "gcc -g -o demo demo.o libabc.a -lm -ldl -rdynamic -lreadline -ltermcap -lpthread"
- Run "gcc -g -o demo demo.o libabc.a -lm -ldl -rdynamic -lreadline -ltermcap -lpthread"
To run demo program, give it a file with the logic network in AIGER or BLIF. For example:
To run
the
demo program, give it a file with the logic network in AIGER or BLIF. For example:
[alanmi@mima] ~/abc> demo i10.aig
> [alanmi@mima] ~/abc> demo i10.aig
i10 : i/o = 257/ 224 lat = 0 and = 2396 lev = 37
> i10 : i/o = 257/ 224 lat = 0 and = 2396 lev = 37
i10 : i/o = 257/ 224 lat = 0 and = 1851 lev = 35
> i10 : i/o = 257/ 224 lat = 0 and = 1851 lev = 35
Networks are equivalent.
> Networks are equivalent.
Reading = 0.00 sec Rewriting = 0.18 sec Verification = 0.41 sec
> Reading = 0.00 sec Rewriting = 0.18 sec Verification = 0.41 sec
The same can be produced by running the binary in the command-line mode:
> [alanmi@mima] ~/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:
> [alanmi@mima] ~/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.
Compiling as C or C++
Compiling as C or C++
The current version of ABC can be compiled with
both C compiler and
C++ compiler.
The current version of ABC can be compiled with
C compiler or
C++ compiler.
To compile as C code (default): make sure that CC=gcc and ABC_NAMESPACE is not defined.
To compile as C code (default): make sure that CC=gcc and ABC_NAMESPACE is not defined.
To compile as C++ code without namespaces: make sure that CC=g++ and ABC_NAMESPACE is not defined.
To compile as C++ code without namespaces: make sure that CC=g++ and ABC_NAMESPACE is not defined.
...
@@ -58,10 +75,10 @@ Trouble shooting:
...
@@ -58,10 +75,10 @@ Trouble shooting:
(1) If compilation does not start because of the cyclic dependency check,
(1) If compilation does not start because of the cyclic dependency check,
try touching all files as follows: find ./ -type f -exec touch "{}" \;
try touching all files as follows: find ./ -type f -exec touch "{}" \;
(2) If compilation fails because
'readline' is missing, install 'readline'
or
(2) If compilation fails because
readline is missing, install 'readline' library
or
comment out line 26 "#define ABC_USE_READ
_
LINE" in file "src/base/main/mainUtils.c"
comment out line 26 "#define ABC_USE_READLINE" in file "src/base/main/mainUtils.c"
(4) If compilation fails because
'pthread' is missing, install 'pthreads
' library or
(4) If compilation fails because
pthreads are missing, install 'pthread
' library or
comment out line 29 "#define ABC_USE_PTHREADS" in file "src/base/cmd/cmdStarter.c"
comment out line 29 "#define ABC_USE_PTHREADS" in file "src/base/cmd/cmdStarter.c"
and in file "src/proof/abs/absPth.c"
and in file "src/proof/abs/absPth.c"
...
@@ -69,6 +86,8 @@ and in file "src/proof/abs/absPth.c"
...
@@ -69,6 +86,8 @@ and in file "src/proof/abs/absPth.c"
- Remove "src/base/main/libSupport.c" from "src/base/main/module.make"
- Remove "src/base/main/libSupport.c" from "src/base/main/module.make"
- Comment out calls to Libs_Init() and Libs_End() in "src/base/main/mainInit.c"
- Comment out calls to Libs_Init() and Libs_End() in "src/base/main/mainInit.c"
(6) On some systems, readline requires adding '-lcurses' to Makefile.
The following comment was added by Krish Sundaresan:
The following comment was added by Krish Sundaresan:
...
...
src/base/main/mainUtils.c
View file @
cad47254
...
@@ -23,10 +23,10 @@
...
@@ -23,10 +23,10 @@
#if !defined(_WIN32) && !defined(AIX)
#if !defined(_WIN32) && !defined(AIX)
// comment out the following line if 'readline' is not available
// comment out the following line if 'readline' is not available
#define ABC_USE_READ
_
LINE
#define ABC_USE_READLINE
#endif
#endif
#ifdef ABC_USE_READ
_
LINE
#ifdef ABC_USE_READLINE
#include <readline/readline.h>
#include <readline/readline.h>
#include <readline/history.h>
#include <readline/history.h>
#endif
#endif
...
@@ -76,7 +76,7 @@ char * Abc_UtilsGetUsersInput( Abc_Frame_t * pAbc )
...
@@ -76,7 +76,7 @@ char * Abc_UtilsGetUsersInput( Abc_Frame_t * pAbc )
{
{
static
char
Prompt
[
5000
];
static
char
Prompt
[
5000
];
sprintf
(
Prompt
,
"abc %02d> "
,
pAbc
->
nSteps
);
sprintf
(
Prompt
,
"abc %02d> "
,
pAbc
->
nSteps
);
#ifdef ABC_USE_READ
_
LINE
#ifdef ABC_USE_READLINE
{
{
static
char
*
line
=
NULL
;
static
char
*
line
=
NULL
;
if
(
line
!=
NULL
)
ABC_FREE
(
line
);
if
(
line
!=
NULL
)
ABC_FREE
(
line
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment