summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abcSweep.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2006-08-24 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2006-08-24 08:01:00 -0700
commit735bca1658f92881e12a616f9bdc6a58d0a4c60b (patch)
treebf38d65e91be84e4086b585c489411876750f041 /src/base/abci/abcSweep.c
parent7b09d2d28aa81916f9c06f0993f2569a7ad18596 (diff)
downloadabc-735bca1658f92881e12a616f9bdc6a58d0a4c60b.tar.gz
abc-735bca1658f92881e12a616f9bdc6a58d0a4c60b.tar.bz2
abc-735bca1658f92881e12a616f9bdc6a58d0a4c60b.zip
Version abc60824
Diffstat (limited to 'src/base/abci/abcSweep.c')
-rw-r--r--src/base/abci/abcSweep.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/base/abci/abcSweep.c b/src/base/abci/abcSweep.c
index 8f1ab180..7c6df88a 100644
--- a/src/base/abci/abcSweep.c
+++ b/src/base/abci/abcSweep.c
@@ -59,11 +59,31 @@ bool Abc_NtkFraigSweep( Abc_Ntk_t * pNtk, int fUseInv, int fExdc, int fVerbose )
Abc_Ntk_t * pNtkAig;
Fraig_Man_t * pMan;
stmm_table * tEquiv;
+ Abc_Obj_t * pObj;
+ int i, fUseTrick;
assert( !Abc_NtkIsStrash(pNtk) );
+ // save gate assignments
+ fUseTrick = 0;
+ if ( Abc_NtkIsMappedLogic(pNtk) )
+ {
+ fUseTrick = 1;
+ Abc_NtkForEachNode( pNtk, pObj, i )
+ pObj->pNext = pObj->pData;
+ }
// derive the AIG
pNtkAig = Abc_NtkStrash( pNtk, 0, 1 );
+ // reconstruct gate assignments
+ if ( fUseTrick )
+ {
+ extern void * Abc_FrameReadLibGen();
+ Aig_ManStop( pNtk->pManFunc );
+ pNtk->pManFunc = Abc_FrameReadLibGen();
+ pNtk->ntkFunc = ABC_FUNC_MAP;
+ Abc_NtkForEachNode( pNtk, pObj, i )
+ pObj->pData = pObj->pNext, pObj->pNext = NULL;
+ }
// perform fraiging of the AIG
Fraig_ParamsSetDefault( &Params );
@@ -176,8 +196,8 @@ stmm_table * Abc_NtkFraigEquiv( Abc_Ntk_t * pNtk, int fUseInv, bool fVerbose )
// skip the dangling nodes
if ( pNodeAig == NULL )
continue;
- // skip the nodes that fanout into POs
- if ( Abc_NodeHasUniqueCoFanout(pNode) )
+ // skip the nodes that fanout into COs
+ if ( Abc_NodeHasCoFanout(pNode) )
continue;
// get the FRAIG node
gNode = Fraig_NotCond( Abc_ObjRegular(pNodeAig)->pCopy, Abc_ObjIsComplement(pNodeAig) );