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
082e5dc1
Commit
082e5dc1
authored
Jun 12, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrating recent changes.
parent
0d1a1c46
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
45 deletions
+40
-45
src/aig/gia/gia.h
+4
-0
src/aig/gia/giaBalance.c
+12
-8
src/aig/gia/giaLf.c
+2
-1
src/base/abci/abc.c
+22
-36
No files found.
src/aig/gia/gia.h
View file @
082e5dc1
...
...
@@ -250,6 +250,7 @@ struct Jf_Par_t_
int
nCutNum
;
int
nProcNum
;
int
nRounds
;
int
nRelaxRatio
;
int
nVerbLimit
;
int
DelayTarget
;
int
fAreaOnly
;
...
...
@@ -1131,6 +1132,9 @@ extern Gia_Man_t * Jf_ManDeriveCnf( Gia_Man_t * p, int fCnfObjIds );
extern
Gia_Man_t
*
Gia_ManIsoCanonicize
(
Gia_Man_t
*
p
,
int
fVerbose
);
extern
Gia_Man_t
*
Gia_ManIsoReduce
(
Gia_Man_t
*
p
,
Vec_Ptr_t
**
pvPosEquivs
,
Vec_Ptr_t
**
pvPiPerms
,
int
fEstimate
,
int
fDualOut
,
int
fVerbose
,
int
fVeryVerbose
);
extern
Gia_Man_t
*
Gia_ManIsoReduce2
(
Gia_Man_t
*
p
,
Vec_Ptr_t
**
pvPosEquivs
,
Vec_Ptr_t
**
pvPiPerms
,
int
fEstimate
,
int
fBetterQual
,
int
fDualOut
,
int
fVerbose
,
int
fVeryVerbose
);
/*=== giaLf.c ===========================================================*/
extern
void
Lf_ManSetDefaultPars
(
Jf_Par_t
*
pPars
);
extern
Gia_Man_t
*
Lf_ManPerformMapping
(
Gia_Man_t
*
pGia
,
Jf_Par_t
*
pPars
);
/*=== giaLogic.c ===========================================================*/
extern
void
Gia_ManTestDistance
(
Gia_Man_t
*
p
);
extern
void
Gia_ManSolveProblem
(
Gia_Man_t
*
pGia
,
Emb_Par_t
*
pPars
);
...
...
src/aig/gia/giaBalance.c
View file @
082e5dc1
...
...
@@ -1021,7 +1021,9 @@ Gia_Man_t * Gia_ManAigSyn2( Gia_Man_t * p, int fVerbose, int fVeryVerbose )
{
Gia_Man_t
*
pNew
,
*
pTemp
;
Jf_Par_t
Pars
,
*
pPars
=
&
Pars
;
Jf_ManSetDefaultPars
(
pPars
);
Lf_ManSetDefaultPars
(
pPars
);
// pPars->fVerbose = 1;
pPars
->
nRelaxRatio
=
40
;
if
(
fVerbose
)
Gia_ManPrintStats
(
p
,
NULL
);
if
(
Gia_ManAndNum
(
p
)
==
0
)
return
Gia_ManDup
(
p
);
...
...
@@ -1030,7 +1032,7 @@ Gia_Man_t * Gia_ManAigSyn2( Gia_Man_t * p, int fVerbose, int fVeryVerbose )
if
(
fVerbose
)
Gia_ManPrintStats
(
pNew
,
NULL
);
Gia_ManAigTransferPiLevels
(
pNew
,
p
);
// perform mapping
pNew
=
J
f_ManPerformMapping
(
pTemp
=
pNew
,
pPars
);
pNew
=
L
f_ManPerformMapping
(
pTemp
=
pNew
,
pPars
);
if
(
fVerbose
)
Gia_ManPrintStats
(
pNew
,
NULL
);
// Gia_ManStop( pTemp );
// perform balancing
...
...
@@ -1044,7 +1046,8 @@ Gia_Man_t * Gia_ManAigSyn3( Gia_Man_t * p, int fVerbose, int fVeryVerbose )
{
Gia_Man_t
*
pNew
,
*
pTemp
;
Jf_Par_t
Pars
,
*
pPars
=
&
Pars
;
Jf_ManSetDefaultPars
(
pPars
);
Lf_ManSetDefaultPars
(
pPars
);
pPars
->
nRelaxRatio
=
40
;
if
(
fVerbose
)
Gia_ManPrintStats
(
p
,
NULL
);
if
(
Gia_ManAndNum
(
p
)
==
0
)
return
Gia_ManDup
(
p
);
...
...
@@ -1054,7 +1057,7 @@ Gia_Man_t * Gia_ManAigSyn3( Gia_Man_t * p, int fVerbose, int fVeryVerbose )
Gia_ManAigTransferPiLevels
(
pNew
,
p
);
// perform mapping
pPars
->
nLutSize
=
6
;
pNew
=
J
f_ManPerformMapping
(
pTemp
=
pNew
,
pPars
);
pNew
=
L
f_ManPerformMapping
(
pTemp
=
pNew
,
pPars
);
if
(
fVerbose
)
Gia_ManPrintStats
(
pNew
,
NULL
);
// Gia_ManStop( pTemp );
// perform balancing
...
...
@@ -1064,7 +1067,7 @@ Gia_Man_t * Gia_ManAigSyn3( Gia_Man_t * p, int fVerbose, int fVeryVerbose )
Gia_ManStop
(
pTemp
);
// perform mapping
pPars
->
nLutSize
=
4
;
pNew
=
J
f_ManPerformMapping
(
pTemp
=
pNew
,
pPars
);
pNew
=
L
f_ManPerformMapping
(
pTemp
=
pNew
,
pPars
);
if
(
fVerbose
)
Gia_ManPrintStats
(
pNew
,
NULL
);
// Gia_ManStop( pTemp );
// perform balancing
...
...
@@ -1078,7 +1081,8 @@ Gia_Man_t * Gia_ManAigSyn4( Gia_Man_t * p, int fVerbose, int fVeryVerbose )
{
Gia_Man_t
*
pNew
,
*
pTemp
;
Jf_Par_t
Pars
,
*
pPars
=
&
Pars
;
Jf_ManSetDefaultPars
(
pPars
);
Lf_ManSetDefaultPars
(
pPars
);
pPars
->
nRelaxRatio
=
40
;
if
(
fVerbose
)
Gia_ManPrintStats
(
p
,
NULL
);
if
(
Gia_ManAndNum
(
p
)
==
0
)
return
Gia_ManDup
(
p
);
...
...
@@ -1089,7 +1093,7 @@ Gia_Man_t * Gia_ManAigSyn4( Gia_Man_t * p, int fVerbose, int fVeryVerbose )
Gia_ManAigTransferPiLevels
(
pNew
,
p
);
// perform mapping
pPars
->
nLutSize
=
7
;
pNew
=
J
f_ManPerformMapping
(
pTemp
=
pNew
,
pPars
);
pNew
=
L
f_ManPerformMapping
(
pTemp
=
pNew
,
pPars
);
if
(
fVerbose
)
Gia_ManPrintStats
(
pNew
,
NULL
);
// Gia_ManStop( pTemp );
// perform extraction
...
...
@@ -1104,7 +1108,7 @@ Gia_Man_t * Gia_ManAigSyn4( Gia_Man_t * p, int fVerbose, int fVeryVerbose )
Gia_ManStop
(
pTemp
);
// perform mapping
pPars
->
nLutSize
=
5
;
pNew
=
J
f_ManPerformMapping
(
pTemp
=
pNew
,
pPars
);
pNew
=
L
f_ManPerformMapping
(
pTemp
=
pNew
,
pPars
);
if
(
fVerbose
)
Gia_ManPrintStats
(
pNew
,
NULL
);
// Gia_ManStop( pTemp );
// perform extraction
...
...
src/aig/gia/giaLf.c
View file @
082e5dc1
...
...
@@ -46,10 +46,11 @@ ABC_NAMESPACE_IMPL_START
***********************************************************************/
void
Lf_ManSetDefaultPars
(
Jf_Par_t
*
pPars
)
{
Jf_ManSetDefaultPars
(
pPars
);
}
Gia_Man_t
*
Lf_ManPerformMapping
(
Gia_Man_t
*
pGia
,
Jf_Par_t
*
pPars
)
{
return
NULL
;
return
Jf_ManPerformMapping
(
pGia
,
pPars
)
;
}
////////////////////////////////////////////////////////////////////////
...
...
src/base/abci/abc.c
View file @
082e5dc1
...
...
@@ -29850,7 +29850,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
1
,
"Command line switch
\"
-R
\"
should be followed by a floating point number.
\n
"
);
return
0
;
}
pPars
->
nRelaxRatio
=
(
float
)
atof
(
argv
[
globalUtilOptind
]);
pPars
->
nRelaxRatio
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nRelaxRatio
<
0
)
goto
usage
;
...
...
@@ -30514,7 +30514,7 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
Gia_Man_t
*
pNew
;
int
c
;
Jf_ManSetDefaultPars
(
pPars
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KC
R
DWaekmdcgvwh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCDWaekmdcgvwh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -30546,17 +30546,6 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
goto
usage
;
}
break
;
case
'R'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-R
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
pPars
->
nRounds
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nRounds
<
0
)
goto
usage
;
break
;
case
'D'
:
if
(
globalUtilOptind
>=
argc
)
{
...
...
@@ -30644,11 +30633,10 @@ usage:
sprintf
(
Buffer
,
"best possible"
);
else
sprintf
(
Buffer
,
"%d"
,
pPars
->
DelayTarget
);
Abc_Print
(
-
2
,
"usage: &jf [-KC
R
DW num] [-akmdcgvwh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &jf [-KCDW num] [-akmdcgvwh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs technology mapping of the network
\n
"
);
Abc_Print
(
-
2
,
"
\t
-K num : LUT size for the mapping (2 <= K <= %d) [default = %d]
\n
"
,
pPars
->
nLutSizeMax
,
pPars
->
nLutSize
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of priority cuts (1 <= C <= %d) [default = %d]
\n
"
,
pPars
->
nCutNumMax
,
pPars
->
nCutNum
);
Abc_Print
(
-
2
,
"
\t
-R num : the number of mapping rounds [default = %d]
\n
"
,
pPars
->
nRounds
);
Abc_Print
(
-
2
,
"
\t
-D num : sets the delay constraint for the mapping [default = %s]
\n
"
,
Buffer
);
Abc_Print
(
-
2
,
"
\t
-W num : min frequency when printing functions with
\"
-w
\"
[default = %d]
\n
"
,
pPars
->
nVerbLimit
);
Abc_Print
(
-
2
,
"
\t
-a : toggles area-oriented mapping [default = %s]
\n
"
,
pPars
->
fAreaOnly
?
"yes"
:
"no"
);
...
...
@@ -30684,7 +30672,7 @@ int Abc_CommandAbc9Kf( Abc_Frame_t * pAbc, int argc, char ** argv )
Gia_Man_t
*
pNew
;
int
c
;
Kf_ManSetDefaultPars
(
pPars
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCP
R
DWaekmdcgtsvwh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCPDWaekmdcgtsvwh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -30727,17 +30715,6 @@ int Abc_CommandAbc9Kf( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
pPars
->
nProcNum
<
0
)
goto
usage
;
break
;
case
'R'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-R
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
pPars
->
nRounds
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nRounds
<
0
)
goto
usage
;
break
;
case
'D'
:
if
(
globalUtilOptind
>=
argc
)
{
...
...
@@ -30819,12 +30796,11 @@ usage:
sprintf
(
Buffer
,
"best possible"
);
else
sprintf
(
Buffer
,
"%d"
,
pPars
->
DelayTarget
);
Abc_Print
(
-
2
,
"usage: &kf [-KCP
R
DW num] [-akmdcgtsvwh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &kf [-KCPDW num] [-akmdcgtsvwh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs technology mapping of the network
\n
"
);
Abc_Print
(
-
2
,
"
\t
-K num : LUT size for the mapping (2 <= K <= %d) [default = %d]
\n
"
,
pPars
->
nLutSizeMax
,
pPars
->
nLutSize
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of priority cuts (1 <= C <= %d) [default = %d]
\n
"
,
pPars
->
nCutNumMax
,
pPars
->
nCutNum
);
Abc_Print
(
-
2
,
"
\t
-P num : the number of cut computation processes (0 <= P <= %d) [default = %d]
\n
"
,
pPars
->
nProcNumMax
,
pPars
->
nProcNum
);
Abc_Print
(
-
2
,
"
\t
-R num : the number of mapping rounds [default = %d]
\n
"
,
pPars
->
nRounds
);
Abc_Print
(
-
2
,
"
\t
-D num : sets the delay constraint for the mapping [default = %s]
\n
"
,
Buffer
);
Abc_Print
(
-
2
,
"
\t
-W num : min frequency when printing functions with
\"
-w
\"
[default = %d]
\n
"
,
pPars
->
nVerbLimit
);
Abc_Print
(
-
2
,
"
\t
-a : toggles area-oriented mapping [default = %s]
\n
"
,
pPars
->
fAreaOnly
?
"yes"
:
"no"
);
...
...
@@ -30855,14 +30831,12 @@ usage:
***********************************************************************/
int
Abc_CommandAbc9Lf
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
void
Lf_ManSetDefaultPars
(
Jf_Par_t
*
pPars
);
extern
Gia_Man_t
*
Lf_ManPerformMapping
(
Gia_Man_t
*
pGia
,
Jf_Par_t
*
pPars
);
char
Buffer
[
200
];
Jf_Par_t
Pars
,
*
pPars
=
&
Pars
;
Gia_Man_t
*
pNew
;
int
c
;
Lf_ManSetDefaultPars
(
pPars
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCRDWaekmdcgtsvwh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KC
F
RDWaekmdcgtsvwh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -30894,10 +30868,10 @@ int Abc_CommandAbc9Lf( Abc_Frame_t * pAbc, int argc, char ** argv )
goto
usage
;
}
break
;
case
'
R
'
:
case
'
F
'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-
R
\"
should be followed by a positive integer.
\n
"
);
Abc_Print
(
-
1
,
"Command line switch
\"
-
F
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
pPars
->
nRounds
=
atoi
(
argv
[
globalUtilOptind
]);
...
...
@@ -30905,6 +30879,17 @@ int Abc_CommandAbc9Lf( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
pPars
->
nRounds
<
0
)
goto
usage
;
break
;
case
'R'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
1
,
"Command line switch
\"
-R
\"
should be followed by a floating point number.
\n
"
);
return
0
;
}
pPars
->
nRelaxRatio
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nRelaxRatio
<
0
)
goto
usage
;
break
;
case
'D'
:
if
(
globalUtilOptind
>=
argc
)
{
...
...
@@ -30986,11 +30971,12 @@ usage:
sprintf
(
Buffer
,
"best possible"
);
else
sprintf
(
Buffer
,
"%d"
,
pPars
->
DelayTarget
);
Abc_Print
(
-
2
,
"usage: &lf [-KCRDW num] [-akmdcgtsvwh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &lf [-KC
F
RDW num] [-akmdcgtsvwh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs technology mapping of the network
\n
"
);
Abc_Print
(
-
2
,
"
\t
-K num : LUT size for the mapping (2 <= K <= %d) [default = %d]
\n
"
,
pPars
->
nLutSizeMax
,
pPars
->
nLutSize
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of priority cuts (1 <= C <= %d) [default = %d]
\n
"
,
pPars
->
nCutNumMax
,
pPars
->
nCutNum
);
Abc_Print
(
-
2
,
"
\t
-R num : the number of mapping rounds [default = %d]
\n
"
,
pPars
->
nRounds
);
Abc_Print
(
-
2
,
"
\t
-F num : the number of mapping rounds [default = %d]
\n
"
,
pPars
->
nRounds
);
Abc_Print
(
-
2
,
"
\t
-R num : the delay relaxation ratio (num >= 0) [default = %d]
\n
"
,
pPars
->
nRelaxRatio
);
Abc_Print
(
-
2
,
"
\t
-D num : sets the delay constraint for the mapping [default = %s]
\n
"
,
Buffer
);
Abc_Print
(
-
2
,
"
\t
-W num : min frequency when printing functions with
\"
-w
\"
[default = %d]
\n
"
,
pPars
->
nVerbLimit
);
Abc_Print
(
-
2
,
"
\t
-a : toggles area-oriented mapping [default = %s]
\n
"
,
pPars
->
fAreaOnly
?
"yes"
:
"no"
);
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