From 05fbf4bd69b047460a41cf869aea78f051a0c5f8 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 6 Feb 2014 12:40:55 -0800 Subject: Fixing assertion failure when all POs have constant functions. --- src/map/scl/sclSize.c | 3 +++ src/map/scl/sclUpsize.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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++ ) { -- cgit v1.2.3