Commit e7d0c9dc by Alan Mishchenko

New feature to optimize delay during mapping.

parent 865526f8
...@@ -15127,7 +15127,6 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -15127,7 +15127,6 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars->fTruth = 1; pPars->fTruth = 1;
pPars->fCutMin = 1; pPars->fCutMin = 1;
pPars->fExpRed = 0; pPars->fExpRed = 0;
pPars->fUsePerm = 0;
pPars->fUseDsd = pPars->fDsdBalance; pPars->fUseDsd = pPars->fDsdBalance;
pPars->pLutLib = NULL; pPars->pLutLib = NULL;
} }
...@@ -15147,7 +15146,6 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -15147,7 +15146,6 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars->fTruth = 1; pPars->fTruth = 1;
pPars->fCutMin = 1; pPars->fCutMin = 1;
pPars->fExpRed = 0; pPars->fExpRed = 0;
pPars->fUsePerm = 0;
} }
if ( pPars->fUseDsd ) if ( pPars->fUseDsd )
...@@ -15266,7 +15264,7 @@ usage: ...@@ -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-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-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-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 <NN> [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-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-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" ); 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 ) ...@@ -29881,8 +29879,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars->fTruth = 1; pPars->fTruth = 1;
pPars->fCutMin = 1; pPars->fCutMin = 1;
pPars->fExpRed = 0; pPars->fExpRed = 0;
pPars->fUsePerm = pPars->fDsdBalance; pPars->fUseDsd = pPars->fDsdBalance;
pPars->fUseDsd = 0;
pPars->pLutLib = NULL; pPars->pLutLib = NULL;
} }
// modify for delay optimization // modify for delay optimization
...@@ -29901,7 +29898,6 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29901,7 +29898,6 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars->fTruth = 1; pPars->fTruth = 1;
pPars->fCutMin = 1; pPars->fCutMin = 1;
pPars->fExpRed = 0; pPars->fExpRed = 0;
pPars->fUsePerm = 0;
} }
if ( pPars->fUseDsd ) if ( pPars->fUseDsd )
...@@ -29978,7 +29974,7 @@ usage: ...@@ -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-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-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-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 <NN> [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-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-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" ); Abc_Print( -2, "\t-g : toggles delay optimization by SOP balancing [default = %s]\n", pPars->fDelayOpt? "yes": "no" );
...@@ -297,7 +297,7 @@ int If_CutLutBalancePinDelays( If_Man_t * p, If_Cut_t * pCut, char * pPerm ) ...@@ -297,7 +297,7 @@ int If_CutLutBalancePinDelays( If_Man_t * p, If_Cut_t * pCut, char * pPerm )
pPerm[i] = 2; pPerm[i] = 2;
else else
pPerm[i] = 1; 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] ); DelayMax = Abc_MaxInt( DelayMax, Delay + (int)pPerm[i] );
} }
return DelayMax; return DelayMax;
...@@ -319,6 +319,7 @@ int If_CutLutBalanceEval( If_Man_t * p, If_Cut_t * pCut ) ...@@ -319,6 +319,7 @@ int If_CutLutBalanceEval( If_Man_t * p, If_Cut_t * pCut )
{ {
pCut->fUser = 1; pCut->fUser = 1;
pCut->Cost = pCut->nLeaves > 1 ? 1 : 0; pCut->Cost = pCut->nLeaves > 1 ? 1 : 0;
pCut->uMaskFunc = 0;
if ( pCut->nLeaves == 0 ) // const if ( pCut->nLeaves == 0 ) // const
{ {
assert( Abc_Lit2Var(If_CutTruthLit(pCut)) == 0 ); assert( Abc_Lit2Var(If_CutTruthLit(pCut)) == 0 );
...@@ -338,7 +339,7 @@ int If_CutLutBalanceEval( If_Man_t * p, If_Cut_t * pCut ) ...@@ -338,7 +339,7 @@ int If_CutLutBalanceEval( If_Man_t * p, If_Cut_t * pCut )
unsigned uLeafMask = 0; unsigned uLeafMask = 0;
for ( i = 0; i < If_CutLeaveNum(pCut); i++ ) 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] ) if ( DelayMax < pTimes[i] )
DelayMax = pTimes[i], nLeafMax = 1, uLeafMask = (1 << (i << 2)); DelayMax = pTimes[i], nLeafMax = 1, uLeafMask = (1 << (i << 2));
else if ( DelayMax == pTimes[i] ) else if ( DelayMax == pTimes[i] )
......
...@@ -205,17 +205,17 @@ void If_CutPropagateRequired( If_Man_t * p, If_Obj_t * pObj, If_Cut_t * pCut, fl ...@@ -205,17 +205,17 @@ void If_CutPropagateRequired( If_Man_t * p, If_Obj_t * pObj, If_Cut_t * pCut, fl
if ( p->pPars->fDelayOpt ) if ( p->pPars->fDelayOpt )
{ {
int Delay = If_CutSopBalancePinDelays( p, pCut, pPerm ); int Delay = If_CutSopBalancePinDelays( p, pCut, pPerm );
assert( Delay == pCut->Delay ); assert( Delay == (int)pCut->Delay );
} }
else if ( p->pPars->fDelayOptLut ) else if ( p->pPars->fDelayOptLut )
{ {
int Delay = If_CutLutBalancePinDelays( p, pCut, pPerm ); int Delay = If_CutLutBalancePinDelays( p, pCut, pPerm );
assert( Delay == pCut->Delay ); assert( Delay == (int)pCut->Delay );
} }
else if ( p->pPars->fDsdBalance ) else if ( p->pPars->fDsdBalance )
{ {
int Delay = If_CutDsdBalancePinDelays( p, pCut, pPerm ); int Delay = If_CutDsdBalancePinDelays( p, pCut, pPerm );
assert( Delay == pCut->Delay ); assert( Delay == (int)pCut->Delay );
} }
else else
pPerm = pCut->pPerm; pPerm = pCut->pPerm;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment