diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-02-20 14:23:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-02-20 14:23:00 -0800 |
commit | 466c4e9992fb10e4f6b1dc92b41e14c1305d8269 (patch) | |
tree | 21a8935ebfd7bda80cb3ee1b2153e3e18b1e3020 /src/misc | |
parent | f4c305fc468c5657a2bbae825261f3e4278ed6f8 (diff) | |
download | abc-466c4e9992fb10e4f6b1dc92b41e14c1305d8269.tar.gz abc-466c4e9992fb10e4f6b1dc92b41e14c1305d8269.tar.bz2 abc-466c4e9992fb10e4f6b1dc92b41e14c1305d8269.zip |
Integrating hierarchy information (reporting incorrect topological order).
Diffstat (limited to 'src/misc')
-rw-r--r-- | src/misc/tim/tim.h | 1 | ||||
-rw-r--r-- | src/misc/tim/timBox.c | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/misc/tim/tim.h b/src/misc/tim/tim.h index bb259d7d..ef94df97 100644 --- a/src/misc/tim/tim.h +++ b/src/misc/tim/tim.h @@ -121,6 +121,7 @@ extern int Tim_ManBoxDelayTableId( Tim_Man_t * p, int iBox ); extern float * Tim_ManBoxDelayTable( Tim_Man_t * p, int iBox ); extern int Tim_ManBoxCopy( Tim_Man_t * p, int iBox ); extern void Tim_ManBoxSetCopy( Tim_Man_t * p, int iBox, int iCopy ); +extern int Tim_ManBoxFindFromCiNum( Tim_Man_t * p, int iCiNum ); /*=== timDump.c ===========================================================*/ extern Vec_Str_t * Tim_ManSave( Tim_Man_t * p, int fHieOnly ); extern Tim_Man_t * Tim_ManLoad( Vec_Str_t * p, int fHieOnly ); diff --git a/src/misc/tim/timBox.c b/src/misc/tim/timBox.c index 82488561..5d29970e 100644 --- a/src/misc/tim/timBox.c +++ b/src/misc/tim/timBox.c @@ -243,6 +243,29 @@ void Tim_ManBoxSetCopy( Tim_Man_t * p, int iBox, int iCopy ) Tim_ManBox(p, iBox)->iCopy = iCopy; } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Tim_ManBoxFindFromCiNum( Tim_Man_t * p, int iCiNum ) +{ + Tim_Box_t * pBox; + int i; + assert( iCiNum >= 0 && iCiNum < Tim_ManCiNum(p) ); + if ( iCiNum < Tim_ManPiNum(p) ) + return -1; + Tim_ManForEachBox( p, pBox, i ) + if ( iCiNum < Tim_ManBoxOutputFirst(p, i) ) + return i - 1; + return -2; +} //////////////////////////////////////////////////////////////////////// /// END OF FILE /// |