From e7d0c9dc2303737237b40a20179148dd5075232f Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 11 Apr 2014 13:07:56 -0700 Subject: New feature to optimize delay during mapping. --- src/base/abci/abc.c | 10 +++------- src/map/if/ifDelay.c | 5 +++-- src/map/if/ifTime.c | 6 +++--- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 099c6519..256e8eb2 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -15127,7 +15127,6 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv ) pPars->fTruth = 1; pPars->fCutMin = 1; pPars->fExpRed = 0; - pPars->fUsePerm = 0; pPars->fUseDsd = pPars->fDsdBalance; pPars->pLutLib = NULL; } @@ -15147,7 +15146,6 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv ) pPars->fTruth = 1; pPars->fCutMin = 1; pPars->fExpRed = 0; - pPars->fUsePerm = 0; } if ( pPars->fUseDsd ) @@ -15266,7 +15264,7 @@ usage: Abc_Print( -2, "\t-e : uses edge-based cut selection heuristics [default = %s]\n", pPars->fEdge? "yes": "no" ); Abc_Print( -2, "\t-p : uses power-aware cut selection heuristics [default = %s]\n", pPars->fPower? "yes": "no" ); Abc_Print( -2, "\t-m : enables cut minimization by removing vacuous variables [default = %s]\n", pPars->fCutMin? "yes": "no" ); - Abc_Print( -2, "\t-s : toggles sequential mapping [default = %s]\n", pPars->fDelayOptLut? "yes": "no" ); + Abc_Print( -2, "\t-s : toggles delay-oriented mapping used with -S [default = %s]\n", pPars->fDelayOptLut? "yes": "no" ); Abc_Print( -2, "\t-d : toggles deriving local AIGs using bi-decomposition [default = %s]\n", pPars->fBidec? "yes": "no" ); Abc_Print( -2, "\t-b : toggles the use of one special feature [default = %s]\n", pPars->fUseBat? "yes": "no" ); Abc_Print( -2, "\t-u : toggles the use of MUXes along with LUTs [default = %s]\n", fLutMux? "yes": "no" ); @@ -29881,8 +29879,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) pPars->fTruth = 1; pPars->fCutMin = 1; pPars->fExpRed = 0; - pPars->fUsePerm = pPars->fDsdBalance; - pPars->fUseDsd = 0; + pPars->fUseDsd = pPars->fDsdBalance; pPars->pLutLib = NULL; } // modify for delay optimization @@ -29901,7 +29898,6 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) pPars->fTruth = 1; pPars->fCutMin = 1; pPars->fExpRed = 0; - pPars->fUsePerm = 0; } if ( pPars->fUseDsd ) @@ -29978,7 +29974,7 @@ usage: Abc_Print( -2, "\t-e : uses edge-based cut selection heuristics [default = %s]\n", pPars->fEdge? "yes": "no" ); Abc_Print( -2, "\t-p : uses power-aware cut selection heuristics [default = %s]\n", pPars->fPower? "yes": "no" ); Abc_Print( -2, "\t-m : enables cut minimization by removing vacuous variables [default = %s]\n", pPars->fCutMin? "yes": "no" ); - Abc_Print( -2, "\t-s : toggles sequential mapping [default = %s]\n", pPars->fDelayOptLut? "yes": "no" ); + Abc_Print( -2, "\t-s : toggles delay-oriented mapping used with -S [default = %s]\n", pPars->fDelayOptLut? "yes": "no" ); Abc_Print( -2, "\t-d : toggles deriving local AIGs using bi-decomposition [default = %s]\n", pPars->fBidec? "yes": "no" ); Abc_Print( -2, "\t-b : toggles the use of one special feature [default = %s]\n", pPars->fUseBat? "yes": "no" ); Abc_Print( -2, "\t-g : toggles delay optimization by SOP balancing [default = %s]\n", pPars->fDelayOpt? "yes": "no" ); 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; -- cgit v1.2.3