Commit 23879f92 by Alan Mishchenko

Unifying parameters for the &ps command.

parent 9d14b0c0
...@@ -181,6 +181,15 @@ struct Gia_Man_t_ ...@@ -181,6 +181,15 @@ struct Gia_Man_t_
typedef struct Gps_Par_t_ Gps_Par_t;
struct Gps_Par_t_
{
int fTents;
int fSwitch;
int fCut;
int fNpn;
};
typedef struct Emb_Par_t_ Emb_Par_t; typedef struct Emb_Par_t_ Emb_Par_t;
struct Emb_Par_t_ struct Emb_Par_t_
{ {
...@@ -1019,7 +1028,7 @@ extern Gia_Man_t * Gia_ManStart( int nObjsMax ); ...@@ -1019,7 +1028,7 @@ extern Gia_Man_t * Gia_ManStart( int nObjsMax );
extern void Gia_ManStop( Gia_Man_t * p ); extern void Gia_ManStop( Gia_Man_t * p );
extern void Gia_ManStopP( Gia_Man_t ** p ); extern void Gia_ManStopP( Gia_Man_t ** p );
extern float Gia_ManMemory( Gia_Man_t * p ); extern float Gia_ManMemory( Gia_Man_t * p );
extern void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut ); extern void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars );
extern void Gia_ManPrintStatsShort( Gia_Man_t * p ); extern void Gia_ManPrintStatsShort( Gia_Man_t * p );
extern void Gia_ManPrintMiterStatus( Gia_Man_t * p ); extern void Gia_ManPrintMiterStatus( Gia_Man_t * p );
extern void Gia_ManSetRegNum( Gia_Man_t * p, int nRegs ); extern void Gia_ManSetRegNum( Gia_Man_t * p, int nRegs );
......
...@@ -863,7 +863,7 @@ Gia_Man_t * Gia_ManDupCofAllInt( Gia_Man_t * p, Vec_Int_t * vSigs, int fVerbose ...@@ -863,7 +863,7 @@ Gia_Man_t * Gia_ManDupCofAllInt( Gia_Man_t * p, Vec_Int_t * vSigs, int fVerbose
if ( fVerbose ) if ( fVerbose )
{ {
printf( "Cofactoring %d signals.\n", Vec_IntSize(vSigs) ); printf( "Cofactoring %d signals.\n", Vec_IntSize(vSigs) );
Gia_ManPrintStats( p, 0, 0, 0 ); Gia_ManPrintStats( p, NULL );
} }
if ( Vec_IntSize( vSigs ) > 200 ) if ( Vec_IntSize( vSigs ) > 200 )
{ {
...@@ -889,7 +889,7 @@ Gia_Man_t * Gia_ManDupCofAllInt( Gia_Man_t * p, Vec_Int_t * vSigs, int fVerbose ...@@ -889,7 +889,7 @@ Gia_Man_t * Gia_ManDupCofAllInt( Gia_Man_t * p, Vec_Int_t * vSigs, int fVerbose
if ( fVerbose ) if ( fVerbose )
printf( "Cofactored variable %d.\n", iVar ); printf( "Cofactored variable %d.\n", iVar );
if ( fVerbose ) if ( fVerbose )
Gia_ManPrintStats( pAig, 0, 0, 0 ); Gia_ManPrintStats( pAig, NULL );
} }
Vec_IntFree( vSigsNew ); Vec_IntFree( vSigsNew );
return pAig; return pAig;
......
...@@ -1773,7 +1773,7 @@ int Gia_CommandSpecI( Gia_Man_t * pGia, int nFramesInit, int nBTLimitInit, int f ...@@ -1773,7 +1773,7 @@ int Gia_CommandSpecI( Gia_Man_t * pGia, int nFramesInit, int nBTLimitInit, int f
} }
// (spech)* where spech = &srm; restore save3; bmc2 -F 100 -C 25000; &resim // (spech)* where spech = &srm; restore save3; bmc2 -F 100 -C 25000; &resim
Gia_ManCleanMark0( pGia ); Gia_ManCleanMark0( pGia );
Gia_ManPrintStats( pGia, 0, 0, 0 ); Gia_ManPrintStats( pGia, NULL );
for ( nIter = 0; ; nIter++ ) for ( nIter = 0; ; nIter++ )
{ {
if ( Gia_ManHasNoEquivs(pGia) ) if ( Gia_ManHasNoEquivs(pGia) )
......
...@@ -956,7 +956,7 @@ Gia_Man_t * Gia_ManFramesInitSpecial( Gia_Man_t * pAig, int nFrames, int fVerbos ...@@ -956,7 +956,7 @@ Gia_Man_t * Gia_ManFramesInitSpecial( Gia_Man_t * pAig, int nFrames, int fVerbos
if ( fVerbose && (f % 100 == 0) ) if ( fVerbose && (f % 100 == 0) )
{ {
printf( "%6d : ", f ); printf( "%6d : ", f );
Gia_ManPrintStats( pFrames, 0, 0, 0 ); Gia_ManPrintStats( pFrames, NULL );
} }
Gia_ManForEachRo( pAig, pObj, i ) Gia_ManForEachRo( pAig, pObj, i )
pObj->Value = f ? Gia_ObjRoToRi( pAig, pObj )->Value : 0; pObj->Value = f ? Gia_ObjRoToRi( pAig, pObj )->Value : 0;
......
...@@ -1139,7 +1139,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P ...@@ -1139,7 +1139,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P
iPo = Vec_IntEntry(vLevel, 0); iPo = Vec_IntEntry(vLevel, 0);
printf( "%6d %6d %6d : ", i, Vec_IntSize(vLevel), iPo ); printf( "%6d %6d %6d : ", i, Vec_IntSize(vLevel), iPo );
pPart = Gia_ManDupCones( p, &iPo, 1, 1 ); pPart = Gia_ManDupCones( p, &iPo, 1, 1 );
Gia_ManPrintStats(pPart, 0, 0, 0); Gia_ManPrintStats(pPart, NULL);
Gia_ManStop( pPart ); Gia_ManStop( pPart );
} }
......
...@@ -326,7 +326,7 @@ void Gia_ManPrintChoiceStats( Gia_Man_t * p ) ...@@ -326,7 +326,7 @@ void Gia_ManPrintChoiceStats( Gia_Man_t * p )
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut ) void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars )
{ {
if ( p->pName ) if ( p->pName )
printf( "%-8s : ", p->pName ); printf( "%-8s : ", p->pName );
...@@ -337,13 +337,12 @@ void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut ) ...@@ -337,13 +337,12 @@ void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut )
printf( " ff =%7d", Gia_ManRegNum(p) ); printf( " ff =%7d", Gia_ManRegNum(p) );
printf( " and =%8d", Gia_ManAndNum(p) ); printf( " and =%8d", Gia_ManAndNum(p) );
printf( " lev =%5d", Gia_ManLevelNum(p) ); Vec_IntFreeP( &p->vLevels ); printf( " lev =%5d", Gia_ManLevelNum(p) ); Vec_IntFreeP( &p->vLevels );
if ( fCut ) if ( pPars && pPars->fCut )
printf( " cut = %d(%d)", Gia_ManCrossCut(p, 0), Gia_ManCrossCut(p, 1) ); printf( " cut = %d(%d)", Gia_ManCrossCut(p, 0), Gia_ManCrossCut(p, 1) );
// printf( " mem =%5.2f MB", 1.0*(sizeof(Gia_Obj_t)*p->nObjs + sizeof(int)*(Vec_IntSize(p->vCis) + Vec_IntSize(p->vCos)))/(1<<20) ); printf( " mem =%5.2f MB", Gia_ManMemory(p) );
printf( " mem =%5.2f MB", 1.0*(sizeof(Gia_Obj_t)*p->nObjsAlloc + sizeof(int)*(Vec_IntCap(p->vCis) + Vec_IntCap(p->vCos)))/(1<<20) );
if ( Gia_ManHasDangling(p) ) if ( Gia_ManHasDangling(p) )
printf( " ch =%5d", Gia_ManEquivCountClasses(p) ); printf( " ch =%5d", Gia_ManEquivCountClasses(p) );
if ( fSwitch ) if ( pPars && pPars->fSwitch )
{ {
if ( p->pSwitching ) if ( p->pSwitching )
printf( " power =%7.2f", Gia_ManEvaluateSwitching(p) ); printf( " power =%7.2f", Gia_ManEvaluateSwitching(p) );
...@@ -360,6 +359,8 @@ void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut ) ...@@ -360,6 +359,8 @@ void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut )
Gia_ManPrintChoiceStats( p ); Gia_ManPrintChoiceStats( p );
if ( Gia_ManHasMapping(p) ) if ( Gia_ManHasMapping(p) )
Gia_ManPrintMappingStats( p ); Gia_ManPrintMappingStats( p );
if ( pPars && pPars->fNpn && Gia_ManHasMapping(p) && Gia_ManLutSizeMax(p) <= 4 )
Gia_ManPrintNpnClasses( p );
if ( p->vPacking ) if ( p->vPacking )
Gia_ManPrintPackingStats( p ); Gia_ManPrintPackingStats( p );
if ( p->pPlacement ) if ( p->pPlacement )
...@@ -370,7 +371,7 @@ void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut ) ...@@ -370,7 +371,7 @@ void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut )
Gia_ManPrintFlopClasses( p ); Gia_ManPrintFlopClasses( p );
Gia_ManPrintGateClasses( p ); Gia_ManPrintGateClasses( p );
Gia_ManPrintObjClasses( p ); Gia_ManPrintObjClasses( p );
if ( fTents ) if ( pPars && pPars->fTents )
{ {
/* /*
int k, Entry, Prev = 1; int k, Entry, Prev = 1;
......
...@@ -147,9 +147,9 @@ Gia_Man_t * Gia_ManDupMuxesTest( Gia_Man_t * p ) ...@@ -147,9 +147,9 @@ Gia_Man_t * Gia_ManDupMuxesTest( Gia_Man_t * p )
Gia_Man_t * pNew, * pNew2; Gia_Man_t * pNew, * pNew2;
pNew = Gia_ManDupMuxes( p ); pNew = Gia_ManDupMuxes( p );
pNew2 = Gia_ManDupNoMuxes( pNew ); pNew2 = Gia_ManDupNoMuxes( pNew );
Gia_ManPrintStats( p, 0, 0, 0 ); Gia_ManPrintStats( p, NULL );
Gia_ManPrintStats( pNew, 0, 0, 0 ); Gia_ManPrintStats( pNew, NULL );
Gia_ManPrintStats( pNew2, 0, 0, 0 ); Gia_ManPrintStats( pNew2, NULL );
Gia_ManStop( pNew ); Gia_ManStop( pNew );
// Gia_ManStop( pNew2 ); // Gia_ManStop( pNew2 );
return pNew2; return pNew2;
......
...@@ -213,7 +213,7 @@ void Gia_SweeperPrintStats( Gia_Man_t * pGia ) ...@@ -213,7 +213,7 @@ void Gia_SweeperPrintStats( Gia_Man_t * pGia )
ABC_PRTP( " Undecided ", p->timeSatUndec, p->timeTotal ); ABC_PRTP( " Undecided ", p->timeSatUndec, p->timeTotal );
ABC_PRTP( "TOTAL RUNTIME ", p->timeTotal, p->timeTotal ); ABC_PRTP( "TOTAL RUNTIME ", p->timeTotal, p->timeTotal );
printf( "GIA: " ); printf( "GIA: " );
Gia_ManPrintStats( pGia, 0, 0, 0 ); Gia_ManPrintStats( pGia, NULL );
printf( "SAT calls = %d. Sat = %d. Unsat = %d. Undecided = %d. Proofs = %d.\n", printf( "SAT calls = %d. Sat = %d. Unsat = %d. Undecided = %d. Proofs = %d.\n",
p->nSatCalls, p->nSatCallsSat, p->nSatCallsUnsat, p->nSatCallsUndec, p->nSatProofs ); p->nSatCalls, p->nSatCallsSat, p->nSatCallsUnsat, p->nSatCallsUndec, p->nSatProofs );
Sat_SolverPrintStats( stdout, p->pSat ); Sat_SolverPrintStats( stdout, p->pSat );
......
...@@ -404,7 +404,7 @@ Gia_Man_t * Abc_NtkDeriveFlatGia2Derive( Abc_Ntk_t * pNtk, Vec_Ptr_t * vOrder ) ...@@ -404,7 +404,7 @@ Gia_Man_t * Abc_NtkDeriveFlatGia2Derive( Abc_Ntk_t * pNtk, Vec_Ptr_t * vOrder )
Gia_ManStop( pGiaBox ); Gia_ManStop( pGiaBox );
printf( "%8d -> ", Abc_NtkCountAndNodes(vOrder) ); printf( "%8d -> ", Abc_NtkCountAndNodes(vOrder) );
Gia_ManPrintStats( pGia, 0, 0, 0 ); Gia_ManPrintStats( pGia, NULL );
return pGia; return pGia;
} }
/* /*
...@@ -724,7 +724,7 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose ) ...@@ -724,7 +724,7 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
clk = Abc_Clock(); clk = Abc_Clock();
pGia = Abc_NtkDeriveFlatGia2( pNtk, vOrder ); pGia = Abc_NtkDeriveFlatGia2( pNtk, vOrder );
Abc_PrintTime( 1, "Deriving GIA", Abc_Clock() - clk ); Abc_PrintTime( 1, "Deriving GIA", Abc_Clock() - clk );
Gia_ManPrintStats( pGia, 0, 0, 0 ); Gia_ManPrintStats( pGia, NULL );
// Gia_ManStop( pGia ); // Gia_ManStop( pGia );
Vec_PtrFree( vOrder ); Vec_PtrFree( vOrder );
...@@ -740,7 +740,7 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose ) ...@@ -740,7 +740,7 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
clk = Abc_Clock(); clk = Abc_Clock();
pGia = Abc_NtkDeriveFlatGia( pNtk ); pGia = Abc_NtkDeriveFlatGia( pNtk );
Abc_PrintTime( 1, "Deriving GIA", Abc_Clock() - clk ); Abc_PrintTime( 1, "Deriving GIA", Abc_Clock() - clk );
Gia_ManPrintStats( pGia, 0, 0, 0 ); Gia_ManPrintStats( pGia, NULL );
// clean nodes/boxes of all nodes // clean nodes/boxes of all nodes
Vec_PtrForEachEntry( Abc_Ntk_t *, vMods, pModel, i ) Vec_PtrForEachEntry( Abc_Ntk_t *, vMods, pModel, i )
......
...@@ -25260,23 +25260,25 @@ usage: ...@@ -25260,23 +25260,25 @@ usage:
***********************************************************************/ ***********************************************************************/
int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv ) int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Gps_Par_t Pars, * pPars = &Pars;
int c; int c;
int fTents = 0; memset( pPars, 0, sizeof(Gps_Par_t) );
int fSwitch = 0;
int fCut = 0;
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "tpch" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "tpcnh" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
case 't': case 't':
fTents ^= 1; pPars->fTents ^= 1;
break; break;
case 'p': case 'p':
fSwitch ^= 1; pPars->fSwitch ^= 1;
break; break;
case 'c': case 'c':
fCut ^= 1; pPars->fCut ^= 1;
break;
case 'n':
pPars->fNpn ^= 1;
break; break;
case 'h': case 'h':
goto usage; goto usage;
...@@ -25289,15 +25291,16 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -25289,15 +25291,16 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Ps(): There is no AIG.\n" ); Abc_Print( -1, "Abc_CommandAbc9Ps(): There is no AIG.\n" );
return 1; return 1;
} }
Gia_ManPrintStats( pAbc->pGia, fTents, fSwitch, fCut ); Gia_ManPrintStats( pAbc->pGia, pPars );
return 0; return 0;
usage: usage:
Abc_Print( -2, "usage: &ps [-tpch]\n" ); Abc_Print( -2, "usage: &ps [-tpcnh]\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", 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", 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", 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-h : print the command usage\n"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 1;
} }
...@@ -501,7 +501,7 @@ void Gia_ManFromBridgeTest( char * pFileName ) ...@@ -501,7 +501,7 @@ void Gia_ManFromBridgeTest( char * pFileName )
p = Gia_ManFromBridge( pFile, NULL ); p = Gia_ManFromBridge( pFile, NULL );
fclose ( pFile ); fclose ( pFile );
Gia_ManPrintStats( p, 0, 0, 0 ); Gia_ManPrintStats( p, NULL );
Gia_AigerWrite( p, "temp.aig", 0, 0 ); Gia_AigerWrite( p, "temp.aig", 0, 0 );
Gia_ManToBridgeAbsNetlistTest( "par_.dump", p, BRIDGE_ABS_NETLIST ); Gia_ManToBridgeAbsNetlistTest( "par_.dump", p, BRIDGE_ABS_NETLIST );
......
...@@ -147,7 +147,7 @@ Gia_Man_t * Abs_RpmPerformOld( Gia_Man_t * p, int fVerbose ) ...@@ -147,7 +147,7 @@ Gia_Man_t * Abs_RpmPerformOld( Gia_Man_t * p, int fVerbose )
if ( fVerbose ) if ( fVerbose )
{ {
printf( "Original AIG:\n" ); printf( "Original AIG:\n" );
Gia_ManPrintStats( p, 0, 0, 0 ); Gia_ManPrintStats( p, NULL );
} }
// perform input trimming // perform input trimming
...@@ -155,7 +155,7 @@ Gia_Man_t * Abs_RpmPerformOld( Gia_Man_t * p, int fVerbose ) ...@@ -155,7 +155,7 @@ Gia_Man_t * Abs_RpmPerformOld( Gia_Man_t * p, int fVerbose )
if ( fVerbose ) if ( fVerbose )
{ {
printf( "After PI trimming:\n" ); printf( "After PI trimming:\n" );
Gia_ManPrintStats( pNew, 0, 0, 0 ); Gia_ManPrintStats( pNew, NULL );
} }
// transform GIA // transform GIA
pNew = Gia_ManDupIn2Ff( pTmp = pNew ); pNew = Gia_ManDupIn2Ff( pTmp = pNew );
...@@ -163,7 +163,7 @@ Gia_Man_t * Abs_RpmPerformOld( Gia_Man_t * p, int fVerbose ) ...@@ -163,7 +163,7 @@ Gia_Man_t * Abs_RpmPerformOld( Gia_Man_t * p, int fVerbose )
if ( fVerbose ) if ( fVerbose )
{ {
printf( "After PI-2-FF transformation:\n" ); printf( "After PI-2-FF transformation:\n" );
Gia_ManPrintStats( pNew, 0, 0, 0 ); Gia_ManPrintStats( pNew, NULL );
} }
// derive AIG // derive AIG
...@@ -178,7 +178,7 @@ Gia_Man_t * Abs_RpmPerformOld( Gia_Man_t * p, int fVerbose ) ...@@ -178,7 +178,7 @@ Gia_Man_t * Abs_RpmPerformOld( Gia_Man_t * p, int fVerbose )
if ( fVerbose ) if ( fVerbose )
{ {
printf( "After min-area retiming:\n" ); printf( "After min-area retiming:\n" );
Gia_ManPrintStats( pNew, 0, 0, 0 ); Gia_ManPrintStats( pNew, NULL );
} }
// transform back // transform back
...@@ -187,7 +187,7 @@ Gia_Man_t * Abs_RpmPerformOld( Gia_Man_t * p, int fVerbose ) ...@@ -187,7 +187,7 @@ Gia_Man_t * Abs_RpmPerformOld( Gia_Man_t * p, int fVerbose )
if ( fVerbose ) if ( fVerbose )
{ {
printf( "After FF-2-PI tranformation:\n" ); printf( "After FF-2-PI tranformation:\n" );
Gia_ManPrintStats( pNew, 0, 0, 0 ); Gia_ManPrintStats( pNew, NULL );
} }
return pNew; return pNew;
} }
......
...@@ -401,7 +401,7 @@ p->timeSim += Abc_Clock() - clk; ...@@ -401,7 +401,7 @@ p->timeSim += Abc_Clock() - clk;
// Gia_AigerWrite( pSrm, "gia_srm.aig", 0, 0 ); // Gia_AigerWrite( pSrm, "gia_srm.aig", 0, 0 );
if ( pPars->fVeryVerbose ) if ( pPars->fVeryVerbose )
Gia_ManPrintStats( pSrm, 0, 0, 0 ); Gia_ManPrintStats( pSrm, NULL );
if ( Gia_ManCoNum(pSrm) == 0 ) if ( Gia_ManCoNum(pSrm) == 0 )
{ {
Gia_ManStop( pSrm ); Gia_ManStop( pSrm );
......
...@@ -385,9 +385,9 @@ Gia_Man_t * Ssc_PerformSweepingConstr( Gia_Man_t * p, Ssc_Pars_t * pPars ) ...@@ -385,9 +385,9 @@ Gia_Man_t * Ssc_PerformSweepingConstr( Gia_Man_t * p, Ssc_Pars_t * pPars )
if ( pPars->fVerbose ) if ( pPars->fVerbose )
{ {
printf( "User AIG: " ); printf( "User AIG: " );
Gia_ManPrintStats( pAig, 0, 0, 0 ); Gia_ManPrintStats( pAig, NULL );
printf( "Care AIG: " ); printf( "Care AIG: " );
Gia_ManPrintStats( pCare, 0, 0, 0 ); Gia_ManPrintStats( pCare, NULL );
} }
pAig = Gia_ManDupLevelized( pResult = pAig ); pAig = Gia_ManDupLevelized( pResult = pAig );
......
...@@ -130,10 +130,10 @@ Gia_Man_t * Gia_ManOptimizeRing( Gia_Man_t * p ) ...@@ -130,10 +130,10 @@ Gia_Man_t * Gia_ManOptimizeRing( Gia_Man_t * p )
int i; int i;
assert( p->nConstrs == 0 ); assert( p->nConstrs == 0 );
printf( "User AIG: " ); printf( "User AIG: " );
Gia_ManPrintStats( p, 0, 0, 0 ); Gia_ManPrintStats( p, NULL );
pTemp = Gia_ManDropContained( p ); pTemp = Gia_ManDropContained( p );
printf( "Drop AIG: " ); printf( "Drop AIG: " );
Gia_ManPrintStats( pTemp, 0, 0, 0 ); Gia_ManPrintStats( pTemp, NULL );
// return pTemp; // return pTemp;
if ( Gia_ManPoNum(pTemp) == 1 ) if ( Gia_ManPoNum(pTemp) == 1 )
return pTemp; return pTemp;
...@@ -158,7 +158,7 @@ Gia_Man_t * Gia_ManOptimizeRing( Gia_Man_t * p ) ...@@ -158,7 +158,7 @@ Gia_Man_t * Gia_ManOptimizeRing( Gia_Man_t * p )
Gia_ManStop( pAux ); Gia_ManStop( pAux );
// report results // report results
printf( "AIG%3d : ", i ); printf( "AIG%3d : ", i );
Gia_ManPrintStats( pTemp, 0, 0, 0 ); Gia_ManPrintStats( pTemp, NULL );
} }
pTemp->nConstrs = 0; pTemp->nConstrs = 0;
return pTemp; return pTemp;
......
...@@ -345,7 +345,7 @@ int Gia_ManBmcPerform( Gia_Man_t * pGia, Bmc_AndPar_t * pPars ) ...@@ -345,7 +345,7 @@ int Gia_ManBmcPerform( Gia_Man_t * pGia, Bmc_AndPar_t * pPars )
// report statistics // report statistics
if ( pPars->fVerbose ) if ( pPars->fVerbose )
{ {
printf( "%4d : PI =%9d. AIG =%9d. Var =%8d. In =%6d. And =%9d. Cla =%9d. Conf =%9d. Mem =%7.1f Mb ", printf( "%4d : PI =%9d. AIG =%9d. Var =%8d. In =%6d. And =%9d. Cla =%9d. Conf =%9d. Mem =%7.1f MB ",
f, Gia_ManPiNum(p->pFrames), Gia_ManAndNum(p->pFrames), f, Gia_ManPiNum(p->pFrames), Gia_ManAndNum(p->pFrames),
p->nSatVars-1, Vec_IntSize(p->vInputs), Vec_IntSize(p->vNodes), p->nSatVars-1, Vec_IntSize(p->vInputs), Vec_IntSize(p->vNodes),
sat_solver_nclauses(p->pSat), sat_solver_nconflicts(p->pSat), Gia_ManMemory(p->pFrames) ); sat_solver_nclauses(p->pSat), sat_solver_nconflicts(p->pSat), Gia_ManMemory(p->pFrames) );
......
...@@ -148,14 +148,14 @@ Gia_Man_t * Bmc_CexTarget( Gia_Man_t * p, int nFrames ) ...@@ -148,14 +148,14 @@ Gia_Man_t * Bmc_CexTarget( Gia_Man_t * p, int nFrames )
{ {
printf( "%3d : ", i ); printf( "%3d : ", i );
if ( i % Gia_ManPiNum(p) == 0 ) if ( i % Gia_ManPiNum(p) == 0 )
Gia_ManPrintStats( pNew, 0, 0, 0 ); Gia_ManPrintStats( pNew, NULL );
pNew = Gia_ManDupExist( pTemp = pNew, i ); pNew = Gia_ManDupExist( pTemp = pNew, i );
Gia_ManStop( pTemp ); Gia_ManStop( pTemp );
} }
Gia_ManPrintStats( pNew, 0, 0, 0 ); Gia_ManPrintStats( pNew, NULL );
pNew = Gia_ManDupLastPis( pTemp = pNew, Gia_ManRegNum(p) ); pNew = Gia_ManDupLastPis( pTemp = pNew, Gia_ManRegNum(p) );
Gia_ManStop( pTemp ); Gia_ManStop( pTemp );
Gia_ManPrintStats( pNew, 0, 0, 0 ); Gia_ManPrintStats( pNew, NULL );
pTemp = Gia_ManDupAppendCones( p, &pNew, 1, 1 ); pTemp = Gia_ManDupAppendCones( p, &pNew, 1, 1 );
Gia_ManStop( pNew ); Gia_ManStop( pNew );
Gia_AigerWrite( pTemp, "miter3.aig", 0, 0 ); Gia_AigerWrite( pTemp, "miter3.aig", 0, 0 );
...@@ -352,7 +352,7 @@ Gia_Man_t * Bmc_CexBuildNetwork2Test( Gia_Man_t * p, Abc_Cex_t * pCex, int nFram ...@@ -352,7 +352,7 @@ Gia_Man_t * Bmc_CexBuildNetwork2Test( Gia_Man_t * p, Abc_Cex_t * pCex, int nFram
{ {
printf( "Frame %5d : ", i ); printf( "Frame %5d : ", i );
pNew = Bmc_CexBuildNetwork2_( p, pCex, i ); pNew = Bmc_CexBuildNetwork2_( p, pCex, i );
Gia_ManPrintStats( pNew, 0, 0, 0 ); Gia_ManPrintStats( pNew, NULL );
Vec_PtrPush( vCones, pNew ); Vec_PtrPush( vCones, pNew );
} }
pNew = Gia_ManDupAppendCones( p, (Gia_Man_t **)Vec_PtrArray(vCones), Vec_PtrSize(vCones), 1 ); pNew = Gia_ManDupAppendCones( p, (Gia_Man_t **)Vec_PtrArray(vCones), Vec_PtrSize(vCones), 1 );
......
...@@ -332,7 +332,7 @@ Abc_Cex_t * Gia_ManCexMin( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int ...@@ -332,7 +332,7 @@ Abc_Cex_t * Gia_ManCexMin( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int
{ {
pNew = Gia_ManCreateUnate( p, pCex, iFrameStart, nRealPis, fUseAll ); pNew = Gia_ManCreateUnate( p, pCex, iFrameStart, nRealPis, fUseAll );
printf( "%3d : ", iFrameStart ); printf( "%3d : ", iFrameStart );
Gia_ManPrintStats( pNew, 0, 0, 0 ); Gia_ManPrintStats( pNew, NULL );
if ( fVerbose ) if ( fVerbose )
Gia_AigerWrite( pNew, "temp.aig", 0, 0 ); Gia_AigerWrite( pNew, "temp.aig", 0, 0 );
Gia_ManStop( pNew ); Gia_ManStop( pNew );
...@@ -343,7 +343,7 @@ Abc_Cex_t * Gia_ManCexMin( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int ...@@ -343,7 +343,7 @@ Abc_Cex_t * Gia_ManCexMin( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int
{ {
pNew = Gia_ManCreateUnate( p, pCex, f, -1, fUseAll ); pNew = Gia_ManCreateUnate( p, pCex, f, -1, fUseAll );
printf( "%3d : ", f ); printf( "%3d : ", f );
Gia_ManPrintStats( pNew, 0, 0, 0 ); Gia_ManPrintStats( pNew, NULL );
if ( fVerbose ) if ( fVerbose )
Gia_AigerWrite( pNew, "temp.aig", 0, 0 ); Gia_AigerWrite( pNew, "temp.aig", 0, 0 );
Gia_ManStop( pNew ); Gia_ManStop( pNew );
......
...@@ -172,7 +172,7 @@ void Bmc_CexPerformUnrollingTest( Gia_Man_t * p, Abc_Cex_t * pCex ) ...@@ -172,7 +172,7 @@ void Bmc_CexPerformUnrollingTest( Gia_Man_t * p, Abc_Cex_t * pCex )
Gia_Man_t * pNew; Gia_Man_t * pNew;
abctime clk = Abc_Clock(); abctime clk = Abc_Clock();
pNew = Bmc_CexPerformUnrolling( p, pCex ); pNew = Bmc_CexPerformUnrolling( p, pCex );
Gia_ManPrintStats( pNew, 0, 0, 0 ); Gia_ManPrintStats( pNew, NULL );
Gia_AigerWrite( pNew, "unroll.aig", 0, 0 ); Gia_AigerWrite( pNew, "unroll.aig", 0, 0 );
//Bmc_CexDumpAogStats( pNew, Abc_Clock() - clk ); //Bmc_CexDumpAogStats( pNew, Abc_Clock() - clk );
Gia_ManStop( pNew ); Gia_ManStop( pNew );
...@@ -284,7 +284,7 @@ void Bmc_CexBuildNetworkTest( Gia_Man_t * p, Abc_Cex_t * pCex ) ...@@ -284,7 +284,7 @@ void Bmc_CexBuildNetworkTest( Gia_Man_t * p, Abc_Cex_t * pCex )
Gia_Man_t * pNew; Gia_Man_t * pNew;
abctime clk = Abc_Clock(); abctime clk = Abc_Clock();
pNew = Bmc_CexBuildNetwork( p, pCex ); pNew = Bmc_CexBuildNetwork( p, pCex );
Gia_ManPrintStats( pNew, 0, 0, 0 ); Gia_ManPrintStats( pNew, NULL );
Gia_AigerWrite( pNew, "unate.aig", 0, 0 ); Gia_AigerWrite( pNew, "unate.aig", 0, 0 );
//Bmc_CexDumpAogStats( pNew, Abc_Clock() - clk ); //Bmc_CexDumpAogStats( pNew, Abc_Clock() - clk );
Gia_ManStop( pNew ); Gia_ManStop( pNew );
......
...@@ -487,8 +487,8 @@ void Unr_ManTest( Gia_Man_t * pGia, int nFrames ) ...@@ -487,8 +487,8 @@ void Unr_ManTest( Gia_Man_t * pGia, int nFrames )
pFrames1 = Unr_ManUnrollSimple( pGia, nFrames ); pFrames1 = Unr_ManUnrollSimple( pGia, nFrames );
Abc_PrintTime( 1, "UnrollS", Abc_Clock() - clk ); Abc_PrintTime( 1, "UnrollS", Abc_Clock() - clk );
Gia_ManPrintStats( pFrames0, 0, 0, 0 ); Gia_ManPrintStats( pFrames0, NULL );
Gia_ManPrintStats( pFrames1, 0, 0, 0 ); Gia_ManPrintStats( pFrames1, NULL );
Gia_AigerWrite( pFrames0, "frames0.aig", 0, 0 ); Gia_AigerWrite( pFrames0, "frames0.aig", 0, 0 );
Gia_AigerWrite( pFrames1, "frames1.aig", 0, 0 ); Gia_AigerWrite( pFrames1, "frames1.aig", 0, 0 );
......
...@@ -220,7 +220,7 @@ Gia_Man_t * Gia_ManInterTest( Gia_Man_t * p ) ...@@ -220,7 +220,7 @@ Gia_Man_t * Gia_ManInterTest( Gia_Man_t * p )
// derive interpolant // derive interpolant
pInter = (Gia_Man_t *)Int2_ManReadInterpolant( pSat ); pInter = (Gia_Man_t *)Int2_ManReadInterpolant( pSat );
Gia_ManPrintStats( pInter, 0, 0, 0 ); Gia_ManPrintStats( pInter, NULL );
Abc_PrintTime( 1, "Total interpolation time", Abc_Clock() - clk ); Abc_PrintTime( 1, "Total interpolation time", Abc_Clock() - clk );
// clean up // clean up
......
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