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
96b9ef2c
Commit
96b9ef2c
authored
Sep 17, 2022
by
Yukio Miyasaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import ttopt
parent
0ed81b34
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
110 additions
and
0 deletions
+110
-0
src/aig/gia/giaTtopt.cpp
+0
-0
src/aig/gia/module.make
+1
-0
src/base/abci/abc.c
+109
-0
No files found.
src/aig/gia/giaTtopt.cpp
0 → 100644
View file @
96b9ef2c
This diff is collapsed.
Click to expand it.
src/aig/gia/module.make
View file @
96b9ef2c
...
@@ -105,5 +105,6 @@ SRC += src/aig/gia/giaAig.c \
...
@@ -105,5 +105,6 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaTis.c
\
src/aig/gia/giaTis.c
\
src/aig/gia/giaTruth.c
\
src/aig/gia/giaTruth.c
\
src/aig/gia/giaTsim.c
\
src/aig/gia/giaTsim.c
\
src/aig/gia/giaTtopt.cpp
\
src/aig/gia/giaUnate.c
\
src/aig/gia/giaUnate.c
\
src/aig/gia/giaUtil.c
src/aig/gia/giaUtil.c
src/base/abci/abc.c
View file @
96b9ef2c
...
@@ -499,6 +499,7 @@ static int Abc_CommandAbc9LNetRead ( Abc_Frame_t * pAbc, int argc, cha
...
@@ -499,6 +499,7 @@ static int Abc_CommandAbc9LNetRead ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9LNetSim
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9LNetSim
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9LNetEval
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9LNetEval
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9LNetOpt
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9LNetOpt
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Ttopt
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9LNetMap
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9LNetMap
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Unmap
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Unmap
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Struct
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Struct
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
@@ -1249,6 +1250,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
...
@@ -1249,6 +1250,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&lnetsim"
,
Abc_CommandAbc9LNetSim
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&lnetsim"
,
Abc_CommandAbc9LNetSim
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&lneteval"
,
Abc_CommandAbc9LNetEval
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&lneteval"
,
Abc_CommandAbc9LNetEval
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&lnetopt"
,
Abc_CommandAbc9LNetOpt
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&lnetopt"
,
Abc_CommandAbc9LNetOpt
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&ttopt"
,
Abc_CommandAbc9Ttopt
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&lnetmap"
,
Abc_CommandAbc9LNetMap
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&lnetmap"
,
Abc_CommandAbc9LNetMap
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&unmap"
,
Abc_CommandAbc9Unmap
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&unmap"
,
Abc_CommandAbc9Unmap
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&struct"
,
Abc_CommandAbc9Struct
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&struct"
,
Abc_CommandAbc9Struct
,
0
);
...
@@ -42202,6 +42204,113 @@ usage:
...
@@ -42202,6 +42204,113 @@ usage:
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Abc_CommandAbc9Ttopt
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Gia_Man_t
*
Gia_ManTtopt
(
Gia_Man_t
*
p
,
int
nIns
,
int
nOuts
,
int
nRounds
);
extern
Gia_Man_t
*
Gia_ManTtoptCare
(
Gia_Man_t
*
p
,
int
nIns
,
int
nOuts
,
int
nRounds
,
char
*
pFileName
,
int
nRarity
);
Gia_Man_t
*
pTemp
;
char
*
pFileName
=
NULL
;
int
c
,
nIns
=
6
,
nOuts
=
2
,
Limit
=
0
,
nRounds
=
20
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"IORXvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'I'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-I
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
nIns
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
break
;
case
'O'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-O
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
nOuts
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
break
;
case
'R'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-R
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
Limit
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
break
;
case
'X'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-X
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
nRounds
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
default:
goto
usage
;
}
}
if
(
argc
>
globalUtilOptind
+
1
)
{
return
0
;
}
if
(
pAbc
->
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Empty GIA network.
\n
"
);
return
1
;
}
if
(
argc
==
globalUtilOptind
+
1
)
{
FILE
*
pFile
=
fopen
(
argv
[
globalUtilOptind
],
"rb"
);
if
(
pFile
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9BCore(): Cannot open file
\"
%s
\"
for reading the simulation information.
\n
"
,
argv
[
globalUtilOptind
]
);
return
0
;
}
fclose
(
pFile
);
pFileName
=
argv
[
globalUtilOptind
];
}
if
(
pFileName
)
pTemp
=
Gia_ManTtoptCare
(
pAbc
->
pGia
,
nIns
,
nOuts
,
nRounds
,
pFileName
,
Limit
);
else
pTemp
=
Gia_ManTtopt
(
pAbc
->
pGia
,
nIns
,
nOuts
,
nRounds
);
Abc_FrameUpdateGia
(
pAbc
,
pTemp
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &ttopt [-IORX num] [-vh] <file>
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs specialized AIG optimization
\n
"
);
Abc_Print
(
-
2
,
"
\t
-I num : the input support size [default = %d]
\n
"
,
nIns
);
Abc_Print
(
-
2
,
"
\t
-O num : the output group size [default = %d]
\n
"
,
nOuts
);
Abc_Print
(
-
2
,
"
\t
-R num : patterns are cares starting this value [default = %d]
\n
"
,
Limit
);
Abc_Print
(
-
2
,
"
\t
-X num : the number of optimization rounds [default = %d]
\n
"
,
nRounds
);
Abc_Print
(
-
2
,
"
\t
-v : toggles verbose output [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : prints the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
<file> : file name with simulation information
\n
"
);
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9LNetMap
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandAbc9LNetMap
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
Abc_Ntk_t
*
Gia_ManPerformLNetMap
(
Gia_Man_t
*
p
,
int
GroupSize
,
int
fUseFixed
,
int
fTryNew
,
int
fVerbose
);
extern
Abc_Ntk_t
*
Gia_ManPerformLNetMap
(
Gia_Man_t
*
p
,
int
GroupSize
,
int
fUseFixed
,
int
fTryNew
,
int
fVerbose
);
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