diff options
Diffstat (limited to 'src/aig/hop')
-rw-r--r-- | src/aig/hop/cudd2.c | 5 | ||||
-rw-r--r-- | src/aig/hop/cudd2.h | 16 | ||||
-rw-r--r-- | src/aig/hop/hop.h | 28 | ||||
-rw-r--r-- | src/aig/hop/hopBalance.c | 43 | ||||
-rw-r--r-- | src/aig/hop/hopCheck.c | 5 | ||||
-rw-r--r-- | src/aig/hop/hopDfs.c | 15 | ||||
-rw-r--r-- | src/aig/hop/hopMan.c | 7 | ||||
-rw-r--r-- | src/aig/hop/hopMem.c | 7 | ||||
-rw-r--r-- | src/aig/hop/hopObj.c | 7 | ||||
-rw-r--r-- | src/aig/hop/hopOper.c | 7 | ||||
-rw-r--r-- | src/aig/hop/hopTable.c | 5 | ||||
-rw-r--r-- | src/aig/hop/hopTruth.c | 7 | ||||
-rw-r--r-- | src/aig/hop/hopUtil.c | 23 | ||||
-rw-r--r-- | src/aig/hop/hop_.c | 5 |
14 files changed, 124 insertions, 56 deletions
diff --git a/src/aig/hop/cudd2.c b/src/aig/hop/cudd2.c index 11842c39..3ad44e4c 100644 --- a/src/aig/hop/cudd2.c +++ b/src/aig/hop/cudd2.c @@ -21,6 +21,9 @@ #include "hop.h" #include "st.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -353,3 +356,5 @@ void Cudd2_bddEqual( void * pCudd, void * pArg0, void * pArg1, int Result ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/aig/hop/cudd2.h b/src/aig/hop/cudd2.h index 27359b3f..2382b22f 100644 --- a/src/aig/hop/cudd2.h +++ b/src/aig/hop/cudd2.h @@ -21,6 +21,7 @@ #ifndef __CUDD2_H__ #define __CUDD2_H__ + // HA: Added for printing messages #ifndef MSG #define MSG(msg) (printf("%s = \n",(msg))); @@ -34,9 +35,10 @@ /// PARAMETERS /// //////////////////////////////////////////////////////////////////////// -#ifdef __cplusplus -extern "C" { -#endif + + +ABC_NAMESPACE_HEADER_START + //////////////////////////////////////////////////////////////////////// /// BASIC TYPES /// @@ -70,9 +72,11 @@ extern void Cudd2_bddCompose( void * pCudd, void * pArg0, void * pArg1, int v, v extern void Cudd2_bddLeq ( void * pCudd, void * pArg0, void * pArg1, int Result ); extern void Cudd2_bddEqual ( void * pCudd, void * pArg0, void * pArg1, int Result ); -#ifdef __cplusplus -} -#endif + + +ABC_NAMESPACE_HEADER_END + + #endif diff --git a/src/aig/hop/hop.h b/src/aig/hop/hop.h index 15641250..a634f136 100644 --- a/src/aig/hop/hop.h +++ b/src/aig/hop/hop.h @@ -21,6 +21,7 @@ #ifndef __HOP_H__ #define __HOP_H__ + //////////////////////////////////////////////////////////////////////// /// INCLUDES /// //////////////////////////////////////////////////////////////////////// @@ -37,9 +38,10 @@ /// PARAMETERS /// //////////////////////////////////////////////////////////////////////// -#ifdef __cplusplus -extern "C" { -#endif + + +ABC_NAMESPACE_HEADER_START + //////////////////////////////////////////////////////////////////////// /// BASIC TYPES /// @@ -102,7 +104,7 @@ struct Hop_Man_t_ // memory management Vec_Ptr_t * vChunks; // allocated memory pieces Vec_Ptr_t * vPages; // memory pages used by nodes - Hop_Obj_t * pListFree; // the list of ABC_FREE nodes + Hop_Obj_t * pListFree; // the list of free nodes // timing statistics int time1; int time2; @@ -111,14 +113,15 @@ struct Hop_Man_t_ //////////////////////////////////////////////////////////////////////// /// MACRO DEFINITIONS /// //////////////////////////////////////////////////////////////////////// +extern void Hop_ManAddMemory( Hop_Man_t * p ); static inline int Hop_BitWordNum( int nBits ) { return (nBits>>5) + ((nBits&31) > 0); } static inline int Hop_TruthWordNum( int nVars ) { return nVars <= 5 ? 1 : (1 << (nVars - 5)); } static inline int Hop_InfoHasBit( unsigned * p, int i ) { return (p[(i)>>5] & (1<<((i) & 31))) > 0; } static inline void Hop_InfoSetBit( unsigned * p, int i ) { p[(i)>>5] |= (1<<((i) & 31)); } static inline void Hop_InfoXorBit( unsigned * p, int i ) { p[(i)>>5] ^= (1<<((i) & 31)); } -static inline int Hop_Base2Log( unsigned n ) { int r; assert( n >= 0 ); if ( n < 2 ) return n; for ( r = 0, n--; n; n >>= 1, r++ ); return r; } -static inline int Hop_Base10Log( unsigned n ) { int r; assert( n >= 0 ); if ( n < 2 ) return n; for ( r = 0, n--; n; n /= 10, r++ ); return r; } +static inline int Hop_Base2Log( unsigned n ) { int r; if ( n < 2 ) return n; for ( r = 0, n--; n; n >>= 1, r++ ); return r; } +static inline int Hop_Base10Log( unsigned n ) { int r; if ( n < 2 ) return n; for ( r = 0, n--; n; n /= 10, r++ ); return r; } static inline Hop_Obj_t * Hop_Regular( Hop_Obj_t * p ) { return (Hop_Obj_t *)((ABC_PTRUINT_T)(p) & ~01); } static inline Hop_Obj_t * Hop_Not( Hop_Obj_t * p ) { return (Hop_Obj_t *)((ABC_PTRUINT_T)(p) ^ 01); } @@ -224,7 +227,6 @@ static inline Hop_Obj_t * Hop_ObjCreateGhost( Hop_Man_t * p, Hop_Obj_t * p0, Ho // internal memory manager static inline Hop_Obj_t * Hop_ManFetchMemory( Hop_Man_t * p ) { - extern void Hop_ManAddMemory( Hop_Man_t * p ); Hop_Obj_t * pTemp; if ( p->pListFree == NULL ) Hop_ManAddMemory( p ); @@ -253,10 +255,10 @@ static inline void Hop_ManRecycleMemory( Hop_Man_t * p, Hop_Obj_t * pEntry ) // iterator over the primary inputs #define Hop_ManForEachPi( p, pObj, i ) \ - Vec_PtrForEachEntry( p->vPis, pObj, i ) + Vec_PtrForEachEntry( Hop_Obj_t *, p->vPis, pObj, i ) // iterator over the primary outputs #define Hop_ManForEachPo( p, pObj, i ) \ - Vec_PtrForEachEntry( p->vPos, pObj, i ) + Vec_PtrForEachEntry( Hop_Obj_t *, p->vPos, pObj, i ) // iterator over all objects, including those currently not used #define Hop_ManForEachNode( p, pObj, i ) \ for ( i = 0; i < p->nTableSize; i++ ) \ @@ -334,9 +336,11 @@ extern void Hop_ObjPrintVerbose( Hop_Obj_t * pObj, int fHaig ); extern void Hop_ManPrintVerbose( Hop_Man_t * p, int fHaig ); extern void Hop_ManDumpBlif( Hop_Man_t * p, char * pFileName ); -#ifdef __cplusplus -} -#endif + + +ABC_NAMESPACE_HEADER_END + + #endif diff --git a/src/aig/hop/hopBalance.c b/src/aig/hop/hopBalance.c index 4bc15bb7..9240ffa9 100644 --- a/src/aig/hop/hopBalance.c +++ b/src/aig/hop/hopBalance.c @@ -20,6 +20,9 @@ #include "hop.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -96,27 +99,27 @@ Hop_Obj_t * Hop_NodeBalance_rec( Hop_Man_t * pNew, Hop_Obj_t * pObjOld, Vec_Vec_ assert( !Hop_IsComplement(pObjOld) ); // return if the result is known if ( pObjOld->pData ) - return pObjOld->pData; + return (Hop_Obj_t *)pObjOld->pData; assert( Hop_ObjIsNode(pObjOld) ); // get the implication supergate vSuper = Hop_NodeBalanceCone( pObjOld, vStore, Level ); // check if supergate contains two nodes in the opposite polarity if ( vSuper->nSize == 0 ) - return pObjOld->pData = Hop_ManConst0(pNew); + return (Hop_Obj_t *)(pObjOld->pData = Hop_ManConst0(pNew)); if ( Vec_PtrSize(vSuper) < 2 ) printf( "BUG!\n" ); // for each old node, derive the new well-balanced node for ( i = 0; i < Vec_PtrSize(vSuper); i++ ) { - pObjNew = Hop_NodeBalance_rec( pNew, Hop_Regular(vSuper->pArray[i]), vStore, Level + 1, fUpdateLevel ); - vSuper->pArray[i] = Hop_NotCond( pObjNew, Hop_IsComplement(vSuper->pArray[i]) ); + pObjNew = Hop_NodeBalance_rec( pNew, Hop_Regular((Hop_Obj_t *)vSuper->pArray[i]), vStore, Level + 1, fUpdateLevel ); + vSuper->pArray[i] = Hop_NotCond( pObjNew, Hop_IsComplement((Hop_Obj_t *)vSuper->pArray[i]) ); } // build the supergate pObjNew = Hop_NodeBalanceBuildSuper( pNew, vSuper, Hop_ObjType(pObjOld), fUpdateLevel ); // make sure the balanced node is not assigned // assert( pObjOld->Level >= Hop_Regular(pObjNew)->Level ); assert( pObjOld->pData == NULL ); - return pObjOld->pData = pObjNew; + return (Hop_Obj_t *)(pObjOld->pData = pObjNew); } /**Function************************************************************* @@ -185,13 +188,13 @@ Vec_Ptr_t * Hop_NodeBalanceCone( Hop_Obj_t * pObj, Vec_Vec_t * vStore, int Level if ( Vec_VecSize( vStore ) <= Level ) Vec_VecPush( vStore, Level, 0 ); // get the temporary array of nodes - vNodes = Vec_VecEntry( vStore, Level ); + vNodes = (Vec_Ptr_t *)Vec_VecEntry( vStore, Level ); Vec_PtrClear( vNodes ); // collect the nodes in the implication supergate RetValue = Hop_NodeBalanceCone_rec( pObj, pObj, vNodes ); assert( vNodes->nSize > 1 ); // unmark the visited nodes - Vec_PtrForEachEntry( vNodes, pObj, i ) + Vec_PtrForEachEntry( Hop_Obj_t *, vNodes, pObj, i ) Hop_Regular(pObj)->fMarkB = 0; // if we found the node and its complement in the same implication supergate, // return empty set of nodes (meaning that we should use constant-0 node) @@ -238,7 +241,7 @@ Hop_Obj_t * Hop_NodeBalanceBuildSuper( Hop_Man_t * p, Vec_Ptr_t * vSuper, Hop_Ty int LeftBound; assert( vSuper->nSize > 1 ); // sort the new nodes by level in the decreasing order - Vec_PtrSort( vSuper, Hop_NodeCompareLevelsDecrease ); + Vec_PtrSort( vSuper, (int (*)(void))Hop_NodeCompareLevelsDecrease ); // balance the nodes while ( vSuper->nSize > 1 ) { @@ -247,11 +250,11 @@ Hop_Obj_t * Hop_NodeBalanceBuildSuper( Hop_Man_t * p, Vec_Ptr_t * vSuper, Hop_Ty // find the node that can be shared (if no such node, randomize choice) Hop_NodeBalancePermute( p, vSuper, LeftBound, Type == AIG_EXOR ); // pull out the last two nodes - pObj1 = Vec_PtrPop(vSuper); - pObj2 = Vec_PtrPop(vSuper); + pObj1 = (Hop_Obj_t *)Vec_PtrPop(vSuper); + pObj2 = (Hop_Obj_t *)Vec_PtrPop(vSuper); Hop_NodeBalancePushUniqueOrderByLevel( vSuper, Hop_Oper(p, pObj1, pObj2, Type) ); } - return Vec_PtrEntry(vSuper, 0); + return (Hop_Obj_t *)Vec_PtrEntry(vSuper, 0); } /**Function************************************************************* @@ -278,19 +281,19 @@ int Hop_NodeBalanceFindLeft( Vec_Ptr_t * vSuper ) return 0; // set the pointer to the one before the last Current = Vec_PtrSize(vSuper) - 2; - pObjRight = Vec_PtrEntry( vSuper, Current ); + pObjRight = (Hop_Obj_t *)Vec_PtrEntry( vSuper, Current ); // go through the nodes to the left of this one for ( Current--; Current >= 0; Current-- ) { // get the next node on the left - pObjLeft = Vec_PtrEntry( vSuper, Current ); + pObjLeft = (Hop_Obj_t *)Vec_PtrEntry( vSuper, Current ); // if the level of this node is different, quit the loop if ( Hop_ObjLevel(Hop_Regular(pObjLeft)) != Hop_ObjLevel(Hop_Regular(pObjRight)) ) break; } Current++; // get the node, for which the equality holds - pObjLeft = Vec_PtrEntry( vSuper, Current ); + pObjLeft = (Hop_Obj_t *)Vec_PtrEntry( vSuper, Current ); assert( Hop_ObjLevel(Hop_Regular(pObjLeft)) == Hop_ObjLevel(Hop_Regular(pObjRight)) ); return Current; } @@ -317,14 +320,14 @@ void Hop_NodeBalancePermute( Hop_Man_t * p, Vec_Ptr_t * vSuper, int LeftBound, i if ( LeftBound == RightBound ) return; // get the two last nodes - pObj1 = Vec_PtrEntry( vSuper, RightBound + 1 ); - pObj2 = Vec_PtrEntry( vSuper, RightBound ); + pObj1 = (Hop_Obj_t *)Vec_PtrEntry( vSuper, RightBound + 1 ); + pObj2 = (Hop_Obj_t *)Vec_PtrEntry( vSuper, RightBound ); if ( Hop_Regular(pObj1) == p->pConst1 || Hop_Regular(pObj2) == p->pConst1 ) return; // find the first node that can be shared for ( i = RightBound; i >= LeftBound; i-- ) { - pObj3 = Vec_PtrEntry( vSuper, i ); + pObj3 = (Hop_Obj_t *)Vec_PtrEntry( vSuper, i ); if ( Hop_Regular(pObj3) == p->pConst1 ) { Vec_PtrWriteEntry( vSuper, i, pObj2 ); @@ -374,8 +377,8 @@ void Hop_NodeBalancePushUniqueOrderByLevel( Vec_Ptr_t * vStore, Hop_Obj_t * pObj // find the p of the node for ( i = vStore->nSize-1; i > 0; i-- ) { - pObj1 = vStore->pArray[i ]; - pObj2 = vStore->pArray[i-1]; + pObj1 = (Hop_Obj_t *)vStore->pArray[i ]; + pObj2 = (Hop_Obj_t *)vStore->pArray[i-1]; if ( Hop_ObjLevel(Hop_Regular(pObj1)) <= Hop_ObjLevel(Hop_Regular(pObj2)) ) break; vStore->pArray[i ] = pObj2; @@ -389,3 +392,5 @@ void Hop_NodeBalancePushUniqueOrderByLevel( Vec_Ptr_t * vStore, Hop_Obj_t * pObj //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/aig/hop/hopCheck.c b/src/aig/hop/hopCheck.c index 9120906f..174c5523 100644 --- a/src/aig/hop/hopCheck.c +++ b/src/aig/hop/hopCheck.c @@ -20,6 +20,9 @@ #include "hop.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -108,3 +111,5 @@ int Hop_ManCheck( Hop_Man_t * p ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/aig/hop/hopDfs.c b/src/aig/hop/hopDfs.c index 27fb1aa6..be1e6c0b 100644 --- a/src/aig/hop/hopDfs.c +++ b/src/aig/hop/hopDfs.c @@ -20,6 +20,9 @@ #include "hop.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -94,7 +97,7 @@ Vec_Ptr_t * Hop_ManDfsNode( Hop_Man_t * p, Hop_Obj_t * pNode ) assert( !Hop_IsComplement(pNode) ); vNodes = Vec_PtrAlloc( 16 ); Hop_ManDfs_rec( pNode, vNodes ); - Vec_PtrForEachEntry( vNodes, pObj, i ) + Vec_PtrForEachEntry( Hop_Obj_t *, vNodes, pObj, i ) Hop_ObjClearMarkA(pObj); return vNodes; } @@ -121,7 +124,7 @@ int Hop_ManCountLevels( Hop_Man_t * p ) pObj->pData = NULL; // compute levels in a DFS order vNodes = Hop_ManDfs( p ); - Vec_PtrForEachEntry( vNodes, pObj, i ) + Vec_PtrForEachEntry( Hop_Obj_t *, vNodes, pObj, i ) { Level0 = (int)(ABC_PTRUINT_T)Hop_ObjFanin0(pObj)->pData; Level1 = (int)(ABC_PTRUINT_T)Hop_ObjFanin1(pObj)->pData; @@ -335,7 +338,7 @@ Hop_Obj_t * Hop_Transfer( Hop_Man_t * pSour, Hop_Man_t * pDest, Hop_Obj_t * pRoo Hop_Transfer_rec( pDest, Hop_Regular(pRoot) ); // clear the markings Hop_ConeUnmark_rec( Hop_Regular(pRoot) ); - return Hop_NotCond( Hop_Regular(pRoot)->pData, Hop_IsComplement(pRoot) ); + return Hop_NotCond( (Hop_Obj_t *)Hop_Regular(pRoot)->pData, Hop_IsComplement(pRoot) ); } /**Function************************************************************* @@ -389,7 +392,7 @@ Hop_Obj_t * Hop_Compose( Hop_Man_t * p, Hop_Obj_t * pRoot, Hop_Obj_t * pFunc, in Hop_Compose_rec( p, Hop_Regular(pRoot), pFunc, Hop_ManPi(p, iVar) ); // clear the markings Hop_ConeUnmark_rec( Hop_Regular(pRoot) ); - return Hop_NotCond( Hop_Regular(pRoot)->pData, Hop_IsComplement(pRoot) ); + return Hop_NotCond( (Hop_Obj_t *)Hop_Regular(pRoot)->pData, Hop_IsComplement(pRoot) ); } /**Function************************************************************* @@ -457,7 +460,7 @@ Hop_Obj_t * Hop_Remap( Hop_Man_t * p, Hop_Obj_t * pRoot, unsigned uSupp, int nVa Hop_Remap_rec( p, Hop_Regular(pRoot) ); // clear the markings Hop_ConeUnmark_rec( Hop_Regular(pRoot) ); - return Hop_NotCond( Hop_Regular(pRoot)->pData, Hop_IsComplement(pRoot) ); + return Hop_NotCond( (Hop_Obj_t *)Hop_Regular(pRoot)->pData, Hop_IsComplement(pRoot) ); } //////////////////////////////////////////////////////////////////////// @@ -465,3 +468,5 @@ Hop_Obj_t * Hop_Remap( Hop_Man_t * p, Hop_Obj_t * pRoot, unsigned uSupp, int nVa //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/aig/hop/hopMan.c b/src/aig/hop/hopMan.c index bf38a780..84d987bb 100644 --- a/src/aig/hop/hopMan.c +++ b/src/aig/hop/hopMan.c @@ -20,6 +20,9 @@ #include "hop.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -127,7 +130,7 @@ int Hop_ManCleanup( Hop_Man_t * p ) if ( Hop_ObjRefs(pNode) == 0 ) Vec_PtrPush( vObjs, pNode ); // recursively remove dangling nodes - Vec_PtrForEachEntry( vObjs, pNode, i ) + Vec_PtrForEachEntry( Hop_Obj_t *, vObjs, pNode, i ) Hop_ObjDelete_rec( p, pNode ); Vec_PtrFree( vObjs ); return nNodesOld - Hop_ManNodeNum(p); @@ -162,3 +165,5 @@ void Hop_ManPrintStats( Hop_Man_t * p ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/aig/hop/hopMem.c b/src/aig/hop/hopMem.c index c6d05865..79de3804 100644 --- a/src/aig/hop/hopMem.c +++ b/src/aig/hop/hopMem.c @@ -20,6 +20,9 @@ #include "hop.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -64,7 +67,7 @@ void Hop_ManStopMemory( Hop_Man_t * p ) { void * pMemory; int i; - Vec_PtrForEachEntry( p->vChunks, pMemory, i ) + Vec_PtrForEachEntry( void *, p->vChunks, pMemory, i ) ABC_FREE( pMemory ); Vec_PtrFree( p->vChunks ); Vec_PtrFree( p->vPages ); @@ -113,3 +116,5 @@ void Hop_ManAddMemory( Hop_Man_t * p ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/aig/hop/hopObj.c b/src/aig/hop/hopObj.c index f173248f..4451b3fa 100644 --- a/src/aig/hop/hopObj.c +++ b/src/aig/hop/hopObj.c @@ -20,6 +20,9 @@ #include "hop.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -240,7 +243,7 @@ Hop_Obj_t * Hop_ObjRepr( Hop_Obj_t * pObj ) assert( !Hop_IsComplement(pObj) ); if ( pObj->pData == NULL || pObj->pData == pObj ) return pObj; - return Hop_ObjRepr( pObj->pData ); + return Hop_ObjRepr( (Hop_Obj_t *)pObj->pData ); } /**Function************************************************************* @@ -270,3 +273,5 @@ void Hop_ObjCreateChoice( Hop_Obj_t * pOld, Hop_Obj_t * pNew ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/aig/hop/hopOper.c b/src/aig/hop/hopOper.c index 0ecb8d61..2f5e7650 100644 --- a/src/aig/hop/hopOper.c +++ b/src/aig/hop/hopOper.c @@ -20,6 +20,9 @@ #include "hop.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -298,7 +301,7 @@ Hop_Obj_t * Hop_Miter( Hop_Man_t * p, Vec_Ptr_t * vPairs ) assert( vPairs->nSize % 2 == 0 ); // go through the cubes of the node's SOP for ( i = 0; i < vPairs->nSize; i += 2 ) - vPairs->pArray[i/2] = Hop_Not( Hop_Exor( p, vPairs->pArray[i], vPairs->pArray[i+1] ) ); + vPairs->pArray[i/2] = Hop_Not( Hop_Exor( p, (Hop_Obj_t *)vPairs->pArray[i], (Hop_Obj_t *)vPairs->pArray[i+1] ) ); vPairs->nSize = vPairs->nSize/2; return Hop_Not( Hop_Multi_rec( p, (Hop_Obj_t **)vPairs->pArray, vPairs->nSize, AIG_AND ) ); } @@ -371,3 +374,5 @@ Hop_Obj_t * Hop_CreateExor( Hop_Man_t * p, int nVars ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/aig/hop/hopTable.c b/src/aig/hop/hopTable.c index cfc6add0..8148a125 100644 --- a/src/aig/hop/hopTable.c +++ b/src/aig/hop/hopTable.c @@ -20,6 +20,9 @@ #include "hop.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -260,3 +263,5 @@ unsigned int Cudd_PrimeAig( unsigned int p) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/aig/hop/hopTruth.c b/src/aig/hop/hopTruth.c index 42ded3ed..0b674225 100644 --- a/src/aig/hop/hopTruth.c +++ b/src/aig/hop/hopTruth.c @@ -20,6 +20,9 @@ #include "hop.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -97,7 +100,7 @@ unsigned * Hop_ManConvertAigToTruth_rec2( Hop_Obj_t * pObj, Vec_Int_t * vTruth, int i; assert( !Hop_IsComplement(pObj) ); if ( !Hop_ObjIsNode(pObj) || !Hop_ObjIsMarkA(pObj) ) - return pObj->pData; + return (unsigned *)pObj->pData; // compute the truth tables of the fanins pTruth0 = Hop_ManConvertAigToTruth_rec2( Hop_ObjFanin0(pObj), vTruth, nWords ); pTruth1 = Hop_ManConvertAigToTruth_rec2( Hop_ObjFanin1(pObj), vTruth, nWords ); @@ -220,3 +223,5 @@ unsigned * Hop_ManConvertAigToTruth( Hop_Man_t * p, Hop_Obj_t * pRoot, int nVars //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/aig/hop/hopUtil.c b/src/aig/hop/hopUtil.c index d541ab99..76ed7b17 100644 --- a/src/aig/hop/hopUtil.c +++ b/src/aig/hop/hopUtil.c @@ -20,6 +20,9 @@ #include "hop.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -338,10 +341,10 @@ void Hop_ObjPrintEqn( FILE * pFile, Hop_Obj_t * pObj, Vec_Vec_t * vLevels, int L } // AND case Vec_VecExpand( vLevels, Level ); - vSuper = Vec_VecEntry(vLevels, Level); + vSuper = (Vec_Ptr_t *)Vec_VecEntry(vLevels, Level); Hop_ObjCollectMulti( pObj, vSuper ); fprintf( pFile, "%s", (Level==0? "" : "(") ); - Vec_PtrForEachEntry( vSuper, pFanin, i ) + Vec_PtrForEachEntry( Hop_Obj_t *, vSuper, pFanin, i ) { Hop_ObjPrintEqn( pFile, Hop_NotCond(pFanin, fCompl), vLevels, Level+1 ); if ( i < Vec_PtrSize(vSuper) - 1 ) @@ -387,10 +390,10 @@ void Hop_ObjPrintVerilog( FILE * pFile, Hop_Obj_t * pObj, Vec_Vec_t * vLevels, i if ( Hop_ObjIsExor(pObj) ) { Vec_VecExpand( vLevels, Level ); - vSuper = Vec_VecEntry( vLevels, Level ); + vSuper = (Vec_Ptr_t *)Vec_VecEntry( vLevels, Level ); Hop_ObjCollectMulti( pObj, vSuper ); fprintf( pFile, "%s", (Level==0? "" : "(") ); - Vec_PtrForEachEntry( vSuper, pFanin, i ) + Vec_PtrForEachEntry( Hop_Obj_t *, vSuper, pFanin, i ) { Hop_ObjPrintVerilog( pFile, Hop_NotCond(pFanin, (fCompl && i==0)), vLevels, Level+1 ); if ( i < Vec_PtrSize(vSuper) - 1 ) @@ -425,10 +428,10 @@ void Hop_ObjPrintVerilog( FILE * pFile, Hop_Obj_t * pObj, Vec_Vec_t * vLevels, i } // AND case Vec_VecExpand( vLevels, Level ); - vSuper = Vec_VecEntry(vLevels, Level); + vSuper = (Vec_Ptr_t *)Vec_VecEntry(vLevels, Level); Hop_ObjCollectMulti( pObj, vSuper ); fprintf( pFile, "%s", (Level==0? "" : "(") ); - Vec_PtrForEachEntry( vSuper, pFanin, i ) + Vec_PtrForEachEntry( Hop_Obj_t *, vSuper, pFanin, i ) { Hop_ObjPrintVerilog( pFile, Hop_NotCond(pFanin, fCompl), vLevels, Level+1 ); if ( i < Vec_PtrSize(vSuper) - 1 ) @@ -486,7 +489,7 @@ void Hop_ManPrintVerbose( Hop_Man_t * p, int fHaig ) printf( " %p", pObj ); printf( "\n" ); vNodes = Hop_ManDfs( p ); - Vec_PtrForEachEntry( vNodes, pObj, i ) + Vec_PtrForEachEntry( Hop_Obj_t *, vNodes, pObj, i ) Hop_ObjPrintVerbose( pObj, fHaig ), printf( "\n" ); printf( "\n" ); } @@ -521,7 +524,7 @@ void Hop_ManDumpBlif( Hop_Man_t * p, char * pFileName ) pObj->pData = (void *)(ABC_PTRUINT_T)Counter++; Hop_ManForEachPo( p, pObj, i ) pObj->pData = (void *)(ABC_PTRUINT_T)Counter++; - Vec_PtrForEachEntry( vNodes, pObj, i ) + Vec_PtrForEachEntry( Hop_Obj_t *, vNodes, pObj, i ) pObj->pData = (void *)(ABC_PTRUINT_T)Counter++; nDigits = Hop_Base10Log( Counter ); // write the file @@ -540,7 +543,7 @@ void Hop_ManDumpBlif( Hop_Man_t * p, char * pFileName ) fprintf( pFile, " n%0*d", nDigits, (int)(ABC_PTRUINT_T)pObj->pData ); fprintf( pFile, "\n" ); // write nodes - Vec_PtrForEachEntry( vNodes, pObj, i ) + Vec_PtrForEachEntry( Hop_Obj_t *, vNodes, pObj, i ) { fprintf( pFile, ".names n%0*d n%0*d n%0*d\n", nDigits, (int)(ABC_PTRUINT_T)Hop_ObjFanin0(pObj)->pData, @@ -570,3 +573,5 @@ void Hop_ManDumpBlif( Hop_Man_t * p, char * pFileName ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/aig/hop/hop_.c b/src/aig/hop/hop_.c index 658b8c4e..b2bd8c22 100644 --- a/src/aig/hop/hop_.c +++ b/src/aig/hop/hop_.c @@ -20,6 +20,9 @@ #include "hop.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -46,3 +49,5 @@ //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + |