Commit 4745eac3 by Alan Mishchenko

Improving network visualization in show/&show.

parent c0f68834
...@@ -47,7 +47,7 @@ void Aig_WriteDotAig( Aig_Man_t * pMan, char * pFileName, int fHaig, Vec_Ptr_t * ...@@ -47,7 +47,7 @@ void Aig_WriteDotAig( Aig_Man_t * pMan, char * pFileName, int fHaig, Vec_Ptr_t *
{ {
FILE * pFile; FILE * pFile;
Aig_Obj_t * pNode;//, * pTemp, * pPrev; Aig_Obj_t * pNode;//, * pTemp, * pPrev;
int LevelMax, Level, i; int LevelMax, Prev, Level, i;
if ( Aig_ManNodeNum(pMan) > 200 ) if ( Aig_ManNodeNum(pMan) > 200 )
{ {
...@@ -252,6 +252,14 @@ void Aig_WriteDotAig( Aig_Man_t * pMan, char * pFileName, int fHaig, Vec_Ptr_t * ...@@ -252,6 +252,14 @@ void Aig_WriteDotAig( Aig_Man_t * pMan, char * pFileName, int fHaig, Vec_Ptr_t *
fprintf( pFile, "title1 -> title2 [style = invis];\n" ); fprintf( pFile, "title1 -> title2 [style = invis];\n" );
Aig_ManForEachCo( pMan, pNode, i ) Aig_ManForEachCo( pMan, pNode, i )
fprintf( pFile, "title2 -> Node%d [style = invis];\n", pNode->Id ); fprintf( pFile, "title2 -> Node%d [style = invis];\n", pNode->Id );
// generate invisible edges among the COs
Prev = -1;
Aig_ManForEachCo( pMan, pNode, i )
{
if ( i > 0 )
fprintf( pFile, "Node%d -> Node%d [style = invis];\n", Prev, pNode->Id );
Prev = pNode->Id;
}
// generate edges // generate edges
Aig_ManForEachObj( pMan, pNode, i ) Aig_ManForEachObj( pMan, pNode, i )
......
...@@ -73,7 +73,7 @@ void Io_WriteDotNtk( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho ...@@ -73,7 +73,7 @@ void Io_WriteDotNtk( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
FILE * pFile; FILE * pFile;
Abc_Obj_t * pNode, * pFanin; Abc_Obj_t * pNode, * pFanin;
char * pSopString; char * pSopString;
int LevelMin, LevelMax, fHasCos, Level, i, k, fHasBdds, fCompl; int LevelMin, LevelMax, fHasCos, Level, i, k, fHasBdds, fCompl, Prev;
int Limit = 300; int Limit = 300;
assert( Abc_NtkIsStrash(pNtk) || Abc_NtkIsLogic(pNtk) ); assert( Abc_NtkIsStrash(pNtk) || Abc_NtkIsLogic(pNtk) );
...@@ -365,6 +365,18 @@ void Io_WriteDotNtk( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho ...@@ -365,6 +365,18 @@ void Io_WriteDotNtk( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
continue; continue;
fprintf( pFile, "title2 -> Node%d [style = invis];\n", pNode->Id ); fprintf( pFile, "title2 -> Node%d [style = invis];\n", pNode->Id );
} }
// generate invisible edges among the COs
Prev = -1;
Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i )
{
if ( (int)pNode->Level != LevelMax )
continue;
if ( !Abc_ObjIsPo(pNode) )
continue;
if ( Prev >= 0 )
fprintf( pFile, "Node%d -> Node%d [style = invis];\n", Prev, pNode->Id );
Prev = pNode->Id;
}
// generate edges // generate edges
Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i ) Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i )
...@@ -424,7 +436,7 @@ void Io_WriteDotSeq( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho ...@@ -424,7 +436,7 @@ void Io_WriteDotSeq( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
FILE * pFile; FILE * pFile;
Abc_Obj_t * pNode, * pFanin; Abc_Obj_t * pNode, * pFanin;
char * pSopString; char * pSopString;
int LevelMin, LevelMax, fHasCos, Level, i, k, fHasBdds, fCompl; int LevelMin, LevelMax, fHasCos, Level, i, k, fHasBdds, fCompl, Prev;
int Limit = 300; int Limit = 300;
assert( Abc_NtkIsStrash(pNtk) || Abc_NtkIsLogic(pNtk) ); assert( Abc_NtkIsStrash(pNtk) || Abc_NtkIsLogic(pNtk) );
...@@ -713,6 +725,18 @@ void Io_WriteDotSeq( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho ...@@ -713,6 +725,18 @@ void Io_WriteDotSeq( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
continue; continue;
fprintf( pFile, "title2 -> Node%d [style = invis];\n", pNode->Id ); fprintf( pFile, "title2 -> Node%d [style = invis];\n", pNode->Id );
} }
// generate invisible edges among the COs
Prev = -1;
Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i )
{
if ( (int)pNode->Level != LevelMax )
continue;
if ( !Abc_ObjIsPo(pNode) )
continue;
if ( Prev >= 0 )
fprintf( pFile, "Node%d -> Node%d [style = invis];\n", Prev, pNode->Id );
Prev = pNode->Id;
}
// generate edges // generate edges
Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i ) Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment