mirror of https://github.com/YosysHQ/abc.git
Fixing assertion failure when all POs have constant functions.
This commit is contained in:
parent
48912a2247
commit
05fbf4bd69
|
|
@ -50,12 +50,15 @@ Abc_Obj_t * Abc_SclFindCriticalCo( SC_Man * p, int * pfRise )
|
|||
Abc_Obj_t * pObj, * pPivot = NULL;
|
||||
float fMaxArr = 0;
|
||||
int i;
|
||||
assert( Abc_NtkPoNum(p->pNtk) > 0 );
|
||||
Abc_NtkForEachCo( p->pNtk, pObj, i )
|
||||
{
|
||||
SC_Pair * pArr = Abc_SclObjTime( p, pObj );
|
||||
if ( fMaxArr < pArr->rise ) fMaxArr = pArr->rise, *pfRise = 1, pPivot = pObj;
|
||||
if ( fMaxArr < pArr->fall ) fMaxArr = pArr->fall, *pfRise = 0, pPivot = pObj;
|
||||
}
|
||||
if ( fMaxArr == 0 )
|
||||
pPivot = Abc_NtkPo(p->pNtk, 0);
|
||||
assert( pPivot != NULL );
|
||||
return pPivot;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -898,7 +898,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars
|
|||
// perform upsizing
|
||||
nAllPos = nAllNodes = nAllTfos = nAllUpsizes = 0;
|
||||
if ( p->BestDelay <= pPars->DelayUser )
|
||||
printf( "Current delay (%.2f ps) is better than the target delay (%.2f ps).\n", p->BestDelay, (float)pPars->DelayUser );
|
||||
printf( "Current delay (%.2f ps) does not exceed the target delay (%.2f ps). Upsizing is not performed.\n", p->BestDelay, (float)pPars->DelayUser );
|
||||
else
|
||||
for ( i = 0; i < pPars->nIters; i++ )
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue