diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-02-06 12:40:55 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-02-06 12:40:55 -0800 |
commit | 05fbf4bd69b047460a41cf869aea78f051a0c5f8 (patch) | |
tree | 40b938d2f810db74c83f8cd6b3111c511b8f91c3 /src/map | |
parent | 48912a22474688302c4ed62133111740061f58bb (diff) | |
download | abc-05fbf4bd69b047460a41cf869aea78f051a0c5f8.tar.gz abc-05fbf4bd69b047460a41cf869aea78f051a0c5f8.tar.bz2 abc-05fbf4bd69b047460a41cf869aea78f051a0c5f8.zip |
Fixing assertion failure when all POs have constant functions.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/scl/sclSize.c | 3 | ||||
-rw-r--r-- | src/map/scl/sclUpsize.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/map/scl/sclSize.c b/src/map/scl/sclSize.c index e06adc22..aaf94510 100644 --- a/src/map/scl/sclSize.c +++ b/src/map/scl/sclSize.c @@ -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; } diff --git a/src/map/scl/sclUpsize.c b/src/map/scl/sclUpsize.c index 4c004b97..d52002a2 100644 --- a/src/map/scl/sclUpsize.c +++ b/src/map/scl/sclUpsize.c @@ -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++ ) { |