summaryrefslogtreecommitdiffstats
path: root/src/aig/gia
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2018-10-22 17:06:37 +0700
committerAlan Mishchenko <alanmi@berkeley.edu>2018-10-22 17:06:37 +0700
commit341e55ab3b53fe222407f0f8771cf05df49d568f (patch)
treec4e4b2c65d0a75018ba85a9ce7222c45b362fefc /src/aig/gia
parent14d985a8c4597bc70765cb889be160b7af5fa128 (diff)
downloadabc-341e55ab3b53fe222407f0f8771cf05df49d568f.tar.gz
abc-341e55ab3b53fe222407f0f8771cf05df49d568f.tar.bz2
abc-341e55ab3b53fe222407f0f8771cf05df49d568f.zip
Fix timing info communication in GIA APIs.
Diffstat (limited to 'src/aig/gia')
-rw-r--r--src/aig/gia/giaBalAig.c12
-rw-r--r--src/aig/gia/giaIf.c16
2 files changed, 27 insertions, 1 deletions
diff --git a/src/aig/gia/giaBalAig.c b/src/aig/gia/giaBalAig.c
index 018bfcaf..a3a0719e 100644
--- a/src/aig/gia/giaBalAig.c
+++ b/src/aig/gia/giaBalAig.c
@@ -399,6 +399,12 @@ Gia_Man_t * Gia_ManBalanceInt( Gia_Man_t * p, int fStrict )
Gia_ManForEachCiId( pNew, Id, i )
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
Gia_ManHashStart( pNew );
Gia_ManForEachBuf( p, pObj, i )
@@ -1051,6 +1057,12 @@ Gia_Man_t * Gia_ManAreaBalance( Gia_Man_t * p, int fSimpleAnd, int nNewNodesMax,
Gia_ManForEachCiId( p, Id, i )
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
if ( p->pManTime && p->vLevels == NULL )
Gia_ManLevelWithBoxes( p );
diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c
index 0c39cae4..b1acb780 100644
--- a/src/aig/gia/giaIf.c
+++ b/src/aig/gia/giaIf.c
@@ -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 );
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->pTimesReq == NULL );
if ( p->vCiArrs )
@@ -2241,6 +2241,13 @@ Gia_Man_t * Gia_ManPerformMappingInt( Gia_Man_t * p, If_Par_t * pPars )
Vec_IntForEachEntry( p->vCiArrs, Entry, i )
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 )
{
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 )
Vec_IntForEachEntry( p->vCoReqs, Entry, i )
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 );
Vec_IntFreeP( &p->vConfigs );
// disable cut minimization when GIA strucure is needed