diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2008-03-26 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2008-03-26 08:01:00 -0700 |
commit | e258fcb2cd0cb0bca2bb077b2e5954b7be02b1c3 (patch) | |
tree | 8056eb71a429208d41735b2be3e237d3ef8e25ff /src/aig/tim/tim.c | |
parent | 85207c7568dd2edac04e97ecdf59c2d684d1cb91 (diff) | |
download | abc-e258fcb2cd0cb0bca2bb077b2e5954b7be02b1c3.tar.gz abc-e258fcb2cd0cb0bca2bb077b2e5954b7be02b1c3.tar.bz2 abc-e258fcb2cd0cb0bca2bb077b2e5954b7be02b1c3.zip |
Version abc80326
Diffstat (limited to 'src/aig/tim/tim.c')
-rw-r--r-- | src/aig/tim/tim.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/aig/tim/tim.c b/src/aig/tim/tim.c index 8d312dba..a71e1497 100644 --- a/src/aig/tim/tim.c +++ b/src/aig/tim/tim.c @@ -148,6 +148,49 @@ Tim_Man_t * Tim_ManStart( int nPis, int nPos ) /**Function************************************************************* + Synopsis [Duplicates the timing manager.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +Tim_Man_t * Tim_ManDup( Tim_Man_t * p, int fDiscrete ) +{ + Tim_Man_t * pNew; + Tim_Box_t * pBox; + float * pDelayTableNew; + int i, k; + pNew = Tim_ManStart( p->nPis, p->nPos ); + memcpy( pNew->pPis, p->pPis, sizeof(Tim_Obj_t) * p->nPis ); + memcpy( pNew->pPos, p->pPos, sizeof(Tim_Obj_t) * p->nPos ); + for ( k = 0; k < p->nPis; k++ ) + pNew->pPis[k].TravId = 0; + for ( k = 0; k < p->nPos; k++ ) + pNew->pPos[k].TravId = 0; + if ( fDiscrete ) + for ( k = 0; k < p->nPis; k++ ) + pNew->pPis[k].timeArr = 0.0; // modify here + pNew->vDelayTables = Vec_PtrAlloc( 100 ); + Tim_ManForEachBox( p, pBox, i ) + { + pDelayTableNew = ALLOC( float, pBox->nInputs * pBox->nOutputs ); + Vec_PtrPush( pNew->vDelayTables, pDelayTableNew ); + if ( fDiscrete ) + for ( k = 0; k < pBox->nInputs * pBox->nOutputs; k++ ) + pDelayTableNew[k] = 1.0; // modify here + else + memcpy( pDelayTableNew, pBox->pDelayTable, sizeof(float) * pBox->nInputs * pBox->nOutputs ); + Tim_ManCreateBoxFirst( pNew, pBox->Inouts[0], pBox->nInputs, + pBox->Inouts[pBox->nInputs], pBox->nOutputs, pDelayTableNew ); + } + return pNew; +} + +/**Function************************************************************* + Synopsis [Stops the timing manager.] Description [] |