mirror of https://github.com/YosysHQ/abc.git
%pdra, %abs: added option -d for apple-to-apple comparison
This commit is contained in:
parent
6f8820fb95
commit
3ae83d376a
|
|
@ -178,6 +178,7 @@ struct Wlc_Par_t_
|
|||
int fProofRefine; // Use proof-based refinement
|
||||
int fHybrid; // Use a hybrid of CBR and PBR
|
||||
int fCheckCombUnsat; // Check if ABS becomes comb. unsat
|
||||
int fAbs2; // Use UFAR style createAbs
|
||||
int fVerbose; // verbose output
|
||||
int fPdrVerbose; // verbose output
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1060,7 +1060,7 @@ int Wlc_NtkPdrAbs( Wlc_Ntk_t * p, Wlc_Par_t * pPars )
|
|||
printf( "\nIteration %d:\n", nIters );
|
||||
|
||||
// get abstracted GIA and the set of pseudo-PIs (vPisNew)
|
||||
if ( pPars->fProofRefine )
|
||||
if ( pPars->fAbs2 || pPars->fProofRefine )
|
||||
{
|
||||
if ( vBlacks == NULL )
|
||||
vBlacks = Wlc_NtkGetBlacks( p, pPars );
|
||||
|
|
@ -1352,14 +1352,28 @@ int Wlc_NtkAbsCore( Wlc_Ntk_t * p, Wlc_Par_t * pPars )
|
|||
Vec_Int_t * vPisNew, * vRefine;
|
||||
Gia_Man_t * pGia, * pTemp;
|
||||
Wlc_Ntk_t * pAbs;
|
||||
Vec_Int_t * vBlacks = NULL;
|
||||
|
||||
if ( pPars->fVerbose )
|
||||
printf( "\nIteration %d:\n", nIters );
|
||||
|
||||
// get abstracted GIA and the set of pseudo-PIs (vPisNew)
|
||||
if ( nIters == 1 && pPars->nLimit < ABC_INFINITY )
|
||||
Wlc_NtkSetUnmark( p, pPars, vUnmark );
|
||||
pAbs = Wlc_NtkAbs( p, pPars, vUnmark, &vPisNew, NULL, pPars->fVerbose );
|
||||
if ( pPars->fAbs2 )
|
||||
{
|
||||
if ( vBlacks == NULL )
|
||||
vBlacks = Wlc_NtkGetBlacks( p, pPars );
|
||||
else
|
||||
Wlc_NtkUpdateBlacks( p, pPars, &vBlacks, vUnmark );
|
||||
pAbs = Wlc_NtkAbs2( p, vBlacks, NULL );
|
||||
vPisNew = Vec_IntDup( vBlacks );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( nIters == 1 && pPars->nLimit < ABC_INFINITY )
|
||||
Wlc_NtkSetUnmark( p, pPars, vUnmark );
|
||||
|
||||
pAbs = Wlc_NtkAbs( p, pPars, vUnmark, &vPisNew, NULL, pPars->fVerbose );
|
||||
}
|
||||
pGia = Wlc_NtkBitBlast( pAbs, NULL, -1, 0, 0, 0, 0 );
|
||||
|
||||
// if the abstraction has flops with DC-init state,
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
int c;
|
||||
Wlc_ManSetDefaultParams( pPars );
|
||||
Extra_UtilGetoptReset();
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "AMXFILabrcpmuxvwh" ) ) != EOF )
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "AMXFILabrcdpmuxvwh" ) ) != EOF )
|
||||
{
|
||||
switch ( c )
|
||||
{
|
||||
|
|
@ -547,6 +547,9 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
case 'c':
|
||||
pPars->fCheckClauses ^= 1;
|
||||
break;
|
||||
case 'd':
|
||||
pPars->fAbs2 ^= 1;
|
||||
break;
|
||||
case 'p':
|
||||
pPars->fPushClauses ^= 1;
|
||||
break;
|
||||
|
|
@ -576,7 +579,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
Wlc_NtkPdrAbs( pNtk, pPars );
|
||||
return 0;
|
||||
usage:
|
||||
Abc_Print( -2, "usage: %%pdra [-AMXFIL num] [-abrcpmxuvwh]\n" );
|
||||
Abc_Print( -2, "usage: %%pdra [-AMXFIL num] [-abrcdpmxuvwh]\n" );
|
||||
Abc_Print( -2, "\t abstraction for word-level networks\n" );
|
||||
Abc_Print( -2, "\t-A num : minimum bit-width of an adder/subtractor to abstract [default = %d]\n", pPars->nBitsAdd );
|
||||
Abc_Print( -2, "\t-M num : minimum bit-width of a multiplier to abstract [default = %d]\n", pPars->nBitsMul );
|
||||
|
|
@ -589,6 +592,7 @@ usage:
|
|||
Abc_Print( -2, "\t-b : toggle using proof-based refinement [default = %s]\n", pPars->fProofRefine? "yes": "no" );
|
||||
Abc_Print( -2, "\t-r : toggle using both cex-based and proof-based refinement [default = %s]\n", pPars->fHybrid? "yes": "no" );
|
||||
Abc_Print( -2, "\t-c : toggle checking clauses in the reloaded trace [default = %s]\n", pPars->fCheckClauses? "yes": "no" );
|
||||
Abc_Print( -2, "\t-d : toggle using another way of creating abstractions [default = %s]\n", pPars->fAbs2? "yes": "no" );
|
||||
Abc_Print( -2, "\t-u : toggle checking combinationally unsat [default = %s]\n", pPars->fCheckCombUnsat? "yes": "no" );
|
||||
Abc_Print( -2, "\t-p : toggle pushing clauses in the reloaded trace [default = %s]\n", pPars->fPushClauses? "yes": "no" );
|
||||
Abc_Print( -2, "\t-m : toggle refining the whole MFFC of a PPI [default = %s]\n", pPars->fMFFC? "yes": "no" );
|
||||
|
|
@ -617,7 +621,7 @@ int Abc_CommandAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
int c;
|
||||
Wlc_ManSetDefaultParams( pPars );
|
||||
Extra_UtilGetoptReset();
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "AMXFILxvwh" ) ) != EOF )
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "AMXFILdxvwh" ) ) != EOF )
|
||||
{
|
||||
switch ( c )
|
||||
{
|
||||
|
|
@ -687,6 +691,9 @@ int Abc_CommandAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
if ( pPars->nLimit < 0 )
|
||||
goto usage;
|
||||
break;
|
||||
case 'd':
|
||||
pPars->fAbs2 ^= 1;
|
||||
break;
|
||||
case 'x':
|
||||
pPars->fXorOutput ^= 1;
|
||||
break;
|
||||
|
|
@ -710,7 +717,7 @@ int Abc_CommandAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
Wlc_NtkAbsCore( pNtk, pPars );
|
||||
return 0;
|
||||
usage:
|
||||
Abc_Print( -2, "usage: %%abs [-AMXFIL num] [-xvwh]\n" );
|
||||
Abc_Print( -2, "usage: %%abs [-AMXFIL num] [-dxvwh]\n" );
|
||||
Abc_Print( -2, "\t abstraction for word-level networks\n" );
|
||||
Abc_Print( -2, "\t-A num : minimum bit-width of an adder/subtractor to abstract [default = %d]\n", pPars->nBitsAdd );
|
||||
Abc_Print( -2, "\t-M num : minimum bit-width of a multiplier to abstract [default = %d]\n", pPars->nBitsMul );
|
||||
|
|
@ -718,6 +725,7 @@ usage:
|
|||
Abc_Print( -2, "\t-F num : minimum bit-width of a flip-flop to abstract [default = %d]\n", pPars->nBitsFlop );
|
||||
Abc_Print( -2, "\t-I num : maximum number of CEGAR iterations [default = %d]\n", pPars->nIterMax );
|
||||
Abc_Print( -2, "\t-L num : maximum number of each type of signals [default = %d]\n", pPars->nLimit );
|
||||
Abc_Print( -2, "\t-d : toggle using another way of creating abstractions [default = %s]\n", pPars->fAbs2? "yes": "no" );
|
||||
Abc_Print( -2, "\t-x : toggle XORing outputs of word-level miter [default = %s]\n", pPars->fXorOutput? "yes": "no" );
|
||||
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", pPars->fVerbose? "yes": "no" );
|
||||
Abc_Print( -2, "\t-w : toggle printing verbose PDR output [default = %s]\n", pPars->fPdrVerbose? "yes": "no" );
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ void Wlc_ManSetDefaultParams( Wlc_Par_t * pPars )
|
|||
pPars->fProofRefine = 0; // Use proof-based refinement
|
||||
pPars->fHybrid = 1; // Use a hybrid of CBR and PBR
|
||||
pPars->fCheckCombUnsat = 0; // Check if ABS becomes comb. unsat
|
||||
pPars->fAbs2 = 0; // Use UFAR style createAbs
|
||||
pPars->fVerbose = 0; // verbose output`
|
||||
pPars->fPdrVerbose = 0; // show verbose PDR output
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue