52 assert( Abc_NtkIsStrash(pNtk) || Abc_NtkIsLogic(pNtk) );
55 pFile = fopen( pFileName,
"w" );
58 fprintf( stdout,
"Io_WriteGml(): Cannot open the output file \"%s\".\n", pFileName );
62 fprintf( pFile,
"graph [\n" );
65 if ( Abc_NtkIsStrash(pNtk) )
68 if ( Abc_ObjFanoutNum(pObj) > 0 )
70 fprintf( pFile,
"\n" );
71 fprintf( pFile,
" node [ id %5d label \"%s\"\n", pObj->
Id,
Abc_ObjName(pObj) );
72 fprintf( pFile,
" graphics [ type \"ellipse\" fill \"#CCCCFF\" ]\n" );
73 fprintf( pFile,
" ]\n" );
77 fprintf( pFile,
"\n" );
80 fprintf( pFile,
" node [ id %5d label \"%s\"\n", pObj->
Id,
Abc_ObjName(pObj) );
81 fprintf( pFile,
" graphics [ type \"triangle\" fill \"#00FFFF\" ]\n" );
82 fprintf( pFile,
" ]\n" );
85 fprintf( pFile,
"\n" );
88 fprintf( pFile,
" node [ id %5d label \"%s\"\n", pObj->
Id,
Abc_ObjName(pObj) );
89 fprintf( pFile,
" graphics [ type \"triangle\" fill \"#00FF00\" ]\n" );
90 fprintf( pFile,
" ]\n" );
93 fprintf( pFile,
"\n" );
96 fprintf( pFile,
" node [ id %5d label \"%s\"\n", pObj->
Id,
Abc_ObjName(pObj) );
97 fprintf( pFile,
" graphics [ type \"rectangle\" fill \"#FF0000\" ]\n" );
98 fprintf( pFile,
" ]\n" );
101 fprintf( pFile,
"\n" );
104 fprintf( pFile,
" node [ id %5d label \"%s\"\n", pObj->
Id,
Abc_ObjName(pObj) );
105 fprintf( pFile,
" graphics [ type \"ellipse\" fill \"#CCCCFF\" ]\n" );
106 fprintf( pFile,
" ]\n" );
110 fprintf( pFile,
"\n" );
115 fprintf( pFile,
" edge [ source %5d target %5d\n", pObj->
Id, pFanin->
Id );
116 fprintf( pFile,
" graphics [ type \"line\" arrow \"first\" ]\n" );
117 fprintf( pFile,
" ]\n" );
121 fprintf( pFile,
"]\n" );
122 fprintf( pFile,
"\n" );
struct Abc_Obj_t_ Abc_Obj_t
#define Abc_NtkForEachPo(pNtk, pPo, i)
#define Abc_NtkForEachLatch(pNtk, pObj, i)
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
#define Abc_ObjForEachFanin(pObj, pFanin, i)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
struct Abc_Ntk_t_ Abc_Ntk_t
#define Abc_NtkForEachPi(pNtk, pPi, i)
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachNode(pNtk, pNode, i)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
ABC_NAMESPACE_IMPL_START void Io_WriteGml(Abc_Ntk_t *pNtk, char *pFileName)
DECLARATIONS ///.