diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-09-23 18:34:10 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-09-23 18:34:10 -0700 |
commit | 40d9b5853b2849c3bf7e2157a4b4c6b798b043d5 (patch) | |
tree | 7c49799a451a3148a757efb35762ffa7c7aa2d01 /src/misc/tim/timBox.c | |
parent | f7caf84f21ff02b12e41be6b7e1fdfeeab3a560f (diff) | |
download | abc-40d9b5853b2849c3bf7e2157a4b4c6b798b043d5.tar.gz abc-40d9b5853b2849c3bf7e2157a4b4c6b798b043d5.tar.bz2 abc-40d9b5853b2849c3bf7e2157a4b4c6b798b043d5.zip |
Testing GIA with time manager.
Diffstat (limited to 'src/misc/tim/timBox.c')
-rw-r--r-- | src/misc/tim/timBox.c | 71 |
1 files changed, 58 insertions, 13 deletions
diff --git a/src/misc/tim/timBox.c b/src/misc/tim/timBox.c index c1176527..82488561 100644 --- a/src/misc/tim/timBox.c +++ b/src/misc/tim/timBox.c @@ -121,13 +121,12 @@ int Tim_ManBoxForCo( Tim_Man_t * p, int iCo ) ***********************************************************************/ int Tim_ManBoxInputFirst( Tim_Man_t * p, int iBox ) { - Tim_Box_t * pBox = (Tim_Box_t *)Vec_PtrEntry( p->vBoxes, iBox ); - return pBox->Inouts[0]; + return Tim_ManBox(p, iBox)->Inouts[0]; } /**Function************************************************************* - Synopsis [Returns the first input of the box.] + Synopsis [Returns the first output of the box.] Description [] @@ -138,13 +137,12 @@ int Tim_ManBoxInputFirst( Tim_Man_t * p, int iBox ) ***********************************************************************/ int Tim_ManBoxOutputFirst( Tim_Man_t * p, int iBox ) { - Tim_Box_t * pBox = (Tim_Box_t *)Vec_PtrEntry( p->vBoxes, iBox ); - return pBox->Inouts[pBox->nInputs]; + return Tim_ManBox(p, iBox)->Inouts[Tim_ManBox(p, iBox)->nInputs]; } /**Function************************************************************* - Synopsis [Returns the first input of the box.] + Synopsis [Returns the number of box inputs.] Description [] @@ -155,13 +153,12 @@ int Tim_ManBoxOutputFirst( Tim_Man_t * p, int iBox ) ***********************************************************************/ int Tim_ManBoxInputNum( Tim_Man_t * p, int iBox ) { - Tim_Box_t * pBox = (Tim_Box_t *)Vec_PtrEntry( p->vBoxes, iBox ); - return pBox->nInputs; + return Tim_ManBox(p, iBox)->nInputs; } /**Function************************************************************* - Synopsis [Returns the first input of the box.] + Synopsis [Returns the number of box outputs.] Description [] @@ -172,13 +169,28 @@ int Tim_ManBoxInputNum( Tim_Man_t * p, int iBox ) ***********************************************************************/ int Tim_ManBoxOutputNum( Tim_Man_t * p, int iBox ) { - Tim_Box_t * pBox = (Tim_Box_t *)Vec_PtrEntry( p->vBoxes, iBox ); - return pBox->nOutputs; + return Tim_ManBox(p, iBox)->nOutputs; +} + +/**Function************************************************************* + + Synopsis [Return the delay table id.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Tim_ManBoxDelayTableId( Tim_Man_t * p, int iBox ) +{ + return Tim_ManBox(p, iBox)->iDelayTable; } /**Function************************************************************* - Synopsis [] + Synopsis [Return the delay table.] Description [] @@ -190,7 +202,7 @@ int Tim_ManBoxOutputNum( Tim_Man_t * p, int iBox ) float * Tim_ManBoxDelayTable( Tim_Man_t * p, int iBox ) { float * pTable; - Tim_Box_t * pBox = (Tim_Box_t *)Vec_PtrEntry( p->vBoxes, iBox ); + Tim_Box_t * pBox = Tim_ManBox(p, iBox); if ( pBox->iDelayTable < 0 ) return NULL; pTable = (float *)Vec_PtrEntry( p->vDelayTables, pBox->iDelayTable ); @@ -199,6 +211,39 @@ float * Tim_ManBoxDelayTable( Tim_Man_t * p, int iBox ) return pTable; } +/**Function************************************************************* + + Synopsis [Returns the copy of the box.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Tim_ManBoxCopy( Tim_Man_t * p, int iBox ) +{ + return Tim_ManBox(p, iBox)->iCopy; +} + +/**Function************************************************************* + + Synopsis [Sets the copy of the box.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Tim_ManBoxSetCopy( Tim_Man_t * p, int iBox, int iCopy ) +{ + Tim_ManBox(p, iBox)->iCopy = iCopy; +} + + //////////////////////////////////////////////////////////////////////// /// END OF FILE /// //////////////////////////////////////////////////////////////////////// |