Commit 341e55ab by Alan Mishchenko

Fix timing info communication in GIA APIs.

parent 14d985a8
...@@ -399,6 +399,12 @@ Gia_Man_t * Gia_ManBalanceInt( Gia_Man_t * p, int fStrict ) ...@@ -399,6 +399,12 @@ Gia_Man_t * Gia_ManBalanceInt( Gia_Man_t * p, int fStrict )
Gia_ManForEachCiId( pNew, Id, i ) Gia_ManForEachCiId( pNew, Id, i )
Vec_IntWriteEntry( pNew->vLevels, Id, Vec_IntEntry(p->vCiArrs, i)/And2Delay ); Vec_IntWriteEntry( pNew->vLevels, Id, Vec_IntEntry(p->vCiArrs, i)/And2Delay );
} }
else if ( p->vInArrs )
{
int Id, And2Delay = p->And2Delay ? p->And2Delay : 1;
Gia_ManForEachCiId( pNew, Id, i )
Vec_IntWriteEntry( pNew->vLevels, Id, (int)(Vec_FltEntry(p->vInArrs, i)/And2Delay) );
}
// create internal nodes // create internal nodes
Gia_ManHashStart( pNew ); Gia_ManHashStart( pNew );
Gia_ManForEachBuf( p, pObj, i ) Gia_ManForEachBuf( p, pObj, i )
...@@ -1051,6 +1057,12 @@ Gia_Man_t * Gia_ManAreaBalance( Gia_Man_t * p, int fSimpleAnd, int nNewNodesMax, ...@@ -1051,6 +1057,12 @@ Gia_Man_t * Gia_ManAreaBalance( Gia_Man_t * p, int fSimpleAnd, int nNewNodesMax,
Gia_ManForEachCiId( p, Id, i ) Gia_ManForEachCiId( p, Id, i )
Vec_IntWriteEntry( p->vLevels, Id, Vec_IntEntry(p->vCiArrs, i)/And2Delay ); Vec_IntWriteEntry( p->vLevels, Id, Vec_IntEntry(p->vCiArrs, i)/And2Delay );
} }
else if ( p->vInArrs )
{
int i, Id, And2Delay = p->And2Delay ? p->And2Delay : 1;
Gia_ManForEachCiId( p, Id, i )
Vec_IntWriteEntry( p->vLevels, Id, (int)(Vec_FltEntry(p->vInArrs, i)/And2Delay) );
}
// determine CI levels // determine CI levels
if ( p->pManTime && p->vLevels == NULL ) if ( p->pManTime && p->vLevels == NULL )
Gia_ManLevelWithBoxes( p ); Gia_ManLevelWithBoxes( p );
......
...@@ -2231,7 +2231,7 @@ Gia_Man_t * Gia_ManPerformMappingInt( Gia_Man_t * p, If_Par_t * pPars ) ...@@ -2231,7 +2231,7 @@ Gia_Man_t * Gia_ManPerformMappingInt( Gia_Man_t * p, If_Par_t * pPars )
{ {
extern void Gia_ManIffTest( Gia_Man_t * pGia, If_LibLut_t * pLib, int fVerbose ); extern void Gia_ManIffTest( Gia_Man_t * pGia, If_LibLut_t * pLib, int fVerbose );
Gia_Man_t * pNew; Gia_Man_t * pNew;
If_Man_t * pIfMan; int i, Entry; If_Man_t * pIfMan; int i, Entry, EntryF;
assert( pPars->pTimesArr == NULL ); assert( pPars->pTimesArr == NULL );
assert( pPars->pTimesReq == NULL ); assert( pPars->pTimesReq == NULL );
if ( p->vCiArrs ) if ( p->vCiArrs )
...@@ -2241,6 +2241,13 @@ Gia_Man_t * Gia_ManPerformMappingInt( Gia_Man_t * p, If_Par_t * pPars ) ...@@ -2241,6 +2241,13 @@ Gia_Man_t * Gia_ManPerformMappingInt( Gia_Man_t * p, If_Par_t * pPars )
Vec_IntForEachEntry( p->vCiArrs, Entry, i ) Vec_IntForEachEntry( p->vCiArrs, Entry, i )
pPars->pTimesArr[i] = (float)Entry; pPars->pTimesArr[i] = (float)Entry;
} }
else if ( p->vInArrs )
{
int Id, And2Delay = p->And2Delay ? p->And2Delay : 1;
assert( Vec_FltSize(p->vInArrs) == Gia_ManCiNum(p) );
Gia_ManForEachCiId( p, Id, i )
pPars->pTimesArr[i] = Vec_FltEntry(p->vInArrs, i)/And2Delay;
}
if ( p->vCoReqs ) if ( p->vCoReqs )
{ {
assert( Vec_IntSize(p->vCoReqs) == Gia_ManCoNum(p) ); assert( Vec_IntSize(p->vCoReqs) == Gia_ManCoNum(p) );
...@@ -2248,6 +2255,13 @@ Gia_Man_t * Gia_ManPerformMappingInt( Gia_Man_t * p, If_Par_t * pPars ) ...@@ -2248,6 +2255,13 @@ Gia_Man_t * Gia_ManPerformMappingInt( Gia_Man_t * p, If_Par_t * pPars )
Vec_IntForEachEntry( p->vCoReqs, Entry, i ) Vec_IntForEachEntry( p->vCoReqs, Entry, i )
pPars->pTimesReq[i] = (float)Entry; pPars->pTimesReq[i] = (float)Entry;
} }
else if ( p->vOutReqs )
{
assert( Vec_FltSize(p->vOutReqs) == Gia_ManCoNum(p) );
pPars->pTimesReq = ABC_CALLOC( float, Gia_ManCoNum(p) );
Vec_FltForEachEntry( p->vOutReqs, EntryF, i )
pPars->pTimesReq[i] = EntryF;
}
ABC_FREE( p->pCellStr ); ABC_FREE( p->pCellStr );
Vec_IntFreeP( &p->vConfigs ); Vec_IntFreeP( &p->vConfigs );
// disable cut minimization when GIA strucure is needed // disable cut minimization when GIA strucure is needed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment