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
13dd4eeb
Commit
13dd4eeb
authored
Jun 22, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with balancing.
parent
fc24e9d3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
1 deletions
+86
-1
abclib.dsp
+4
-0
src/aig/gia/giaBalance2.c
+0
-0
src/aig/gia/giaMan.c
+1
-1
src/aig/gia/module.make
+1
-0
src/base/abci/abc.c
+80
-0
No files found.
abclib.dsp
View file @
13dd4eeb
...
@@ -3691,6 +3691,10 @@ SOURCE=.\src\aig\gia\giaBalance.c
...
@@ -3691,6 +3691,10 @@ SOURCE=.\src\aig\gia\giaBalance.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaBalance2.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaBidec.c
SOURCE=.\src\aig\gia\giaBidec.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
src/aig/gia/giaBalance2.c
0 → 100644
View file @
13dd4eeb
This diff is collapsed.
Click to expand it.
src/aig/gia/giaMan.c
View file @
13dd4eeb
...
@@ -385,7 +385,7 @@ void Gia_ManPrintChoiceStats( Gia_Man_t * p )
...
@@ -385,7 +385,7 @@ void Gia_ManPrintChoiceStats( Gia_Man_t * p )
void
Gia_ManPrintStats
(
Gia_Man_t
*
p
,
Gps_Par_t
*
pPars
)
void
Gia_ManPrintStats
(
Gia_Man_t
*
p
,
Gps_Par_t
*
pPars
)
{
{
extern
float
Gia_ManLevelAve
(
Gia_Man_t
*
p
);
extern
float
Gia_ManLevelAve
(
Gia_Man_t
*
p
);
if
(
pPars
->
fMiter
)
if
(
pPars
&&
pPars
->
fMiter
)
{
{
Gia_ManPrintStatsMiter
(
p
,
0
);
Gia_ManPrintStatsMiter
(
p
,
0
);
return
;
return
;
...
...
src/aig/gia/module.make
View file @
13dd4eeb
...
@@ -3,6 +3,7 @@ SRC += src/aig/gia/giaAig.c \
...
@@ -3,6 +3,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaAiger.c
\
src/aig/gia/giaAiger.c
\
src/aig/gia/giaAigerExt.c
\
src/aig/gia/giaAigerExt.c
\
src/aig/gia/giaBalance.c
\
src/aig/gia/giaBalance.c
\
src/aig/gia/giaBalance2.c
\
src/aig/gia/giaBidec.c
\
src/aig/gia/giaBidec.c
\
src/aig/gia/giaCCof.c
\
src/aig/gia/giaCCof.c
\
src/aig/gia/giaCex.c
\
src/aig/gia/giaCex.c
\
...
...
src/base/abci/abc.c
View file @
13dd4eeb
...
@@ -350,6 +350,7 @@ static int Abc_CommandAbc9Bidec ( Abc_Frame_t * pAbc, int argc, cha
...
@@ -350,6 +350,7 @@ static int Abc_CommandAbc9Bidec ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9Shrink
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Shrink
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Fx
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Fx
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Balance
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Balance
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9BalanceLut
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Syn2
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Syn2
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Syn3
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Syn3
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Syn4
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Syn4
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
@@ -928,6 +929,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
...
@@ -928,6 +929,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&shrink"
,
Abc_CommandAbc9Shrink
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&shrink"
,
Abc_CommandAbc9Shrink
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&fx"
,
Abc_CommandAbc9Fx
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&fx"
,
Abc_CommandAbc9Fx
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&b"
,
Abc_CommandAbc9Balance
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&b"
,
Abc_CommandAbc9Balance
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&blut"
,
Abc_CommandAbc9BalanceLut
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&syn2"
,
Abc_CommandAbc9Syn2
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&syn2"
,
Abc_CommandAbc9Syn2
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&syn3"
,
Abc_CommandAbc9Syn3
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&syn3"
,
Abc_CommandAbc9Syn3
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&syn4"
,
Abc_CommandAbc9Syn4
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&syn4"
,
Abc_CommandAbc9Syn4
,
0
);
...
@@ -27766,6 +27768,84 @@ usage:
...
@@ -27766,6 +27768,84 @@ usage:
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Abc_CommandAbc9BalanceLut
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Gia_Man_t
*
Gia_ManBalanceLut
(
Gia_Man_t
*
p
,
int
nLutSize
,
int
nCutNum
,
int
fVerbose
);
Gia_Man_t
*
pTemp
=
NULL
;
int
nLutSize
=
6
;
int
nCutNum
=
8
;
int
c
,
fVerbose
=
0
;
int
fVeryVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCvwh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'K'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-K
\"
should be followed by a char string.
\n
"
);
goto
usage
;
}
nLutSize
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nLutSize
<
0
)
goto
usage
;
break
;
case
'C'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-C
\"
should be followed by a char string.
\n
"
);
goto
usage
;
}
nCutNum
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nCutNum
<
0
)
goto
usage
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'w'
:
fVeryVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
pAbc
->
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9BalanceLut(): There is no AIG.
\n
"
);
return
1
;
}
pTemp
=
Gia_ManBalanceLut
(
pAbc
->
pGia
,
nLutSize
,
nCutNum
,
fVerbose
);
Abc_FrameUpdateGia
(
pAbc
,
pTemp
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &blut [-KC num] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs AIG balancing for the given LUT size
\n
"
);
Abc_Print
(
-
2
,
"
\t
-K num : LUT size for the mapping (2 <= K <= %d) [default = %d]
\n
"
,
6
,
nLutSize
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of priority cuts (1 <= C <= %d) [default = %d]
\n
"
,
8
,
nCutNum
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
// Abc_Print( -2, "\t-w : toggle printing additional information [default = %s]\n", fVeryVerbose? "yes": "no" );
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Syn2
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandAbc9Syn2
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
Gia_Man_t
*
pTemp
;
Gia_Man_t
*
pTemp
;
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