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
15f54289
Commit
15f54289
authored
Sep 21, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding switch to enable SOP balancing in '&flow2'.
parent
8f3dd475
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
14 deletions
+30
-14
src/aig/gia/giaScript.c
+21
-10
src/base/abci/abc.c
+9
-4
No files found.
src/aig/gia/giaScript.c
View file @
15f54289
...
...
@@ -491,7 +491,7 @@ void Gia_ManPerformFlow( int fIsMapped, int nAnds, int nLevels, int nLutSize, in
SeeAlso []
***********************************************************************/
void
Gia_ManPerformFlow2
(
int
fIsMapped
,
int
nAnds
,
int
nLevels
,
int
nLutSize
,
int
nCutNum
,
int
fVerbose
)
void
Gia_ManPerformFlow2
(
int
fIsMapped
,
int
nAnds
,
int
nLevels
,
int
nLutSize
,
int
nCutNum
,
int
f
Balance
,
int
f
Verbose
)
{
char
Comm1
[
100
],
Comm2
[
100
],
Comm3
[
100
],
Comm4
[
100
];
sprintf
(
Comm1
,
"&synch2 -K %d; &if -m -K %d -C %d; &save"
,
nLutSize
,
nLutSize
,
nCutNum
);
...
...
@@ -521,9 +521,12 @@ void Gia_ManPerformFlow2( int fIsMapped, int nAnds, int nLevels, int nLutSize, i
// perform balancing
if
(
fVerbose
)
printf
(
"Trying SOP balancing...
\n
"
);
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
"&st; &sopb -R 10 -C 4"
);
if
(
fBalance
)
{
if
(
fVerbose
)
printf
(
"Trying SOP balancing...
\n
"
);
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
"&st; &sopb -R 10 -C 4"
);
}
// perform synthesis
...
...
@@ -546,9 +549,13 @@ void Gia_ManPerformFlow2( int fIsMapped, int nAnds, int nLevels, int nLutSize, i
// perform balancing
if
(
fVerbose
)
printf
(
"Trying SOP balancing...
\n
"
);
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
"&st; &sopb -R 10"
);
if
(
fBalance
)
{
if
(
fVerbose
)
printf
(
"Trying SOP balancing...
\n
"
);
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
"&st; &sopb -R 10"
);
}
// perform synthesis
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
Comm3
);
...
...
@@ -570,9 +577,13 @@ void Gia_ManPerformFlow2( int fIsMapped, int nAnds, int nLevels, int nLutSize, i
// perform balancing
if
(
fVerbose
)
printf
(
"Trying SOP balancing...
\n
"
);
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
"&st; &sopb -R 10"
);
if
(
fBalance
)
{
if
(
fVerbose
)
printf
(
"Trying SOP balancing...
\n
"
);
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
"&st; &sopb -R 10"
);
}
// perform synthesis
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
Comm3
);
...
...
src/base/abci/abc.c
View file @
15f54289
...
...
@@ -30978,12 +30978,13 @@ usage:
***********************************************************************/
int
Abc_CommandAbc9Flow2
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
void
Gia_ManPerformFlow2
(
int
fIsMapped
,
int
nAnds
,
int
nLevels
,
int
nLutSize
,
int
nCutNum
,
int
fVerbose
);
extern
void
Gia_ManPerformFlow2
(
int
fIsMapped
,
int
nAnds
,
int
nLevels
,
int
nLutSize
,
int
nCutNum
,
int
f
Balance
,
int
f
Verbose
);
int
nLutSize
=
6
;
int
nCutNum
=
8
;
int
fBalance
=
0
;
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KC
b
vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -31009,6 +31010,9 @@ int Abc_CommandAbc9Flow2( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
nCutNum
<
0
)
goto
usage
;
break
;
case
'b'
:
fBalance
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
...
...
@@ -31023,14 +31027,15 @@ int Abc_CommandAbc9Flow2( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Abc_CommandAbc9Flow2(): There is no AIG.
\n
"
);
return
1
;
}
Gia_ManPerformFlow2
(
Gia_ManHasMapping
(
pAbc
->
pGia
),
Gia_ManAndNum
(
pAbc
->
pGia
),
Gia_ManLevelNum
(
pAbc
->
pGia
),
nLutSize
,
nCutNum
,
fVerbose
);
Gia_ManPerformFlow2
(
Gia_ManHasMapping
(
pAbc
->
pGia
),
Gia_ManAndNum
(
pAbc
->
pGia
),
Gia_ManLevelNum
(
pAbc
->
pGia
),
nLutSize
,
nCutNum
,
f
Balance
,
f
Verbose
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &flow2 [-KC num] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &flow2 [-KC num] [-
b
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
integration optimization and mapping flow
\n
"
);
Abc_Print
(
-
2
,
"
\t
-K num : the number of LUT inputs (LUT size) [default = %d]
\n
"
,
nLutSize
);
Abc_Print
(
-
2
,
"
\t
-C num : the number of cuts at a node [default = %d]
\n
"
,
nCutNum
);
Abc_Print
(
-
2
,
"
\t
-b : toggle using SOP balancing during synthesis [default = %s]
\n
"
,
fBalance
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
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