abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
timMan.c File Reference
#include "timInt.h"
#include "map/if/if.h"

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START
Tim_Man_t
Tim_ManStart (int nCis, int nCos)
 DECLARATIONS ///. More...
 
Tim_Man_tTim_ManDup (Tim_Man_t *p, int fUnitDelay)
 
Tim_Man_tTim_ManTrim (Tim_Man_t *p, Vec_Int_t *vBoxPres)
 
Tim_Man_tTim_ManReduce (Tim_Man_t *p, Vec_Int_t *vBoxesLeft, int nTermsDiff)
 
Vec_Int_tTim_ManAlignTwo (Tim_Man_t *pSpec, Tim_Man_t *pImpl)
 
void Tim_ManStop (Tim_Man_t *p)
 
void Tim_ManStopP (Tim_Man_t **p)
 
void Tim_ManCreate (Tim_Man_t *p, void *pLib, Vec_Flt_t *vInArrs, Vec_Flt_t *vOutReqs)
 
float * Tim_ManGetArrTimes (Tim_Man_t *p)
 
float * Tim_ManGetReqTimes (Tim_Man_t *p)
 
void Tim_ManPrint (Tim_Man_t *p)
 
void Tim_ManPrintStats (Tim_Man_t *p, int nAnd2Delay)
 
int Tim_ManCiNum (Tim_Man_t *p)
 
int Tim_ManCoNum (Tim_Man_t *p)
 
int Tim_ManPiNum (Tim_Man_t *p)
 
int Tim_ManPoNum (Tim_Man_t *p)
 
int Tim_ManBoxNum (Tim_Man_t *p)
 
int Tim_ManBlackBoxNum (Tim_Man_t *p)
 
int Tim_ManDelayTableNum (Tim_Man_t *p)
 
void Tim_ManSetDelayTables (Tim_Man_t *p, Vec_Ptr_t *vDelayTables)
 
void Tim_ManTravIdDisable (Tim_Man_t *p)
 
void Tim_ManTravIdEnable (Tim_Man_t *p)
 

Function Documentation

Vec_Int_t* Tim_ManAlignTwo ( Tim_Man_t pSpec,
Tim_Man_t pImpl 
)

Function*************************************************************

Synopsis [Aligns two sets of boxes using the copy field.]

Description []

SideEffects []

SeeAlso []

Definition at line 344 of file timMan.c.

345 {
346  Vec_Int_t * vBoxPres;
347  Tim_Box_t * pBox;
348  int i;
349  assert( Tim_ManBoxNum(pSpec) > Tim_ManBoxNum(pImpl) );
350  // check if boxes of pImpl can be aligned
351  Tim_ManForEachBox( pImpl, pBox, i )
352  if ( pBox->iCopy < 0 || pBox->iCopy >= Tim_ManBoxNum(pSpec) )
353  return NULL;
354  // map dropped boxes into 1, others into 0
355  vBoxPres = Vec_IntStart( Tim_ManBoxNum(pSpec) );
356  Tim_ManForEachBox( pImpl, pBox, i )
357  {
358  assert( !Vec_IntEntry(vBoxPres, pBox->iCopy) );
359  Vec_IntWriteEntry( vBoxPres, pBox->iCopy, 1 );
360  }
361  return vBoxPres;
362 }
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
#define Tim_ManForEachBox(p, pBox, i)
Definition: timInt.h:117
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
int Tim_ManBoxNum(Tim_Man_t *p)
Definition: timMan.c:702
static Vec_Int_t * Vec_IntStart(int nSize)
Definition: bblif.c:172
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
if(last==0)
Definition: sparse_int.h:34
#define assert(ex)
Definition: util_old.h:213
typedefABC_NAMESPACE_HEADER_START struct Tim_Box_t_ Tim_Box_t
INCLUDES ///.
Definition: timInt.h:48
int Tim_ManBlackBoxNum ( Tim_Man_t p)

Definition at line 706 of file timMan.c.

707 {
708  Tim_Box_t * pBox;
709  int i, Counter = 0;
710  if ( Tim_ManBoxNum(p) )
711  Tim_ManForEachBox( p, pBox, i )
712  Counter += pBox->fBlack;
713  return Counter;
714 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define Tim_ManForEachBox(p, pBox, i)
Definition: timInt.h:117
int Tim_ManBoxNum(Tim_Man_t *p)
Definition: timMan.c:702
static int Counter
typedefABC_NAMESPACE_HEADER_START struct Tim_Box_t_ Tim_Box_t
INCLUDES ///.
Definition: timInt.h:48
int Tim_ManBoxNum ( Tim_Man_t p)

Definition at line 702 of file timMan.c.

703 {
704  return p->vBoxes ? Vec_PtrSize(p->vBoxes) : 0;
705 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
int Tim_ManCiNum ( Tim_Man_t p)

Function*************************************************************

Synopsis [Read parameters.]

Description []

SideEffects []

SeeAlso []

Definition at line 680 of file timMan.c.

681 {
682  return p->nCis;
683 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int Tim_ManCoNum ( Tim_Man_t p)

Definition at line 684 of file timMan.c.

685 {
686  return p->nCos;
687 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Tim_ManCreate ( Tim_Man_t p,
void *  pLib,
Vec_Flt_t vInArrs,
Vec_Flt_t vOutReqs 
)

Function*************************************************************

Synopsis [Creates manager using hierarchy / box library / delay info.]

Description []

SideEffects []

SeeAlso []

Definition at line 403 of file timMan.c.

404 {
405  If_LibBox_t * pLibBox = (If_LibBox_t *)pLib;
406  If_Box_t * pIfBox;
407  Tim_Box_t * pBox;
408  Tim_Obj_t * pObj;
409  float * pTable;
410  int i, k;
411  assert( p->vDelayTables == NULL );
412  p->vDelayTables = pLibBox ? Vec_PtrStart( Vec_PtrSize(pLibBox->vBoxes) ) : Vec_PtrAlloc( 100 );
413  if ( p->vBoxes )
414  Tim_ManForEachBox( p, pBox, i )
415  {
416  if ( pBox->iDelayTable == -1 || pLibBox == NULL )
417  {
418  // create table with constants
419  pTable = ABC_ALLOC( float, 3 + pBox->nInputs * pBox->nOutputs );
420  pTable[0] = pBox->iDelayTable;
421  pTable[1] = pBox->nInputs;
422  pTable[2] = pBox->nOutputs;
423  for ( k = 0; k < pBox->nInputs * pBox->nOutputs; k++ )
424  pTable[3 + k] = 1.0;
425  // save table
426  pBox->iDelayTable = Vec_PtrSize(p->vDelayTables);
427  Vec_PtrPush( p->vDelayTables, pTable );
428  continue;
429  }
430  assert( pBox->iDelayTable >= 0 && pBox->iDelayTable < Vec_PtrSize(pLibBox->vBoxes) );
431  pIfBox = (If_Box_t *)Vec_PtrEntry( pLibBox->vBoxes, pBox->iDelayTable );
432  assert( pIfBox != NULL );
433  assert( pIfBox->nPis == pBox->nInputs );
434  assert( pIfBox->nPos == pBox->nOutputs );
435  pBox->fBlack = pIfBox->fBlack;
436  if ( Vec_PtrEntry( p->vDelayTables, pBox->iDelayTable ) != NULL )
437  continue;
438  // create table of boxes
439  pTable = ABC_ALLOC( float, 3 + pBox->nInputs * pBox->nOutputs );
440  pTable[0] = pBox->iDelayTable;
441  pTable[1] = pBox->nInputs;
442  pTable[2] = pBox->nOutputs;
443  for ( k = 0; k < pBox->nInputs * pBox->nOutputs; k++ )
444  pTable[3 + k] = pIfBox->pDelays[k];
445  // save table
446  Vec_PtrWriteEntry( p->vDelayTables, pBox->iDelayTable, pTable );
447  }
448  // create arrival times
449  if ( vInArrs )
450  {
451  assert( Vec_FltSize(vInArrs) == Tim_ManPiNum(p) );
452  Tim_ManForEachPi( p, pObj, i )
453  pObj->timeArr = Vec_FltEntry(vInArrs, i);
454 
455  }
456  // create required times
457  if ( vOutReqs )
458  {
459  k = 0;
460  assert( Vec_FltSize(vOutReqs) == Tim_ManPoNum(p) );
461  Tim_ManForEachPo( p, pObj, i )
462  pObj->timeReq = Vec_FltEntry(vOutReqs, k++);
463  assert( k == Tim_ManPoNum(p) );
464  }
465 }
char fBlack
Definition: if.h:341
static Vec_Ptr_t * Vec_PtrStart(int nSize)
Definition: vecPtr.h:106
int * pDelays
Definition: if.h:347
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define Tim_ManForEachBox(p, pBox, i)
Definition: timInt.h:117
int Tim_ManPiNum(Tim_Man_t *p)
Definition: timMan.c:688
#define Tim_ManForEachPo(p, pObj, i)
Definition: timInt.h:114
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
int Tim_ManPoNum(Tim_Man_t *p)
Definition: timMan.c:694
if(last==0)
Definition: sparse_int.h:34
int nPis
Definition: if.h:345
Vec_Ptr_t * vBoxes
Definition: if.h:352
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
Definition: vecPtr.h:396
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
Definition: if.h:337
#define Tim_ManForEachPi(p, pObj, i)
Definition: timInt.h:112
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
#define assert(ex)
Definition: util_old.h:213
static float Vec_FltEntry(Vec_Flt_t *p, int i)
Definition: vecFlt.h:342
static int Vec_FltSize(Vec_Flt_t *p)
Definition: vecFlt.h:294
typedefABC_NAMESPACE_HEADER_START struct Tim_Box_t_ Tim_Box_t
INCLUDES ///.
Definition: timInt.h:48
int nPos
Definition: if.h:346
int Tim_ManDelayTableNum ( Tim_Man_t p)

Definition at line 715 of file timMan.c.

716 {
717  return p->vDelayTables ? Vec_PtrSize(p->vDelayTables) : 0;
718 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
Tim_Man_t* Tim_ManDup ( Tim_Man_t p,
int  fUnitDelay 
)

Function*************************************************************

Synopsis [Duplicates the timing manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 86 of file timMan.c.

87 {
88  Tim_Man_t * pNew;
89  Tim_Box_t * pBox;
90  Tim_Obj_t * pObj;
91  float * pDelayTable, * pDelayTableNew;
92  int i, k, nInputs, nOutputs;
93  // clear traversal IDs
94  Tim_ManForEachCi( p, pObj, i )
95  pObj->TravId = 0;
96  Tim_ManForEachCo( p, pObj, i )
97  pObj->TravId = 0;
98  // create new manager
99  pNew = Tim_ManStart( p->nCis, p->nCos );
100  // copy box connectivity information
101  memcpy( pNew->pCis, p->pCis, sizeof(Tim_Obj_t) * p->nCis );
102  memcpy( pNew->pCos, p->pCos, sizeof(Tim_Obj_t) * p->nCos );
103  if ( fUnitDelay )
104  {
105  // discretize PI arrival times
106 // Tim_ManForEachPi( pNew, pObj, k )
107 // pObj->timeArr = (int)pObj->timeArr;
108  // discretize PO required times
109 // Tim_ManForEachPo( pNew, pObj, k )
110 // pObj->timeReq = 1 + (int)pObj->timeReq;
111  // clear PI arrival and PO required
112  Tim_ManInitPiArrivalAll( p, 0.0 );
114  }
115  // duplicate delay tables
116  if ( Tim_ManDelayTableNum(p) > 0 )
117  {
118  pNew->vDelayTables = Vec_PtrStart( Vec_PtrSize(p->vDelayTables) );
119  Tim_ManForEachTable( p, pDelayTable, i )
120  {
121  if ( pDelayTable == NULL )
122  continue;
123  assert( i == (int)pDelayTable[0] );
124  nInputs = (int)pDelayTable[1];
125  nOutputs = (int)pDelayTable[2];
126  pDelayTableNew = ABC_ALLOC( float, 3 + nInputs * nOutputs );
127  pDelayTableNew[0] = (int)pDelayTable[0];
128  pDelayTableNew[1] = (int)pDelayTable[1];
129  pDelayTableNew[2] = (int)pDelayTable[2];
130  for ( k = 0; k < nInputs * nOutputs; k++ )
131  if ( pDelayTable[3+k] == -ABC_INFINITY )
132  pDelayTableNew[3+k] = -ABC_INFINITY;
133  else
134  pDelayTableNew[3+k] = fUnitDelay ? (float)fUnitDelay : pDelayTable[3+k];
135 // assert( (int)pDelayTableNew[0] == Vec_PtrSize(pNew->vDelayTables) );
136  assert( Vec_PtrEntry(pNew->vDelayTables, i) == NULL );
137  Vec_PtrWriteEntry( pNew->vDelayTables, i, pDelayTableNew );
138 //printf( "Finished duplicating delay table %d.\n", i );
139  }
140  }
141  // duplicate boxes
142  if ( Tim_ManBoxNum(p) > 0 )
143  {
144  pNew->vBoxes = Vec_PtrAlloc( Tim_ManBoxNum(p) );
145  Tim_ManForEachBox( p, pBox, i )
146  Tim_ManCreateBox( pNew, pBox->Inouts[0], pBox->nInputs,
147  pBox->Inouts[pBox->nInputs], pBox->nOutputs, pBox->iDelayTable );
148  }
149  return pNew;
150 }
static Vec_Ptr_t * Vec_PtrStart(int nSize)
Definition: vecPtr.h:106
#define Tim_ManForEachTable(p, pTable, i)
Definition: timInt.h:125
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define Tim_ManForEachBox(p, pBox, i)
Definition: timInt.h:117
char * memcpy()
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
int Tim_ManDelayTableNum(Tim_Man_t *p)
Definition: timMan.c:715
void Tim_ManCreateBox(Tim_Man_t *p, int firstIn, int nIns, int firstOut, int nOuts, int iDelayTable)
ITERATORS ///.
Definition: timBox.c:44
int Tim_ManBoxNum(Tim_Man_t *p)
Definition: timMan.c:702
ABC_NAMESPACE_IMPL_START Tim_Man_t * Tim_ManStart(int nCis, int nCos)
DECLARATIONS ///.
Definition: timMan.c:45
#define Tim_ManForEachCo(p, pObj, i)
Definition: timInt.h:109
if(last==0)
Definition: sparse_int.h:34
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
Definition: vecPtr.h:396
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
void Tim_ManInitPiArrivalAll(Tim_Man_t *p, float Delay)
Definition: timTime.c:78
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
#define TIM_ETERNITY
MACRO DEFINITIONS ///.
Definition: tim.h:98
#define Tim_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: timInt.h:107
#define ABC_INFINITY
MACRO DEFINITIONS ///.
Definition: abc_global.h:216
#define assert(ex)
Definition: util_old.h:213
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
Definition: tim.h:92
typedefABC_NAMESPACE_HEADER_START struct Tim_Box_t_ Tim_Box_t
INCLUDES ///.
Definition: timInt.h:48
void Tim_ManInitPoRequiredAll(Tim_Man_t *p, float Delay)
Definition: timTime.c:97
float* Tim_ManGetArrTimes ( Tim_Man_t p)

Function*************************************************************

Synopsis [Get arrival and required times if they are non-trivial.]

Description []

SideEffects []

SeeAlso []

Definition at line 479 of file timMan.c.

480 {
481  float * pTimes;
482  Tim_Obj_t * pObj;
483  int i;
484  Tim_ManForEachPi( p, pObj, i )
485  if ( pObj->timeArr != 0.0 )
486  break;
487  if ( i == Tim_ManPiNum(p) )
488  return NULL;
489  pTimes = ABC_FALLOC( float, Tim_ManCiNum(p) );
490  Tim_ManForEachPi( p, pObj, i )
491  pTimes[i] = pObj->timeArr;
492  return pTimes;
493 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int Tim_ManPiNum(Tim_Man_t *p)
Definition: timMan.c:688
if(last==0)
Definition: sparse_int.h:34
#define Tim_ManForEachPi(p, pObj, i)
Definition: timInt.h:112
int Tim_ManCiNum(Tim_Man_t *p)
Definition: timMan.c:680
#define ABC_FALLOC(type, num)
Definition: abc_global.h:231
float* Tim_ManGetReqTimes ( Tim_Man_t p)

Definition at line 494 of file timMan.c.

495 {
496  float * pTimes;
497  Tim_Obj_t * pObj;
498  int i, k = 0;
499  Tim_ManForEachPo( p, pObj, i )
500  if ( pObj->timeReq != TIM_ETERNITY )
501  break;
502  if ( i == Tim_ManPoNum(p) )
503  return NULL;
504  pTimes = ABC_FALLOC( float, Tim_ManCoNum(p) );
505  Tim_ManForEachPo( p, pObj, i )
506  pTimes[k++] = pObj->timeArr;
507  assert( k == Tim_ManPoNum(p) );
508  return pTimes;
509 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define Tim_ManForEachPo(p, pObj, i)
Definition: timInt.h:114
int Tim_ManPoNum(Tim_Man_t *p)
Definition: timMan.c:694
if(last==0)
Definition: sparse_int.h:34
#define TIM_ETERNITY
MACRO DEFINITIONS ///.
Definition: tim.h:98
int Tim_ManCoNum(Tim_Man_t *p)
Definition: timMan.c:684
#define assert(ex)
Definition: util_old.h:213
#define ABC_FALLOC(type, num)
Definition: abc_global.h:231
int Tim_ManPiNum ( Tim_Man_t p)

Definition at line 688 of file timMan.c.

689 {
690  if ( Tim_ManBoxNum(p) == 0 )
691  return Tim_ManCiNum(p);
692  return Tim_ManBoxOutputFirst(p, 0);
693 }
int Tim_ManBoxOutputFirst(Tim_Man_t *p, int iBox)
Definition: timBox.c:154
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int Tim_ManBoxNum(Tim_Man_t *p)
Definition: timMan.c:702
int Tim_ManCiNum(Tim_Man_t *p)
Definition: timMan.c:680
int Tim_ManPoNum ( Tim_Man_t p)

Definition at line 694 of file timMan.c.

695 {
696  int iLastBoxId;
697  if ( Tim_ManBoxNum(p) == 0 )
698  return Tim_ManCoNum(p);
699  iLastBoxId = Tim_ManBoxNum(p) - 1;
700  return Tim_ManCoNum(p) - (Tim_ManBoxInputFirst(p, iLastBoxId) + Tim_ManBoxInputNum(p, iLastBoxId));
701 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int Tim_ManBoxNum(Tim_Man_t *p)
Definition: timMan.c:702
int Tim_ManBoxInputNum(Tim_Man_t *p, int iBox)
Definition: timBox.c:186
int Tim_ManCoNum(Tim_Man_t *p)
Definition: timMan.c:684
int Tim_ManBoxInputFirst(Tim_Man_t *p, int iBox)
Definition: timBox.c:122
void Tim_ManPrint ( Tim_Man_t p)

Function*************************************************************

Synopsis [Prints the timing manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 523 of file timMan.c.

524 {
525  Tim_Box_t * pBox;
526  Tim_Obj_t * pObj, * pPrev;
527  float * pTable;
528  int i, j, k, TableX, TableY;
529  if ( p == NULL )
530  return;
531  printf( "TIMING MANAGER:\n" );
532  printf( "PI = %d. CI = %d. PO = %d. CO = %d. Box = %d.\n",
534 
535  // print CI info
536  pPrev = p->pCis;
537  Tim_ManForEachPi( p, pObj, i )
538  if ( pPrev->timeArr != pObj->timeArr || pPrev->timeReq != pObj->timeReq )
539  break;
540  if ( i == Tim_ManCiNum(p) )
541  printf( "All PIs : arrival = %5.3f required = %5.3f\n", pPrev->timeArr, pPrev->timeReq );
542  else
543  Tim_ManForEachPi( p, pObj, i )
544  printf( "PI%5d : arrival = %5.3f required = %5.3f\n", i, pObj->timeArr, pObj->timeReq );
545 
546  // print CO info
547  pPrev = p->pCos;
548  Tim_ManForEachPo( p, pObj, i )
549  if ( pPrev->timeArr != pObj->timeArr || pPrev->timeReq != pObj->timeReq )
550  break;
551  if ( i == Tim_ManCoNum(p) )
552  printf( "All POs : arrival = %5.3f required = %5.3f\n", pPrev->timeArr, pPrev->timeReq );
553  else
554  {
555  int k = 0;
556  Tim_ManForEachPo( p, pObj, i )
557  printf( "PO%5d : arrival = %5.3f required = %5.3f\n", k++, pObj->timeArr, pObj->timeReq );
558  }
559 
560  // print box info
561  if ( Tim_ManBoxNum(p) > 0 )
562  Tim_ManForEachBox( p, pBox, i )
563  {
564  printf( "*** Box %5d : I =%4d. O =%4d. I1 =%6d. O1 =%6d. Table =%4d\n",
565  i, pBox->nInputs, pBox->nOutputs,
567  pBox->iDelayTable );
568 
569  // print box inputs
570  pPrev = Tim_ManBoxInput( p, pBox, 0 );
571  Tim_ManBoxForEachInput( p, pBox, pObj, k )
572  if ( pPrev->timeArr != pObj->timeArr || pPrev->timeReq != pObj->timeReq )
573  break;
574  if ( k == Tim_ManBoxInputNum(p, pBox->iBox) )
575  printf( "Box inputs : arrival = %5.3f required = %5.3f\n", pPrev->timeArr, pPrev->timeReq );
576  else
577  Tim_ManBoxForEachInput( p, pBox, pObj, k )
578  printf( "box-in%4d : arrival = %5.3f required = %5.3f\n", k, pObj->timeArr, pObj->timeReq );
579 
580  // print box outputs
581  pPrev = Tim_ManBoxOutput( p, pBox, 0 );
582  Tim_ManBoxForEachOutput( p, pBox, pObj, k )
583  if ( pPrev->timeArr != pObj->timeArr || pPrev->timeReq != pObj->timeReq )
584  break;
585  if ( k == Tim_ManBoxOutputNum(p, pBox->iBox) )
586  printf( "Box outputs : arrival = %5.3f required = %5.3f\n", pPrev->timeArr, pPrev->timeReq );
587  else
588  Tim_ManBoxForEachOutput( p, pBox, pObj, k )
589  printf( "box-out%3d : arrival = %5.3f required = %5.3f\n", k, pObj->timeArr, pObj->timeReq );
590 
591  if ( i > 2 )
592  break;
593  }
594 
595  // print delay tables
596  if ( Tim_ManDelayTableNum(p) > 0 )
597  Tim_ManForEachTable( p, pTable, i )
598  {
599  if ( pTable == NULL )
600  continue;
601  printf( "Delay table %d:\n", i );
602  assert( i == (int)pTable[0] );
603  TableX = (int)pTable[1];
604  TableY = (int)pTable[2];
605  for ( j = 0; j < TableY; j++, printf( "\n" ) )
606  for ( k = 0; k < TableX; k++ )
607  if ( pTable[3+j*TableX+k] == -ABC_INFINITY )
608  printf( "%5s", "-" );
609  else
610  printf( "%5.0f", pTable[3+j*TableX+k] );
611  }
612  printf( "\n" );
613 }
int Tim_ManBoxOutputFirst(Tim_Man_t *p, int iBox)
Definition: timBox.c:154
#define Tim_ManForEachTable(p, pTable, i)
Definition: timInt.h:125
#define Tim_ManBoxForEachOutput(p, pBox, pObj, i)
Definition: timInt.h:122
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define Tim_ManForEachBox(p, pBox, i)
Definition: timInt.h:117
int Tim_ManPiNum(Tim_Man_t *p)
Definition: timMan.c:688
#define Tim_ManForEachPo(p, pObj, i)
Definition: timInt.h:114
int Tim_ManBoxOutputNum(Tim_Man_t *p, int iBox)
Definition: timBox.c:202
int Tim_ManDelayTableNum(Tim_Man_t *p)
Definition: timMan.c:715
static Tim_Obj_t * Tim_ManBoxOutput(Tim_Man_t *p, Tim_Box_t *pBox, int i)
Definition: timInt.h:101
int Tim_ManPoNum(Tim_Man_t *p)
Definition: timMan.c:694
int Tim_ManBoxNum(Tim_Man_t *p)
Definition: timMan.c:702
#define Tim_ManBoxForEachInput(p, pBox, pObj, i)
Definition: timInt.h:120
if(last==0)
Definition: sparse_int.h:34
else
Definition: sparse_int.h:55
int Tim_ManBoxInputNum(Tim_Man_t *p, int iBox)
Definition: timBox.c:186
#define Tim_ManForEachPi(p, pObj, i)
Definition: timInt.h:112
int Tim_ManCoNum(Tim_Man_t *p)
Definition: timMan.c:684
#define ABC_INFINITY
MACRO DEFINITIONS ///.
Definition: abc_global.h:216
#define assert(ex)
Definition: util_old.h:213
static Tim_Obj_t * Tim_ManBoxInput(Tim_Man_t *p, Tim_Box_t *pBox, int i)
Definition: timInt.h:100
int Tim_ManBoxInputFirst(Tim_Man_t *p, int iBox)
Definition: timBox.c:122
typedefABC_NAMESPACE_HEADER_START struct Tim_Box_t_ Tim_Box_t
INCLUDES ///.
Definition: timInt.h:48
int Tim_ManCiNum(Tim_Man_t *p)
Definition: timMan.c:680
void Tim_ManPrintStats ( Tim_Man_t p,
int  nAnd2Delay 
)

Function*************************************************************

Synopsis [Prints statistics of the timing manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 626 of file timMan.c.

627 {
628  Tim_Box_t * pBox;
629  Vec_Int_t * vCounts;
630  Vec_Ptr_t * vBoxes;
631  int i, Count, IdMax;
632  if ( p == NULL )
633  return;
634  Abc_Print( 1, "Hierarchy : " );
635  printf( "PI/CI = %d/%d PO/CO = %d/%d Box = %d ",
638  Tim_ManBoxNum(p) );
639  if ( nAnd2Delay )
640  printf( "delay(AND2) = %d", nAnd2Delay );
641  printf( "\n" );
642  if ( Tim_ManBoxNum(p) == 0 )
643  return;
644  IdMax = 0;
645  Tim_ManForEachBox( p, pBox, i )
646  IdMax = Abc_MaxInt( IdMax, pBox->iDelayTable );
647  vCounts = Vec_IntStart( IdMax+1 );
648  vBoxes = Vec_PtrStart( IdMax+1 );
649  Tim_ManForEachBox( p, pBox, i )
650  {
651  Vec_IntAddToEntry( vCounts, pBox->iDelayTable, 1 );
652  Vec_PtrWriteEntry( vBoxes, pBox->iDelayTable, pBox );
653  }
654  // print statistics about boxes
655  Vec_IntForEachEntry( vCounts, Count, i )
656  {
657  if ( Count == 0 ) continue;
658  pBox = (Tim_Box_t *)Vec_PtrEntry( vBoxes, i );
659  printf( " Box %4d ", i );
660  printf( "Num = %4d ", Count );
661  printf( "Ins = %4d ", pBox->nInputs );
662  printf( "Outs = %4d", pBox->nOutputs );
663  printf( "\n" );
664  }
665  Vec_IntFree( vCounts );
666  Vec_PtrFree( vBoxes );
667 }
static Vec_Ptr_t * Vec_PtrStart(int nSize)
Definition: vecPtr.h:106
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
#define Tim_ManForEachBox(p, pBox, i)
Definition: timInt.h:117
int Tim_ManPiNum(Tim_Man_t *p)
Definition: timMan.c:688
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
int Tim_ManPoNum(Tim_Man_t *p)
Definition: timMan.c:694
int Tim_ManBoxNum(Tim_Man_t *p)
Definition: timMan.c:702
static Vec_Int_t * Vec_IntStart(int nSize)
Definition: bblif.c:172
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
Definition: bblif.c:302
static void Abc_Print(int level, const char *format,...)
Definition: abc_global.h:313
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
Definition: vecPtr.h:396
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
int Tim_ManCoNum(Tim_Man_t *p)
Definition: timMan.c:684
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
typedefABC_NAMESPACE_HEADER_START struct Tim_Box_t_ Tim_Box_t
INCLUDES ///.
Definition: timInt.h:48
int Tim_ManCiNum(Tim_Man_t *p)
Definition: timMan.c:680
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
Tim_Man_t* Tim_ManReduce ( Tim_Man_t p,
Vec_Int_t vBoxesLeft,
int  nTermsDiff 
)

Function*************************************************************

Synopsis [Reduces the timing manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 251 of file timMan.c.

252 {
253  Tim_Man_t * pNew;
254  Tim_Box_t * pBox;
255  Tim_Obj_t * pObj;
256  float * pDelayTable, * pDelayTableNew;
257  int i, k, iBox, nNewCis, nNewCos, nInputs, nOutputs;
258  int nNewPiNum = Tim_ManPiNum(p) - nTermsDiff;
259  int nNewPoNum = Tim_ManPoNum(p) - nTermsDiff;
260  assert( Vec_IntSize(vBoxesLeft) <= Tim_ManBoxNum(p) );
261  // count the number of CIs and COs in the trimmed manager
262  nNewCis = nNewPiNum;
263  nNewCos = nNewPoNum;
264  Vec_IntForEachEntry( vBoxesLeft, iBox, i )
265  {
266  pBox = Tim_ManBox( p, iBox );
267  nNewCis += pBox->nOutputs;
268  nNewCos += pBox->nInputs;
269  }
270  assert( nNewCis <= Tim_ManCiNum(p) - nTermsDiff );
271  assert( nNewCos <= Tim_ManCoNum(p) - nTermsDiff );
272  // clear traversal IDs
273  Tim_ManForEachCi( p, pObj, i )
274  pObj->TravId = 0;
275  Tim_ManForEachCo( p, pObj, i )
276  pObj->TravId = 0;
277  // create new manager
278  pNew = Tim_ManStart( nNewCis, nNewCos );
279  // copy box connectivity information
280  memcpy( pNew->pCis, p->pCis, sizeof(Tim_Obj_t) * nNewPiNum );
281  memcpy( pNew->pCos + nNewCos - nNewPoNum,
282  p->pCos + Tim_ManCoNum(p) - Tim_ManPoNum(p),
283  sizeof(Tim_Obj_t) * nNewPoNum );
284  // duplicate delay tables
285  if ( Tim_ManDelayTableNum(p) > 0 )
286  {
287  int fWarning = 0;
288  pNew->vDelayTables = Vec_PtrStart( Vec_PtrSize(p->vDelayTables) );
289  Tim_ManForEachTable( p, pDelayTable, i )
290  {
291  if ( pDelayTable == NULL )
292  continue;
293  if ( i != (int)pDelayTable[0] && fWarning == 0 )
294  {
295  printf( "Warning: Mismatch in delay-table number between the manager and the box.\n" );
296  fWarning = 1;
297  }
298  //assert( i == (int)pDelayTable[0] );
299  nInputs = (int)pDelayTable[1];
300  nOutputs = (int)pDelayTable[2];
301  pDelayTableNew = ABC_ALLOC( float, 3 + nInputs * nOutputs );
302  pDelayTableNew[0] = i;//(int)pDelayTable[0];
303  pDelayTableNew[1] = (int)pDelayTable[1];
304  pDelayTableNew[2] = (int)pDelayTable[2];
305  for ( k = 0; k < nInputs * nOutputs; k++ )
306  pDelayTableNew[3+k] = pDelayTable[3+k];
307 // assert( (int)pDelayTableNew[0] == Vec_PtrSize(pNew->vDelayTables) );
308  assert( Vec_PtrEntry(pNew->vDelayTables, i) == NULL );
309  Vec_PtrWriteEntry( pNew->vDelayTables, i, pDelayTableNew );
310  }
311  }
312  // duplicate boxes
313  if ( Tim_ManBoxNum(p) > 0 )
314  {
315  int curPi = nNewPiNum;
316  int curPo = 0;
317  pNew->vBoxes = Vec_PtrAlloc( Tim_ManBoxNum(p) );
318  Vec_IntForEachEntry( vBoxesLeft, iBox, i )
319  {
320  pBox = Tim_ManBox( p, iBox );
321  Tim_ManCreateBox( pNew, curPo, pBox->nInputs, curPi, pBox->nOutputs, pBox->iDelayTable );
322  Tim_ManBoxSetCopy( pNew, Tim_ManBoxNum(pNew) - 1, iBox );
323  curPi += pBox->nOutputs;
324  curPo += pBox->nInputs;
325  }
326  curPo += nNewPoNum;
327  assert( curPi == Tim_ManCiNum(pNew) );
328  assert( curPo == Tim_ManCoNum(pNew) );
329  }
330  return pNew;
331 }
static Vec_Ptr_t * Vec_PtrStart(int nSize)
Definition: vecPtr.h:106
#define Tim_ManForEachTable(p, pTable, i)
Definition: timInt.h:125
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int Tim_ManPiNum(Tim_Man_t *p)
Definition: timMan.c:688
char * memcpy()
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
int Tim_ManDelayTableNum(Tim_Man_t *p)
Definition: timMan.c:715
void Tim_ManCreateBox(Tim_Man_t *p, int firstIn, int nIns, int firstOut, int nOuts, int iDelayTable)
ITERATORS ///.
Definition: timBox.c:44
int Tim_ManPoNum(Tim_Man_t *p)
Definition: timMan.c:694
int Tim_ManBoxNum(Tim_Man_t *p)
Definition: timMan.c:702
ABC_NAMESPACE_IMPL_START Tim_Man_t * Tim_ManStart(int nCis, int nCos)
DECLARATIONS ///.
Definition: timMan.c:45
#define Tim_ManForEachCo(p, pObj, i)
Definition: timInt.h:109
if(last==0)
Definition: sparse_int.h:34
static Tim_Box_t * Tim_ManBox(Tim_Man_t *p, int i)
Definition: timInt.h:95
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
Definition: vecPtr.h:396
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
#define Tim_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: timInt.h:107
int Tim_ManCoNum(Tim_Man_t *p)
Definition: timMan.c:684
#define assert(ex)
Definition: util_old.h:213
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
Definition: tim.h:92
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
typedefABC_NAMESPACE_HEADER_START struct Tim_Box_t_ Tim_Box_t
INCLUDES ///.
Definition: timInt.h:48
void Tim_ManBoxSetCopy(Tim_Man_t *p, int iBox, int iCopy)
Definition: timBox.c:290
int Tim_ManCiNum(Tim_Man_t *p)
Definition: timMan.c:680
void Tim_ManSetDelayTables ( Tim_Man_t p,
Vec_Ptr_t vDelayTables 
)

Function*************************************************************

Synopsis [Sets the vector of timing tables associated with the manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 731 of file timMan.c.

732 {
733  assert( p->vDelayTables == NULL );
734  p->vDelayTables = vDelayTables;
735 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define assert(ex)
Definition: util_old.h:213
ABC_NAMESPACE_IMPL_START Tim_Man_t* Tim_ManStart ( int  nCis,
int  nCos 
)

DECLARATIONS ///.

CFile****************************************************************

FileName [timMan.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Hierarchy/timing manager.]

Synopsis [Manipulation of manager data-structure.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - April 28, 2007.]

Revision [

Id:
timMan.c,v 1.00 2007/04/28 00:00:00 alanmi Exp

]FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [Starts the timing manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file timMan.c.

46 {
47  Tim_Man_t * p;
48  Tim_Obj_t * pObj;
49  int i;
50  p = ABC_ALLOC( Tim_Man_t, 1 );
51  memset( p, 0, sizeof(Tim_Man_t) );
52  p->pMemObj = Mem_FlexStart();
53  p->nCis = nCis;
54  p->nCos = nCos;
55  p->pCis = ABC_ALLOC( Tim_Obj_t, nCis );
56  memset( p->pCis, 0, sizeof(Tim_Obj_t) * nCis );
57  p->pCos = ABC_ALLOC( Tim_Obj_t, nCos );
58  memset( p->pCos, 0, sizeof(Tim_Obj_t) * nCos );
59  Tim_ManForEachCi( p, pObj, i )
60  {
61  pObj->Id = i;
62  pObj->iObj2Box = pObj->iObj2Num = -1;
63  pObj->timeReq = TIM_ETERNITY;
64  }
65  Tim_ManForEachCo( p, pObj, i )
66  {
67  pObj->Id = i;
68  pObj->iObj2Box = pObj->iObj2Num = -1;
69  pObj->timeReq = TIM_ETERNITY;
70  }
71  p->fUseTravId = 1;
72  return p;
73 }
char * memset()
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
Mem_Flex_t * Mem_FlexStart()
Definition: mem.c:311
float timeReq
Definition: timInt.h:86
#define Tim_ManForEachCo(p, pObj, i)
Definition: timInt.h:109
int iObj2Num
Definition: timInt.h:84
int Id
Definition: timInt.h:81
#define TIM_ETERNITY
MACRO DEFINITIONS ///.
Definition: tim.h:98
#define Tim_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: timInt.h:107
int iObj2Box
Definition: timInt.h:83
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
Definition: tim.h:92
void Tim_ManStop ( Tim_Man_t p)

Function*************************************************************

Synopsis [Stops the timing manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 375 of file timMan.c.

376 {
377  Vec_PtrFreeFree( p->vDelayTables );
378  Vec_PtrFreeP( &p->vBoxes );
379  Mem_FlexStop( p->pMemObj, 0 );
380  ABC_FREE( p->pCis );
381  ABC_FREE( p->pCos );
382  ABC_FREE( p );
383 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_PtrFreeFree(Vec_Ptr_t *p)
Definition: vecPtr.h:569
void Mem_FlexStop(Mem_Flex_t *p, int fVerbose)
Definition: mem.c:343
#define ABC_FREE(obj)
Definition: abc_global.h:232
static void Vec_PtrFreeP(Vec_Ptr_t **p)
Definition: vecPtr.h:240
void Tim_ManStopP ( Tim_Man_t **  p)

Definition at line 384 of file timMan.c.

385 {
386  if ( *p == NULL )
387  return;
388  Tim_ManStop( *p );
389  *p = NULL;
390 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Tim_ManStop(Tim_Man_t *p)
Definition: timMan.c:375
void Tim_ManTravIdDisable ( Tim_Man_t p)

Function*************************************************************

Synopsis [Disables the use of the traversal ID.]

Description []

SideEffects []

SeeAlso []

Definition at line 748 of file timMan.c.

749 {
750  p->fUseTravId = 0;
751 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Tim_ManTravIdEnable ( Tim_Man_t p)

Function*************************************************************

Synopsis [Enables the use of the traversal ID.]

Description []

SideEffects []

SeeAlso []

Definition at line 764 of file timMan.c.

765 {
766  p->fUseTravId = 1;
767 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Tim_Man_t* Tim_ManTrim ( Tim_Man_t p,
Vec_Int_t vBoxPres 
)

Function*************************************************************

Synopsis [Trims the timing manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 163 of file timMan.c.

164 {
165  Tim_Man_t * pNew;
166  Tim_Box_t * pBox;
167  Tim_Obj_t * pObj;
168  float * pDelayTable, * pDelayTableNew;
169  int i, k, nNewCis, nNewCos, nInputs, nOutputs;
170  assert( Vec_IntSize(vBoxPres) == Tim_ManBoxNum(p) );
171  // count the number of CIs and COs in the trimmed manager
172  nNewCis = Tim_ManPiNum(p);
173  nNewCos = Tim_ManPoNum(p);
174  if ( Tim_ManBoxNum(p) )
175  Tim_ManForEachBox( p, pBox, i )
176  if ( Vec_IntEntry(vBoxPres, i) )
177  {
178  nNewCis += pBox->nOutputs;
179  nNewCos += pBox->nInputs;
180  }
181  if ( nNewCis == Tim_ManCiNum(p) && nNewCos == Tim_ManCoNum(p) )
182  return Tim_ManDup( p, 0 );
183  assert( nNewCis < Tim_ManCiNum(p) );
184  assert( nNewCos < Tim_ManCoNum(p) );
185  // clear traversal IDs
186  Tim_ManForEachCi( p, pObj, i )
187  pObj->TravId = 0;
188  Tim_ManForEachCo( p, pObj, i )
189  pObj->TravId = 0;
190  // create new manager
191  pNew = Tim_ManStart( nNewCis, nNewCos );
192  // copy box connectivity information
193  memcpy( pNew->pCis, p->pCis, sizeof(Tim_Obj_t) * Tim_ManPiNum(p) );
194  memcpy( pNew->pCos + nNewCos - Tim_ManPoNum(p),
195  p->pCos + Tim_ManCoNum(p) - Tim_ManPoNum(p),
196  sizeof(Tim_Obj_t) * Tim_ManPoNum(p) );
197  // duplicate delay tables
198  if ( Tim_ManDelayTableNum(p) > 0 )
199  {
200  pNew->vDelayTables = Vec_PtrStart( Vec_PtrSize(p->vDelayTables) );
201  Tim_ManForEachTable( p, pDelayTable, i )
202  {
203  if ( pDelayTable == NULL )
204  continue;
205  assert( i == (int)pDelayTable[0] );
206  nInputs = (int)pDelayTable[1];
207  nOutputs = (int)pDelayTable[2];
208  pDelayTableNew = ABC_ALLOC( float, 3 + nInputs * nOutputs );
209  pDelayTableNew[0] = (int)pDelayTable[0];
210  pDelayTableNew[1] = (int)pDelayTable[1];
211  pDelayTableNew[2] = (int)pDelayTable[2];
212  for ( k = 0; k < nInputs * nOutputs; k++ )
213  pDelayTableNew[3+k] = pDelayTable[3+k];
214 // assert( (int)pDelayTableNew[0] == Vec_PtrSize(pNew->vDelayTables) );
215  assert( Vec_PtrEntry(pNew->vDelayTables, i) == NULL );
216  Vec_PtrWriteEntry( pNew->vDelayTables, i, pDelayTableNew );
217  }
218  }
219  // duplicate boxes
220  if ( Tim_ManBoxNum(p) > 0 )
221  {
222  int curPi = Tim_ManPiNum(p);
223  int curPo = 0;
224  pNew->vBoxes = Vec_PtrAlloc( Tim_ManBoxNum(p) );
225  Tim_ManForEachBox( p, pBox, i )
226  if ( Vec_IntEntry(vBoxPres, i) )
227  {
228  Tim_ManCreateBox( pNew, curPo, pBox->nInputs, curPi, pBox->nOutputs, pBox->iDelayTable );
229  Tim_ManBoxSetCopy( pNew, Tim_ManBoxNum(pNew) - 1, i );
230  curPi += pBox->nOutputs;
231  curPo += pBox->nInputs;
232  }
233  curPo += Tim_ManPoNum(p);
234  assert( curPi == Tim_ManCiNum(pNew) );
235  assert( curPo == Tim_ManCoNum(pNew) );
236  }
237  return pNew;
238 }
static Vec_Ptr_t * Vec_PtrStart(int nSize)
Definition: vecPtr.h:106
Tim_Man_t * Tim_ManDup(Tim_Man_t *p, int fUnitDelay)
Definition: timMan.c:86
#define Tim_ManForEachTable(p, pTable, i)
Definition: timInt.h:125
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define Tim_ManForEachBox(p, pBox, i)
Definition: timInt.h:117
int Tim_ManPiNum(Tim_Man_t *p)
Definition: timMan.c:688
char * memcpy()
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
int Tim_ManDelayTableNum(Tim_Man_t *p)
Definition: timMan.c:715
void Tim_ManCreateBox(Tim_Man_t *p, int firstIn, int nIns, int firstOut, int nOuts, int iDelayTable)
ITERATORS ///.
Definition: timBox.c:44
int Tim_ManPoNum(Tim_Man_t *p)
Definition: timMan.c:694
int Tim_ManBoxNum(Tim_Man_t *p)
Definition: timMan.c:702
ABC_NAMESPACE_IMPL_START Tim_Man_t * Tim_ManStart(int nCis, int nCos)
DECLARATIONS ///.
Definition: timMan.c:45
#define Tim_ManForEachCo(p, pObj, i)
Definition: timInt.h:109
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
if(last==0)
Definition: sparse_int.h:34
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
Definition: vecPtr.h:396
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
#define Tim_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: timInt.h:107
int Tim_ManCoNum(Tim_Man_t *p)
Definition: timMan.c:684
#define assert(ex)
Definition: util_old.h:213
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
Definition: tim.h:92
typedefABC_NAMESPACE_HEADER_START struct Tim_Box_t_ Tim_Box_t
INCLUDES ///.
Definition: timInt.h:48
void Tim_ManBoxSetCopy(Tim_Man_t *p, int iBox, int iCopy)
Definition: timBox.c:290
int Tim_ManCiNum(Tim_Man_t *p)
Definition: timMan.c:680