mirror of https://github.com/YosysHQ/abc.git
fix option
This commit is contained in:
parent
1f16d8bc90
commit
a3fb930e44
|
|
@ -55,7 +55,7 @@ struct Gia_ManTranStochParam {
|
||||||
int nHops;
|
int nHops;
|
||||||
int nRestarts;
|
int nRestarts;
|
||||||
int nSeedBase;
|
int nSeedBase;
|
||||||
int fCspf;
|
int fMspf;
|
||||||
int fMerge;
|
int fMerge;
|
||||||
int fResetHop;
|
int fResetHop;
|
||||||
int fTruth;
|
int fTruth;
|
||||||
|
|
@ -73,9 +73,9 @@ Gia_Man_t * Gia_ManTranStochOpt1( Gia_ManTranStochParam * p, Gia_Man_t * pOld )
|
||||||
do {
|
do {
|
||||||
n = Gia_ManAndNum( pGia );
|
n = Gia_ManAndNum( pGia );
|
||||||
if ( p->fTruth )
|
if ( p->fTruth )
|
||||||
pNew = Gia_ManTransductionTt( pGia, (p->fMerge? 8: 7), !p->fCspf, p->nSeed++, 0, 0, 0, 0, p->pExdc, p->fNewLine, p->nVerbose > 0? p->nVerbose - 1: 0 );
|
pNew = Gia_ManTransductionTt( pGia, (p->fMerge? 8: 7), p->fMspf, p->nSeed++, 0, 0, 0, 0, p->pExdc, p->fNewLine, p->nVerbose > 0? p->nVerbose - 1: 0 );
|
||||||
else
|
else
|
||||||
pNew = Gia_ManTransductionBdd( pGia, (p->fMerge? 8: 7), !p->fCspf, p->nSeed++, 0, 0, 0, 0, p->pExdc, p->fNewLine, p->nVerbose > 0? p->nVerbose - 1: 0 );
|
pNew = Gia_ManTransductionBdd( pGia, (p->fMerge? 8: 7), p->fMspf, p->nSeed++, 0, 0, 0, 0, p->pExdc, p->fNewLine, p->nVerbose > 0? p->nVerbose - 1: 0 );
|
||||||
Gia_ManStop( pGia );
|
Gia_ManStop( pGia );
|
||||||
pGia = pNew;
|
pGia = pNew;
|
||||||
pNew = Gia_ManCompress2( pGia, 1, 0 );
|
pNew = Gia_ManCompress2( pGia, 1, 0 );
|
||||||
|
|
@ -145,7 +145,7 @@ Gia_Man_t * Gia_ManTranStochOpt3( Gia_ManTranStochParam * p, Gia_Man_t * pOld )
|
||||||
return pBest;
|
return pBest;
|
||||||
}
|
}
|
||||||
|
|
||||||
Gia_Man_t * Gia_ManTranStoch( Gia_Man_t * pGia, int nRestarts, int nHops, int nSeedBase, int fCspf, int fMerge, int fResetHop, int fTruth, int fSingle, int fOriginalOnly, int fNewLine, Gia_Man_t * pExdc, int nVerbose ) {
|
Gia_Man_t * Gia_ManTranStoch( Gia_Man_t * pGia, int nRestarts, int nHops, int nSeedBase, int fMspf, int fMerge, int fResetHop, int fTruth, int fSingle, int fOriginalOnly, int fNewLine, Gia_Man_t * pExdc, int nVerbose ) {
|
||||||
int i, j = 0;
|
int i, j = 0;
|
||||||
Gia_Man_t * pNew, * pBest, * pStart;
|
Gia_Man_t * pNew, * pBest, * pStart;
|
||||||
Abc_Ntk_t * pNtk, * pNtkRes;
|
Abc_Ntk_t * pNtk, * pNtkRes;
|
||||||
|
|
@ -153,7 +153,7 @@ Gia_Man_t * Gia_ManTranStoch( Gia_Man_t * pGia, int nRestarts, int nHops, int nS
|
||||||
p->nRestarts = nRestarts;
|
p->nRestarts = nRestarts;
|
||||||
p->nHops = nHops;
|
p->nHops = nHops;
|
||||||
p->nSeedBase = nSeedBase;
|
p->nSeedBase = nSeedBase;
|
||||||
p->fCspf = fCspf;
|
p->fMspf = fMspf;
|
||||||
p->fMerge = fMerge;
|
p->fMerge = fMerge;
|
||||||
p->fResetHop = fResetHop;
|
p->fResetHop = fResetHop;
|
||||||
p->fTruth = fTruth;
|
p->fTruth = fTruth;
|
||||||
|
|
|
||||||
|
|
@ -42754,11 +42754,11 @@ usage:
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
int Abc_CommandAbc9TranStoch( Abc_Frame_t * pAbc, int argc, char ** argv )
|
int Abc_CommandAbc9TranStoch( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||||
{
|
{
|
||||||
extern Gia_Man_t * Gia_ManTranStoch( Gia_Man_t * pGia, int nRestarts, int nHops, int nSeedBase, int fCspf, int fMerge, int fResetHop, int fTruth, int fSingle, int fOriginalOnly, int fNewLine, Gia_Man_t * pExdc, int nVerbose );
|
extern Gia_Man_t * Gia_ManTranStoch( Gia_Man_t * pGia, int nRestarts, int nHops, int nSeedBase, int fMspf, int fMerge, int fResetHop, int fTruth, int fSingle, int fOriginalOnly, int fNewLine, Gia_Man_t * pExdc, int nVerbose );
|
||||||
Gia_Man_t * pTemp, * pExdc = NULL;
|
Gia_Man_t * pTemp, * pExdc = NULL;
|
||||||
int c, nRestarts = 0, nHops = 10, nSeedBase = 0, fCspf = 0, fMerge = 1, fResetHop = 1, fTruth = 0, fSingle = 0, fOriginalOnly = 0, fNewLine = 0, nVerbose = 1;
|
int c, nRestarts = 0, nHops = 10, nSeedBase = 0, fMspf = 1, fMerge = 1, fResetHop = 1, fTruth = 0, fSingle = 0, fOriginalOnly = 0, fNewLine = 0, nVerbose = 1;
|
||||||
Extra_UtilGetoptReset();
|
Extra_UtilGetoptReset();
|
||||||
while ( ( c = Extra_UtilGetopt( argc, argv, "NMRVcmrtsonh" ) ) != EOF )
|
while ( ( c = Extra_UtilGetopt( argc, argv, "NMRVmgrtsonh" ) ) != EOF )
|
||||||
{
|
{
|
||||||
switch ( c )
|
switch ( c )
|
||||||
{
|
{
|
||||||
|
|
@ -42798,10 +42798,10 @@ int Abc_CommandAbc9TranStoch( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||||
nVerbose = atoi(argv[globalUtilOptind]);
|
nVerbose = atoi(argv[globalUtilOptind]);
|
||||||
globalUtilOptind++;
|
globalUtilOptind++;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
|
||||||
fCspf ^= 1;
|
|
||||||
break;
|
|
||||||
case 'm':
|
case 'm':
|
||||||
|
fMspf ^= 1;
|
||||||
|
break;
|
||||||
|
case 'g':
|
||||||
fMerge ^= 1;
|
fMerge ^= 1;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
|
|
@ -42851,21 +42851,21 @@ int Abc_CommandAbc9TranStoch( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pTemp = Gia_ManTranStoch( pAbc->pGia, nRestarts, nHops, nSeedBase, fCspf, fMerge, fResetHop, fTruth, fSingle, fOriginalOnly, fNewLine, pExdc, nVerbose );
|
pTemp = Gia_ManTranStoch( pAbc->pGia, nRestarts, nHops, nSeedBase, fMspf, fMerge, fResetHop, fTruth, fSingle, fOriginalOnly, fNewLine, pExdc, nVerbose );
|
||||||
if ( pExdc != NULL )
|
if ( pExdc != NULL )
|
||||||
Gia_ManStop( pExdc );
|
Gia_ManStop( pExdc );
|
||||||
Abc_FrameUpdateGia( pAbc, pTemp );
|
Abc_FrameUpdateGia( pAbc, pTemp );
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
Abc_Print( -2, "usage: &transtoch [-NMRV num] [-cmrtsonh] <file>\n" );
|
Abc_Print( -2, "usage: &transtoch [-NMRV num] [-mgrtsonh] <file>\n" );
|
||||||
Abc_Print( -2, "\t iterates transduction with randomized parameters\n" );
|
Abc_Print( -2, "\t iterates transduction with randomized parameters\n" );
|
||||||
Abc_Print( -2, "\t-N num : number of restarts [default = %d]\n", nRestarts );
|
Abc_Print( -2, "\t-N num : number of restarts [default = %d]\n", nRestarts );
|
||||||
Abc_Print( -2, "\t-M num : number of hops (if; mfs2; strash) [default = %d]\n", nHops );
|
Abc_Print( -2, "\t-M num : number of hops (if; mfs2; strash) [default = %d]\n", nHops );
|
||||||
Abc_Print( -2, "\t-R num : random seed [default = %d]\n", nSeedBase );
|
Abc_Print( -2, "\t-R num : random seed [default = %d]\n", nSeedBase );
|
||||||
Abc_Print( -2, "\t-V num : verbosity level [default = %d]\n", nVerbose);
|
Abc_Print( -2, "\t-V num : verbosity level [default = %d]\n", nVerbose);
|
||||||
Abc_Print( -2, "\t-c : toggles using CSPF instead of MSPF [default = %s]\n", fCspf? "yes": "no" );
|
Abc_Print( -2, "\t-m : toggles using MSPF instead of CSPF [default = %s]\n", fMspf? "yes": "no" );
|
||||||
Abc_Print( -2, "\t-m : toggles using ResubShared [default = %s]\n", fMerge? "yes": "no" );
|
Abc_Print( -2, "\t-g : toggles using ResubShared [default = %s]\n", fMerge? "yes": "no" );
|
||||||
Abc_Print( -2, "\t-r : toggles resetting hop count when new minimum is found [default = %s]\n", fResetHop? "yes": "no" );
|
Abc_Print( -2, "\t-r : toggles resetting hop count when new minimum is found [default = %s]\n", fResetHop? "yes": "no" );
|
||||||
Abc_Print( -2, "\t-t : toggles using truth table instead of BDD [default = %s]\n", fTruth? "yes": "no" );
|
Abc_Print( -2, "\t-t : toggles using truth table instead of BDD [default = %s]\n", fTruth? "yes": "no" );
|
||||||
Abc_Print( -2, "\t-s : toggles starting from the smallest starting point [default = %s]\n", fSingle? "yes": "no" );
|
Abc_Print( -2, "\t-s : toggles starting from the smallest starting point [default = %s]\n", fSingle? "yes": "no" );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue