mirror of https://github.com/YosysHQ/abc.git
Integrating recent changes.
This commit is contained in:
parent
0d1a1c4624
commit
082e5dc1b0
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 = Jf_ManPerformMapping( pTemp = pNew, pPars );
|
||||
pNew = Lf_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 = Jf_ManPerformMapping( pTemp = pNew, pPars );
|
||||
pNew = Lf_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 = Jf_ManPerformMapping( pTemp = pNew, pPars );
|
||||
pNew = Lf_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 = Jf_ManPerformMapping( pTemp = pNew, pPars );
|
||||
pNew = Lf_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 = Jf_ManPerformMapping( pTemp = pNew, pPars );
|
||||
pNew = Lf_ManPerformMapping( pTemp = pNew, pPars );
|
||||
if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
|
||||
// Gia_ManStop( pTemp );
|
||||
// perform extraction
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -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, "KCRDWaekmdcgvwh" ) ) != 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 [-KCRDW 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, "KCPRDWaekmdcgtsvwh" ) ) != 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 [-KCPRDW 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, "KCFRDWaekmdcgtsvwh" ) ) != 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 [-KCFRDW 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" );
|
||||
|
|
|
|||
Loading…
Reference in New Issue