diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2008-04-02 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2008-04-02 08:01:00 -0700 |
commit | 0080244a89eaaccd64c64af8f394486ab5d3e5b5 (patch) | |
tree | 0a0badb1e94215e0689edf36faeed7d7e9f2b88a /src/aig/tim | |
parent | 2c7f6e39b84d29db096388459db7583c01b79b01 (diff) | |
download | abc-0080244a89eaaccd64c64af8f394486ab5d3e5b5.tar.gz abc-0080244a89eaaccd64c64af8f394486ab5d3e5b5.tar.bz2 abc-0080244a89eaaccd64c64af8f394486ab5d3e5b5.zip |
Version abc80402
Diffstat (limited to 'src/aig/tim')
-rw-r--r-- | src/aig/tim/tim.c | 53 | ||||
-rw-r--r-- | src/aig/tim/tim.h | 2 |
2 files changed, 55 insertions, 0 deletions
diff --git a/src/aig/tim/tim.c b/src/aig/tim/tim.c index ea8a3df1..d66dbd35 100644 --- a/src/aig/tim/tim.c +++ b/src/aig/tim/tim.c @@ -78,6 +78,7 @@ struct Tim_Obj_t_ static inline Tim_Obj_t * Tim_ManPi( Tim_Man_t * p, int i ) { assert( i < p->nPis ); return p->pPis + i; } static inline Tim_Obj_t * Tim_ManPo( Tim_Man_t * p, int i ) { assert( i < p->nPos ); return p->pPos + i; } +static inline Tim_Box_t * Tim_ManBox( Tim_Man_t * p, int i ) { return Vec_PtrEntry(p->vBoxes, i); } static inline Tim_Box_t * Tim_ManPiBox( Tim_Man_t * p, int i ) { return Tim_ManPi(p,i)->iObj2Box < 0 ? NULL : Vec_PtrEntry( p->vBoxes, Tim_ManPi(p,i)->iObj2Box ); } static inline Tim_Box_t * Tim_ManPoBox( Tim_Man_t * p, int i ) { return Tim_ManPo(p,i)->iObj2Box < 0 ? NULL : Vec_PtrEntry( p->vBoxes, Tim_ManPo(p,i)->iObj2Box ); } @@ -363,6 +364,48 @@ void Tim_ManTravIdEnable( Tim_Man_t * p ) /**Function************************************************************* + Synopsis [Label box inputs.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Tim_ManSetCurrentTravIdBoxInputs( Tim_Man_t * p, int iBox ) +{ + Tim_Box_t * pBox; + Tim_Obj_t * pObj; + int i; + pBox = Tim_ManBox( p, iBox ); + Tim_ManBoxForEachInput( p, pBox, pObj, i ) + pObj->TravId = p->nTravIds; +} + +/**Function************************************************************* + + Synopsis [Label box outputs.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Tim_ManSetCurrentTravIdBoxOutputs( Tim_Man_t * p, int iBox ) +{ + Tim_Box_t * pBox; + Tim_Obj_t * pObj; + int i; + pBox = Tim_ManBox( p, iBox ); + Tim_ManBoxForEachOutput( p, pBox, pObj, i ) + pObj->TravId = p->nTravIds; +} + +/**Function************************************************************* + Synopsis [Sets the vector of timing tables associated with the manager.] Description [] @@ -469,6 +512,16 @@ void Tim_ManCreateBoxFirst( Tim_Man_t * p, int firstIn, int nIns, int firstOut, ***********************************************************************/ void Tim_ManIncrementTravId( Tim_Man_t * p ) { + int i; + if ( p->nTravIds >= (1<<30)-1 ) + { + p->nTravIds = 0; + for ( i = 0; i < p->nPis; i++ ) + p->pPis[i].TravId = 0; + for ( i = 0; i < p->nPos; i++ ) + p->pPos[i].TravId = 0; + } + assert( p->nTravIds < (1<<30)-1 ); p->nTravIds++; } diff --git a/src/aig/tim/tim.h b/src/aig/tim/tim.h index 6904984f..d092434e 100644 --- a/src/aig/tim/tim.h +++ b/src/aig/tim/tim.h @@ -65,6 +65,8 @@ extern void Tim_ManStop( Tim_Man_t * p ); extern void Tim_ManPrint( Tim_Man_t * p ); extern void Tim_ManTravIdDisable( Tim_Man_t * p ); extern void Tim_ManTravIdEnable( Tim_Man_t * p ); +extern void Tim_ManSetCurrentTravIdBoxInputs( Tim_Man_t * p, int iBox ); +extern void Tim_ManSetCurrentTravIdBoxOutputs( Tim_Man_t * p, int iBox ); extern void Tim_ManSetDelayTables( Tim_Man_t * p, Vec_Ptr_t * vDelayTables ); extern void Tim_ManCreateBox( Tim_Man_t * p, int * pIns, int nIns, int * pOuts, int nOuts, float * pDelayTable ); extern void Tim_ManCreateBoxFirst( Tim_Man_t * p, int firstIn, int nIns, int firstOut, int nOuts, float * pDelayTable ); |