mirror of
https://github.com/YosysHQ/abc.git
synced 2026-09-02 02:37:25 +02:00
Changing switch -R <num> in &gla to mean the max allowed size of abstraction. Adding switch -Q <num> to stop when the number of objects exceeds num % _during_refinement_.
This commit is contained in:
+2
-1
@@ -55,7 +55,8 @@ struct Abs_Par_t_
|
||||
int nLearnedDelta; // delta increase of learned clauses
|
||||
int nLearnedPerce; // percentage of clauses to leave
|
||||
int nTimeOut; // timeout in seconds
|
||||
int nRatioMin; // stop when less than this % of object is abstracted
|
||||
int nRatioMin; // stop when less than this % of object is unabstracted
|
||||
int nRatioMin2; // stop when less than this % of object is unabstracted during refinement
|
||||
int nRatioMax; // restart when the number of abstracted object is more than this
|
||||
int fUseTermVars; // use terminal variables
|
||||
int fUseRollback; // use rollback to the starting number of frames
|
||||
|
||||
@@ -1534,8 +1534,8 @@ int Gia_ManPerformGla( Gia_Man_t * pAig, Abs_Par_t * pPars )
|
||||
if ( p->pPars->fVerbose )
|
||||
{
|
||||
Abc_Print( 1, "Running gate-level abstraction (GLA) with the following parameters:\n" );
|
||||
Abc_Print( 1, "FrameMax = %d ConfMax = %d Timeout = %d RatioMin = %d %% RatioMax = %d %%\n",
|
||||
pPars->nFramesMax, pPars->nConfLimit, pPars->nTimeOut, pPars->nRatioMin, pPars->nRatioMax );
|
||||
Abc_Print( 1, "FrameMax = %d ConfMax = %d Timeout = %d Limit = %d %% Limit2 = %d %% RatioMax = %d %%\n",
|
||||
pPars->nFramesMax, pPars->nConfLimit, pPars->nTimeOut, pPars->nRatioMin, pPars->nRatioMin2, pPars->nRatioMax );
|
||||
Abc_Print( 1, "LrnStart = %d LrnDelta = %d LrnRatio = %d %% Skip = %d SimpleCNF = %d Dump = %d\n",
|
||||
pPars->nLearnedStart, pPars->nLearnedDelta, pPars->nLearnedPerce, pPars->fUseSkip, pPars->fUseSimple, pPars->fDumpVabs|pPars->fDumpMabs );
|
||||
if ( pPars->fDumpVabs || pPars->fDumpMabs )
|
||||
@@ -1659,7 +1659,7 @@ int Gia_ManPerformGla( Gia_Man_t * pAig, Abs_Par_t * pPars )
|
||||
if ( pPars->fVerbose )
|
||||
Ga2_ManAbsPrintFrame( p, f, sat_solver2_nconflicts(p->pSat)-nConflsBeg, c+1, Abc_Clock() - clk, 0 );
|
||||
// check if the number of objects is below limit
|
||||
if ( Vec_IntSize(p->vAbs) >= p->nMarked * (100 - pPars->nRatioMin/2) / 100 )
|
||||
if ( pPars->nRatioMin2 && Vec_IntSize(p->vAbs) >= p->nMarked * pPars->nRatioMin2 / 100 )
|
||||
{
|
||||
Status = l_Undef;
|
||||
goto finish;
|
||||
@@ -1755,7 +1755,7 @@ int Gia_ManPerformGla( Gia_Man_t * pAig, Abs_Par_t * pPars )
|
||||
Vec_IntFreeP( &pAig->vGateClasses );
|
||||
pAig->vGateClasses = Ga2_ManAbsTranslate( p );
|
||||
// check if the number of objects is below limit
|
||||
if ( Vec_IntSize(p->vAbs) >= p->nMarked * (100 - pPars->nRatioMin) / 100 )
|
||||
if ( pPars->nRatioMin && Vec_IntSize(p->vAbs) >= p->nMarked * pPars->nRatioMin / 100 )
|
||||
{
|
||||
Status = l_Undef;
|
||||
goto finish;
|
||||
@@ -1827,10 +1827,10 @@ finish:
|
||||
Abc_Print( 1, "GLA reached timeout %d sec in frame %d with a %d-stable abstraction. ", p->pPars->nTimeOut, p->pPars->iFrameProved+1, p->pPars->nFramesNoChange );
|
||||
else if ( pPars->nConfLimit && sat_solver2_nconflicts(p->pSat) >= pPars->nConfLimit )
|
||||
Abc_Print( 1, "GLA exceeded %d conflicts in frame %d with a %d-stable abstraction. ", pPars->nConfLimit, p->pPars->iFrameProved+1, p->pPars->nFramesNoChange );
|
||||
else if ( Vec_IntSize(p->vAbs) >= p->nMarked * (100 - pPars->nRatioMin) / 100 )
|
||||
Abc_Print( 1, "GLA found the ratio of abstracted objects to exceed %d %% in frame %d. ", pPars->nRatioMin, p->pPars->iFrameProved+1 );
|
||||
else if ( Vec_IntSize(p->vAbs) >= p->nMarked * (100 - pPars->nRatioMin/2) / 100 )
|
||||
Abc_Print( 1, "GLA found the ratio of abstracted objects during refinement to exceed %d %% in frame %d. ", pPars->nRatioMin/2, p->pPars->iFrameProved+1 );
|
||||
else if ( pPars->nRatioMin2 && Vec_IntSize(p->vAbs) >= p->nMarked * pPars->nRatioMin2 / 100 )
|
||||
Abc_Print( 1, "GLA found that the size of abstraction exceeds %d %% in frame %d during refinement. ", pPars->nRatioMin2, p->pPars->iFrameProved+1 );
|
||||
else if ( pPars->nRatioMin && Vec_IntSize(p->vAbs) >= p->nMarked * pPars->nRatioMin / 100 )
|
||||
Abc_Print( 1, "GLA found that the size of abstraction exceeds %d %% in frame %d. ", pPars->nRatioMin, p->pPars->iFrameProved+1 );
|
||||
else
|
||||
Abc_Print( 1, "GLA finished %d frames and produced a %d-stable abstraction. ", p->pPars->iFrameProved+1, p->pPars->nFramesNoChange );
|
||||
p->pPars->iFrame = p->pPars->iFrameProved;
|
||||
|
||||
Reference in New Issue
Block a user