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
1e69e7e7
Commit
1e69e7e7
authored
Sep 21, 2021
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding command &reshape.
parent
a3632560
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
23 deletions
+73
-23
abclib.dsp
+8
-0
src/aig/gia/giaMan.c
+0
-2
src/aig/gia/module.make
+2
-0
src/base/abci/abc.c
+63
-0
src/base/acb/acbUtil.c
+0
-21
No files found.
abclib.dsp
View file @
1e69e7e7
...
...
@@ -5095,6 +5095,14 @@ SOURCE=.\src\aig\gia\giaQbf.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaReshape1.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaReshape2.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaResub.c
# End Source File
# Begin Source File
...
...
src/aig/gia/giaMan.c
View file @
1e69e7e7
...
...
@@ -81,8 +81,6 @@ Gia_Man_t * Gia_ManStart( int nObjsMax )
***********************************************************************/
void
Gia_ManStop
(
Gia_Man_t
*
p
)
{
extern
void
Gia_DatFree
(
Gia_Dat_t
*
p
);
Gia_DatFree
(
p
->
pUData
);
if
(
p
->
vSeqModelVec
)
Vec_PtrFreeFree
(
p
->
vSeqModelVec
);
Gia_ManStaticFanoutStop
(
p
);
...
...
src/aig/gia/module.make
View file @
1e69e7e7
...
...
@@ -60,6 +60,8 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaPat.c
\
src/aig/gia/giaPf.c
\
src/aig/gia/giaQbf.c
\
src/aig/gia/giaReshape1.c
\
src/aig/gia/giaReshape2.c
\
src/aig/gia/giaResub.c
\
src/aig/gia/giaResub2.c
\
src/aig/gia/giaResub3.c
\
...
...
src/base/abci/abc.c
View file @
1e69e7e7
...
...
@@ -445,6 +445,7 @@ static int Abc_CommandAbc9Extract ( Abc_Frame_t * pAbc, int argc, cha
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_CommandAbc9Resub
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Reshape
(
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_CommandAbc9Syn4
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
...
@@ -1186,6 +1187,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&b"
,
Abc_CommandAbc9Balance
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&blut"
,
Abc_CommandAbc9BalanceLut
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&resub"
,
Abc_CommandAbc9Resub
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reshape"
,
Abc_CommandAbc9Reshape
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&syn2"
,
Abc_CommandAbc9Syn2
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&syn3"
,
Abc_CommandAbc9Syn3
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&syn4"
,
Abc_CommandAbc9Syn4
,
0
);
...
...
@@ -35494,6 +35496,67 @@ usage:
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Reshape
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Gia_Man_t
*
Gia_ManReshape1
(
Gia_Man_t
*
pGia
,
int
fVerbose
,
int
fVeryVerbose
);
extern
Gia_Man_t
*
Gia_ManReshape2
(
Gia_Man_t
*
pGia
,
int
fVerbose
,
int
fVeryVerbose
);
Gia_Man_t
*
pTemp
;
int
fUseReshape1
=
0
;
int
c
,
fVerbose
=
0
;
int
fVeryVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"avwh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'a'
:
fUseReshape1
^=
1
;
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_CommandAbc9Resub(): There is no AIG.
\n
"
);
return
1
;
}
if
(
fUseReshape1
)
pTemp
=
Gia_ManReshape1
(
pAbc
->
pGia
,
fVerbose
,
fVeryVerbose
);
else
pTemp
=
Gia_ManReshape2
(
pAbc
->
pGia
,
fVerbose
,
fVeryVerbose
);
Abc_FrameUpdateGia
(
pAbc
,
pTemp
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &reshape [-avwh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs AIG resubstitution
\n
"
);
Abc_Print
(
-
2
,
"
\t
-a : toggles selecting the algorithm [default = %s]
\n
"
,
fUseReshape1
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggles printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggles 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
)
{
Gia_Man_t
*
pTemp
;
src/base/acb/acbUtil.c
View file @
1e69e7e7
...
...
@@ -1259,27 +1259,6 @@ void Acb_Ntk4DumpWeights( char * pFileNameIn, Vec_Ptr_t * vObjNames, char * pFil
Vec_IntFree
(
vObjs
);
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Acb_NtkRunSim
(
char
*
pFileName
[
4
],
int
nTimeout
,
int
nWords
,
int
nBeam
,
int
LevL
,
int
LevU
,
int
fOrder
,
int
fFancy
,
int
fUseBuf
,
int
fRandom
,
int
fUseWeights
,
int
fInputs
,
int
fSkipMffc
,
int
fVerbose
,
int
fVeryVerbose
)
{
extern
int
Gia_Sim4Try
(
char
*
pFileName0
,
char
*
pFileName1
,
char
*
pFileName2
,
int
nTimeout
,
int
nWords
,
int
nBeam
,
int
LevL
,
int
LevU
,
int
fOrder
,
int
fFancy
,
int
fUseBuf
,
int
fSkipMffc
,
int
fVerbose
);
extern
void
Acb_NtkRunEco
(
char
*
pFileNames
[
4
],
int
nTimeout
,
int
fCheck
,
int
fRandom
,
int
fInputs
,
int
fUnitW
,
int
fVerbose
,
int
fVeryVerbose
);
char
*
pFileNames
[
4
]
=
{
pFileName
[
2
],
pFileName
[
1
],
fUseWeights
?
(
char
*
)
"weights.txt"
:
NULL
,
pFileName
[
2
]
};
if
(
Gia_Sim4Try
(
pFileName
[
0
],
pFileName
[
1
],
pFileName
[
2
],
nTimeout
,
nWords
,
nBeam
,
LevL
,
LevU
,
fOrder
,
fFancy
,
fUseBuf
,
fSkipMffc
,
fVerbose
)
)
Acb_NtkRunEco
(
pFileNames
,
nTimeout
,
1
,
fRandom
,
fInputs
,
0
,
fVerbose
,
fVeryVerbose
);
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...
...
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