summaryrefslogtreecommitdiffstats
path: root/src/base/io
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-03-28 15:32:29 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-03-28 15:32:29 -0700
commit4745eac3248a80d42789919f6a9271a3e5a7b807 (patch)
tree2ab4912d604529b3a75aff24557cba426ec2d8f6 /src/base/io
parentc0f688349d1c23d329a4c4d0bc7bf77d55c329e1 (diff)
downloadabc-4745eac3248a80d42789919f6a9271a3e5a7b807.tar.gz
abc-4745eac3248a80d42789919f6a9271a3e5a7b807.tar.bz2
abc-4745eac3248a80d42789919f6a9271a3e5a7b807.zip
Improving network visualization in show/&show.
Diffstat (limited to 'src/base/io')
-rw-r--r--src/base/io/ioWriteDot.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/base/io/ioWriteDot.c b/src/base/io/ioWriteDot.c
index 1110e70e..24f3da63 100644
--- a/src/base/io/ioWriteDot.c
+++ b/src/base/io/ioWriteDot.c
@@ -73,7 +73,7 @@ void Io_WriteDotNtk( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
FILE * pFile;
Abc_Obj_t * pNode, * pFanin;
char * pSopString;
- int LevelMin, LevelMax, fHasCos, Level, i, k, fHasBdds, fCompl;
+ int LevelMin, LevelMax, fHasCos, Level, i, k, fHasBdds, fCompl, Prev;
int Limit = 300;
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
continue;
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
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
FILE * pFile;
Abc_Obj_t * pNode, * pFanin;
char * pSopString;
- int LevelMin, LevelMax, fHasCos, Level, i, k, fHasBdds, fCompl;
+ int LevelMin, LevelMax, fHasCos, Level, i, k, fHasBdds, fCompl, Prev;
int Limit = 300;
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
continue;
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
Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i )