Reapply "Fixing the required time problem."

This reverts commit 98967c9f3a.
This commit is contained in:
Miodrag Milanovic 2026-05-12 08:15:31 +02:00
parent 98967c9f3a
commit 3d2af6345c
2 changed files with 34 additions and 1 deletions

View File

@ -3000,6 +3000,20 @@ Gia_Man_t * Gia_ManPerformMappingInt( Gia_Man_t * p, If_Par_t * pPars )
pPars->pTimesReq[i] = EntryF; pPars->pTimesReq[i] = EntryF;
} }
*/ */
if ( p->pManTime && pPars->pTimesArr == NULL )
{
Tim_Man_t * pManTime = (Tim_Man_t *)p->pManTime;
pPars->pTimesArr = ABC_CALLOC( float, Gia_ManCiNum(p) );
for ( i = 0; i < Gia_ManCiNum(p); i++ )
pPars->pTimesArr[i] = Tim_ManGetCiArrival( pManTime, i );
}
if ( p->pManTime && pPars->pTimesReq == NULL )
{
Tim_Man_t * pManTime = (Tim_Man_t *)p->pManTime;
pPars->pTimesReq = ABC_CALLOC( float, Gia_ManCoNum(p) );
for ( i = 0; i < Gia_ManCoNum(p); i++ )
pPars->pTimesReq[i] = Tim_ManGetCoRequired( pManTime, i );
}
ABC_FREE( p->pCellStr ); ABC_FREE( p->pCellStr );
Vec_IntFreeP( &p->vConfigs ); Vec_IntFreeP( &p->vConfigs );
Vec_StrFreeP( &p->vConfigs2 ); Vec_StrFreeP( &p->vConfigs2 );

View File

@ -477,7 +477,26 @@ void If_ManComputeRequired( If_Man_t * p )
return; return;
// set the required times for the POs // set the required times for the POs
Tim_ManIncrementTravId( p->pManTim ); Tim_ManIncrementTravId( p->pManTim );
if ( p->vCoAttrs ) if ( p->pPars->pTimesReq )
{
Counter = 0;
If_ManForEachCo( p, pObj, i )
{
reqTime = p->pPars->pTimesReq[i];
if ( If_ObjArrTime(If_ObjFanin0(pObj)) > reqTime + p->fEpsilon )
{
reqTime = If_ObjArrTime(If_ObjFanin0(pObj));
Counter++;
}
Tim_ManSetCoRequired( p->pManTim, i, reqTime );
}
if ( Counter && !p->fReqTimeWarn )
{
Abc_Print( 0, "Required times are exceeded at %d output%s. The earliest arrival times are used.\n", Counter, Counter > 1 ? "s":"" );
p->fReqTimeWarn = 1;
}
}
else if ( p->vCoAttrs )
{ {
assert( If_ManCoNum(p) == Vec_IntSize(p->vCoAttrs) ); assert( If_ManCoNum(p) == Vec_IntSize(p->vCoAttrs) );
If_ManForEachCo( p, pObj, i ) If_ManForEachCo( p, pObj, i )