diff options
Diffstat (limited to 'src/aig')
-rw-r--r-- | src/aig/bdc/bdcSpfd.c | 10 | ||||
-rw-r--r-- | src/aig/gia/giaAiger.c | 18 | ||||
-rw-r--r-- | src/aig/llb/llb4Nonlin.c | 2 | ||||
-rw-r--r-- | src/aig/saig/saigAbsPba.c | 4 | ||||
-rw-r--r-- | src/aig/ssw/sswRarity.c | 9 |
5 files changed, 23 insertions, 20 deletions
diff --git a/src/aig/bdc/bdcSpfd.c b/src/aig/bdc/bdcSpfd.c index d9f0c7d6..2f05419d 100644 --- a/src/aig/bdc/bdcSpfd.c +++ b/src/aig/bdc/bdcSpfd.c @@ -19,6 +19,7 @@ ***********************************************************************/ #include "bdcInt.h" +#include "aig.h" ABC_NAMESPACE_IMPL_START @@ -93,7 +94,6 @@ int Bdc_SpfdAdjCost( word t ) extern void Abc_Show6VarFunc( word F0, word F1 ); -extern word Aig_ManRandom64( int fReset ); //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// @@ -254,12 +254,12 @@ Abc_PrintTime( 1, "Time", clock() - clk ); { clk = clock(); c = 0; - pNode1 = Vec_PtrEntry( vLevels, n-1 ); + pNode1 = (Bdc_Nod_t *)Vec_PtrEntry( vLevels, n-1 ); Count1 = Vec_IntEntry( vBegs, n-1 ); // go through previous levels for ( k = 0; k < n-1; k++ ) { - pNode0 = Vec_PtrEntry( vLevels, k ); + pNode0 = (Bdc_Nod_t *)Vec_PtrEntry( vLevels, k ); Count0 = Vec_IntEntry( vBegs, k ); for ( i = 0; i < Count0; i++ ) for ( j = 0; j < Count1; j++ ) @@ -915,8 +915,8 @@ void Bdc_SpfdDecomposeTest44() Vec_Int_t * vWeights; Vec_Wrd_t * vDivs; - word c0, c1, s, tt, ttt, tbest; - int i, j, k, n, Cost, CostBest = 100000; + word c0, c1, s, tt, tbest; + int i, j, Cost, CostBest = 100000; int clk = clock(); return; diff --git a/src/aig/gia/giaAiger.c b/src/aig/gia/giaAiger.c index 5b78dbfb..7722b1f9 100644 --- a/src/aig/gia/giaAiger.c +++ b/src/aig/gia/giaAiger.c @@ -490,7 +490,7 @@ Gia_Man_t * Gia_ReadAiger2( char * pFileName, int fCheck ) // check if there are other types of information to read pCur = pSymbols; - if ( (char *)pCur + 1 < pContents + nFileSize && *pCur == 'c' ) + if ( pCur + 1 < (unsigned char *)pContents + nFileSize && *pCur == 'c' ) { pCur++; if ( *pCur == 'e' ) @@ -695,7 +695,7 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck // check if there are other types of information to read pCur = pSymbols; - if ( (char *)pCur + 1 < pContents + nFileSize && *pCur == 'c' ) + if ( pCur + 1 < (unsigned char *)pContents + nFileSize && *pCur == 'c' ) { pCur++; if ( *pCur == 'e' ) @@ -749,11 +749,11 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck if ( *pCur != 'c' ) { int fBreakUsed = 0; - char * pCurOld = pCur; + unsigned char * pCurOld = pCur; pNew->vUserPiIds = Vec_IntStartFull( nInputs ); pNew->vUserPoIds = Vec_IntStartFull( nOutputs ); pNew->vUserFfIds = Vec_IntStartFull( nLatches ); - while ( (char *)pCur < pContents + nFileSize && *pCur != 'c' ) + while ( pCur < (unsigned char *)pContents + nFileSize && *pCur != 'c' ) { int iTerm; char * pType = (char *)pCur; @@ -796,7 +796,7 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck // in case of abnormal termination, remove the arrays if ( fBreakUsed ) { - char * pName; + unsigned char * pName; int Entry, nInvars, nConstr, iTerm; Vec_Int_t * vPoNames = Vec_IntStartFull( nOutputs ); @@ -807,8 +807,8 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck // try to figure out signal names fBreakUsed = 0; - pCur = pCurOld; - while ( pCur < pContents + nFileSize && *pCur != 'c' ) + pCur = (unsigned char *)pCurOld; + while ( pCur < (unsigned char *)pContents + nFileSize && *pCur != 'c' ) { // get the terminal type if ( *pCur == 'i' || *pCur == 'l' ) @@ -825,7 +825,7 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck break; } // get the terminal number - iTerm = atoi( ++pCur ); while ( *pCur++ != ' ' ); + iTerm = atoi( (char *)++pCur ); while ( *pCur++ != ' ' ); // get the node if ( iTerm < 0 || iTerm >= nOutputs ) { @@ -844,7 +844,7 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck pName = pCur; while ( *pCur++ != '\n' ); *(pCur-1) = 0; // assign the name - Vec_IntWriteEntry( vPoNames, iTerm, pName - pContents ); + Vec_IntWriteEntry( vPoNames, iTerm, pName - (unsigned char *)pContents ); } // check that all names are assigned diff --git a/src/aig/llb/llb4Nonlin.c b/src/aig/llb/llb4Nonlin.c index 0d78b15a..05898165 100644 --- a/src/aig/llb/llb4Nonlin.c +++ b/src/aig/llb/llb4Nonlin.c @@ -995,7 +995,7 @@ void Llb_MnxStop( Llb_Mnx_t * p ) Cudd_RecursiveDeref( p->dd, p->bCurrent ); if ( p->bNext ) Cudd_RecursiveDeref( p->dd, p->bNext ); - if ( p->vRings ); + if ( p->vRings ) Vec_PtrForEachEntry( DdNode *, p->vRings, bTemp, i ) Cudd_RecursiveDeref( p->dd, bTemp ); if ( p->vRoots ) diff --git a/src/aig/saig/saigAbsPba.c b/src/aig/saig/saigAbsPba.c index e37d62fa..75af32f1 100644 --- a/src/aig/saig/saigAbsPba.c +++ b/src/aig/saig/saigAbsPba.c @@ -134,7 +134,7 @@ Aig_Man_t * Saig_ManUnrollForPba( Aig_Man_t * pAig, int nStart, int nFrames, Vec if ( f >= nStart ) { Saig_ManForEachPo( pAig, pObj, i ) - pObjNew = Aig_Or( pFrames, pObjNew, pObj->pData ); + pObjNew = Aig_Or( pFrames, pObjNew, (Aig_Obj_t *)pObj->pData ); } // transfer if ( f == nFrames - 1 ) @@ -146,7 +146,7 @@ Aig_Man_t * Saig_ManUnrollForPba( Aig_Man_t * pAig, int nStart, int nFrames, Vec { int iFlopNum = Aig_ObjPioNum(pObj) - Saig_ManPoNum(pAig); assert( iFlopNum >= 0 && iFlopNum < Aig_ManRegNum(pAig) ); - Saig_ObjLiToLo(pAig, pObj)->pData = Aig_Mux( pFrames, Aig_ManPi(pFrames,iFlopNum), Aig_ObjCreatePi(pFrames), pObj->pData ); + Saig_ObjLiToLo(pAig, pObj)->pData = Aig_Mux( pFrames, Aig_ManPi(pFrames,iFlopNum), Aig_ObjCreatePi(pFrames), (Aig_Obj_t *)pObj->pData ); } } } diff --git a/src/aig/ssw/sswRarity.c b/src/aig/ssw/sswRarity.c index 037dfe55..ad37af25 100644 --- a/src/aig/ssw/sswRarity.c +++ b/src/aig/ssw/sswRarity.c @@ -429,8 +429,9 @@ void Ssw_RarManInitialize( Ssw_RarMan_t * p, Vec_Int_t * vInit ) SeeAlso [] ***********************************************************************/ -int Ssw_RarManObjIsConst( Ssw_RarMan_t * p, Aig_Obj_t * pObj ) +int Ssw_RarManObjIsConst( void * pMan, Aig_Obj_t * pObj ) { + Ssw_RarMan_t * p = (Ssw_RarMan_t *)pMan; word * pSim = Ssw_RarObjSim( p, Aig_ObjId(pObj) ); word Flip = pObj->fPhase ? ~0 : 0; int w; @@ -451,8 +452,9 @@ int Ssw_RarManObjIsConst( Ssw_RarMan_t * p, Aig_Obj_t * pObj ) SeeAlso [] ***********************************************************************/ -int Ssw_RarManObjsAreEqual( Ssw_RarMan_t * p, Aig_Obj_t * pObj0, Aig_Obj_t * pObj1 ) +int Ssw_RarManObjsAreEqual( void * pMan, Aig_Obj_t * pObj0, Aig_Obj_t * pObj1 ) { + Ssw_RarMan_t * p = (Ssw_RarMan_t *)pMan; word * pSim0 = Ssw_RarObjSim( p, pObj0->Id ); word * pSim1 = Ssw_RarObjSim( p, pObj1->Id ); word Flip = (pObj0->fPhase != pObj1->fPhase) ? ~0 : 0; @@ -474,8 +476,9 @@ int Ssw_RarManObjsAreEqual( Ssw_RarMan_t * p, Aig_Obj_t * pObj0, Aig_Obj_t * pOb SeeAlso [] ***********************************************************************/ -unsigned Ssw_RarManObjHashWord( Ssw_RarMan_t * p, Aig_Obj_t * pObj ) +unsigned Ssw_RarManObjHashWord( void * pMan, Aig_Obj_t * pObj ) { + Ssw_RarMan_t * p = (Ssw_RarMan_t *)pMan; static int s_SPrimes[128] = { 1009, 1049, 1093, 1151, 1201, 1249, 1297, 1361, 1427, 1459, 1499, 1559, 1607, 1657, 1709, 1759, 1823, 1877, 1933, 1997, |