diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2020-07-13 11:23:11 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2020-07-13 11:23:11 -0700 |
commit | ba063a1b557a548cbedd963f6bcdf176df14ee8e (patch) | |
tree | a10e8ffbe4fe15adcad1756397d34a8e5b2878ab /src/aig | |
parent | 2ba092e4cc73ec8d6001cdc1a1784a799be745af (diff) | |
download | abc-ba063a1b557a548cbedd963f6bcdf176df14ee8e.tar.gz abc-ba063a1b557a548cbedd963f6bcdf176df14ee8e.tar.bz2 abc-ba063a1b557a548cbedd963f6bcdf176df14ee8e.zip |
Correctly handling transfer of additional AIG info when AIG has no internal nodes.
Diffstat (limited to 'src/aig')
-rw-r--r-- | src/aig/gia/giaFx.c | 6 | ||||
-rw-r--r-- | src/aig/gia/giaScript.c | 18 |
2 files changed, 20 insertions, 4 deletions
diff --git a/src/aig/gia/giaFx.c b/src/aig/gia/giaFx.c index c6eae6c7..032ae5fc 100644 --- a/src/aig/gia/giaFx.c +++ b/src/aig/gia/giaFx.c @@ -460,7 +460,11 @@ Gia_Man_t * Gia_ManPerformFx( Gia_Man_t * p, int nNewNodesMax, int LitCountMax, Vec_Wec_t * vCubes; Vec_Str_t * vCompl; if ( Gia_ManAndNum(p) == 0 ) - return Gia_ManDup(p); + { + pNew = Gia_ManDup(p); + Gia_ManTransferTiming( pNew, p ); + return pNew; + } // abctime clk; assert( Gia_ManHasMapping(p) ); // collect information diff --git a/src/aig/gia/giaScript.c b/src/aig/gia/giaScript.c index 334b1ee9..751f5000 100644 --- a/src/aig/gia/giaScript.c +++ b/src/aig/gia/giaScript.c @@ -88,7 +88,11 @@ Gia_Man_t * Gia_ManAigSyn2( Gia_Man_t * pInit, int fOldAlgo, int fCoarsen, int f p = Gia_ManDup( pInit ); Gia_ManTransferTiming( p, pInit ); if ( Gia_ManAndNum(p) == 0 ) - return p; + { + pNew = Gia_ManDup(p); + Gia_ManTransferTiming( pNew, p ); + return pNew; + } // delay optimization if ( fDelayMin && p->pManTime == NULL ) { @@ -157,7 +161,11 @@ Gia_Man_t * Gia_ManAigSyn3( Gia_Man_t * p, int fVerbose, int fVeryVerbose ) pPars->nRelaxRatio = 40; if ( fVerbose ) Gia_ManPrintStats( p, NULL ); if ( Gia_ManAndNum(p) == 0 ) - return Gia_ManDup(p); + { + pNew = Gia_ManDup(p); + Gia_ManTransferTiming( pNew, p ); + return pNew; + } // perform balancing pNew = Gia_ManAreaBalance( p, 0, ABC_INFINITY, fVeryVerbose, 0 ); if ( fVerbose ) Gia_ManPrintStats( pNew, NULL ); @@ -189,7 +197,11 @@ Gia_Man_t * Gia_ManAigSyn4( Gia_Man_t * p, int fVerbose, int fVeryVerbose ) pPars->nRelaxRatio = 40; if ( fVerbose ) Gia_ManPrintStats( p, NULL ); if ( Gia_ManAndNum(p) == 0 ) - return Gia_ManDup(p); + { + pNew = Gia_ManDup(p); + Gia_ManTransferTiming( pNew, p ); + return pNew; + } //Gia_ManAigPrintPiLevels( p ); // perform balancing pNew = Gia_ManAreaBalance( p, 0, ABC_INFINITY, fVeryVerbose, 0 ); |