DECLARATIONS ///.
Date [Ver. 1.0. Started - June 20, 2005.]
] FUNCTION DEFINITIONS /// Function*************************************************************
47{
48 FILE * pFile;
50 int i, k;
51
52 assert( Abc_NtkIsStrash(pNtk) || Abc_NtkIsLogic(pNtk) );
53
54
55 pFile = fopen( pFileName, "w" );
56 if ( pFile == NULL )
57 {
58 fprintf( stdout, "Io_WriteGml(): Cannot open the output file \"%s\".\n", pFileName );
59 return;
60 }
62 fprintf( pFile, "graph [\n" );
63
64
65 if ( Abc_NtkIsStrash(pNtk) )
66 {
68 if ( Abc_ObjFanoutNum(pObj) > 0 )
69 {
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" );
74 }
75 }
76
77 fprintf( pFile, "\n" );
79 {
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" );
83 }
84
85 fprintf( pFile, "\n" );
87 {
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" );
91 }
92
93 fprintf( pFile, "\n" );
95 {
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" );
99 }
100
101 fprintf( pFile, "\n" );
103 {
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" );
107 }
108
109
110 fprintf( pFile, "\n" );
112 {
114 {
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" );
118 }
119 }
120
121 fprintf( pFile, "]\n" );
122 fprintf( pFile, "\n" );
123 fclose( pFile );
124}
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 ///.
#define Abc_NtkForEachPi(pNtk, pPi, i)
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachNode(pNtk, pNode, i)