summaryrefslogtreecommitdiffstats
path: root/src/base/io/ioWriteDot.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2006-11-11 08:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2006-11-11 08:01:00 -0800
commitda5e0785dfb98335bd49a13bf9e86e736fb931be (patch)
tree3e88084f64093c8394fddf2d96b522a4df183981 /src/base/io/ioWriteDot.c
parentfaf1265bb82f934cc14b6106ccce89e37203efbd (diff)
downloadabc-da5e0785dfb98335bd49a13bf9e86e736fb931be.tar.gz
abc-da5e0785dfb98335bd49a13bf9e86e736fb931be.tar.bz2
abc-da5e0785dfb98335bd49a13bf9e86e736fb931be.zip
Version abc61111
Diffstat (limited to 'src/base/io/ioWriteDot.c')
-rw-r--r--src/base/io/ioWriteDot.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/base/io/ioWriteDot.c b/src/base/io/ioWriteDot.c
index 05539c40..3cc3fcfe 100644
--- a/src/base/io/ioWriteDot.c
+++ b/src/base/io/ioWriteDot.c
@@ -19,7 +19,9 @@
***********************************************************************/
#include "io.h"
-#include "seqInt.h"
+#include "main.h"
+#include "mio.h"
+//#include "seqInt.h"
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
@@ -292,6 +294,10 @@ void Io_WriteDotAig( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
{
if ( Abc_ObjFaninNum(pNode) == 0 )
continue;
+
+ if ( Abc_ObjIsBo(pNode) )
+ continue;
+
if ( fMulti && Abc_ObjIsNode(pNode) )
{
Vec_Ptr_t * vSuper;
@@ -305,6 +311,10 @@ void Io_WriteDotAig( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
pFanin = Abc_ObjRegular(pFanin);
if ( !pFanin->fMarkC )
continue;
+
+ if ( Abc_ObjIsBi(pFanin) )
+ continue;
+
fprintf( pFile, "Node%d", pNode->Id );
fprintf( pFile, " -> " );
fprintf( pFile, "Node%d%s", pFanin->Id, (Abc_ObjIsLatch(pFanin)? "_out":"") );
@@ -316,7 +326,7 @@ void Io_WriteDotAig( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
continue;
}
// generate the edge from this node to the next
- if ( Abc_ObjFanin0(pNode)->fMarkC )
+ if ( Abc_ObjFanin0(pNode)->fMarkC && !Abc_ObjIsBi(Abc_ObjFanin0(pNode)) )
{
fprintf( pFile, "Node%d%s", pNode->Id, (Abc_ObjIsLatch(pNode)? "_in":"") );
fprintf( pFile, " -> " );
@@ -331,7 +341,7 @@ void Io_WriteDotAig( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
if ( Abc_ObjFaninNum(pNode) == 1 )
continue;
// generate the edge from this node to the next
- if ( Abc_ObjFanin1(pNode)->fMarkC )
+ if ( Abc_ObjFanin1(pNode)->fMarkC && !Abc_ObjIsBi(Abc_ObjFanin1(pNode)) )
{
fprintf( pFile, "Node%d", pNode->Id );
fprintf( pFile, " -> " );
@@ -392,7 +402,7 @@ void Io_WriteDotNtk( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
int LevelMin, LevelMax, fHasCos, Level, i, k, fHasBdds;
int Limit = 300;
- assert( !Abc_NtkHasAig(pNtk) );
+ assert( !Abc_NtkIsStrash(pNtk) );
if ( vNodes->nSize < 1 )
{
@@ -606,7 +616,7 @@ void Io_WriteDotNtk( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
fprintf( pFile, " rank = same;\n" );
// the labeling node of this level
fprintf( pFile, " Level%d;\n", LevelMin );
- // generat the PO nodes
+ // generate the PO nodes
Vec_PtrForEachEntry( vNodes, pNode, i )
{
if ( !Abc_ObjIsCi(pNode) )
@@ -653,6 +663,11 @@ void Io_WriteDotNtk( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
{
if ( !Abc_ObjFanin0(pNode)->fMarkC )
continue;
+
+ // added to fix the bug after adding boxes
+ if ( Abc_ObjIsBo(pNode) || Abc_ObjIsBi(pFanin) )
+ continue;
+
// generate the edge from this node to the next
fprintf( pFile, "Node%d%s", pNode->Id, (Abc_ObjIsLatch(pNode)? "_in":"") );
fprintf( pFile, " -> " );