summaryrefslogtreecommitdiff
path: root/src/base/abc/abcFanio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/abc/abcFanio.c')
-rw-r--r--src/base/abc/abcFanio.c66
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*************************************************************