summaryrefslogtreecommitdiffstats
path: root/src/aig
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig')
-rw-r--r--src/aig/gia/gia.h11
-rw-r--r--src/aig/gia/giaCof.c4
-rw-r--r--src/aig/gia/giaEquiv.c2
-rw-r--r--src/aig/gia/giaFrames.c2
-rw-r--r--src/aig/gia/giaIso.c2
-rw-r--r--src/aig/gia/giaMan.c13
-rw-r--r--src/aig/gia/giaMuxes.c6
-rw-r--r--src/aig/gia/giaSweeper.c2
8 files changed, 26 insertions, 16 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h
index 2d3cf518..51c9c020 100644
--- a/src/aig/gia/gia.h
+++ b/src/aig/gia/gia.h
@@ -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;
struct Emb_Par_t_
{
@@ -1019,7 +1028,7 @@ extern Gia_Man_t * Gia_ManStart( int nObjsMax );
extern void Gia_ManStop( Gia_Man_t * p );
extern void Gia_ManStopP( 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_ManPrintMiterStatus( Gia_Man_t * p );
extern void Gia_ManSetRegNum( Gia_Man_t * p, int nRegs );
diff --git a/src/aig/gia/giaCof.c b/src/aig/gia/giaCof.c
index ceaa8daa..43cce6ac 100644
--- a/src/aig/gia/giaCof.c
+++ b/src/aig/gia/giaCof.c
@@ -863,7 +863,7 @@ Gia_Man_t * Gia_ManDupCofAllInt( Gia_Man_t * p, Vec_Int_t * vSigs, int fVerbose
if ( fVerbose )
{
printf( "Cofactoring %d signals.\n", Vec_IntSize(vSigs) );
- Gia_ManPrintStats( p, 0, 0, 0 );
+ Gia_ManPrintStats( p, NULL );
}
if ( Vec_IntSize( vSigs ) > 200 )
{
@@ -889,7 +889,7 @@ Gia_Man_t * Gia_ManDupCofAllInt( Gia_Man_t * p, Vec_Int_t * vSigs, int fVerbose
if ( fVerbose )
printf( "Cofactored variable %d.\n", iVar );
if ( fVerbose )
- Gia_ManPrintStats( pAig, 0, 0, 0 );
+ Gia_ManPrintStats( pAig, NULL );
}
Vec_IntFree( vSigsNew );
return pAig;
diff --git a/src/aig/gia/giaEquiv.c b/src/aig/gia/giaEquiv.c
index d795856a..13443414 100644
--- a/src/aig/gia/giaEquiv.c
+++ b/src/aig/gia/giaEquiv.c
@@ -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
Gia_ManCleanMark0( pGia );
- Gia_ManPrintStats( pGia, 0, 0, 0 );
+ Gia_ManPrintStats( pGia, NULL );
for ( nIter = 0; ; nIter++ )
{
if ( Gia_ManHasNoEquivs(pGia) )
diff --git a/src/aig/gia/giaFrames.c b/src/aig/gia/giaFrames.c
index ae832af9..ebe2c139 100644
--- a/src/aig/gia/giaFrames.c
+++ b/src/aig/gia/giaFrames.c
@@ -956,7 +956,7 @@ Gia_Man_t * Gia_ManFramesInitSpecial( Gia_Man_t * pAig, int nFrames, int fVerbos
if ( fVerbose && (f % 100 == 0) )
{
printf( "%6d : ", f );
- Gia_ManPrintStats( pFrames, 0, 0, 0 );
+ Gia_ManPrintStats( pFrames, NULL );
}
Gia_ManForEachRo( pAig, pObj, i )
pObj->Value = f ? Gia_ObjRoToRi( pAig, pObj )->Value : 0;
diff --git a/src/aig/gia/giaIso.c b/src/aig/gia/giaIso.c
index 5c03d1d2..baf7bc93 100644
--- a/src/aig/gia/giaIso.c
+++ b/src/aig/gia/giaIso.c
@@ -1139,7 +1139,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P
iPo = Vec_IntEntry(vLevel, 0);
printf( "%6d %6d %6d : ", i, Vec_IntSize(vLevel), iPo );
pPart = Gia_ManDupCones( p, &iPo, 1, 1 );
- Gia_ManPrintStats(pPart, 0, 0, 0);
+ Gia_ManPrintStats(pPart, NULL);
Gia_ManStop( pPart );
}
diff --git a/src/aig/gia/giaMan.c b/src/aig/gia/giaMan.c
index 58057136..7874d45a 100644
--- a/src/aig/gia/giaMan.c
+++ b/src/aig/gia/giaMan.c
@@ -326,7 +326,7 @@ void Gia_ManPrintChoiceStats( Gia_Man_t * p )
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 )
printf( "%-8s : ", p->pName );
@@ -337,13 +337,12 @@ void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut )
printf( " ff =%7d", Gia_ManRegNum(p) );
printf( " and =%8d", Gia_ManAndNum(p) );
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( " 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", 1.0*(sizeof(Gia_Obj_t)*p->nObjsAlloc + sizeof(int)*(Vec_IntCap(p->vCis) + Vec_IntCap(p->vCos)))/(1<<20) );
+ printf( " mem =%5.2f MB", Gia_ManMemory(p) );
if ( Gia_ManHasDangling(p) )
printf( " ch =%5d", Gia_ManEquivCountClasses(p) );
- if ( fSwitch )
+ if ( pPars && pPars->fSwitch )
{
if ( p->pSwitching )
printf( " power =%7.2f", Gia_ManEvaluateSwitching(p) );
@@ -360,6 +359,8 @@ void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut )
Gia_ManPrintChoiceStats( p );
if ( Gia_ManHasMapping(p) )
Gia_ManPrintMappingStats( p );
+ if ( pPars && pPars->fNpn && Gia_ManHasMapping(p) && Gia_ManLutSizeMax(p) <= 4 )
+ Gia_ManPrintNpnClasses( p );
if ( p->vPacking )
Gia_ManPrintPackingStats( p );
if ( p->pPlacement )
@@ -370,7 +371,7 @@ void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut )
Gia_ManPrintFlopClasses( p );
Gia_ManPrintGateClasses( p );
Gia_ManPrintObjClasses( p );
- if ( fTents )
+ if ( pPars && pPars->fTents )
{
/*
int k, Entry, Prev = 1;
diff --git a/src/aig/gia/giaMuxes.c b/src/aig/gia/giaMuxes.c
index 479d75e7..fea76107 100644
--- a/src/aig/gia/giaMuxes.c
+++ b/src/aig/gia/giaMuxes.c
@@ -147,9 +147,9 @@ Gia_Man_t * Gia_ManDupMuxesTest( Gia_Man_t * p )
Gia_Man_t * pNew, * pNew2;
pNew = Gia_ManDupMuxes( p );
pNew2 = Gia_ManDupNoMuxes( pNew );
- Gia_ManPrintStats( p, 0, 0, 0 );
- Gia_ManPrintStats( pNew, 0, 0, 0 );
- Gia_ManPrintStats( pNew2, 0, 0, 0 );
+ Gia_ManPrintStats( p, NULL );
+ Gia_ManPrintStats( pNew, NULL );
+ Gia_ManPrintStats( pNew2, NULL );
Gia_ManStop( pNew );
// Gia_ManStop( pNew2 );
return pNew2;
diff --git a/src/aig/gia/giaSweeper.c b/src/aig/gia/giaSweeper.c
index f1295990..a930b994 100644
--- a/src/aig/gia/giaSweeper.c
+++ b/src/aig/gia/giaSweeper.c
@@ -213,7 +213,7 @@ void Gia_SweeperPrintStats( Gia_Man_t * pGia )
ABC_PRTP( " Undecided ", p->timeSatUndec, p->timeTotal );
ABC_PRTP( "TOTAL RUNTIME ", p->timeTotal, p->timeTotal );
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",
p->nSatCalls, p->nSatCallsSat, p->nSatCallsUnsat, p->nSatCallsUndec, p->nSatProofs );
Sat_SolverPrintStats( stdout, p->pSat );