From 0cad45fa900133942fedc7ea22bc4802e57d9ca0 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 27 May 2013 09:49:13 -0700 Subject: New MFS package. --- src/base/abci/abcMfs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/base') diff --git a/src/base/abci/abcMfs.c b/src/base/abci/abcMfs.c index 2371e49a..76dfb162 100644 --- a/src/base/abci/abcMfs.c +++ b/src/base/abci/abcMfs.c @@ -126,10 +126,13 @@ Sfm_Ntk_t * Abc_NtkExtractMfs( Abc_Ntk_t * pNtk, int nFirstFixed ) Vec_IntPush( vArray, pFanin->iTemp ); } Vec_PtrFree( vNodes ); - // update fixed - assert( nFirstFixed >= 0 && nFirstFixed < Abc_NtkNodeNum(pNtk) ); for ( i = Abc_NtkCiNum(pNtk); i < Abc_NtkCiNum(pNtk) + nFirstFixed; i++ ) Vec_StrWriteEntry( vFixed, i, (char)1 ); + // update fixed + assert( nFirstFixed >= 0 && nFirstFixed < Abc_NtkNodeNum(pNtk) ); +// for ( i = Abc_NtkCiNum(pNtk); i + Abc_NtkCoNum(pNtk) < Abc_NtkObjNum(pNtk); i++ ) +// if ( rand() % 10 == 0 ) +// Vec_StrWriteEntry( vFixed, i, (char)1 ); return Sfm_NtkConstruct( vFanins, Abc_NtkCiNum(pNtk), Abc_NtkCoNum(pNtk), vFixed, vTruths ); } @@ -159,7 +162,8 @@ void Abc_NtkInsertMfs( Abc_Ntk_t * pNtk, Sfm_Ntk_t * p ) Vec_IntWriteEntry( vMap, pNode->iTemp, Abc_ObjId(pNode) ); // remove old fanins Abc_NtkForEachNode( pNtk, pNode, i ) - Abc_ObjRemoveFanins( pNode ); + if ( !Sfm_NodeReadFixed(p, pNode->iTemp) ) + Abc_ObjRemoveFanins( pNode ); // create new fanins vCover = Vec_IntAlloc( 1 << 16 ); Abc_NtkForEachNode( pNtk, pNode, i ) -- cgit v1.2.3