summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abcHaig.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2007-04-08 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2007-04-08 08:01:00 -0700
commitc09d4d499cee70f02e3e9a18226554b8d1d34488 (patch)
tree89ac20b1029dc8407f655224f6ef2b5f431fa453 /src/base/abci/abcHaig.c
parent94112fd22fc6f09ccc488cfc577d43aebeff9c5f (diff)
downloadabc-c09d4d499cee70f02e3e9a18226554b8d1d34488.tar.gz
abc-c09d4d499cee70f02e3e9a18226554b8d1d34488.tar.bz2
abc-c09d4d499cee70f02e3e9a18226554b8d1d34488.zip
Version abc70408
Diffstat (limited to 'src/base/abci/abcHaig.c')
-rw-r--r--src/base/abci/abcHaig.c39
1 files changed, 30 insertions, 9 deletions
diff --git a/src/base/abci/abcHaig.c b/src/base/abci/abcHaig.c
index a0ed5906..d3513bbe 100644
--- a/src/base/abci/abcHaig.c
+++ b/src/base/abci/abcHaig.c
@@ -364,7 +364,7 @@ Hop_Man_t * Abc_NtkHaigReconstruct( Hop_Man_t * p )
if ( pObj->pData ) // member of the class
Hop_Regular(pObj->pNext)->pData = Hop_Regular(((Hop_Obj_t *)pObj->pData)->pNext);
}
- printf( " Counter = %d.\n", Counter );
+// printf( " Counter = %d.\n", Counter );
// transfer the POs
Hop_ManForEachPo( p, pObj, i )
Hop_ObjCreatePo( pNew, Hop_ObjChild0Hop(pObj) );
@@ -681,15 +681,7 @@ Abc_Ntk_t * Abc_NtkHaigUse( Abc_Ntk_t * pNtk )
pMan = Abc_NtkHaigReconstruct( pManTemp = pMan );
Hop_ManStop( pManTemp );
}
-/*
- pMan = Abc_NtkHaigReconstruct( pManTemp = pMan );
- Hop_ManStop( pManTemp );
- Abc_NtkHaigResetReprs( pMan );
- pMan = Abc_NtkHaigReconstruct( pManTemp = pMan );
- Hop_ManStop( pManTemp );
- Abc_NtkHaigResetReprs( pMan );
-*/
// traverse in the topological order and create new AIG
pNtkAig = Abc_NtkHaigRecreateAig( pNtk, pMan );
Hop_ManStop( pMan );
@@ -698,6 +690,35 @@ Abc_Ntk_t * Abc_NtkHaigUse( Abc_Ntk_t * pNtk )
return pNtkAig;
}
+/**Function*************************************************************
+
+ Synopsis [Transform HOP manager into the one without loops.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+Abc_Ntk_t * Abc_NtkHopRemoveLoops( Abc_Ntk_t * pNtk, Hop_Man_t * pMan )
+{
+ Abc_Ntk_t * pNtkAig;
+ Hop_Man_t * pManTemp;
+
+ // iteratively reconstruct the HOP manager to create choice nodes
+ while ( Abc_NtkHaigResetReprs( pMan ) )
+ {
+ pMan = Abc_NtkHaigReconstruct( pManTemp = pMan );
+ Hop_ManStop( pManTemp );
+ }
+
+ // traverse in the topological order and create new AIG
+ pNtkAig = Abc_NtkHaigRecreateAig( pNtk, pMan );
+ Hop_ManStop( pMan );
+ return pNtkAig;
+}
+
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////