62 char FileNameDot[200];
69 if ( (pFile = fopen( FileNameDot,
"w" )) == NULL )
71 fprintf( stdout,
"Cannot open the intermediate file \"%s\".\n", FileNameDot );
100 char * FileNameDot =
"temp.dot";
102 if ( (pFile = fopen( FileNameDot,
"w" )) == NULL )
104 fprintf( stdout,
"Cannot open the intermediate file \"%s\".\n", FileNameDot );
125 char FileNameDot[200];
155 if ( (pFile = fopen( FileNameDot,
"w" )) == NULL )
157 fprintf( stdout,
"Cannot open the intermediate file \"%s\".\n", FileNameDot );
189 char FileNameDot[200];
195 printf(
"Temporarily visualization of AIGs with choice nodes is disabled.\n" );
201 if ( (pFile = fopen( FileNameDot,
"w" )) == NULL )
203 fprintf( stdout,
"Cannot open the intermediate file \"%s\".\n", FileNameDot );
222 Io_WriteDotSeq( pNtk, vNodes, NULL, FileNameDot, fGateNames, fUseReverse );
224 Io_WriteDotNtk( pNtk, vNodes, NULL, FileNameDot, fGateNames, fUseReverse );
249 char FileNamePs[200];
250 char CommandDot[1000];
252 char * pDotNameWin =
"dot.exe";
253 char * pDotNameUnix =
"dot";
254 char * pGsNameWin =
"gsview32.exe";
255 char * pGsNameUnix =
"gv";
265 pDotName = pDotNameWin;
267 pDotName = pDotNameUnix;
271 if ( (pFile = fopen( FileNameDot,
"r" )) == NULL )
273 fprintf( stdout,
"Cannot open the intermediate file \"%s\".\n", FileNameDot );
280 sprintf( FileNamePs,
"%s.ps", FileGeneric );
284 sprintf( CommandDot,
"%s -Tps -o %s %s", pDotName, FileNamePs, FileNameDot );
285 RetValue =
system( CommandDot );
286 if ( RetValue == -1 )
288 fprintf( stdout,
"Command \"%s\" did not succeed.\n", CommandDot );
292 if ( (pFile = fopen( FileNamePs,
"r" )) == NULL )
294 fprintf( stdout,
"Cannot open intermediate file \"%s\".\n", FileNamePs );
308 _unlink( FileNameDot );
309 if ( _spawnl( _P_NOWAIT, pGsNameWin, pGsNameWin, FileNamePs, NULL ) == -1 )
310 if ( _spawnl( _P_NOWAIT,
"C:\\Program Files\\Ghostgum\\gsview\\gsview32.exe",
311 "C:\\Program Files\\Ghostgum\\gsview\\gsview32.exe", FileNamePs, NULL ) == -1 )
312 if ( _spawnl( _P_NOWAIT,
"C:\\Program Files\\Ghostgum\\gsview\\gsview64.exe",
313 "C:\\Program Files\\Ghostgum\\gsview\\gsview64.exe", FileNamePs, NULL ) == -1 )
315 fprintf( stdout,
"Cannot find \"%s\".\n", pGsNameWin );
320 char CommandPs[1000];
321 unlink( FileNameDot );
322 sprintf( CommandPs,
"%s %s &", pGsNameUnix, FileNamePs );
323 if (
system( CommandPs ) == -1 )
325 fprintf( stdout,
"Cannot execute \"%s\".\n", CommandPs );
347 sprintf( pBuffer,
"%s.dot", pName );
349 for ( pCur = pBuffer; *pCur; pCur++ )
350 if ( !((*pCur >=
'0' && *pCur <=
'9') || (*pCur >=
'a' && *pCur <=
'z') ||
351 (*pCur >=
'A' && *pCur <=
'Z') || (*pCur ==
'.')) )
373 pFile = fopen( pFileName,
"w" );
376 printf(
"Cannot open input file %s.\n", pFileName );
380 fprintf( pFile,
"digraph G {\n" );
381 fprintf( pFile,
" graph [splines=true overlap=false];\n" );
382 fprintf( pFile,
" size = \"7.5,10\";\n" );
383 fprintf( pFile,
" center = true;\n" );
385 fprintf( pFile,
" edge [dir=forward];\n" );
394 fprintf( pFile,
" { rank = same; %d [label=\"%d(%d)\"]; }\n", i, i, Count );
402 fprintf( pFile,
" %4d -> %4d\n", pTemp->
iTemp, i );
405 fprintf( pFile,
"}\n" );
424 char FileNameDot[200];
429 if ( (pFile = fopen( FileNameDot,
"w" )) == NULL )
431 fprintf( stdout,
"Cannot open the intermediate file \"%s\".\n", FileNameDot );
void Abc_NtkShowFlopDependency(Abc_Ntk_t *pNtk)
static int Abc_NtkIsStrash(Abc_Ntk_t *pNtk)
static int Abc_NtkIsLogic(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
void Abc_NtkShow(Abc_Ntk_t *pNtk0, int fGateNames, int fSeq, int fUseReverse)
void Abc_NodeShowBddOne(DdManager *dd, DdNode *bFunc)
void Abc_NodeShowBdd(Abc_Obj_t *pNode)
FUNCTION DEFINITIONS ///.
static int Vec_PtrPushUnique(Vec_Ptr_t *p, void *Entry)
void Io_WriteDotSeq(Abc_Ntk_t *pNtk, Vec_Ptr_t *vNodes, Vec_Ptr_t *vNodesShow, char *pFileName, int fGateNames, int fUseReverse)
ABC_DLL Vec_Ptr_t * Abc_NtkManCutReadCutLarge(Abc_ManCut_t *p)
static int Abc_NtkHasMapping(Abc_Ntk_t *pNtk)
static int Abc_ObjIsPi(Abc_Obj_t *pObj)
ABC_DLL Abc_Ntk_t * Abc_NtkDup(Abc_Ntk_t *pNtk)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
ABC_DLL Vec_Ptr_t * Abc_NtkManCutReadVisited(Abc_ManCut_t *p)
ABC_DLL Vec_Ptr_t * Abc_NodeGetFaninNames(Abc_Obj_t *pNode)
ABC_DLL int Abc_NtkGetChoiceNum(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
ABC_DLL Vec_Ptr_t * Abc_NodeFindCut(Abc_ManCut_t *p, Abc_Obj_t *pRoot, int fContain)
ABC_DLL void Abc_NodeFreeNames(Vec_Ptr_t *vNames)
ABC_DLL int Abc_NtkToSop(Abc_Ntk_t *pNtk, int fDirect)
#define ABC_NAMESPACE_IMPL_END
ABC_DLL Vec_Ptr_t * Abc_NtkNodeSupport(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
ABC_NAMESPACE_IMPL_START void Abc_ShowFile(char *FileNameDot)
DECLARATIONS ///.
void Abc_NtkWriteFlopDependency(Abc_Ntk_t *pNtk, char *pFileName)
#define ABC_NAMESPACE_IMPL_START
ABC_DLL Vec_Ptr_t * Abc_NodeCollectTfoCands(Abc_ManCut_t *p, Abc_Obj_t *pRoot, Vec_Ptr_t *vFanins, int LevelMax)
static char * Abc_NtkName(Abc_Ntk_t *pNtk)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Abc_NtkIsBddLogic(Abc_Ntk_t *pNtk)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
void Abc_NodeShowCut(Abc_Obj_t *pNode, int nNodeSizeMax, int nConeSizeMax)
#define Abc_NtkForEachLatchInput(pNtk, pObj, i)
ABC_DLL Abc_ManCut_t * Abc_NtkManCutStart(int nNodeSizeMax, int nConeSizeMax, int nNodeFanStop, int nConeFanStop)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
ABC_DLL void Abc_NtkCleanCopy(Abc_Ntk_t *pNtk)
int Cudd_DumpDot(DdManager *dd, int n, DdNode **f, char **inames, char **onames, FILE *fp)
static void Abc_ShowGetFileName(char *pName, char *pBuffer)
ABC_DLL void Abc_NtkManCutStop(Abc_ManCut_t *p)
ABC_DLL char * Abc_FrameReadFlag(char *pFlag)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
void Io_WriteDotNtk(Abc_Ntk_t *pNtk, Vec_Ptr_t *vNodes, Vec_Ptr_t *vNodesShow, char *pFileName, int fGateNames, int fUseReverse)
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
ABC_DLL void Abc_NodeConeCollect(Abc_Obj_t **ppRoots, int nRoots, Vec_Ptr_t *vFanins, Vec_Ptr_t *vVisited, int fIncludeFanins)
static void Vec_PtrFree(Vec_Ptr_t *p)