diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-03-05 13:13:15 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-03-05 13:13:15 -0800 |
commit | 4ff5203f4c8b341eb717b742bf1af51f64f31ccd (patch) | |
tree | d3e814bd980de2c87db542d7e0929fded9db25b8 /src/map | |
parent | 0c9337f6276f8a56960f697b7361c978e3e50a41 (diff) | |
download | abc-4ff5203f4c8b341eb717b742bf1af51f64f31ccd.tar.gz abc-4ff5203f4c8b341eb717b742bf1af51f64f31ccd.tar.bz2 abc-4ff5203f4c8b341eb717b742bf1af51f64f31ccd.zip |
Improvements to the hierarchy/timing manager.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/if/if.h | 3 | ||||
-rw-r--r-- | src/map/if/ifCore.c | 2 | ||||
-rw-r--r-- | src/map/if/ifLibBox.c | 8 | ||||
-rw-r--r-- | src/map/if/ifMan.c | 6 | ||||
-rw-r--r-- | src/map/if/ifSeq.c | 1 | ||||
-rw-r--r-- | src/map/if/ifUtil.c | 14 |
6 files changed, 19 insertions, 15 deletions
diff --git a/src/map/if/if.h b/src/map/if/if.h index bdc505be..e8a4c604 100644 --- a/src/map/if/if.h +++ b/src/map/if/if.h @@ -193,6 +193,7 @@ struct If_Man_t_ int pPerm[3][IF_MAX_LUTSIZE]; // permutations unsigned uSharedMask; // mask of shared variables int nShared; // the number of shared variables + int fReqTimeWarn; // warning about exceeding required times was printed // SOP balancing Vec_Int_t * vCover; // used to compute ISOP Vec_Wrd_t * vAnds; // intermediate storage @@ -318,7 +319,7 @@ struct If_Box_t_ { char * pName; int Id; - int fWhite; + int fBlack; int nPis; int nPos; int * pDelays; diff --git a/src/map/if/ifCore.c b/src/map/if/ifCore.c index afaccfe9..95dc03bf 100644 --- a/src/map/if/ifCore.c +++ b/src/map/if/ifCore.c @@ -86,7 +86,7 @@ int If_ManPerformMappingComb( If_Man_t * p ) // set arrival times and fanout estimates If_ManForEachCi( p, pObj, i ) { - If_ObjSetArrTime( pObj, p->pPars->pTimesArr[i] ); + If_ObjSetArrTime( pObj, p->pPars->pTimesArr ? p->pPars->pTimesArr[i] : (float)0.0 ); pObj->EstRefs = (float)1.0; } diff --git a/src/map/if/ifLibBox.c b/src/map/if/ifLibBox.c index 8d7cb33b..042cb7f1 100644 --- a/src/map/if/ifLibBox.c +++ b/src/map/if/ifLibBox.c @@ -45,13 +45,13 @@ ABC_NAMESPACE_IMPL_START SeeAlso [] ***********************************************************************/ -If_Box_t * If_BoxStart( char * pName, int Id, int fWhite, int nPis, int nPos ) +If_Box_t * If_BoxStart( char * pName, int Id, int fBlack, int nPis, int nPos ) { If_Box_t * p; p = ABC_CALLOC( If_Box_t, 1 ); p->pName = pName; // consumes memory p->Id = Id; - p->fWhite = fWhite; + p->fBlack = fBlack; p->nPis = nPis; p->nPos = nPos; p->pDelays = ABC_CALLOC( int, nPis * nPos ); @@ -202,7 +202,7 @@ If_LibBox_t * If_LibBoxRead( char * pFileName ) pToken = If_LibBoxGetToken( pFile ); nPos = atoi( pToken ); // create box - pBox = If_BoxStart( pName, Id, fWhite, nPis, nPos ); + pBox = If_BoxStart( pName, Id, !fWhite, nPis, nPos ); If_LibBoxAdd( p, pBox ); // read the table for ( i = 0; i < nPis * nPos; i++ ) @@ -224,7 +224,7 @@ void If_LibBoxPrint( FILE * pFile, If_LibBox_t * p ) fprintf( pFile, "# <Name> <ID> <Type> <I> <O>\n" ); If_LibBoxForEachBox( p, pBox, i ) { - fprintf( pFile, "%s %d %d %d %d\n", pBox->pName, pBox->Id, pBox->fWhite, pBox->nPis, pBox->nPos ); + fprintf( pFile, "%s %d %d %d %d\n", pBox->pName, pBox->Id, !pBox->fBlack, pBox->nPis, pBox->nPos ); for ( j = 0; j < pBox->nPos; j++, printf("\n") ) for ( k = 0; k < pBox->nPis; k++ ) if ( pBox->pDelays[j * pBox->nPis + k] == -1 ) diff --git a/src/map/if/ifMan.c b/src/map/if/ifMan.c index 9f9e360e..b0a70a32 100644 --- a/src/map/if/ifMan.c +++ b/src/map/if/ifMan.c @@ -189,10 +189,8 @@ void If_ManStop( If_Man_t * p ) ABC_FREE( p->puTemp[0] ); ABC_FREE( p->pCutTemp ); // free pars memory - if ( p->pPars->pTimesArr ) - ABC_FREE( p->pPars->pTimesArr ); - if ( p->pPars->pTimesReq ) - ABC_FREE( p->pPars->pTimesReq ); + ABC_FREE( p->pPars->pTimesArr ); + ABC_FREE( p->pPars->pTimesReq ); if ( p->pManTim ) Tim_ManStop( p->pManTim ); if ( p->vSwitching ) diff --git a/src/map/if/ifSeq.c b/src/map/if/ifSeq.c index 37c98f0d..d6037ce8 100644 --- a/src/map/if/ifSeq.c +++ b/src/map/if/ifSeq.c @@ -294,6 +294,7 @@ void If_ManPerformMappingSeqPost( If_Man_t * p ) { If_Obj_t * pObjLi, * pObjLo, * pObj; int i; + assert( 0 ); // set arrival times assert( p->pPars->pTimesArr != NULL ); diff --git a/src/map/if/ifUtil.c b/src/map/if/ifUtil.c index b8b03d70..efc6fba3 100644 --- a/src/map/if/ifUtil.c +++ b/src/map/if/ifUtil.c @@ -156,23 +156,27 @@ void If_ManComputeRequired( If_Man_t * p ) if ( p->pManTim == NULL ) { // consider the case when the required times are given - if ( p->pPars->pTimesReq ) + if ( p->pPars->pTimesReq && !p->pPars->fAreaOnly ) { - assert( !p->pPars->fAreaOnly ); // make sure that the required time hold Counter = 0; If_ManForEachCo( p, pObj, i ) { if ( If_ObjArrTime(If_ObjFanin0(pObj)) > p->pPars->pTimesReq[i] + p->fEpsilon ) { + If_ObjFanin0(pObj)->Required = If_ObjArrTime(If_ObjFanin0(pObj)); Counter++; // Abc_Print( 0, "Required times are violated for output %d (arr = %d; req = %d).\n", // i, (int)If_ObjArrTime(If_ObjFanin0(pObj)), (int)p->pPars->pTimesReq[i] ); } - If_ObjFanin0(pObj)->Required = p->pPars->pTimesReq[i]; + else + If_ObjFanin0(pObj)->Required = p->pPars->pTimesReq[i]; + } + if ( Counter && !p->fReqTimeWarn ) + { + Abc_Print( 0, "Required times are exceeded at %d output%s. The earliest arrival times are used.\n", Counter, Counter > 1 ? "s":"" ); + p->fReqTimeWarn = 1; } - if ( Counter ) - Abc_Print( 0, "Required times are violated for %d outputs.\n", Counter ); } else { |