summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-09-23 20:32:37 -0400
committerAlan Mishchenko <alanmi@berkeley.edu>2014-09-23 20:32:37 -0400
commitd9b5aa49f7e77505938d14affbb7f2fe287df33d (patch)
tree1bbd66bba06dc6b36870612416cc35cc726e3a61 /src
parent3f95853f3edd55307a09fceb220090e632de322c (diff)
downloadabc-d9b5aa49f7e77505938d14affbb7f2fe287df33d.tar.gz
abc-d9b5aa49f7e77505938d14affbb7f2fe287df33d.tar.bz2
abc-d9b5aa49f7e77505938d14affbb7f2fe287df33d.zip
Enables dumping stats into a file.
Diffstat (limited to 'src')
-rw-r--r--src/base/abci/abc.c2
-rw-r--r--src/base/abci/abcPrint.c14
2 files changed, 15 insertions, 1 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index eb19028e..c05b8af6 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -1211,7 +1211,7 @@ usage:
Abc_Print( -2, "\t prints the network statistics\n" );
Abc_Print( -2, "\t-f : toggles printing the literal count in the factored forms [default = %s]\n", fFactor? "yes": "no" );
Abc_Print( -2, "\t-b : toggles saving the best logic network in \"best.blif\" [default = %s]\n", fSaveBest? "yes": "no" );
- Abc_Print( -2, "\t-d : toggles dumping network into file \"<input_file_name>_dump.blif\" [default = %s]\n", fDumpResult? "yes": "no" );
+ Abc_Print( -2, "\t-d : toggles dumping statistics about the network into file [default = %s]\n", fDumpResult? "yes": "no" );
Abc_Print( -2, "\t-l : toggles printing delay of LUT mapping using LUT library [default = %s]\n", fSaveBest? "yes": "no" );
Abc_Print( -2, "\t-t : toggles printing runtime statistics [default = %s]\n", fPrintTime? "yes": "no" );
Abc_Print( -2, "\t-m : toggles printing MUX statistics [default = %s]\n", fPrintMuxes? "yes": "no" );
diff --git a/src/base/abci/abcPrint.c b/src/base/abci/abcPrint.c
index 2f481fc7..27b9513e 100644
--- a/src/base/abci/abcPrint.c
+++ b/src/base/abci/abcPrint.c
@@ -222,6 +222,7 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum
}
if ( fSaveBest )
Abc_NtkCompareAndSaveBest( pNtk );
+/*
if ( fDumpResult )
{
char Buffer[1000] = {0};
@@ -230,6 +231,7 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum
Io_Write( pNtk, Buffer, IO_FILE_BLIF );
if ( pNtk->pSpec ) ABC_FREE( pNameGen );
}
+*/
// if ( Abc_NtkIsStrash(pNtk) )
// Abc_AigCountNext( pNtk->pManFunc );
@@ -322,6 +324,18 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum
Abc_Print( 1,"\n" );
// print the statistic into a file
+ if ( fDumpResult )
+ {
+ FILE * pTable = fopen( "abcstats.txt", "a+" );
+ fprintf( pTable, "%s ", pNtk->pName );
+ fprintf( pTable, "%d ", Abc_NtkPiNum(pNtk) );
+ fprintf( pTable, "%d ", Abc_NtkPoNum(pNtk) );
+ fprintf( pTable, "%d ", Abc_NtkNodeNum(pNtk) );
+ fprintf( pTable, "%d ", Abc_NtkGetTotalFanins(pNtk) );
+ fprintf( pTable, "%d ", Abc_NtkLevel(pNtk) );
+ fprintf( pTable, "\n" );
+ fclose( pTable );
+ }
/*
{
FILE * pTable;