Commit 93d89eaa by Alan Mishchenko

Various modifications.

parent 9c8db283
...@@ -3811,6 +3811,10 @@ SOURCE=.\src\aig\gia\giaKf.c ...@@ -3811,6 +3811,10 @@ SOURCE=.\src\aig\gia\giaKf.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\aig\gia\giaLf.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaMan.c SOURCE=.\src\aig\gia\giaMan.c
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -197,6 +197,7 @@ struct Gps_Par_t_ ...@@ -197,6 +197,7 @@ struct Gps_Par_t_
int fCut; int fCut;
int fNpn; int fNpn;
int fLutProf; int fLutProf;
int fMuxXor;
char * pDumpFile; char * pDumpFile;
}; };
...@@ -912,10 +913,14 @@ static inline int Gia_ObjLutFanin( Gia_Man_t * p, int Id, int i ) { re ...@@ -912,10 +913,14 @@ static inline int Gia_ObjLutFanin( Gia_Man_t * p, int Id, int i ) { re
for ( i = p->nObjs - 1; (i > 0) && ((pObj) = Gia_ManObj(p, i)); i-- ) for ( i = p->nObjs - 1; (i > 0) && ((pObj) = Gia_ManObj(p, i)); i-- )
#define Gia_ManForEachAnd( p, pObj, i ) \ #define Gia_ManForEachAnd( p, pObj, i ) \
for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsAnd(pObj) ) {} else for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsAnd(pObj) ) {} else
#define Gia_ManForEachAndId( p, i ) \
for ( i = 0; (i < p->nObjs); i++ ) if ( !Gia_ObjIsAnd(Gia_ManObj(p, i)) ) {} else
#define Gia_ManForEachCand( p, pObj, i ) \ #define Gia_ManForEachCand( p, pObj, i ) \
for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsCand(pObj) ) {} else for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsCand(pObj) ) {} else
#define Gia_ManForEachAndReverse( p, pObj, i ) \ #define Gia_ManForEachAndReverse( p, pObj, i ) \
for ( i = p->nObjs - 1; (i > 0) && ((pObj) = Gia_ManObj(p, i)); i-- ) if ( !Gia_ObjIsAnd(pObj) ) {} else for ( i = p->nObjs - 1; (i > 0) && ((pObj) = Gia_ManObj(p, i)); i-- ) if ( !Gia_ObjIsAnd(pObj) ) {} else
#define Gia_ManForEachAndReverseId( p, i ) \
for ( i = p->nObjs - 1; (i > 0); i-- ) if ( !Gia_ObjIsAnd(Gia_ManObj(p, i)) ) {} else
#define Gia_ManForEachMux( p, pObj, i ) \ #define Gia_ManForEachMux( p, pObj, i ) \
for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsMuxId(p, i) ) {} else for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsMuxId(p, i) ) {} else
#define Gia_ManForEachCi( p, pObj, i ) \ #define Gia_ManForEachCi( p, pObj, i ) \
...@@ -928,6 +933,8 @@ static inline int Gia_ObjLutFanin( Gia_Man_t * p, int Id, int i ) { re ...@@ -928,6 +933,8 @@ static inline int Gia_ObjLutFanin( Gia_Man_t * p, int Id, int i ) { re
for ( i = Vec_IntSize(p->vCos) - 1; (i >= 0) && ((pObj) = Gia_ManCo(p, i)); i-- ) for ( i = Vec_IntSize(p->vCos) - 1; (i >= 0) && ((pObj) = Gia_ManCo(p, i)); i-- )
#define Gia_ManForEachCoDriver( p, pObj, i ) \ #define Gia_ManForEachCoDriver( p, pObj, i ) \
for ( i = 0; (i < Vec_IntSize(p->vCos)) && ((pObj) = Gia_ObjFanin0(Gia_ManCo(p, i))); i++ ) for ( i = 0; (i < Vec_IntSize(p->vCos)) && ((pObj) = Gia_ObjFanin0(Gia_ManCo(p, i))); i++ )
#define Gia_ManForEachCoDriverId( p, DriverId, i ) \
for ( i = 0; (i < Vec_IntSize(p->vCos)) && (((DriverId) = Gia_ObjFaninId0p(p, Gia_ManCo(p, i))), 1); i++ )
#define Gia_ManForEachPi( p, pObj, i ) \ #define Gia_ManForEachPi( p, pObj, i ) \
for ( i = 0; (i < Gia_ManPiNum(p)) && ((pObj) = Gia_ManCi(p, i)); i++ ) for ( i = 0; (i < Gia_ManPiNum(p)) && ((pObj) = Gia_ManCi(p, i)); i++ )
#define Gia_ManForEachPo( p, pObj, i ) \ #define Gia_ManForEachPo( p, pObj, i ) \
...@@ -1114,6 +1121,7 @@ extern int Gia_ManLutNum( Gia_Man_t * p ); ...@@ -1114,6 +1121,7 @@ extern int Gia_ManLutNum( Gia_Man_t * p );
extern int Gia_ManLutLevel( Gia_Man_t * p ); extern int Gia_ManLutLevel( Gia_Man_t * p );
extern void Gia_ManSetRefsMapped( Gia_Man_t * p ); extern void Gia_ManSetRefsMapped( Gia_Man_t * p );
extern void Gia_ManSetIfParsDefault( void * pIfPars ); extern void Gia_ManSetIfParsDefault( void * pIfPars );
extern void Gia_ManMappingVerify( Gia_Man_t * p );
extern Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pIfPars, int fNormalized ); extern Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pIfPars, int fNormalized );
/*=== giaJf.c ===========================================================*/ /*=== giaJf.c ===========================================================*/
extern void Jf_ManSetDefaultPars( Jf_Par_t * pPars ); extern void Jf_ManSetDefaultPars( Jf_Par_t * pPars );
...@@ -1269,6 +1277,7 @@ extern Vec_Int_t * Gia_ManRequiredLevel( Gia_Man_t * p ); ...@@ -1269,6 +1277,7 @@ extern Vec_Int_t * Gia_ManRequiredLevel( Gia_Man_t * p );
extern void Gia_ManCreateValueRefs( Gia_Man_t * p ); extern void Gia_ManCreateValueRefs( Gia_Man_t * p );
extern void Gia_ManCreateRefs( Gia_Man_t * p ); extern void Gia_ManCreateRefs( Gia_Man_t * p );
extern int * Gia_ManCreateMuxRefs( Gia_Man_t * p ); extern int * Gia_ManCreateMuxRefs( Gia_Man_t * p );
extern void Gia_ManCountMuxXor( Gia_Man_t * p, int * pnMuxes, int * pnXors );
extern int Gia_ManCrossCut( Gia_Man_t * p, int fReverse ); extern int Gia_ManCrossCut( Gia_Man_t * p, int fReverse );
extern int Gia_ManIsNormalized( Gia_Man_t * p ); extern int Gia_ManIsNormalized( Gia_Man_t * p );
extern Vec_Int_t * Gia_ManCollectPoIds( Gia_Man_t * p ); extern Vec_Int_t * Gia_ManCollectPoIds( Gia_Man_t * p );
......
...@@ -423,9 +423,24 @@ void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars ) ...@@ -423,9 +423,24 @@ void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars )
Abc_Print( 1, " ch =%5d", Gia_ManEquivCountClasses(p) ); Abc_Print( 1, " ch =%5d", Gia_ManEquivCountClasses(p) );
if ( p->pMuxes ) if ( p->pMuxes )
{ {
Abc_Print( 1, " and =%5d", Gia_ManAndNum(p)-Gia_ManXorNum(p)-Gia_ManMuxNum(p) ); int nAnds = Gia_ManAndNum(p)-Gia_ManXorNum(p)-Gia_ManMuxNum(p);
Abc_Print( 1, " xor =%5d", Gia_ManXorNum(p) ); int nXors = Gia_ManXorNum(p);
Abc_Print( 1, " mux =%5d", Gia_ManMuxNum(p) ); int nMuxes = Gia_ManMuxNum(p);
int nTotal = nAnds + 3*nXors + 3*nMuxes;
Abc_Print( 1, "\nXOR/MUX stats:" );
Abc_Print( 1, " xor =%8d (%6.2f %%) ", nXors, 300.0*nXors/nTotal );
Abc_Print( 1, " mux =%8d (%6.2f %%) ", nMuxes, 300.0*nMuxes/nTotal );
Abc_Print( 1, " and =%8d (%6.2f %%) ", nAnds, 100.0*nAnds/nTotal );
}
else if ( pPars->fMuxXor )
{
int nAnds, nMuxes, nXors, nTotal = Gia_ManAndNum(p);
Gia_ManCountMuxXor( p, &nMuxes, &nXors );
nAnds = Gia_ManAndNum(p)-3*nMuxes-3*nXors;
Abc_Print( 1, "\nXOR/MUX stats:" );
Abc_Print( 1, " xor =%8d (%6.2f %%) ", nXors, 300.0*nXors/nTotal );
Abc_Print( 1, " mux =%8d (%6.2f %%) ", nMuxes, 300.0*nMuxes/nTotal );
Abc_Print( 1, " and =%8d (%6.2f %%) ", nAnds, 100.0*nAnds/nTotal );
} }
if ( pPars && pPars->fSwitch ) if ( pPars && pPars->fSwitch )
{ {
......
...@@ -746,6 +746,34 @@ int * Gia_ManCreateMuxRefs( Gia_Man_t * p ) ...@@ -746,6 +746,34 @@ int * Gia_ManCreateMuxRefs( Gia_Man_t * p )
/**Function************************************************************* /**Function*************************************************************
Synopsis [Assigns references.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Gia_ManCountMuxXor( Gia_Man_t * p, int * pnMuxes, int * pnXors )
{
Gia_Obj_t * pObj, * pFan0, * pFan1;
int i;
*pnMuxes = 0;
*pnXors = 0;
Gia_ManForEachAnd( p, pObj, i )
{
if ( !Gia_ObjIsMuxType(pObj) )
continue;
if ( Gia_ObjRecognizeExor(pObj, &pFan0, &pFan1) )
(*pnXors)++;
else
(*pnMuxes)++;
}
}
/**Function*************************************************************
Synopsis [Computes the maximum frontier size.] Synopsis [Computes the maximum frontier size.]
Description [] Description []
......
...@@ -33,6 +33,7 @@ SRC += src/aig/gia/giaAig.c \ ...@@ -33,6 +33,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaIso3.c \ src/aig/gia/giaIso3.c \
src/aig/gia/giaJf.c \ src/aig/gia/giaJf.c \
src/aig/gia/giaKf.c \ src/aig/gia/giaKf.c \
src/aig/gia/giaLf.c \
src/aig/gia/giaMan.c \ src/aig/gia/giaMan.c \
src/aig/gia/giaMem.c \ src/aig/gia/giaMem.c \
src/aig/gia/giaMfs.c \ src/aig/gia/giaMfs.c \
......
...@@ -380,6 +380,7 @@ static int Abc_CommandAbc9Iff ( Abc_Frame_t * pAbc, int argc, cha ...@@ -380,6 +380,7 @@ static int Abc_CommandAbc9Iff ( Abc_Frame_t * pAbc, int argc, cha
static int Abc_CommandAbc9If2 ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9If2 ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Jf ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Jf ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Kf ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Kf ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Lf ( 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 );
static int Abc_CommandAbc9Trace ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Trace ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Speedup ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Speedup ( Abc_Frame_t * pAbc, int argc, char ** argv );
...@@ -955,6 +956,7 @@ void Abc_Init( Abc_Frame_t * pAbc ) ...@@ -955,6 +956,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd( pAbc, "ABC9", "&if2", Abc_CommandAbc9If2, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&if2", Abc_CommandAbc9If2, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&jf", Abc_CommandAbc9Jf, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&jf", Abc_CommandAbc9Jf, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&kf", Abc_CommandAbc9Kf, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&kf", Abc_CommandAbc9Kf, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&lf", Abc_CommandAbc9Lf, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&struct", Abc_CommandAbc9Struct, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&struct", Abc_CommandAbc9Struct, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&trace", Abc_CommandAbc9Trace, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&trace", Abc_CommandAbc9Trace, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&speedup", Abc_CommandAbc9Speedup, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&speedup", Abc_CommandAbc9Speedup, 0 );
...@@ -25364,7 +25366,7 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -25364,7 +25366,7 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
int c; int c;
memset( pPars, 0, sizeof(Gps_Par_t) ); memset( pPars, 0, sizeof(Gps_Par_t) );
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "Dtpcnlh" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "Dtpcnlmh" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
...@@ -25383,6 +25385,9 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -25383,6 +25385,9 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'l': case 'l':
pPars->fLutProf ^= 1; pPars->fLutProf ^= 1;
break; break;
case 'm':
pPars->fMuxXor ^= 1;
break;
case 'D': case 'D':
if ( globalUtilOptind >= argc ) if ( globalUtilOptind >= argc )
{ {
...@@ -25407,13 +25412,14 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -25407,13 +25412,14 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0; return 0;
usage: usage:
Abc_Print( -2, "usage: &ps [-tpcnlh] [-D file]\n" ); Abc_Print( -2, "usage: &ps [-tpcnlmh] [-D file]\n" );
Abc_Print( -2, "\t prints stats of the current AIG\n" ); Abc_Print( -2, "\t prints stats of the current AIG\n" );
Abc_Print( -2, "\t-t : toggle printing BMC tents [default = %s]\n", pPars->fTents? "yes": "no" ); Abc_Print( -2, "\t-t : toggle printing BMC tents [default = %s]\n", pPars->fTents? "yes": "no" );
Abc_Print( -2, "\t-p : toggle printing switching activity [default = %s]\n", pPars->fSwitch? "yes": "no" ); Abc_Print( -2, "\t-p : toggle printing switching activity [default = %s]\n", pPars->fSwitch? "yes": "no" );
Abc_Print( -2, "\t-c : toggle printing the size of frontier cut [default = %s]\n", pPars->fCut? "yes": "no" ); Abc_Print( -2, "\t-c : toggle printing the size of frontier cut [default = %s]\n", pPars->fCut? "yes": "no" );
Abc_Print( -2, "\t-n : toggle printing NPN classes of functions [default = %s]\n", pPars->fNpn? "yes": "no" ); Abc_Print( -2, "\t-n : toggle printing NPN classes of functions [default = %s]\n", pPars->fNpn? "yes": "no" );
Abc_Print( -2, "\t-l : toggle printing LUT size profile [default = %s]\n", pPars->fLutProf? "yes": "no" ); Abc_Print( -2, "\t-l : toggle printing LUT size profile [default = %s]\n", pPars->fLutProf? "yes": "no" );
Abc_Print( -2, "\t-m : toggle printing MUX/XOR statistics [default = %s]\n", pPars->fMuxXor? "yes": "no" );
Abc_Print( -2, "\t-D file : file name to dump statistics [default = none]\n" ); Abc_Print( -2, "\t-D file : file name to dump statistics [default = none]\n" );
Abc_Print( -2, "\t-h : print the command usage\n"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 1;
...@@ -30829,6 +30835,172 @@ usage: ...@@ -30829,6 +30835,172 @@ usage:
return 1; return 1;
} }
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
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 )
{
switch ( c )
{
case 'K':
if ( globalUtilOptind >= argc )
{
Abc_Print( -1, "Command line switch \"-K\" should be followed by a positive integer.\n" );
goto usage;
}
pPars->nLutSize = atoi(argv[globalUtilOptind]);
globalUtilOptind++;
if ( pPars->nLutSize < 2 || pPars->nLutSize > pPars->nLutSizeMax )
{
Abc_Print( -1, "LUT size %d is not supported.\n", pPars->nLutSize );
goto usage;
}
break;
case 'C':
if ( globalUtilOptind >= argc )
{
Abc_Print( -1, "Command line switch \"-C\" should be followed by a positive integer.\n" );
goto usage;
}
pPars->nCutNum = atoi(argv[globalUtilOptind]);
globalUtilOptind++;
if ( pPars->nCutNum < 1 || pPars->nCutNum > pPars->nCutNumMax )
{
Abc_Print( -1, "This number of cuts (%d) is not supported.\n", pPars->nCutNum );
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 )
{
Abc_Print( -1, "Command line switch \"-D\" should be followed by a floating point number.\n" );
goto usage;
}
pPars->DelayTarget = atoi(argv[globalUtilOptind]);
globalUtilOptind++;
if ( pPars->DelayTarget <= 0.0 )
goto usage;
break;
case 'W':
if ( globalUtilOptind >= argc )
{
Abc_Print( -1, "Command line switch \"-W\" should be followed by a positive integer.\n" );
goto usage;
}
pPars->nVerbLimit = atoi(argv[globalUtilOptind]);
globalUtilOptind++;
if ( pPars->nVerbLimit < 0 )
goto usage;
break;
case 'a':
pPars->fAreaOnly ^= 1;
break;
case 'e':
pPars->fOptEdge ^= 1;
break;
case 'k':
pPars->fCoarsen ^= 1;
break;
case 'm':
pPars->fCutMin ^= 1;
break;
case 'd':
pPars->fFuncDsd ^= 1;
break;
case 'c':
pPars->fGenCnf ^= 1;
break;
case 'g':
pPars->fPureAig ^= 1;
break;
case 't':
pPars->fCutHashing ^= 1;
break;
case 's':
pPars->fCutSimple ^= 1;
break;
case 'v':
pPars->fVerbose ^= 1;
break;
case 'w':
pPars->fVeryVerbose ^= 1;
break;
case 'h':
default:
goto usage;
}
}
if ( pAbc->pGia == NULL )
{
Abc_Print( -1, "Empty GIA network.\n" );
return 1;
}
pNew = Lf_ManPerformMapping( pAbc->pGia, pPars );
if ( pNew == NULL )
{
Abc_Print( -1, "Abc_CommandAbc9Lf(): Mapping into LUTs has failed.\n" );
return 1;
}
Abc_FrameUpdateGia( pAbc, pNew );
return 0;
usage:
if ( pPars->DelayTarget == -1 )
sprintf(Buffer, "best possible" );
else
sprintf(Buffer, "%d", pPars->DelayTarget );
Abc_Print( -2, "usage: &lf [-KCRDW 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-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" );
Abc_Print( -2, "\t-e : toggles edge vs node minimization [default = %s]\n", pPars->fOptEdge? "yes": "no" );
Abc_Print( -2, "\t-k : toggles coarsening the subject graph [default = %s]\n", pPars->fCoarsen? "yes": "no" );
Abc_Print( -2, "\t-m : toggles cut minimization [default = %s]\n", pPars->fCutMin? "yes": "no" );
Abc_Print( -2, "\t-d : toggles using DSD to represent cut functions [default = %s]\n", pPars->fFuncDsd? "yes": "no" );
Abc_Print( -2, "\t-c : toggles mapping for CNF generation [default = %s]\n", pPars->fGenCnf? "yes": "no" );
Abc_Print( -2, "\t-g : toggles generating AIG without mapping [default = %s]\n", pPars->fPureAig? "yes": "no" );
Abc_Print( -2, "\t-t : toggles cut computation using hash table [default = %s]\n", pPars->fCutHashing? "yes": "no" );
Abc_Print( -2, "\t-s : toggles cut computation using a simple method [default = %s]\n", pPars->fCutSimple? "yes": "no" );
Abc_Print( -2, "\t-v : toggles verbose output [default = %s]\n", pPars->fVerbose? "yes": "no" );
Abc_Print( -2, "\t-w : toggles very verbose output [default = %s]\n", pPars->fVeryVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : prints the command usage\n");
return 1;
}
/**Function************************************************************* /**Function*************************************************************
...@@ -480,6 +480,11 @@ static inline void Vec_IntUpdateEntry( Vec_Int_t * p, int i, int Value ) ...@@ -480,6 +480,11 @@ static inline void Vec_IntUpdateEntry( Vec_Int_t * p, int i, int Value )
if ( Vec_IntEntry( p, i ) < Value ) if ( Vec_IntEntry( p, i ) < Value )
Vec_IntWriteEntry( p, i, Value ); Vec_IntWriteEntry( p, i, Value );
} }
static inline void Vec_IntDowndateEntry( Vec_Int_t * p, int i, int Value )
{
if ( Vec_IntEntry( p, i ) > Value )
Vec_IntWriteEntry( p, i, Value );
}
/**Function************************************************************* /**Function*************************************************************
......
...@@ -558,14 +558,18 @@ static inline void Vec_PtrClear( Vec_Ptr_t * p ) ...@@ -558,14 +558,18 @@ static inline void Vec_PtrClear( Vec_Ptr_t * p )
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
static inline void Vec_PtrFreeFree( Vec_Ptr_t * p ) static inline void Vec_PtrFreeData( Vec_Ptr_t * p )
{ {
void * pTemp; void * pTemp; int i;
int i;
if ( p == NULL ) return; if ( p == NULL ) return;
Vec_PtrForEachEntry( void *, p, pTemp, i ) Vec_PtrForEachEntry( void *, p, pTemp, i )
if ( pTemp != (void *)(ABC_PTRINT_T)1 && pTemp != (void *)(ABC_PTRINT_T)2 ) if ( pTemp != (void *)(ABC_PTRINT_T)1 && pTemp != (void *)(ABC_PTRINT_T)2 )
ABC_FREE( pTemp ); ABC_FREE( pTemp );
}
static inline void Vec_PtrFreeFree( Vec_Ptr_t * p )
{
if ( p == NULL ) return;
Vec_PtrFreeData( p );
Vec_PtrFree( p ); Vec_PtrFree( p );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment