summaryrefslogtreecommitdiffstats
path: root/src/base/io/ioWriteDot.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2005-11-28 08:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2005-11-28 08:01:00 -0800
commit5e0f86a2c9bdc773251db2b741b7b051cc4a147a (patch)
treecda989b7f0cb2db3c9719cab14eb2ce1a9782e1e /src/base/io/ioWriteDot.c
parent3a1ca9fa0ebfb2ae431501067d1a1a63fe6ecba5 (diff)
downloadabc-5e0f86a2c9bdc773251db2b741b7b051cc4a147a.tar.gz
abc-5e0f86a2c9bdc773251db2b741b7b051cc4a147a.tar.bz2
abc-5e0f86a2c9bdc773251db2b741b7b051cc4a147a.zip
Version abc51128
Diffstat (limited to 'src/base/io/ioWriteDot.c')
-rw-r--r--src/base/io/ioWriteDot.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/base/io/ioWriteDot.c b/src/base/io/ioWriteDot.c
index d00b265a..373c4636 100644
--- a/src/base/io/ioWriteDot.c
+++ b/src/base/io/ioWriteDot.c
@@ -26,6 +26,7 @@
////////////////////////////////////////////////////////////////////////
static char * Abc_NtkPrintSop( char * pSop );
+static int Abc_NtkCountLogicNodes( Vec_Ptr_t * vNodes );
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -181,7 +182,7 @@ void Io_WriteDotAig( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
fprintf( pFile, " fontsize=18,\n" );
fprintf( pFile, " fontname = \"Times-Roman\",\n" );
fprintf( pFile, " label=\"" );
- fprintf( pFile, "The set contains %d nodes and spans %d levels.", vNodes->nSize, LevelMax - LevelMin + 1 );
+ fprintf( pFile, "The set contains %d logic nodes and spans %d levels.", Abc_NtkCountLogicNodes(vNodes), LevelMax - LevelMin + 1 );
fprintf( pFile, "\\n" );
fprintf( pFile, "\"\n" );
fprintf( pFile, " ];\n" );
@@ -526,7 +527,7 @@ void Io_WriteDotNtk( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
fprintf( pFile, " fontsize=18,\n" );
fprintf( pFile, " fontname = \"Times-Roman\",\n" );
fprintf( pFile, " label=\"" );
- fprintf( pFile, "The set contains %d nodes and spans %d levels.", vNodes->nSize, LevelMax - LevelMin + 1 );
+ fprintf( pFile, "The set contains %d logic nodes and spans %d levels.", Abc_NtkCountLogicNodes(vNodes), LevelMax - LevelMin + 1 );
fprintf( pFile, "\\n" );
fprintf( pFile, "\"\n" );
fprintf( pFile, " ];\n" );
@@ -701,6 +702,32 @@ char * Abc_NtkPrintSop( char * pSop )
return Buffer;
}
+/**Function*************************************************************
+
+ Synopsis [Computes the printable SOP form.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+int Abc_NtkCountLogicNodes( Vec_Ptr_t * vNodes )
+{
+ Abc_Obj_t * pObj;
+ int i, Counter = 0;
+ Vec_PtrForEachEntry( vNodes, pObj, i )
+ {
+ if ( !Abc_ObjIsNode(pObj) )
+ continue;
+ if ( Abc_ObjFaninNum(pObj) == 0 && Abc_ObjFanoutNum(pObj) == 0 )
+ continue;
+ Counter ++;
+ }
+ return Counter;
+}
+
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////