diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
commit | 0871bffae307e0553e0c5186336189e8b55cf6a6 (patch) | |
tree | 4571d1563fe33a53a57fea1c35fb668b9d33265f /src/opt/ret | |
parent | f936cc0680c98ffe51b3a1716c996072d5dbf76c (diff) | |
download | abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.gz abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.bz2 abc-0871bffae307e0553e0c5186336189e8b55cf6a6.zip |
Version abc90215
Diffstat (limited to 'src/opt/ret')
-rw-r--r-- | src/opt/ret/retArea.c | 14 | ||||
-rw-r--r-- | src/opt/ret/retCore.c | 2 | ||||
-rw-r--r-- | src/opt/ret/retFlow.c | 2 | ||||
-rw-r--r-- | src/opt/ret/retIncrem.c | 10 | ||||
-rw-r--r-- | src/opt/ret/retInit.c | 32 | ||||
-rw-r--r-- | src/opt/ret/retLvalue.c | 4 |
6 files changed, 32 insertions, 32 deletions
diff --git a/src/opt/ret/retArea.c b/src/opt/ret/retArea.c index 318147f5..63503916 100644 --- a/src/opt/ret/retArea.c +++ b/src/opt/ret/retArea.c @@ -264,22 +264,22 @@ int Abc_NtkRetimeMinAreaInitValues_rec( Abc_Obj_t * pObj ) int i; // skip visited nodes if ( Abc_NodeIsTravIdCurrent(pObj) ) - return (int)(PORT_PTRUINT_T)pObj->pCopy; + return (int)(ABC_PTRUINT_T)pObj->pCopy; Abc_NodeSetTravIdCurrent(pObj); // consider the case of a latch output if ( Abc_ObjIsBo(pObj) ) { assert( Abc_ObjIsLatch(Abc_ObjFanin0(pObj)) ); - pObj->pCopy = (void *)(PORT_PTRUINT_T)Abc_NtkRetimeMinAreaInitValues_rec( Abc_ObjFanin0(pObj) ); - return (int)(PORT_PTRUINT_T)pObj->pCopy; + pObj->pCopy = (void *)(ABC_PTRUINT_T)Abc_NtkRetimeMinAreaInitValues_rec( Abc_ObjFanin0(pObj) ); + return (int)(ABC_PTRUINT_T)pObj->pCopy; } assert( Abc_ObjIsNode(pObj) ); // visit the fanins Abc_ObjForEachFanin( pObj, pFanin, i ) Abc_NtkRetimeMinAreaInitValues_rec( pFanin ); // compute the value of the node - pObj->pCopy = (void *)(PORT_PTRUINT_T)Abc_ObjSopSimulate(pObj); - return (int)(PORT_PTRUINT_T)pObj->pCopy; + pObj->pCopy = (void *)(ABC_PTRUINT_T)Abc_ObjSopSimulate(pObj); + return (int)(ABC_PTRUINT_T)pObj->pCopy; } /**Function************************************************************* @@ -301,7 +301,7 @@ void Abc_NtkRetimeMinAreaInitValues( Abc_Ntk_t * pNtk, Vec_Ptr_t * vMinCut ) Abc_NtkIncrementTravId(pNtk); Abc_NtkForEachLatch( pNtk, pObj, i ) { - pObj->pCopy = (void *)(PORT_PTRUINT_T)Abc_LatchIsInit1(pObj); + pObj->pCopy = (void *)(ABC_PTRUINT_T)Abc_LatchIsInit1(pObj); Abc_NodeSetTravIdCurrent( pObj ); } // propagate initial values @@ -478,7 +478,7 @@ void Abc_NtkRetimeMinAreaUpdateLatches( Abc_Ntk_t * pNtk, Vec_Ptr_t * vMinCut, i Abc_ObjAddFanin( pLatch, pLatchIn ); if ( fForward ) { - pLatch->pData = (void *)(PORT_PTRUINT_T)(pObj->pCopy? ABC_INIT_ONE : ABC_INIT_ZERO); + pLatch->pData = (void *)(ABC_PTRUINT_T)(pObj->pCopy? ABC_INIT_ONE : ABC_INIT_ZERO); // redirect edges to the unvisited fanouts of the node Abc_NodeCollectFanouts( pObj, vNodes ); Vec_PtrForEachEntry( vNodes, pNext, k ) diff --git a/src/opt/ret/retCore.c b/src/opt/ret/retCore.c index 47b2cbbc..9de1b723 100644 --- a/src/opt/ret/retCore.c +++ b/src/opt/ret/retCore.c @@ -94,7 +94,7 @@ int Abc_NtkRetime( Abc_Ntk_t * pNtk, int Mode, int fForwardOnly, int fBackwardOn { printf( "Reduction in area = %3d. Reduction in delay = %3d. ", nLatches - Abc_NtkLatchNum(pNtk), nLevels - Abc_NtkLevel(pNtk) ); - PRT( "Total runtime", clock() - clkTotal ); + ABC_PRT( "Total runtime", clock() - clkTotal ); } timeRetime = clock() - clkTotal; return RetValue; diff --git a/src/opt/ret/retFlow.c b/src/opt/ret/retFlow.c index bad4b7e7..7c17c1f6 100644 --- a/src/opt/ret/retFlow.c +++ b/src/opt/ret/retFlow.c @@ -228,7 +228,7 @@ Vec_Ptr_t * Abc_NtkMaxFlow( Abc_Ntk_t * pNtk, int fForward, int fVerbose ) { printf( "L = %6d. %s max-flow = %6d. Min-cut = %6d. ", Abc_NtkLatchNum(pNtk), fForward? "Forward " : "Backward", Flow, Vec_PtrSize(vMinCut) ); -PRT( "Time", clock() - clk ); +ABC_PRT( "Time", clock() - clk ); } // Abc_NtkMaxFlowPrintCut( pNtk, vMinCut ); diff --git a/src/opt/ret/retIncrem.c b/src/opt/ret/retIncrem.c index 140e5dcc..233fb436 100644 --- a/src/opt/ret/retIncrem.c +++ b/src/opt/ret/retIncrem.c @@ -113,7 +113,7 @@ st_table * Abc_NtkRetimePrepareLatches( Abc_Ntk_t * pNtk ) Abc_NtkForEachLatch( pNtk, pLatch, i ) { // map latch into its true number - st_insert( tLatches, (void *)(PORT_PTRUINT_T)pLatch, (void *)(PORT_PTRUINT_T)(i-nOffSet) ); + st_insert( tLatches, (void *)(ABC_PTRUINT_T)pLatch, (void *)(ABC_PTRUINT_T)(i-nOffSet) ); // disconnect LI pLatchIn = Abc_ObjFanin0(pLatch); pFanin = Abc_ObjFanin0(pLatchIn); @@ -194,7 +194,7 @@ int Abc_NtkRetimeFinalizeLatches( Abc_Ntk_t * pNtk, st_table * tLatches, int nId Vec_PtrPush( vCosNew, pLatchIn ); Vec_PtrPush( vBoxesNew, pLatch ); } - // free useless Cis/Cos + // ABC_FREE useless Cis/Cos Vec_PtrForEachEntry( vCisOld, pObj, i ) if ( !Abc_ObjIsPi(pObj) && Abc_ObjFaninNum(pObj) == 0 && Abc_ObjFanoutNum(pObj) == 0 ) Abc_NtkDeleteObj(pObj); @@ -320,7 +320,7 @@ void Abc_NtkRetimeNode( Abc_Obj_t * pObj, int fForward, int fInitial ) { // compute the initial value if ( fInitial ) - pObj->pCopy = (void *)(PORT_PTRUINT_T)Abc_ObjSopSimulate( pObj ); + pObj->pCopy = (void *)(ABC_PTRUINT_T)Abc_ObjSopSimulate( pObj ); // collect fanins Abc_NodeCollectFanins( pObj, vNodes ); // make the node point to the fanins fanins @@ -400,10 +400,10 @@ int Abc_NtkRetimeCheckCompatibleLatchFanouts( Abc_Obj_t * pObj ) continue; if ( Init == -1 ) { - Init = (int)(PORT_PTRUINT_T)pObj->pData; + Init = (int)(ABC_PTRUINT_T)pObj->pData; nLatches++; } - else if ( Init == (int)(PORT_PTRUINT_T)pObj->pData ) + else if ( Init == (int)(ABC_PTRUINT_T)pObj->pData ) nLatches++; } return nLatches; diff --git a/src/opt/ret/retInit.c b/src/opt/ret/retInit.c index 8de0ef47..72b384d9 100644 --- a/src/opt/ret/retInit.c +++ b/src/opt/ret/retInit.c @@ -57,9 +57,9 @@ Vec_Int_t * Abc_NtkRetimeInitialValues( Abc_Ntk_t * pNtkCone, Vec_Int_t * vValue printf( "The miter for initial state computation has %d AIG nodes. ", Abc_NtkNodeNum(pNtkMiter) ); // solve the miter clk = clock(); - RetValue = Abc_NtkMiterSat( pNtkMiter, (sint64)500000, (sint64)50000000, 0, NULL, NULL ); + RetValue = Abc_NtkMiterSat( pNtkMiter, (ABC_INT64_T)500000, (ABC_INT64_T)50000000, 0, NULL, NULL ); if ( fVerbose ) - { PRT( "SAT solving time", clock() - clk ); } + { ABC_PRT( "SAT solving time", clock() - clk ); } // analyze the result if ( RetValue == 1 ) printf( "Abc_NtkRetimeInitialValues(): The problem is unsatisfiable. DC latch values are used.\n" ); @@ -100,9 +100,9 @@ int Abc_ObjSopSimulate( Abc_Obj_t * pObj ) Abc_CubeForEachVar( pCube, Value, v ) { if ( Value == '0' ) - ResVar = 1 ^ ((int)(PORT_PTRUINT_T)Abc_ObjFanin(pObj, v)->pCopy); + ResVar = 1 ^ ((int)(ABC_PTRUINT_T)Abc_ObjFanin(pObj, v)->pCopy); else if ( Value == '1' ) - ResVar = (int)(PORT_PTRUINT_T)Abc_ObjFanin(pObj, v)->pCopy; + ResVar = (int)(ABC_PTRUINT_T)Abc_ObjFanin(pObj, v)->pCopy; else continue; ResAnd &= ResVar; @@ -134,17 +134,17 @@ int Abc_NtkRetimeVerifyModel( Abc_Ntk_t * pNtkCone, Vec_Int_t * vValues, int * p assert( Abc_NtkIsSopLogic(pNtkCone) ); // set the PIs Abc_NtkForEachPi( pNtkCone, pObj, i ) - pObj->pCopy = (void *)(PORT_PTRUINT_T)pModel[i]; + pObj->pCopy = (void *)(ABC_PTRUINT_T)pModel[i]; // simulate the internal nodes vNodes = Abc_NtkDfs( pNtkCone, 0 ); Vec_PtrForEachEntry( vNodes, pObj, i ) - pObj->pCopy = (void *)(PORT_PTRUINT_T)Abc_ObjSopSimulate( pObj ); + pObj->pCopy = (void *)(ABC_PTRUINT_T)Abc_ObjSopSimulate( pObj ); Vec_PtrFree( vNodes ); // compare the outputs Abc_NtkForEachPo( pNtkCone, pObj, i ) pObj->pCopy = Abc_ObjFanin0(pObj)->pCopy; Abc_NtkForEachPo( pNtkCone, pObj, i ) - Counter += (Vec_IntEntry(vValues, i) != (int)(PORT_PTRUINT_T)pObj->pCopy); + Counter += (Vec_IntEntry(vValues, i) != (int)(ABC_PTRUINT_T)pObj->pCopy); if ( Counter > 0 ) printf( "%d outputs (out of %d) have a value mismatch.\n", Counter, Abc_NtkPoNum(pNtkCone) ); return 1; @@ -167,7 +167,7 @@ void Abc_NtkRetimeTranferToCopy( Abc_Ntk_t * pNtk ) int i; Abc_NtkForEachObj( pNtk, pObj, i ) if ( Abc_ObjIsLatch(pObj) ) - pObj->pCopy = (void *)(PORT_PTRUINT_T)Abc_LatchIsInit1(pObj); + pObj->pCopy = (void *)(ABC_PTRUINT_T)Abc_LatchIsInit1(pObj); } /**Function************************************************************* @@ -187,7 +187,7 @@ void Abc_NtkRetimeTranferFromCopy( Abc_Ntk_t * pNtk ) int i; Abc_NtkForEachObj( pNtk, pObj, i ) if ( Abc_ObjIsLatch(pObj) ) - pObj->pData = (void *)(PORT_PTRUINT_T)(pObj->pCopy? ABC_INIT_ONE : ABC_INIT_ZERO); + pObj->pData = (void *)(ABC_PTRUINT_T)(pObj->pCopy? ABC_INIT_ONE : ABC_INIT_ZERO); } /**Function************************************************************* @@ -230,10 +230,10 @@ void Abc_NtkRetimeInsertLatchValues( Abc_Ntk_t * pNtk, Vec_Int_t * vValues ) int i, Counter = 0; Abc_NtkForEachObj( pNtk, pObj, i ) if ( Abc_ObjIsLatch(pObj) ) - pObj->pCopy = (void *)(PORT_PTRUINT_T)Counter++; + pObj->pCopy = (void *)(ABC_PTRUINT_T)Counter++; Abc_NtkForEachObj( pNtk, pObj, i ) if ( Abc_ObjIsLatch(pObj) ) - pObj->pData = (void *)(PORT_PTRUINT_T)(vValues? (Vec_IntEntry(vValues,(int)(PORT_PTRUINT_T)pObj->pCopy)? ABC_INIT_ONE : ABC_INIT_ZERO) : ABC_INIT_DC); + pObj->pData = (void *)(ABC_PTRUINT_T)(vValues? (Vec_IntEntry(vValues,(int)(ABC_PTRUINT_T)pObj->pCopy)? ABC_INIT_ONE : ABC_INIT_ZERO) : ABC_INIT_DC); } /**Function************************************************************* @@ -316,22 +316,22 @@ void Abc_NtkCycleInitStateSop( Abc_Ntk_t * pNtk, int nFrames, int fVerbose ) srand( 0x12341234 ); // initialize the values Abc_NtkForEachPi( pNtk, pObj, i ) - pObj->pCopy = (void *)(PORT_PTRUINT_T)(rand() & 1); + pObj->pCopy = (void *)(ABC_PTRUINT_T)(rand() & 1); Abc_NtkForEachLatch( pNtk, pObj, i ) - pObj->pCopy = (void *)(PORT_PTRUINT_T)Abc_LatchIsInit1(pObj); + pObj->pCopy = (void *)(ABC_PTRUINT_T)Abc_LatchIsInit1(pObj); // simulate for the given number of timeframes vNodes = Abc_NtkDfs( pNtk, 0 ); for ( f = 0; f < nFrames; f++ ) { // simulate internal nodes Vec_PtrForEachEntry( vNodes, pObj, i ) - pObj->pCopy = (void *)(PORT_PTRUINT_T)Abc_ObjSopSimulate( pObj ); + pObj->pCopy = (void *)(ABC_PTRUINT_T)Abc_ObjSopSimulate( pObj ); // bring the results to the COs Abc_NtkForEachCo( pNtk, pObj, i ) pObj->pCopy = Abc_ObjFanin0(pObj)->pCopy; // assign PI values Abc_NtkForEachPi( pNtk, pObj, i ) - pObj->pCopy = (void *)(PORT_PTRUINT_T)(rand() & 1); + pObj->pCopy = (void *)(ABC_PTRUINT_T)(rand() & 1); // transfer the latch values Abc_NtkForEachLatch( pNtk, pObj, i ) Abc_ObjFanout0(pObj)->pCopy = Abc_ObjFanin0(pObj)->pCopy; @@ -339,7 +339,7 @@ void Abc_NtkCycleInitStateSop( Abc_Ntk_t * pNtk, int nFrames, int fVerbose ) Vec_PtrFree( vNodes ); // set the final values Abc_NtkForEachLatch( pNtk, pObj, i ) - pObj->pData = (void *)(PORT_PTRUINT_T)(Abc_ObjFanout0(pObj)->pCopy ? ABC_INIT_ONE : ABC_INIT_ZERO); + pObj->pData = (void *)(ABC_PTRUINT_T)(Abc_ObjFanout0(pObj)->pCopy ? ABC_INIT_ONE : ABC_INIT_ZERO); } //////////////////////////////////////////////////////////////////////// diff --git a/src/opt/ret/retLvalue.c b/src/opt/ret/retLvalue.c index 26f51f09..02d9cac2 100644 --- a/src/opt/ret/retLvalue.c +++ b/src/opt/ret/retLvalue.c @@ -37,8 +37,8 @@ static Vec_Ptr_t * Abc_ManCollectLatches( Abc_Ntk_t * pNtk ); static int Abc_NtkRetimeUsingLags( Abc_Ntk_t * pNtk, Vec_Int_t * vLags, int fVerbose ); static inline int Abc_NodeComputeLag( int LValue, int Fi ) { return (LValue + (1<<16)*Fi)/Fi - (1<<16) - (int)(LValue % Fi == 0); } -static inline int Abc_NodeGetLValue( Abc_Obj_t * pNode ) { return (int)(PORT_PTRUINT_T)pNode->pCopy; } -static inline void Abc_NodeSetLValue( Abc_Obj_t * pNode, int Value ) { pNode->pCopy = (void *)(PORT_PTRUINT_T)Value; } +static inline int Abc_NodeGetLValue( Abc_Obj_t * pNode ) { return (int)(ABC_PTRUINT_T)pNode->pCopy; } +static inline void Abc_NodeSetLValue( Abc_Obj_t * pNode, int Value ) { pNode->pCopy = (void *)(ABC_PTRUINT_T)Value; } //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// |