diff options
-rw-r--r-- | src/base/abci/abc.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 08c9ca49..77d11cd1 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -39140,11 +39140,11 @@ int Abc_CommandAbc9Dch( Abc_Frame_t * pAbc, int argc, char ** argv ) { Gia_Man_t * pTemp; Dch_Pars_t Pars, * pPars = &Pars; - int c; + int c, fEquiv = 0; // set defaults Dch_ManSetDefaultParams( pPars ); Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "WCSsptfrvh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "WCSsptfrevh" ) ) != EOF ) { switch ( c ) { @@ -39196,6 +39196,9 @@ int Abc_CommandAbc9Dch( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'r': pPars->fSkipRedSupp ^= 1; break; + case 'e': + fEquiv ^= 1; + break; case 'v': pPars->fVerbose ^= 1; break; @@ -39215,12 +39218,22 @@ int Abc_CommandAbc9Dch( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Abc_CommandAbc9Dch(): This command does not work with barrier buffers.\n" ); return 1; } - pTemp = Gia_ManPerformDch( pAbc->pGia, pPars ); + if ( fEquiv ) + { + Aig_Man_t * pNew = Gia_ManToAigSimple( pAbc->pGia ); + assert( Gia_ManObjNum(pAbc->pGia) == Aig_ManObjNum(pNew) ); + Dch_ComputeEquivalences( pNew, (Dch_Pars_t *)pPars ); + Gia_ManReprFromAigRepr( pNew, pAbc->pGia ); + Aig_ManStop( pNew ); + pTemp = Gia_ManEquivReduce( pAbc->pGia, 1, 0, 0, 0 ); + } + else + pTemp = Gia_ManPerformDch( pAbc->pGia, pPars ); Abc_FrameUpdateGia( pAbc, pTemp ); return 0; usage: - Abc_Print( -2, "usage: &dch [-WCS num] [-sptfrvh]\n" ); + Abc_Print( -2, "usage: &dch [-WCS num] [-sptfrevh]\n" ); Abc_Print( -2, "\t computes structural choices using a new approach\n" ); Abc_Print( -2, "\t-W num : the max number of simulation words [default = %d]\n", pPars->nWords ); Abc_Print( -2, "\t-C num : the max number of conflicts at a node [default = %d]\n", pPars->nBTLimit ); @@ -39230,6 +39243,7 @@ usage: Abc_Print( -2, "\t-t : toggle simulation of the TFO classes [default = %s]\n", pPars->fSimulateTfo? "yes": "no" ); Abc_Print( -2, "\t-f : toggle using lighter logic synthesis [default = %s]\n", pPars->fLightSynth? "yes": "no" ); Abc_Print( -2, "\t-r : toggle skipping choices with redundant support [default = %s]\n", pPars->fSkipRedSupp? "yes": "no" ); + Abc_Print( -2, "\t-e : toggle computing and merging equivalences [default = %s]\n", fEquiv? "yes": "no" ); Abc_Print( -2, "\t-v : toggle verbose printout [default = %s]\n", pPars->fVerbose? "yes": "no" ); Abc_Print( -2, "\t-h : print the command usage\n"); return 1; |