summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/aig/gia/giaUtil.c25
-rw-r--r--src/base/abci/abc.c9
2 files changed, 33 insertions, 1 deletions
diff --git a/src/aig/gia/giaUtil.c b/src/aig/gia/giaUtil.c
index c7af642e..1c1edda7 100644
--- a/src/aig/gia/giaUtil.c
+++ b/src/aig/gia/giaUtil.c
@@ -2050,6 +2050,31 @@ void Gia_AigerWriteLut( Gia_Man_t * p, char * pFileName )
Vec_WrdFree( vTruths );
}
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Gia_DumpLutSizeDistrib( Gia_Man_t * p, char * pFileName )
+{
+ FILE * pTable = fopen( pFileName, "a+" );
+ int i, Counts[10] = {0};
+ Gia_ManForEachLut( p, i )
+ if ( Gia_ObjLutSize(p, i) > 0 && Gia_ObjLutSize(p, i) < 10 )
+ Counts[ Gia_ObjLutSize(p, i) ]++;
+ fprintf( pTable, "%s", p->pName );
+ for ( i = 1; i < 10; i++ )
+ fprintf( pTable, " %d", Counts[i] );
+ fprintf( pTable, "\n" );
+ fclose( pTable );
+}
+
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 7055bf59..8dbf1332 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -43670,8 +43670,15 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// Jf_ManTestCnf( pAbc->pGia );
// Gia_ManCheckFalseTest( pAbc->pGia, nFrames );
// Gia_ParTest( pAbc->pGia, nWords, nProcs );
- Gia_StoComputeCuts( pAbc->pGia );
+// Gia_StoComputeCuts( pAbc->pGia );
// printf( "\nThis command is currently disabled.\n\n" );
+ {
+ char Buffer[10];
+ extern void Gia_DumpLutSizeDistrib( Gia_Man_t * p, char * pFileName );
+ sprintf( Buffer, "stats%d.txt", nFrames );
+ if ( pAbc->pGia )
+ Gia_DumpLutSizeDistrib( pAbc->pGia, Buffer );
+ }
return 0;
usage:
Abc_Print( -2, "usage: &test [-FW num] [-svh]\n" );