From a34183790f64e829718c3918144af70e1398ab46 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 13 Nov 2014 18:28:25 -0800 Subject: Enabling AIGs with boxes for word-level and sequential designs. --- src/aig/gia/giaFadds.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/aig/gia/giaFadds.c') diff --git a/src/aig/gia/giaFadds.c b/src/aig/gia/giaFadds.c index 499a9e8f..4e913687 100644 --- a/src/aig/gia/giaFadds.c +++ b/src/aig/gia/giaFadds.c @@ -538,7 +538,7 @@ Tim_Man_t * Gia_ManGenerateTim( int nPis, int nPos, int nBoxes, int nIns, int nO curPo = 0; for ( i = 0; i < nBoxes; i++ ) { - Tim_ManCreateBox( pMan, curPo, nIns, curPi, nOuts, 0 ); + Tim_ManCreateBox( pMan, curPo, nIns, curPi, nOuts, -1 ); curPi += nOuts; curPo += nIns; } @@ -697,12 +697,12 @@ Gia_Man_t * Gia_ManDupWithFaddBoxes( Gia_Man_t * p, int nFaddMin, int fVerbose ) Gia_ManDupWithFaddBoxes_rec( pNew, p, Gia_ObjFanin0(pObj), vFadds, vMap, vChains, vMap2Chain, vTruths ); Gia_ManForEachCo( p, pObj, i ) Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) ); -// Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) ); + Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) ); if ( Gia_ManRegNum(p) ) { if ( fVerbose ) printf( "Warning: Sequential design is coverted into combinational one by adding white boxes.\n" ); - Gia_ManSetRegNum( pNew, 0 ); + pNew->nRegs = 0; } assert( !Gia_ManHasDangling(pNew) ); @@ -712,10 +712,6 @@ Gia_Man_t * Gia_ManDupWithFaddBoxes( Gia_Man_t * p, int nFaddMin, int fVerbose ) Vec_WecFree( vChains ); Vec_IntFree( vMap2Chain ); Vec_IntFree( vTruths ); - - // normalize - pNew = Gia_ManDupNormalize( pTemp = pNew ); - Gia_ManStop( pTemp ); // other information nBoxes = (Gia_ManCiNum(pNew) - Gia_ManCiNum(p)) / 2; @@ -723,6 +719,12 @@ Gia_Man_t * Gia_ManDupWithFaddBoxes( Gia_Man_t * p, int nFaddMin, int fVerbose ) pNew->pManTime = Gia_ManGenerateTim( Gia_ManCiNum(p), Gia_ManCoNum(p), nBoxes, 3, 2 ); pNew->pAigExtra = Gia_ManGenerateExtraAig( nBoxes, 3, 2 ); + // normalize + pNew = Gia_ManDupNormalize( pTemp = pNew ); + pNew->pManTime = pTemp->pManTime; pTemp->pManTime = NULL; + pNew->pAigExtra = pTemp->pAigExtra; pTemp->pAigExtra = NULL; + Gia_ManStop( pTemp ); + //pNew = Gia_ManDupCollapse( pTemp = pNew, pNew->pAigExtra, NULL ); //Gia_ManStop( pTemp ); -- cgit v1.2.3