From c158dd5a94294e297bd8561b72897bcfb53f03f9 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Tue, 5 Jan 2016 16:40:00 -0800 Subject: Migrating to using 32-bit timing representation in &nf. --- src/map/mio/mio.h | 4 +- src/map/mio/mioUtils.c | 28 +++++----- src/map/scl/sclCon.h | 142 ++++++++++++++++++++++++------------------------- 3 files changed, 87 insertions(+), 87 deletions(-) (limited to 'src/map') diff --git a/src/map/mio/mio.h b/src/map/mio/mio.h index 8fa3f71a..06a461ab 100644 --- a/src/map/mio/mio.h +++ b/src/map/mio/mio.h @@ -65,8 +65,8 @@ struct Mio_Cell2_t_ float AreaF; // area word AreaW; // area word uTruth; // truth table - word DelayAve; // average delay - word Delays[6]; // delay + int iDelayAve; // average delay + int iDelays[6]; // delay void * pMioGate; // gate pointer }; diff --git a/src/map/mio/mioUtils.c b/src/map/mio/mioUtils.c index 85b5c6d6..e03159f3 100644 --- a/src/map/mio/mioUtils.c +++ b/src/map/mio/mioUtils.c @@ -635,9 +635,9 @@ static inline int Mio_CompareTwo2( Mio_Cell2_t * pCell1, Mio_Cell2_t * pCell2 ) if ( pCell1->AreaW < pCell2->AreaW ) return 0; // compare delays - if ( pCell1->DelayAve > pCell2->DelayAve ) + if ( pCell1->iDelayAve > pCell2->iDelayAve ) return 1; - if ( pCell1->DelayAve < pCell2->DelayAve ) + if ( pCell1->iDelayAve < pCell2->iDelayAve ) return 0; // compare names Comp = strcmp( pCell1->pName, pCell2->pName ); @@ -651,21 +651,21 @@ static inline int Mio_CompareTwo2( Mio_Cell2_t * pCell1, Mio_Cell2_t * pCell2 ) static inline void Mio_CollectCopy2( Mio_Cell2_t * pCell, Mio_Gate_t * pGate ) { Mio_Pin_t * pPin; int k; - pCell->pName = pGate->pName; - pCell->vExpr = pGate->vExpr; - pCell->uTruth = pGate->uTruth; - pCell->AreaF = pGate->dArea; - pCell->AreaW = (word)(MIO_NUM * pGate->dArea); - pCell->nFanins = pGate->nInputs; - pCell->pMioGate = pGate; - pCell->DelayAve = 0; + pCell->pName = pGate->pName; + pCell->vExpr = pGate->vExpr; + pCell->uTruth = pGate->uTruth; + pCell->AreaF = pGate->dArea; + pCell->AreaW = (word)(MIO_NUM * pGate->dArea); + pCell->nFanins = pGate->nInputs; + pCell->pMioGate = pGate; + pCell->iDelayAve = 0; for ( k = 0, pPin = pGate->pPins; pPin; pPin = pPin->pNext, k++ ) { - pCell->Delays[k] = (word)(MIO_NUM/2 * pPin->dDelayBlockRise + MIO_NUM/2 * pPin->dDelayBlockFall); - pCell->DelayAve += pCell->Delays[k]; + pCell->iDelays[k] = (int)(MIO_NUM/2 * pPin->dDelayBlockRise + MIO_NUM/2 * pPin->dDelayBlockFall); + pCell->iDelayAve += pCell->iDelays[k]; } if ( pCell->nFanins ) - pCell->DelayAve /= pCell->nFanins; + pCell->iDelayAve /= pCell->nFanins; } Mio_Cell2_t * Mio_CollectRootsNew2( Mio_Library_t * pLib, int nInputs, int * pnGates, int fVerbose ) @@ -758,7 +758,7 @@ Mio_Cell2_t * Mio_CollectRootsNew2( Mio_Library_t * pLib, int nInputs, int * pnG printf( "None\n" ); else printf( "%-20s In = %d N = %3d A = %12.6f D = %12.6f\n", - pCell->pName, pCell->nFanins, pCounts[i], pCell->AreaF, MIO_NUMINV*(unsigned)pCell->DelayAve ); + pCell->pName, pCell->nFanins, pCounts[i], pCell->AreaF, MIO_NUMINV*pCell->iDelayAve ); } ABC_FREE( pCounts ); } diff --git a/src/map/scl/sclCon.h b/src/map/scl/sclCon.h index ec911963..c085a2a7 100644 --- a/src/map/scl/sclCon.h +++ b/src/map/scl/sclCon.h @@ -33,18 +33,18 @@ struct Scl_Con_t_ char * pFileName; // constraint file name char * pModelName; // current design name char * pInCellDef; // default input driving gate - word tInArrDef; // default input arrival time - word tInSlewDef; // default input slew - word tInLoadDef; // default input load - word tOutReqDef; // default output required time - word tOutLoadDef; // default output load + int tInArrDef; // default input arrival time + int tInSlewDef; // default input slew + int tInLoadDef; // default input load + int tOutReqDef; // default output required time + int tOutLoadDef; // default output load Vec_Ptr_t vInCells; // input driving gate names Vec_Ptr_t vInCellsPtr; // input driving gates - Vec_Wrd_t vInArrs; // input arrival times - Vec_Wrd_t vInSlews; // input slews - Vec_Wrd_t vInLoads; // input loads - Vec_Wrd_t vOutReqs; // output required times - Vec_Wrd_t vOutLoads; // output loads + Vec_Int_t vInArrs; // input arrival times + Vec_Int_t vInSlews; // input slews + Vec_Int_t vInLoads; // input loads + Vec_Int_t vOutReqs; // output required times + Vec_Int_t vOutLoads; // output loads Abc_Nam_t * pNamI; // input names Abc_Nam_t * pNamO; // output names }; @@ -61,10 +61,10 @@ struct Scl_Con_t_ #define SCL_NUM 1000 #define SCL_NUMINV 0.001 -#define SCL_INFINITY (~(word)0) +#define SCL_INFINITY (0x3FFFFFFF) -static inline word Scl_Flt2Wrd( float w ) { return SCL_NUM*w; } -static inline float Scl_Wrd2Flt( word w ) { return SCL_NUMINV*(unsigned)(w&0x3FFFFFFF) + SCL_NUMINV*(1<<30)*(unsigned)(w>>30); } +static inline int Scl_Flt2Int( float w ) { return SCL_NUM*w; } +static inline float Scl_Int2Flt( int i ) { return SCL_NUMINV*i; } //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// @@ -95,11 +95,11 @@ static inline Scl_Con_t * Scl_ConAlloc( char * pFileName, Abc_Nam_t * pNamI, Abc p->tOutReqDef = SCL_INFINITY; p->tOutLoadDef = SCL_INFINITY; Vec_PtrFill( &p->vInCells, Abc_NamObjNumMax(pNamI)-1, NULL ); - Vec_WrdFill( &p->vInArrs, Abc_NamObjNumMax(pNamI)-1, SCL_INFINITY ); - Vec_WrdFill( &p->vInSlews, Abc_NamObjNumMax(pNamI)-1, SCL_INFINITY ); - Vec_WrdFill( &p->vInLoads, Abc_NamObjNumMax(pNamI)-1, SCL_INFINITY ); - Vec_WrdFill( &p->vOutReqs, Abc_NamObjNumMax(pNamO)-1, SCL_INFINITY ); - Vec_WrdFill( &p->vOutLoads, Abc_NamObjNumMax(pNamO)-1, SCL_INFINITY ); + Vec_IntFill( &p->vInArrs, Abc_NamObjNumMax(pNamI)-1, SCL_INFINITY ); + Vec_IntFill( &p->vInSlews, Abc_NamObjNumMax(pNamI)-1, SCL_INFINITY ); + Vec_IntFill( &p->vInLoads, Abc_NamObjNumMax(pNamI)-1, SCL_INFINITY ); + Vec_IntFill( &p->vOutReqs, Abc_NamObjNumMax(pNamO)-1, SCL_INFINITY ); + Vec_IntFill( &p->vOutLoads, Abc_NamObjNumMax(pNamO)-1, SCL_INFINITY ); return p; } static inline void Scl_ConFree( Scl_Con_t * p ) @@ -107,11 +107,11 @@ static inline void Scl_ConFree( Scl_Con_t * p ) Vec_PtrErase( &p->vInCellsPtr ); Vec_PtrFreeData( &p->vInCells ); Vec_PtrErase( &p->vInCells ); - Vec_WrdErase( &p->vInArrs ); - Vec_WrdErase( &p->vInSlews ); - Vec_WrdErase( &p->vInLoads ); - Vec_WrdErase( &p->vOutReqs ); - Vec_WrdErase( &p->vOutLoads ); + Vec_IntErase( &p->vInArrs ); + Vec_IntErase( &p->vInSlews ); + Vec_IntErase( &p->vInLoads ); + Vec_IntErase( &p->vOutReqs ); + Vec_IntErase( &p->vOutLoads ); Abc_NamDeref( p->pNamI ); Abc_NamDeref( p->pNamO ); ABC_FREE( p->pInCellDef ); @@ -136,7 +136,7 @@ static inline int Scl_ConParse( Scl_Con_t * p, Abc_Nam_t * pNamI, Abc_Nam_t * pN { char Buffer[1000]; char * pToken, * pToken2, * pToken3, * pName; - int i, Num = -1, nLines = 0; word Value; + int i, Num = -1, nLines = 0; int Value; FILE * pFile = fopen( p->pFileName, "rb" ); while ( fgets( Buffer, 1000, pFile ) ) { @@ -153,18 +153,18 @@ static inline int Scl_ConParse( Scl_Con_t * p, Abc_Nam_t * pNamI, Abc_Nam_t * pN pToken3 = strtok( NULL, " \t\r\n" ); if ( !strcmp(pToken, ".model") ) p->pModelName = Abc_UtilStrsav(pToken2); else if ( !strcmp(pToken, SCL_DEF_DIRECTIVE(SCL_INPUT_CELL)) ) p->pInCellDef = Abc_UtilStrsav(pToken2); - else if ( !strcmp(pToken, SCL_DEF_DIRECTIVE(SCL_INPUT_ARR)) ) p->tInArrDef = Scl_Flt2Wrd(atof(pToken2)); - else if ( !strcmp(pToken, SCL_DEF_DIRECTIVE(SCL_INPUT_SLEW)) ) p->tInSlewDef = Scl_Flt2Wrd(atof(pToken2)); - else if ( !strcmp(pToken, SCL_DEF_DIRECTIVE(SCL_INPUT_LOAD)) ) p->tInLoadDef = Scl_Flt2Wrd(atof(pToken2)); - else if ( !strcmp(pToken, SCL_DEF_DIRECTIVE(SCL_OUTPUT_REQ)) ) p->tOutReqDef = Scl_Flt2Wrd(atof(pToken2)); - else if ( !strcmp(pToken, SCL_DEF_DIRECTIVE(SCL_OUTPUT_LOAD))) p->tOutLoadDef = Scl_Flt2Wrd(atof(pToken2)); + else if ( !strcmp(pToken, SCL_DEF_DIRECTIVE(SCL_INPUT_ARR)) ) p->tInArrDef = Scl_Flt2Int(atof(pToken2)); + else if ( !strcmp(pToken, SCL_DEF_DIRECTIVE(SCL_INPUT_SLEW)) ) p->tInSlewDef = Scl_Flt2Int(atof(pToken2)); + else if ( !strcmp(pToken, SCL_DEF_DIRECTIVE(SCL_INPUT_LOAD)) ) p->tInLoadDef = Scl_Flt2Int(atof(pToken2)); + else if ( !strcmp(pToken, SCL_DEF_DIRECTIVE(SCL_OUTPUT_REQ)) ) p->tOutReqDef = Scl_Flt2Int(atof(pToken2)); + else if ( !strcmp(pToken, SCL_DEF_DIRECTIVE(SCL_OUTPUT_LOAD))) p->tOutLoadDef = Scl_Flt2Int(atof(pToken2)); else if ( pToken3 == NULL ) { printf( "Directive %s should be followed by two arguments.\n", pToken ); continue; } else if ( !strcmp(pToken, SCL_DIRECTIVE(SCL_INPUT_CELL)) ) if ( (Num = Abc_NamStrFind(pNamI, pToken2)) > 0 ) Vec_PtrWriteEntry( &p->vInCells, Num-1, Abc_UtilStrsav(pToken3) ); else printf( "Line %d: Cannot find input \"%s\".\n", nLines, pToken2 ); - else if ( !strcmp(pToken, SCL_DIRECTIVE(SCL_INPUT_ARR)) ) if ( (Num = Abc_NamStrFind(pNamI, pToken2)) > 0 ) Vec_WrdWriteEntry( &p->vInArrs, Num-1, Scl_Flt2Wrd(atof(pToken3)) ); else printf( "Line %d: Cannot find input \"%s\".\n", nLines, pToken2 ); - else if ( !strcmp(pToken, SCL_DIRECTIVE(SCL_INPUT_SLEW)) ) if ( (Num = Abc_NamStrFind(pNamI, pToken2)) > 0 ) Vec_WrdWriteEntry( &p->vInSlews, Num-1, Scl_Flt2Wrd(atof(pToken3)) ); else printf( "Line %d: Cannot find input \"%s\".\n", nLines, pToken2 ); - else if ( !strcmp(pToken, SCL_DIRECTIVE(SCL_INPUT_LOAD)) ) if ( (Num = Abc_NamStrFind(pNamI, pToken2)) > 0 ) Vec_WrdWriteEntry( &p->vInLoads, Num-1, Scl_Flt2Wrd(atof(pToken3)) ); else printf( "Line %d: Cannot find input \"%s\".\n", nLines, pToken2 ); - else if ( !strcmp(pToken, SCL_DIRECTIVE(SCL_OUTPUT_REQ)) ) if ( (Num = Abc_NamStrFind(pNamO, pToken2)) > 0 ) Vec_WrdWriteEntry( &p->vOutReqs, Num-1, Scl_Flt2Wrd(atof(pToken3)) ); else printf( "Line %d: Cannot find output \"%s\".\n", nLines, pToken2 ); - else if ( !strcmp(pToken, SCL_DIRECTIVE(SCL_OUTPUT_LOAD)) ) if ( (Num = Abc_NamStrFind(pNamO, pToken2)) > 0 ) Vec_WrdWriteEntry( &p->vOutLoads, Num-1, Scl_Flt2Wrd(atof(pToken3)) ); else printf( "Line %d: Cannot find output \"%s\".\n", nLines, pToken2 ); + else if ( !strcmp(pToken, SCL_DIRECTIVE(SCL_INPUT_ARR)) ) if ( (Num = Abc_NamStrFind(pNamI, pToken2)) > 0 ) Vec_IntWriteEntry( &p->vInArrs, Num-1, Scl_Flt2Int(atof(pToken3)) ); else printf( "Line %d: Cannot find input \"%s\".\n", nLines, pToken2 ); + else if ( !strcmp(pToken, SCL_DIRECTIVE(SCL_INPUT_SLEW)) ) if ( (Num = Abc_NamStrFind(pNamI, pToken2)) > 0 ) Vec_IntWriteEntry( &p->vInSlews, Num-1, Scl_Flt2Int(atof(pToken3)) ); else printf( "Line %d: Cannot find input \"%s\".\n", nLines, pToken2 ); + else if ( !strcmp(pToken, SCL_DIRECTIVE(SCL_INPUT_LOAD)) ) if ( (Num = Abc_NamStrFind(pNamI, pToken2)) > 0 ) Vec_IntWriteEntry( &p->vInLoads, Num-1, Scl_Flt2Int(atof(pToken3)) ); else printf( "Line %d: Cannot find input \"%s\".\n", nLines, pToken2 ); + else if ( !strcmp(pToken, SCL_DIRECTIVE(SCL_OUTPUT_REQ)) ) if ( (Num = Abc_NamStrFind(pNamO, pToken2)) > 0 ) Vec_IntWriteEntry( &p->vOutReqs, Num-1, Scl_Flt2Int(atof(pToken3)) ); else printf( "Line %d: Cannot find output \"%s\".\n", nLines, pToken2 ); + else if ( !strcmp(pToken, SCL_DIRECTIVE(SCL_OUTPUT_LOAD)) ) if ( (Num = Abc_NamStrFind(pNamO, pToken2)) > 0 ) Vec_IntWriteEntry( &p->vOutLoads, Num-1, Scl_Flt2Int(atof(pToken3)) ); else printf( "Line %d: Cannot find output \"%s\".\n", nLines, pToken2 ); else printf( "Line %d: Skipping unrecognized directive \"%s\".\n", nLines, pToken ); } // set missing defaults @@ -177,11 +177,11 @@ static inline int Scl_ConParse( Scl_Con_t * p, Abc_Nam_t * pNamI, Abc_Nam_t * pN // set individual defaults if ( p->pInCellDef ) Vec_PtrForEachEntry(char *, &p->vInCells, pName, i) if ( pName == NULL ) Vec_PtrWriteEntry( &p->vInCells, i, Abc_UtilStrsav(p->pInCellDef) ); - Vec_WrdForEachEntry( &p->vInArrs, Value, i ) if ( Value == SCL_INFINITY ) Vec_WrdWriteEntry( &p->vInArrs, i, p->tInArrDef ); - Vec_WrdForEachEntry( &p->vInSlews, Value, i ) if ( Value == SCL_INFINITY ) Vec_WrdWriteEntry( &p->vInSlews, i, p->tInSlewDef ); - Vec_WrdForEachEntry( &p->vInLoads, Value, i ) if ( Value == SCL_INFINITY ) Vec_WrdWriteEntry( &p->vInLoads, i, p->tInLoadDef ); - Vec_WrdForEachEntry( &p->vOutReqs, Value, i ) if ( Value == SCL_INFINITY ) Vec_WrdWriteEntry( &p->vOutReqs, i, p->tOutReqDef ); - Vec_WrdForEachEntry( &p->vOutLoads, Value, i ) if ( Value == SCL_INFINITY ) Vec_WrdWriteEntry( &p->vOutLoads, i, p->tOutLoadDef ); + Vec_IntForEachEntry( &p->vInArrs, Value, i ) if ( Value == SCL_INFINITY ) Vec_IntWriteEntry( &p->vInArrs, i, p->tInArrDef ); + Vec_IntForEachEntry( &p->vInSlews, Value, i ) if ( Value == SCL_INFINITY ) Vec_IntWriteEntry( &p->vInSlews, i, p->tInSlewDef ); + Vec_IntForEachEntry( &p->vInLoads, Value, i ) if ( Value == SCL_INFINITY ) Vec_IntWriteEntry( &p->vInLoads, i, p->tInLoadDef ); + Vec_IntForEachEntry( &p->vOutReqs, Value, i ) if ( Value == SCL_INFINITY ) Vec_IntWriteEntry( &p->vOutReqs, i, p->tOutReqDef ); + Vec_IntForEachEntry( &p->vOutLoads, Value, i ) if ( Value == SCL_INFINITY ) Vec_IntWriteEntry( &p->vOutLoads, i, p->tOutLoadDef ); fclose( pFile ); return 1; @@ -196,7 +196,7 @@ static inline Scl_Con_t * Scl_ConRead( char * pFileName, Abc_Nam_t * pNamI, Abc_ } static inline void Scl_ConWrite( Scl_Con_t * p, char * pFileName ) { - char * pName; word Value; int i; + char * pName; int Value; int i; FILE * pFile = pFileName ? fopen( pFileName, "wb" ) : stdout; if ( pFile == NULL ) { @@ -206,18 +206,18 @@ static inline void Scl_ConWrite( Scl_Con_t * p, char * pFileName ) fprintf( pFile, ".model %s\n", p->pModelName ); if ( p->pInCellDef ) fprintf( pFile, ".default_%s %s\n", SCL_INPUT_CELL, p->pInCellDef ); - if ( p->tInArrDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_INPUT_ARR, Scl_Wrd2Flt(p->tInArrDef) ); - if ( p->tInSlewDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_INPUT_SLEW, Scl_Wrd2Flt(p->tInSlewDef) ); - if ( p->tInLoadDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_INPUT_LOAD, Scl_Wrd2Flt(p->tInLoadDef) ); - if ( p->tOutReqDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_OUTPUT_REQ, Scl_Wrd2Flt(p->tOutReqDef) ); - if ( p->tOutLoadDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_OUTPUT_LOAD, Scl_Wrd2Flt(p->tOutLoadDef) ); + if ( p->tInArrDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_INPUT_ARR, Scl_Int2Flt(p->tInArrDef) ); + if ( p->tInSlewDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_INPUT_SLEW, Scl_Int2Flt(p->tInSlewDef) ); + if ( p->tInLoadDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_INPUT_LOAD, Scl_Int2Flt(p->tInLoadDef) ); + if ( p->tOutReqDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_OUTPUT_REQ, Scl_Int2Flt(p->tOutReqDef) ); + if ( p->tOutLoadDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_OUTPUT_LOAD, Scl_Int2Flt(p->tOutLoadDef) ); Vec_PtrForEachEntry(char *, &p->vInCells, pName, i) if ( pName ) fprintf( pFile, ".%s %s %s\n", SCL_INPUT_CELL, Abc_NamStr(p->pNamI, i+1), pName ); - Vec_WrdForEachEntry( &p->vInArrs, Value, i ) if ( Value != p->tInArrDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_INPUT_ARR, Abc_NamStr(p->pNamI, i+1), Scl_Wrd2Flt(Value) ); - Vec_WrdForEachEntry( &p->vInSlews, Value, i ) if ( Value != p->tInSlewDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_INPUT_SLEW, Abc_NamStr(p->pNamI, i+1), Scl_Wrd2Flt(Value) ); - Vec_WrdForEachEntry( &p->vInLoads, Value, i ) if ( Value != p->tInLoadDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_INPUT_LOAD, Abc_NamStr(p->pNamI, i+1), Scl_Wrd2Flt(Value) ); - Vec_WrdForEachEntry( &p->vOutReqs, Value, i ) if ( Value != p->tOutReqDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_OUTPUT_REQ, Abc_NamStr(p->pNamO, i+1), Scl_Wrd2Flt(Value) ); - Vec_WrdForEachEntry( &p->vOutLoads, Value, i ) if ( Value != p->tOutLoadDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_OUTPUT_LOAD, Abc_NamStr(p->pNamO, i+1), Scl_Wrd2Flt(Value) ); + Vec_IntForEachEntry( &p->vInArrs, Value, i ) if ( Value != p->tInArrDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_INPUT_ARR, Abc_NamStr(p->pNamI, i+1), Scl_Int2Flt(Value) ); + Vec_IntForEachEntry( &p->vInSlews, Value, i ) if ( Value != p->tInSlewDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_INPUT_SLEW, Abc_NamStr(p->pNamI, i+1), Scl_Int2Flt(Value) ); + Vec_IntForEachEntry( &p->vInLoads, Value, i ) if ( Value != p->tInLoadDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_INPUT_LOAD, Abc_NamStr(p->pNamI, i+1), Scl_Int2Flt(Value) ); + Vec_IntForEachEntry( &p->vOutReqs, Value, i ) if ( Value != p->tOutReqDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_OUTPUT_REQ, Abc_NamStr(p->pNamO, i+1), Scl_Int2Flt(Value) ); + Vec_IntForEachEntry( &p->vOutLoads, Value, i ) if ( Value != p->tOutLoadDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_OUTPUT_LOAD, Abc_NamStr(p->pNamO, i+1), Scl_Int2Flt(Value) ); if ( pFile != stdout ) fclose ( pFile ); @@ -235,18 +235,18 @@ static inline void Scl_ConWrite( Scl_Con_t * p, char * pFileName ) ***********************************************************************/ static inline int Scl_ConHasInCells_( Scl_Con_t * p ) { return Vec_PtrCountZero(&p->vInCells) != Vec_PtrSize(&p->vInCells); } -static inline int Scl_ConHasInArrs_( Scl_Con_t * p ) { return Vec_WrdCountZero(&p->vInArrs) != Vec_WrdSize(&p->vInArrs); } -static inline int Scl_ConHasInSlews_( Scl_Con_t * p ) { return Vec_WrdCountZero(&p->vInSlews) != Vec_WrdSize(&p->vInSlews); } -static inline int Scl_ConHasInLoads_( Scl_Con_t * p ) { return Vec_WrdCountZero(&p->vInLoads) != Vec_WrdSize(&p->vInLoads); } -static inline int Scl_ConHasOutReqs_( Scl_Con_t * p ) { return Vec_WrdCountZero(&p->vOutReqs) != Vec_WrdSize(&p->vOutReqs); } -static inline int Scl_ConHasOutLoads_( Scl_Con_t * p ) { return Vec_WrdCountZero(&p->vOutLoads) != Vec_WrdSize(&p->vOutLoads); } +static inline int Scl_ConHasInArrs_( Scl_Con_t * p ) { return Vec_IntCountZero(&p->vInArrs) != Vec_IntSize(&p->vInArrs); } +static inline int Scl_ConHasInSlews_( Scl_Con_t * p ) { return Vec_IntCountZero(&p->vInSlews) != Vec_IntSize(&p->vInSlews); } +static inline int Scl_ConHasInLoads_( Scl_Con_t * p ) { return Vec_IntCountZero(&p->vInLoads) != Vec_IntSize(&p->vInLoads); } +static inline int Scl_ConHasOutReqs_( Scl_Con_t * p ) { return Vec_IntCountZero(&p->vOutReqs) != Vec_IntSize(&p->vOutReqs); } +static inline int Scl_ConHasOutLoads_( Scl_Con_t * p ) { return Vec_IntCountZero(&p->vOutLoads) != Vec_IntSize(&p->vOutLoads); } static inline char * Scl_ConGetInCell_( Scl_Con_t * p, int i ) { return (char*)Vec_PtrEntry( &p->vInCells, i ); } -static inline word Scl_ConGetInArr_( Scl_Con_t * p, int i ) { return Vec_WrdEntry( &p->vInArrs, i ); } -static inline word Scl_ConGetInSlew_( Scl_Con_t * p, int i ) { return Vec_WrdEntry( &p->vInSlews, i ); } -static inline word Scl_ConGetInLoad_( Scl_Con_t * p, int i ) { return Vec_WrdEntry( &p->vInLoads, i ); } -static inline word Scl_ConGetOutReq_( Scl_Con_t * p, int i ) { return Vec_WrdEntry( &p->vOutReqs, i ); } -static inline word Scl_ConGetOutLoad_( Scl_Con_t * p, int i ) { return Vec_WrdEntry( &p->vOutLoads, i ); } +static inline int Scl_ConGetInArr_( Scl_Con_t * p, int i ) { return Vec_IntEntry( &p->vInArrs, i ); } +static inline int Scl_ConGetInSlew_( Scl_Con_t * p, int i ) { return Vec_IntEntry( &p->vInSlews, i ); } +static inline int Scl_ConGetInLoad_( Scl_Con_t * p, int i ) { return Vec_IntEntry( &p->vInLoads, i ); } +static inline int Scl_ConGetOutReq_( Scl_Con_t * p, int i ) { return Vec_IntEntry( &p->vOutReqs, i ); } +static inline int Scl_ConGetOutLoad_( Scl_Con_t * p, int i ) { return Vec_IntEntry( &p->vOutLoads, i ); } /**Function************************************************************* @@ -271,17 +271,17 @@ static inline int Scl_ConHasOutReqs() { return Scl_ConHasOutReqs static inline int Scl_ConHasOutLoads() { return Scl_ConHasOutLoads_( Scl_ConReadMan() ); } static inline char * Scl_ConGetInCell( int i ) { return Scl_ConGetInCell_ ( Scl_ConReadMan(), i ); } -static inline word Scl_ConGetInArr( int i ) { return Scl_ConGetInArr_ ( Scl_ConReadMan(), i ); } -static inline word Scl_ConGetInSlew( int i ) { return Scl_ConGetInSlew_ ( Scl_ConReadMan(), i ); } -static inline word Scl_ConGetInLoad( int i ) { return Scl_ConGetInLoad_ ( Scl_ConReadMan(), i ); } -static inline word Scl_ConGetOutReq( int i ) { return Scl_ConGetOutReq_ ( Scl_ConReadMan(), i ); } -static inline word Scl_ConGetOutLoad( int i ) { return Scl_ConGetOutLoad_( Scl_ConReadMan(), i ); } - -static inline float Scl_ConGetInArrFloat( int i ) { return Scl_Wrd2Flt( Scl_ConGetInArr(i) ); } -static inline float Scl_ConGetInSlewFloat( int i ) { return Scl_Wrd2Flt( Scl_ConGetInSlew(i) ); } -static inline float Scl_ConGetInLoadFloat( int i ) { return Scl_Wrd2Flt( Scl_ConGetInLoad(i) ); } -static inline float Scl_ConGetOutReqFloat( int i ) { return Scl_Wrd2Flt( Scl_ConGetOutReq(i) ); } -static inline float Scl_ConGetOutLoadFloat( int i ) { return Scl_Wrd2Flt( Scl_ConGetOutLoad(i) ); } +static inline int Scl_ConGetInArr( int i ) { return Scl_ConGetInArr_ ( Scl_ConReadMan(), i ); } +static inline int Scl_ConGetInSlew( int i ) { return Scl_ConGetInSlew_ ( Scl_ConReadMan(), i ); } +static inline int Scl_ConGetInLoad( int i ) { return Scl_ConGetInLoad_ ( Scl_ConReadMan(), i ); } +static inline int Scl_ConGetOutReq( int i ) { return Scl_ConGetOutReq_ ( Scl_ConReadMan(), i ); } +static inline int Scl_ConGetOutLoad( int i ) { return Scl_ConGetOutLoad_( Scl_ConReadMan(), i ); } + +static inline float Scl_ConGetInArrFloat( int i ) { return Scl_Int2Flt( Scl_ConGetInArr(i) ); } +static inline float Scl_ConGetInSlewFloat( int i ) { return Scl_Int2Flt( Scl_ConGetInSlew(i) ); } +static inline float Scl_ConGetInLoadFloat( int i ) { return Scl_Int2Flt( Scl_ConGetInLoad(i) ); } +static inline float Scl_ConGetOutReqFloat( int i ) { return Scl_Int2Flt( Scl_ConGetOutReq(i) ); } +static inline float Scl_ConGetOutLoadFloat( int i ) { return Scl_Int2Flt( Scl_ConGetOutLoad(i) ); } ABC_NAMESPACE_HEADER_END -- cgit v1.2.3