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

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void If_CutSortInputPins (If_Man_t *p, If_Cut_t *pCut, int *pPinPerm, float *pPinDelays)
 DECLARATIONS ///. More...
 
float If_CutDelay (If_Man_t *p, If_Obj_t *pObj, If_Cut_t *pCut)
 
void If_CutPropagateRequired (If_Man_t *p, If_Obj_t *pObj, If_Cut_t *pCut, float ObjRequired)
 
float If_ManDelayMax (If_Man_t *p, int fSeq)
 
void If_ManComputeRequired (If_Man_t *p)
 

Function Documentation

float If_CutDelay ( If_Man_t p,
If_Obj_t pObj,
If_Cut_t pCut 
)

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

Synopsis [Computes delay.]

Description []

SideEffects []

SeeAlso []

Definition at line 91 of file ifTime.c.

92 {
93  static int pPinPerm[IF_MAX_LUTSIZE];
94  static float pPinDelays[IF_MAX_LUTSIZE];
95  char * pPerm = If_CutPerm( pCut );
96  If_Obj_t * pLeaf;
97  float Delay, DelayCur;
98  float * pLutDelays;
99  int i, Shift, Pin2PinDelay;//, iLeaf;
100  Delay = -IF_FLOAT_LARGE;
101  if ( p->pPars->pLutLib )
102  {
103  assert( !p->pPars->fLiftLeaves );
104  pLutDelays = p->pPars->pLutLib->pLutDelays[pCut->nLeaves];
105  if ( p->pPars->pLutLib->fVarPinDelays )
106  {
107  // compute the delay using sorted pins
108  If_CutSortInputPins( p, pCut, pPinPerm, pPinDelays );
109  for ( i = 0; i < (int)pCut->nLeaves; i++ )
110  {
111  DelayCur = pPinDelays[pPinPerm[i]] + pLutDelays[i];
112  Delay = IF_MAX( Delay, DelayCur );
113  }
114  }
115  else
116  {
117  If_CutForEachLeaf( p, pCut, pLeaf, i )
118  {
119  DelayCur = If_ObjCutBest(pLeaf)->Delay + pLutDelays[0];
120  Delay = IF_MAX( Delay, DelayCur );
121  }
122  }
123  }
124  else
125  {
126  if ( pCut->fUser )
127  {
128  assert( !p->pPars->fLiftLeaves );
129  If_CutForEachLeaf( p, pCut, pLeaf, i )
130  {
131  Pin2PinDelay = pPerm ? (pPerm[i] == IF_BIG_CHAR ? -IF_BIG_CHAR : pPerm[i]) : 1;
132  DelayCur = If_ObjCutBest(pLeaf)->Delay + (float)Pin2PinDelay;
133  Delay = IF_MAX( Delay, DelayCur );
134  }
135  }
136  else
137  {
138  if ( p->pPars->fLiftLeaves )
139  {
140  If_CutForEachLeafSeq( p, pCut, pLeaf, Shift, i )
141  {
142  DelayCur = If_ObjCutBest(pLeaf)->Delay - Shift * p->Period;
143  Delay = IF_MAX( Delay, DelayCur + 1.0 );
144  }
145  }
146  else
147  {
148  If_CutForEachLeaf( p, pCut, pLeaf, i )
149  {
150  DelayCur = If_ObjCutBest(pLeaf)->Delay + 1.0;
151  Delay = IF_MAX( Delay, DelayCur );
152  }
153  }
154  }
155  }
156  return Delay;
157 }
#define IF_MAX(a, b)
Definition: if.h:437
unsigned nLeaves
Definition: if.h:289
Definition: if.h:303
#define IF_BIG_CHAR
Definition: if.h:60
#define If_CutForEachLeaf(p, pCut, pLeaf, i)
Definition: if.h:474
static char * If_CutPerm(If_Cut_t *pCut)
Definition: if.h:397
float pLutDelays[IF_MAX_LUTSIZE+1][IF_MAX_LUTSIZE+1]
Definition: if.h:176
static If_Cut_t * If_ObjCutBest(If_Obj_t *pObj)
Definition: if.h:401
unsigned fUser
Definition: if.h:286
#define If_CutForEachLeafSeq(p, pCut, pLeaf, Shift, i)
Definition: if.h:481
int fVarPinDelays
Definition: if.h:174
#define IF_MAX_LUTSIZE
INCLUDES ///.
Definition: if.h:52
static int pPerm[13719]
Definition: rwrTemp.c:32
#define IF_FLOAT_LARGE
Definition: if.h:440
If_Par_t * pPars
Definition: if.h:184
int Period
Definition: if.h:224
ABC_NAMESPACE_IMPL_START void If_CutSortInputPins(If_Man_t *p, If_Cut_t *pCut, int *pPinPerm, float *pPinDelays)
DECLARATIONS ///.
Definition: ifTime.c:44
#define assert(ex)
Definition: util_old.h:213
int fLiftLeaves
Definition: if.h:156
float Delay
Definition: if.h:280
If_LibLut_t * pLutLib
Definition: if.h:160
void If_CutPropagateRequired ( If_Man_t p,
If_Obj_t pObj,
If_Cut_t pCut,
float  ObjRequired 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 170 of file ifTime.c.

171 {
172  static int pPinPerm[IF_MAX_LUTSIZE];
173  static float pPinDelays[IF_MAX_LUTSIZE];
174  If_Obj_t * pLeaf;
175  float * pLutDelays;
176  float Required;
177  int i, Pin2PinDelay;//, iLeaf;
178  assert( !p->pPars->fLiftLeaves );
179  // compute the pins
180  if ( p->pPars->pLutLib )
181  {
182  pLutDelays = p->pPars->pLutLib->pLutDelays[pCut->nLeaves];
183  if ( p->pPars->pLutLib->fVarPinDelays )
184  {
185  // compute the delay using sorted pins
186  If_CutSortInputPins( p, pCut, pPinPerm, pPinDelays );
187  for ( i = 0; i < (int)pCut->nLeaves; i++ )
188  {
189  Required = ObjRequired - pLutDelays[i];
190  pLeaf = If_ManObj( p, pCut->pLeaves[pPinPerm[i]] );
191  pLeaf->Required = IF_MIN( pLeaf->Required, Required );
192  }
193  }
194  else
195  {
196  Required = ObjRequired;
197  If_CutForEachLeaf( p, pCut, pLeaf, i )
198  pLeaf->Required = IF_MIN( pLeaf->Required, Required - pLutDelays[0] );
199  }
200  }
201  else
202  {
203  if ( pCut->fUser )
204  {
205  char Perm[IF_MAX_FUNC_LUTSIZE], * pPerm = Perm;
206  if ( p->pPars->fDelayOpt )
207  {
208  int Delay = If_CutSopBalancePinDelays( p, pCut, pPerm );
209  assert( Delay == (int)pCut->Delay );
210  }
211  else if ( p->pPars->fDelayOptLut )
212  {
213  int Delay = If_CutLutBalancePinDelays( p, pCut, pPerm );
214  assert( Delay == (int)pCut->Delay );
215  }
216  else if ( p->pPars->fDsdBalance )
217  {
218  int Delay = If_CutDsdBalancePinDelays( p, pCut, pPerm );
219  assert( Delay == (int)pCut->Delay );
220  }
221  else
222  pPerm = If_CutPerm(pCut);
223  If_CutForEachLeaf( p, pCut, pLeaf, i )
224  {
225  Pin2PinDelay = pPerm ? (pPerm[i] == IF_BIG_CHAR ? -IF_BIG_CHAR : pPerm[i]) : 1;
226  Required = ObjRequired - (float)Pin2PinDelay;
227  pLeaf->Required = IF_MIN( pLeaf->Required, Required );
228  }
229  }
230  else
231  {
232  Required = ObjRequired;
233  If_CutForEachLeaf( p, pCut, pLeaf, i )
234  pLeaf->Required = IF_MIN( pLeaf->Required, Required - (float)1.0 );
235  }
236  }
237 }
unsigned nLeaves
Definition: if.h:289
int If_CutSopBalancePinDelays(If_Man_t *p, If_Cut_t *pCut, char *pPerm)
Definition: ifDelay.c:159
static If_Obj_t * If_ManObj(If_Man_t *p, int i)
Definition: if.h:370
Definition: if.h:303
#define IF_BIG_CHAR
Definition: if.h:60
#define If_CutForEachLeaf(p, pCut, pLeaf, i)
Definition: if.h:474
float Required
Definition: if.h:325
int fDelayOptLut
Definition: if.h:122
static char * If_CutPerm(If_Cut_t *pCut)
Definition: if.h:397
float pLutDelays[IF_MAX_LUTSIZE+1][IF_MAX_LUTSIZE+1]
Definition: if.h:176
unsigned fUser
Definition: if.h:286
int pLeaves[0]
Definition: if.h:290
int fDsdBalance
Definition: if.h:123
int fVarPinDelays
Definition: if.h:174
#define IF_MAX_LUTSIZE
INCLUDES ///.
Definition: if.h:52
else
Definition: sparse_int.h:55
#define IF_MIN(a, b)
MACRO DEFINITIONS ///.
Definition: if.h:436
#define IF_MAX_FUNC_LUTSIZE
Definition: if.h:54
int If_CutLutBalancePinDelays(If_Man_t *p, If_Cut_t *pCut, char *pPerm)
Definition: ifDelay.c:327
static int pPerm[13719]
Definition: rwrTemp.c:32
If_Par_t * pPars
Definition: if.h:184
ABC_NAMESPACE_IMPL_START void If_CutSortInputPins(If_Man_t *p, If_Cut_t *pCut, int *pPinPerm, float *pPinDelays)
DECLARATIONS ///.
Definition: ifTime.c:44
int fDelayOpt
Definition: if.h:121
#define assert(ex)
Definition: util_old.h:213
int fLiftLeaves
Definition: if.h:156
float Delay
Definition: if.h:280
int If_CutDsdBalancePinDelays(If_Man_t *p, If_Cut_t *pCut, char *pPerm)
Definition: ifDsd.c:2152
If_LibLut_t * pLutLib
Definition: if.h:160
ABC_NAMESPACE_IMPL_START void If_CutSortInputPins ( If_Man_t p,
If_Cut_t pCut,
int *  pPinPerm,
float *  pPinDelays 
)

DECLARATIONS ///.

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

FileName [ifTime.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [FPGA mapping based on priority cuts.]

Synopsis [Computation of delay paramters depending on the library.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - November 21, 2006.]

Revision [

Id:
ifTime.c,v 1.00 2006/11/21 00:00:00 alanmi Exp

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

Synopsis [Sorts the pins in the decreasing order of delays.]

Description []

SideEffects []

SeeAlso []

Definition at line 44 of file ifTime.c.

45 {
46  If_Obj_t * pLeaf;
47  int i, j, best_i, temp;
48  // start the trivial permutation and collect pin delays
49  If_CutForEachLeaf( p, pCut, pLeaf, i )
50  {
51  pPinPerm[i] = i;
52  pPinDelays[i] = If_ObjCutBest(pLeaf)->Delay;
53  }
54  // selection sort the pins in the decreasible order of delays
55  // this order will match the increasing order of LUT input pins
56  for ( i = 0; i < (int)pCut->nLeaves-1; i++ )
57  {
58  best_i = i;
59  for ( j = i+1; j < (int)pCut->nLeaves; j++ )
60  if ( pPinDelays[pPinPerm[j]] > pPinDelays[pPinPerm[best_i]] )
61  best_i = j;
62  if ( best_i == i )
63  continue;
64  temp = pPinPerm[i];
65  pPinPerm[i] = pPinPerm[best_i];
66  pPinPerm[best_i] = temp;
67  }
68 /*
69  // verify
70  assert( pPinPerm[0] < (int)pCut->nLeaves );
71  for ( i = 1; i < (int)pCut->nLeaves; i++ )
72  {
73  assert( pPinPerm[i] < (int)pCut->nLeaves );
74  assert( pPinDelays[pPinPerm[i-1]] >= pPinDelays[pPinPerm[i]] );
75  }
76 */
77 }
unsigned nLeaves
Definition: if.h:289
Definition: if.h:303
#define If_CutForEachLeaf(p, pCut, pLeaf, i)
Definition: if.h:474
static If_Cut_t * If_ObjCutBest(If_Obj_t *pObj)
Definition: if.h:401
float Delay
Definition: if.h:280
void If_ManComputeRequired ( If_Man_t p)

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

Synopsis [Computes the required times of all nodes.]

Description []

SideEffects []

SeeAlso []

Definition at line 294 of file ifTime.c.

295 {
296  If_Obj_t * pObj;
297  int i, Counter;
298  float reqTime;
299 
300  // compute area, clean required times, collect nodes used in the mapping
301 // p->AreaGlo = If_ManScanMapping( p );
302  If_ManMarkMapping( p );
303  if ( p->pManTim == NULL )
304  {
305  // consider the case when the required times are given
306  if ( p->pPars->pTimesReq && !p->pPars->fAreaOnly )
307  {
308  // make sure that the required time hold
309  Counter = 0;
310  If_ManForEachCo( p, pObj, i )
311  {
312  if ( If_ObjArrTime(If_ObjFanin0(pObj)) > p->pPars->pTimesReq[i] + p->fEpsilon )
313  {
315  Counter++;
316  // Abc_Print( 0, "Required times are violated for output %d (arr = %d; req = %d).\n",
317  // i, (int)If_ObjArrTime(If_ObjFanin0(pObj)), (int)p->pPars->pTimesReq[i] );
318  }
319  else
320  If_ObjFanin0(pObj)->Required = p->pPars->pTimesReq[i];
321  }
322  if ( Counter && !p->fReqTimeWarn )
323  {
324  Abc_Print( 0, "Required times are exceeded at %d output%s. The earliest arrival times are used.\n", Counter, Counter > 1 ? "s":"" );
325  p->fReqTimeWarn = 1;
326  }
327  }
328  else
329  {
330  // get the global required times
331  p->RequiredGlo = If_ManDelayMax( p, 0 );
332 
333  // find new delay target
334  if ( p->pPars->nRelaxRatio && p->pPars->DelayTargetNew == 0 )
335  p->pPars->DelayTargetNew = p->RequiredGlo * (100.0 + p->pPars->nRelaxRatio) / 100.0;
336 
337  // update the required times according to the target
338  if ( p->pPars->DelayTarget != -1 )
339  {
340  if ( p->RequiredGlo > p->pPars->DelayTarget + p->fEpsilon )
341  {
342  if ( p->fNextRound == 0 )
343  {
344  p->fNextRound = 1;
345  Abc_Print( 0, "Cannot meet the target required times (%4.2f). Mapping continues anyway.\n", p->pPars->DelayTarget );
346  }
347  }
348  else if ( p->RequiredGlo < p->pPars->DelayTarget - p->fEpsilon )
349  {
350  if ( p->fNextRound == 0 )
351  {
352  p->fNextRound = 1;
353 // Abc_Print( 0, "Relaxing the required times from (%4.2f) to the target (%4.2f).\n", p->RequiredGlo, p->pPars->DelayTarget );
354  }
355  p->RequiredGlo = p->pPars->DelayTarget;
356  }
357  }
358  else if ( p->pPars->DelayTargetNew > 0 ) // relax the required times
360  // do not propagate required times if area minimization is requested
361  if ( p->pPars->fAreaOnly )
362  return;
363  // set the required times for the POs
364  if ( p->pPars->fDoAverage )
365  {
366  if ( p->pPars->nRelaxRatio )
367  {
368  If_ManForEachCo( p, pObj, i )
369  If_ObjFanin0(pObj)->Required = If_ObjArrTime(If_ObjFanin0(pObj)) * (100.0 + p->pPars->nRelaxRatio) / 100.0;
370  }
371  else
372  {
373  If_ManForEachCo( p, pObj, i )
374  If_ObjFanin0(pObj)->Required = If_ObjArrTime(If_ObjFanin0(pObj));
375  }
376  }
377  else if ( p->pPars->fLatchPaths )
378  {
379  If_ManForEachLatchInput( p, pObj, i )
380  If_ObjFanin0(pObj)->Required = p->RequiredGlo;
381  }
382  else
383  {
384  If_ManForEachCo( p, pObj, i )
385  If_ObjFanin0(pObj)->Required = p->RequiredGlo;
386  }
387  }
388  // go through the nodes in the reverse topological order
389  // Vec_PtrForEachEntry( If_Obj_t *, p->vMapped, pObj, i )
390  // If_CutPropagateRequired( p, pObj, If_ObjCutBest(pObj), pObj->Required );
391  If_ManForEachObjReverse( p, pObj, i )
392  {
393  if ( pObj->nRefs == 0 )
394  continue;
395  If_CutPropagateRequired( p, pObj, If_ObjCutBest(pObj), pObj->Required );
396  }
397  }
398  else
399  {
400  // get the global required times
401  p->RequiredGlo = If_ManDelayMax( p, 0 );
402 
403  // find new delay target
404  if ( p->pPars->nRelaxRatio && p->pPars->DelayTargetNew == 0 )
405  p->pPars->DelayTargetNew = p->RequiredGlo * (100.0 + p->pPars->nRelaxRatio) / 100.0;
406 
407  // update the required times according to the target
408  if ( p->pPars->DelayTarget != -1 )
409  {
410  if ( p->RequiredGlo > p->pPars->DelayTarget + p->fEpsilon )
411  {
412  if ( p->fNextRound == 0 )
413  {
414  p->fNextRound = 1;
415  Abc_Print( 0, "Cannot meet the target required times (%4.2f). Mapping continues anyway.\n", p->pPars->DelayTarget );
416  }
417  }
418  else if ( p->RequiredGlo < p->pPars->DelayTarget - p->fEpsilon )
419  {
420  if ( p->fNextRound == 0 )
421  {
422  p->fNextRound = 1;
423 // Abc_Print( 0, "Relaxing the required times from (%4.2f) to the target (%4.2f).\n", p->RequiredGlo, p->pPars->DelayTarget );
424  }
425  p->RequiredGlo = p->pPars->DelayTarget;
426  }
427  }
428  else if ( p->pPars->DelayTargetNew > 0 ) // relax the required times
429  p->RequiredGlo = p->pPars->DelayTargetNew;
430 
431  // do not propagate required times if area minimization is requested
432  if ( p->pPars->fAreaOnly )
433  return;
434  // set the required times for the POs
435  Tim_ManIncrementTravId( p->pManTim );
436  if ( p->vCoAttrs )
437  {
438  assert( If_ManCoNum(p) == Vec_IntSize(p->vCoAttrs) );
439  If_ManForEachCo( p, pObj, i )
440  {
441  if ( Vec_IntEntry(p->vCoAttrs, i) == -1 ) // -1=internal
442  continue;
443  if ( Vec_IntEntry(p->vCoAttrs, i) == 0 ) // 0=optimize
444  Tim_ManSetCoRequired( p->pManTim, i, p->RequiredGlo );
445  else if ( Vec_IntEntry(p->vCoAttrs, i) == 1 ) // 1=keep
446  Tim_ManSetCoRequired( p->pManTim, i, If_ObjArrTime(If_ObjFanin0(pObj)) );
447  else if ( Vec_IntEntry(p->vCoAttrs, i) == 2 ) // 2=relax
448  Tim_ManSetCoRequired( p->pManTim, i, IF_FLOAT_LARGE );
449  else assert( 0 );
450  }
451  }
452  else if ( p->pPars->fDoAverage )
453  {
454  if ( p->pPars->nRelaxRatio )
455  {
456  If_ManForEachCo( p, pObj, i )
457  Tim_ManSetCoRequired( p->pManTim, i, If_ObjArrTime(If_ObjFanin0(pObj)) * (100.0 + p->pPars->nRelaxRatio) / 100.0 );
458  }
459  else
460  {
461  If_ManForEachCo( p, pObj, i )
462  Tim_ManSetCoRequired( p->pManTim, i, If_ObjArrTime(If_ObjFanin0(pObj)) );
463  }
464  }
465  else if ( p->pPars->fLatchPaths )
466  {
467  If_ManForEachPo( p, pObj, i )
468  Tim_ManSetCoRequired( p->pManTim, i, IF_FLOAT_LARGE );
469  If_ManForEachLatchInput( p, pObj, i )
470  Tim_ManSetCoRequired( p->pManTim, i, p->RequiredGlo );
471  }
472  else
473  {
474  Tim_ManInitPoRequiredAll( p->pManTim, p->RequiredGlo );
475 // If_ManForEachCo( p, pObj, i )
476 // Tim_ManSetCoRequired( p->pManTim, pObj->IdPio, p->RequiredGlo );
477  }
478  // go through the nodes in the reverse topological order
479  If_ManForEachObjReverse( p, pObj, i )
480  {
481  if ( If_ObjIsAnd(pObj) )
482  {
483  if ( pObj->nRefs == 0 )
484  continue;
485  If_CutPropagateRequired( p, pObj, If_ObjCutBest(pObj), pObj->Required );
486  }
487  else if ( If_ObjIsCi(pObj) )
488  {
489  reqTime = pObj->Required;
490  Tim_ManSetCiRequired( p->pManTim, pObj->IdPio, reqTime );
491  }
492  else if ( If_ObjIsCo(pObj) )
493  {
494  reqTime = Tim_ManGetCoRequired( p->pManTim, pObj->IdPio );
495  If_ObjFanin0(pObj)->Required = IF_MIN( reqTime, If_ObjFanin0(pObj)->Required );
496  }
497  else if ( If_ObjIsConst1(pObj) )
498  {
499  }
500  else // add the node to the mapper
501  assert( 0 );
502  }
503  }
504 }
void Tim_ManIncrementTravId(Tim_Man_t *p)
DECLARATIONS ///.
Definition: timTrav.c:44
Definition: if.h:303
static int If_ObjIsAnd(If_Obj_t *pObj)
Definition: if.h:377
#define If_ManForEachLatchInput(p, pObj, i)
Definition: if.h:457
static int If_ObjIsCo(If_Obj_t *pObj)
Definition: if.h:374
float Required
Definition: if.h:325
int fDoAverage
Definition: if.h:139
float If_ManDelayMax(If_Man_t *p, int fSeq)
Definition: ifTime.c:250
static If_Obj_t * If_ObjFanin0(If_Obj_t *pObj)
Definition: if.h:380
static int If_ObjIsCi(If_Obj_t *pObj)
Definition: if.h:373
static If_Cut_t * If_ObjCutBest(If_Obj_t *pObj)
Definition: if.h:401
#define If_ManForEachPo(p, pObj, i)
Definition: if.h:454
float DelayTargetNew
Definition: if.h:158
Tim_Man_t * pManTim
Definition: if.h:263
void Tim_ManSetCiRequired(Tim_Man_t *p, int iCi, float Delay)
Definition: timTime.c:135
#define If_ManForEachObjReverse(p, pObj, i)
Definition: if.h:465
int fAreaOnly
Definition: if.h:145
float RequiredGlo
Definition: if.h:196
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
int fReqTimeWarn
Definition: if.h:212
if(last==0)
Definition: sparse_int.h:34
else
Definition: sparse_int.h:55
#define IF_MIN(a, b)
MACRO DEFINITIONS ///.
Definition: if.h:436
static int Counter
float * pTimesReq
Definition: if.h:162
static void Abc_Print(int level, const char *format,...)
Definition: abc_global.h:313
float fEpsilon
Definition: if.h:195
static float If_ObjArrTime(If_Obj_t *pObj)
Definition: if.h:405
#define IF_FLOAT_LARGE
Definition: if.h:440
int nRelaxRatio
Definition: if.h:111
If_Par_t * pPars
Definition: if.h:184
float DelayTarget
Definition: if.h:109
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
#define If_ManForEachCo(p, pObj, i)
Definition: if.h:448
static int If_ObjIsConst1(If_Obj_t *pObj)
Definition: if.h:372
void If_CutPropagateRequired(If_Man_t *p, If_Obj_t *pObj, If_Cut_t *pCut, float ObjRequired)
Definition: ifTime.c:170
float Tim_ManGetCoRequired(Tim_Man_t *p, int iCo)
Definition: timTime.c:222
#define assert(ex)
Definition: util_old.h:213
static int If_ManCoNum(If_Man_t *p)
Definition: if.h:361
void Tim_ManSetCoRequired(Tim_Man_t *p, int iCo, float Delay)
Definition: timTime.c:154
int fNextRound
Definition: if.h:206
void If_ManMarkMapping(If_Man_t *p)
Definition: ifUtil.c:434
void Tim_ManInitPoRequiredAll(Tim_Man_t *p, float Delay)
Definition: timTime.c:97
float If_ManDelayMax ( If_Man_t p,
int  fSeq 
)

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

Synopsis [Returns the max delay of the POs.]

Description []

SideEffects []

SeeAlso []

Definition at line 250 of file ifTime.c.

251 {
252  If_Obj_t * pObj;
253  float DelayBest;
254  int i;
255  if ( p->pPars->fLatchPaths && (p->pPars->nLatchesCi == 0 || p->pPars->nLatchesCo == 0) )
256  {
257  Abc_Print( 0, "Delay optimization of latch path is not performed because there is no latches.\n" );
258  p->pPars->fLatchPaths = 0;
259  }
260  DelayBest = -IF_FLOAT_LARGE;
261  if ( fSeq )
262  {
263  assert( p->pPars->nLatchesCi > 0 );
264  If_ManForEachPo( p, pObj, i )
265  if ( DelayBest < If_ObjArrTime(If_ObjFanin0(pObj)) )
266  DelayBest = If_ObjArrTime(If_ObjFanin0(pObj));
267  }
268  else if ( p->pPars->fLatchPaths )
269  {
270  If_ManForEachLatchInput( p, pObj, i )
271  if ( DelayBest < If_ObjArrTime(If_ObjFanin0(pObj)) )
272  DelayBest = If_ObjArrTime(If_ObjFanin0(pObj));
273  }
274  else
275  {
276  If_ManForEachCo( p, pObj, i )
277  if ( DelayBest < If_ObjArrTime(If_ObjFanin0(pObj)) )
278  DelayBest = If_ObjArrTime(If_ObjFanin0(pObj));
279  }
280  return DelayBest;
281 }
Definition: if.h:303
#define If_ManForEachLatchInput(p, pObj, i)
Definition: if.h:457
static If_Obj_t * If_ObjFanin0(If_Obj_t *pObj)
Definition: if.h:380
#define If_ManForEachPo(p, pObj, i)
Definition: if.h:454
int nLatchesCi
Definition: if.h:152
int fLatchPaths
Definition: if.h:117
if(last==0)
Definition: sparse_int.h:34
else
Definition: sparse_int.h:55
static void Abc_Print(int level, const char *format,...)
Definition: abc_global.h:313
static float If_ObjArrTime(If_Obj_t *pObj)
Definition: if.h:405
#define IF_FLOAT_LARGE
Definition: if.h:440
If_Par_t * pPars
Definition: if.h:184
int nLatchesCo
Definition: if.h:153
#define If_ManForEachCo(p, pObj, i)
Definition: if.h:448
#define assert(ex)
Definition: util_old.h:213