summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaDup.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2011-10-19 15:42:55 +0700
committerAlan Mishchenko <alanmi@berkeley.edu>2011-10-19 15:42:55 +0700
commit397bebf8a55da132304a941968b3c32df8939e6f (patch)
tree9784d00524ebe6268e82ee366dcd3b197f572bd1 /src/aig/gia/giaDup.c
parentefd310af3ec011afb968a9195f31cc3cb4e1c59a (diff)
downloadabc-397bebf8a55da132304a941968b3c32df8939e6f.tar.gz
abc-397bebf8a55da132304a941968b3c32df8939e6f.tar.bz2
abc-397bebf8a55da132304a941968b3c32df8939e6f.zip
New abstraction code.
Diffstat (limited to 'src/aig/gia/giaDup.c')
-rw-r--r--src/aig/gia/giaDup.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c
index b879cb05..974f39d0 100644
--- a/src/aig/gia/giaDup.c
+++ b/src/aig/gia/giaDup.c
@@ -1584,6 +1584,27 @@ Gia_Man_t * Gia_ManDupAbsFlops( Gia_Man_t * p, Vec_Int_t * vFlopClasses )
/**Function*************************************************************
+ Synopsis [Duplicates the AIG manager recursively.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Gia_ManDupAbsGates_rec( Gia_Man_t * pNew, Gia_Obj_t * pObj )
+{
+ if ( ~pObj->Value )
+ return;
+ assert( Gia_ObjIsAnd(pObj) );
+ Gia_ManDupAbsGates_rec( pNew, Gia_ObjFanin0(pObj) );
+ Gia_ManDupAbsGates_rec( pNew, Gia_ObjFanin1(pObj) );
+ pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
+}
+
+/**Function*************************************************************
+
Synopsis [Performs abstraction of the AIG to preserve the included gates.]
Description [The array contains 1 for those objects (const, RO, AND)
@@ -1642,6 +1663,7 @@ Gia_Man_t * Gia_ManDupAbsGates( Gia_Man_t * p, Vec_Int_t * vGateClasses )
// create internal nodes
Gia_ManForEachObjVec( vNodes, p, pObj, i )
pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
+// Gia_ManDupAbsGates_rec( pNew, pObj );
// create PO
Gia_ManForEachPo( p, pObj, i )
pObj->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );