diff options
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/io/ioWriteGml.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/base/io/ioWriteGml.c b/src/base/io/ioWriteGml.c index 49a90d9c..1164188f 100644 --- a/src/base/io/ioWriteGml.c +++ b/src/base/io/ioWriteGml.c @@ -61,6 +61,18 @@ void Io_WriteGml( Abc_Ntk_t * pNtk, char * pFileName ) fprintf( pFile, "# GML for \"%s\" written by ABC on %s\n", pNtk->pName, Extra_TimeStamp() ); fprintf( pFile, "graph [\n" ); + // output constant node in the AIG if it has fanouts + if ( Abc_NtkIsStrash(pNtk) ) + { + pObj = Abc_AigConst1( pNtk ); + if ( Abc_ObjFanoutNum(pObj) > 0 ) + { + fprintf( pFile, "\n" ); + fprintf( pFile, " node [ id %5d label \"%s\"\n", pObj->Id, Abc_ObjName(pObj) ); + fprintf( pFile, " graphics [ type \"ellipse\" fill \"#CCCCFF\" ]\n" ); // grey + fprintf( pFile, " ]\n" ); + } + } // output the POs fprintf( pFile, "\n" ); Abc_NtkForEachPo( pNtk, pObj, i ) |