diff options
| author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-01-25 05:57:52 +0700 | 
|---|---|---|
| committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-01-25 05:57:52 +0700 | 
| commit | 4bd54729d799513d8c21333446706d387aac7192 (patch) | |
| tree | fe61f85f818891e0529e7d85044da70d1f0171f5 | |
| parent | 4efc89d3421198005af1b6a5971809628897aa19 (diff) | |
| download | abc-4bd54729d799513d8c21333446706d387aac7192.tar.gz abc-4bd54729d799513d8c21333446706d387aac7192.tar.bz2 abc-4bd54729d799513d8c21333446706d387aac7192.zip  | |
Integration of timing manager.
| -rw-r--r-- | src/misc/tim/timMan.c | 13 | 
1 files changed, 10 insertions, 3 deletions
diff --git a/src/misc/tim/timMan.c b/src/misc/tim/timMan.c index 72f3bbff..a0f3a6a2 100644 --- a/src/misc/tim/timMan.c +++ b/src/misc/tim/timMan.c @@ -115,9 +115,11 @@ Tim_Man_t * Tim_ManDup( Tim_Man_t * p, int fUnitDelay )      // duplicate delay tables      if ( Tim_ManDelayTableNum(p) > 0 )      { -        pNew->vDelayTables = Vec_PtrAlloc( Vec_PtrSize(p->vDelayTables) ); +        pNew->vDelayTables = Vec_PtrStart( Vec_PtrSize(p->vDelayTables) );          Tim_ManForEachTable( p, pDelayTable, i )          { +            if ( pDelayTable == NULL ) +                continue;              assert( i == (int)pDelayTable[0] );              nInputs   = (int)pDelayTable[1];              nOutputs  = (int)pDelayTable[2]; @@ -127,8 +129,10 @@ Tim_Man_t * Tim_ManDup( Tim_Man_t * p, int fUnitDelay )              pDelayTableNew[2] = (int)pDelayTable[2];              for ( k = 0; k < nInputs * nOutputs; k++ )                  pDelayTableNew[3+k] = fUnitDelay ? 1.0 : pDelayTable[3+k]; -            assert( (int)pDelayTableNew[0] == Vec_PtrSize(pNew->vDelayTables) ); -            Vec_PtrPush( pNew->vDelayTables, pDelayTableNew ); +//            assert( (int)pDelayTableNew[0] == Vec_PtrSize(pNew->vDelayTables) ); +            assert( Vec_PtrEntry(pNew->vDelayTables, i) == NULL ); +            Vec_PtrWriteEntry( pNew->vDelayTables, i, pDelayTableNew ); +printf( "Finished duplicating delay table %d.\n", i );          }      }      // duplicate boxes @@ -358,6 +362,9 @@ void Tim_ManPrint( Tim_Man_t * p )          else              Tim_ManBoxForEachOutput( p, pBox, pObj, k )                  printf( "box-out%3d :  arr = %5.3f  req = %5.3f\n", k, pObj->timeArr, pObj->timeReq ); + +        if ( i > 2 ) +            break;      }      // print delay tables  | 
