summaryrefslogtreecommitdiffstats
path: root/src/aig/hop
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2007-04-06 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2007-04-06 08:01:00 -0700
commit00dc0f3daab81e3a30b7fae3ec4f2c191fce114c (patch)
tree0db78ea60c485e8bc52886031edc9ab2a9dce2f6 /src/aig/hop
parent028138a76eb74eee80f1d9592f43bdbe0d4c3d6c (diff)
downloadabc-00dc0f3daab81e3a30b7fae3ec4f2c191fce114c.tar.gz
abc-00dc0f3daab81e3a30b7fae3ec4f2c191fce114c.tar.bz2
abc-00dc0f3daab81e3a30b7fae3ec4f2c191fce114c.zip
Version abc70406
Diffstat (limited to 'src/aig/hop')
-rw-r--r--src/aig/hop/hop.h1
-rw-r--r--src/aig/hop/hopUtil.c25
2 files changed, 25 insertions, 1 deletions
diff --git a/src/aig/hop/hop.h b/src/aig/hop/hop.h
index 44f5ac8e..8413fb02 100644
--- a/src/aig/hop/hop.h
+++ b/src/aig/hop/hop.h
@@ -314,6 +314,7 @@ extern void Hop_TableProfile( Hop_Man_t * p );
/*=== aigUtil.c =========================================================*/
extern void Hop_ManIncrementTravId( Hop_Man_t * p );
extern void Hop_ManCleanData( Hop_Man_t * p );
+extern void Hop_ObjCleanData_rec( Hop_Obj_t * pObj );
extern void Hop_ObjCollectMulti( Hop_Obj_t * pFunc, Vec_Ptr_t * vSuper );
extern int Hop_ObjIsMuxType( Hop_Obj_t * pObj );
extern int Hop_ObjRecognizeExor( Hop_Obj_t * pObj, Hop_Obj_t ** ppFan0, Hop_Obj_t ** ppFan1 );
diff --git a/src/aig/hop/hopUtil.c b/src/aig/hop/hopUtil.c
index 9b5bf686..34f689f6 100644
--- a/src/aig/hop/hopUtil.c
+++ b/src/aig/hop/hopUtil.c
@@ -48,7 +48,7 @@ void Hop_ManIncrementTravId( Hop_Man_t * p )
/**Function*************************************************************
- Synopsis [Sets the DFS ordering of the nodes.]
+ Synopsis [Cleans the data pointers for the nodes.]
Description []
@@ -73,6 +73,29 @@ void Hop_ManCleanData( Hop_Man_t * p )
/**Function*************************************************************
+ Synopsis [Recursively cleans the data pointers in the cone of the node.]
+
+ Description [Applicable to small AIGs only because no caching is performed.]
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Hop_ObjCleanData_rec( Hop_Obj_t * pObj )
+{
+ assert( !Hop_IsComplement(pObj) );
+ assert( !Hop_ObjIsPo(pObj) );
+ if ( Hop_ObjIsAnd(pObj) )
+ {
+ Hop_ObjCleanData_rec( Hop_ObjFanin0(pObj) );
+ Hop_ObjCleanData_rec( Hop_ObjFanin1(pObj) );
+ }
+ pObj->pData = NULL;
+}
+
+/**Function*************************************************************
+
Synopsis [Detects multi-input gate rooted at this node.]
Description []