diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-04-11 13:07:56 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-04-11 13:07:56 -0700 |
commit | e7d0c9dc2303737237b40a20179148dd5075232f (patch) | |
tree | d74ad1c1991a938b16ae5578284c6a8e63ef4024 /src/map | |
parent | 865526f88094140c458a244fc8bb279bfa154fc1 (diff) | |
download | abc-e7d0c9dc2303737237b40a20179148dd5075232f.tar.gz abc-e7d0c9dc2303737237b40a20179148dd5075232f.tar.bz2 abc-e7d0c9dc2303737237b40a20179148dd5075232f.zip |
New feature to optimize delay during mapping.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/if/ifDelay.c | 5 | ||||
-rw-r--r-- | src/map/if/ifTime.c | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/map/if/ifDelay.c b/src/map/if/ifDelay.c index 1c10d950..7a434aea 100644 --- a/src/map/if/ifDelay.c +++ b/src/map/if/ifDelay.c @@ -297,7 +297,7 @@ int If_CutLutBalancePinDelays( If_Man_t * p, If_Cut_t * pCut, char * pPerm ) pPerm[i] = 2; else pPerm[i] = 1; - Delay = (int)If_ObjCutBest(If_CutLeaf(p, pCut, pCutPerm[i]))->Delay; + Delay = (int)If_ObjCutBest(If_CutLeaf(p, pCut, Abc_Lit2Var(pCutPerm[i])))->Delay; DelayMax = Abc_MaxInt( DelayMax, Delay + (int)pPerm[i] ); } return DelayMax; @@ -319,6 +319,7 @@ int If_CutLutBalanceEval( If_Man_t * p, If_Cut_t * pCut ) { pCut->fUser = 1; pCut->Cost = pCut->nLeaves > 1 ? 1 : 0; + pCut->uMaskFunc = 0; if ( pCut->nLeaves == 0 ) // const { assert( Abc_Lit2Var(If_CutTruthLit(pCut)) == 0 ); @@ -338,7 +339,7 @@ int If_CutLutBalanceEval( If_Man_t * p, If_Cut_t * pCut ) unsigned uLeafMask = 0; for ( i = 0; i < If_CutLeaveNum(pCut); i++ ) { - pTimes[i] = (int)If_ObjCutBest(If_CutLeaf(p, pCut, pCutPerm[i]))->Delay; + pTimes[i] = (int)If_ObjCutBest(If_CutLeaf(p, pCut, Abc_Lit2Var(pCutPerm[i])))->Delay; if ( DelayMax < pTimes[i] ) DelayMax = pTimes[i], nLeafMax = 1, uLeafMask = (1 << (i << 2)); else if ( DelayMax == pTimes[i] ) diff --git a/src/map/if/ifTime.c b/src/map/if/ifTime.c index e35ba0db..9647fd76 100644 --- a/src/map/if/ifTime.c +++ b/src/map/if/ifTime.c @@ -205,17 +205,17 @@ void If_CutPropagateRequired( If_Man_t * p, If_Obj_t * pObj, If_Cut_t * pCut, fl if ( p->pPars->fDelayOpt ) { int Delay = If_CutSopBalancePinDelays( p, pCut, pPerm ); - assert( Delay == pCut->Delay ); + assert( Delay == (int)pCut->Delay ); } else if ( p->pPars->fDelayOptLut ) { int Delay = If_CutLutBalancePinDelays( p, pCut, pPerm ); - assert( Delay == pCut->Delay ); + assert( Delay == (int)pCut->Delay ); } else if ( p->pPars->fDsdBalance ) { int Delay = If_CutDsdBalancePinDelays( p, pCut, pPerm ); - assert( Delay == pCut->Delay ); + assert( Delay == (int)pCut->Delay ); } else pPerm = pCut->pPerm; |