diff options
author | Ruben Undheim <ruben.undheim@gmail.com> | 2018-08-04 13:06:52 +0000 |
---|---|---|
committer | Ruben Undheim <ruben.undheim@gmail.com> | 2018-08-04 13:06:52 +0000 |
commit | bfa5c2f2e843651f29c8c0da0fa1113c99cfc469 (patch) | |
tree | 456681a68120a1335b6914082af3b8751d3ef715 /src/base/abc/abcFanio.c | |
parent | 53ac3bc10b50517e1677fb89182cb64914099e7a (diff) |
New upstream version 1.01+20180801git3fb3c6b+dfsg
Diffstat (limited to 'src/base/abc/abcFanio.c')
-rw-r--r-- | src/base/abc/abcFanio.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/base/abc/abcFanio.c b/src/base/abc/abcFanio.c index 0ac36a4..caa57a4 100644 --- a/src/base/abc/abcFanio.c +++ b/src/base/abc/abcFanio.c @@ -86,14 +86,14 @@ void Abc_ObjAddFanin( Abc_Obj_t * pObj, Abc_Obj_t * pFanin ) Abc_Obj_t * pFaninR = Abc_ObjRegular(pFanin); assert( !Abc_ObjIsComplement(pObj) ); assert( pObj->pNtk == pFaninR->pNtk ); - assert( pObj->Id >= 0 && pFaninR->Id >= 0 );
- assert( !Abc_ObjIsPi(pObj) && !Abc_ObjIsPo(pFaninR) ); // fanin of PI or fanout of PO
- assert( !Abc_ObjIsCo(pObj) || !Abc_ObjFaninNum(pObj) ); // CO with two fanins
- assert( !Abc_ObjIsNet(pObj) || !Abc_ObjFaninNum(pObj) ); // net with two fanins
+ assert( pObj->Id >= 0 && pFaninR->Id >= 0 ); + assert( !Abc_ObjIsPi(pObj) && !Abc_ObjIsPo(pFaninR) ); // fanin of PI or fanout of PO + assert( !Abc_ObjIsCo(pObj) || !Abc_ObjFaninNum(pObj) ); // CO with two fanins + assert( !Abc_ObjIsNet(pObj) || !Abc_ObjFaninNum(pObj) ); // net with two fanins Vec_IntPushMem( pObj->pNtk->pMmStep, &pObj->vFanins, pFaninR->Id ); Vec_IntPushMem( pObj->pNtk->pMmStep, &pFaninR->vFanouts, pObj->Id ); if ( Abc_ObjIsComplement(pFanin) ) - Abc_ObjSetFaninC( pObj, Abc_ObjFaninNum(pObj)-1 );
+ Abc_ObjSetFaninC( pObj, Abc_ObjFaninNum(pObj)-1 ); } @@ -208,34 +208,34 @@ void Abc_ObjPatchFanin( Abc_Obj_t * pObj, Abc_Obj_t * pFaninOld, Abc_Obj_t * pFa } Vec_IntPushMem( pObj->pNtk->pMmStep, &pFaninNewR->vFanouts, pObj->Id ); } -
-/**Function*************************************************************
-
- Synopsis [Replaces pObj by iObjNew in the fanin arrays of the fanouts.]
-
- Description []
-
- SideEffects []
-
- SeeAlso []
-
-***********************************************************************/
-void Abc_ObjPatchFanoutFanin( Abc_Obj_t * pObj, int iObjNew )
-{
- Abc_Obj_t * pFanout;
- int i, k, Entry;
- // update fanouts of the node to point to this one
- Abc_ObjForEachFanout( pObj, pFanout, i )
- {
- Vec_IntForEachEntry( &pFanout->vFanins, Entry, k )
- if ( Entry == (int)Abc_ObjId(pObj) )
- {
- Vec_IntWriteEntry( &pFanout->vFanins, k, iObjNew );
- break;
- }
- assert( k < Vec_IntSize(&pFanout->vFanins) );
- }
-}
+ +/**Function************************************************************* + + Synopsis [Replaces pObj by iObjNew in the fanin arrays of the fanouts.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Abc_ObjPatchFanoutFanin( Abc_Obj_t * pObj, int iObjNew ) +{ + Abc_Obj_t * pFanout; + int i, k, Entry; + // update fanouts of the node to point to this one + Abc_ObjForEachFanout( pObj, pFanout, i ) + { + Vec_IntForEachEntry( &pFanout->vFanins, Entry, k ) + if ( Entry == (int)Abc_ObjId(pObj) ) + { + Vec_IntWriteEntry( &pFanout->vFanins, k, iObjNew ); + break; + } + assert( k < Vec_IntSize(&pFanout->vFanins) ); + } +} /**Function************************************************************* |