summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-12-13 20:10:24 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2014-12-13 20:10:24 -0800
commit6e59e4e5421a8904f533774a047033ad994465a6 (patch)
treefd6e43a7e246fe5840ebcf108a5daa96a98e07de
parente946deec81b1e9aa58a3143e9c986f413bd6fe9b (diff)
downloadabc-6e59e4e5421a8904f533774a047033ad994465a6.tar.gz
abc-6e59e4e5421a8904f533774a047033ad994465a6.tar.bz2
abc-6e59e4e5421a8904f533774a047033ad994465a6.zip
Adding relax ratio to &synch2.
-rw-r--r--src/aig/gia/giaScript.c4
-rw-r--r--src/base/abci/abc.c21
2 files changed, 19 insertions, 6 deletions
diff --git a/src/aig/gia/giaScript.c b/src/aig/gia/giaScript.c
index 9ccb832b..cc6300c8 100644
--- a/src/aig/gia/giaScript.c
+++ b/src/aig/gia/giaScript.c
@@ -383,7 +383,7 @@ Gia_Man_t * Gia_ManAigSynch2Choices( Gia_Man_t * pGia1, Gia_Man_t * pGia2, Gia_M
Aig_ManStop( pMan );
return pGia;
}
-Gia_Man_t * Gia_ManAigSynch2( Gia_Man_t * pInit, void * pPars0, int nLutSize )
+Gia_Man_t * Gia_ManAigSynch2( Gia_Man_t * pInit, void * pPars0, int nLutSize, int nRelaxRatio )
{
extern Gia_Man_t * Gia_ManLutBalance( Gia_Man_t * p, int nLutSize, int fUseMuxes, int fRecursive, int fOptArea, int fVerbose );
Dch_Pars_t * pParsDch = (Dch_Pars_t *)pPars0;
@@ -393,7 +393,7 @@ Gia_Man_t * Gia_ManAigSynch2( Gia_Man_t * pInit, void * pPars0, int nLutSize )
Lf_ManSetDefaultPars( pPars );
pPars->fCutMin = 1;
pPars->fCoarsen = 1;
- pPars->nRelaxRatio = 20;
+ pPars->nRelaxRatio = nRelaxRatio;
pPars->nAreaTuner = 5;
pPars->nCutNum = 12;
pPars->fVerbose = fVerbose;
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 3573c442..44bf61c3 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -28850,14 +28850,15 @@ usage:
***********************************************************************/
int Abc_CommandAbc9Synch2( Abc_Frame_t * pAbc, int argc, char ** argv )
{
- extern Gia_Man_t * Gia_ManAigSynch2( Gia_Man_t * p, void * pPars, int nLutSize );
+ extern Gia_Man_t * Gia_ManAigSynch2( Gia_Man_t * p, void * pPars, int nLutSize, int nRelaxRatio );
Gia_Man_t * pTemp;
Dch_Pars_t Pars, * pPars = &Pars;
int c, nLutSize = 6;
+ int nRelaxRatio = 20;
// set defaults
Dch_ManSetDefaultParams( pPars );
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "WCSKfvh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "WCSKRfvh" ) ) != EOF )
{
switch ( c )
{
@@ -28905,6 +28906,17 @@ int Abc_CommandAbc9Synch2( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( nLutSize < 0 )
goto usage;
break;
+ case 'R':
+ if ( globalUtilOptind >= argc )
+ {
+ Abc_Print( 1, "Command line switch \"-R\" should be followed by a floating point number.\n" );
+ return 0;
+ }
+ nRelaxRatio = atoi(argv[globalUtilOptind]);
+ globalUtilOptind++;
+ if ( nRelaxRatio < 0 )
+ goto usage;
+ break;
case 'f':
pPars->fLightSynth ^= 1;
break;
@@ -28922,17 +28934,18 @@ int Abc_CommandAbc9Synch2( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Dch(): There is no AIG.\n" );
return 1;
}
- pTemp = Gia_ManAigSynch2( pAbc->pGia, pPars, nLutSize );
+ pTemp = Gia_ManAigSynch2( pAbc->pGia, pPars, nLutSize, nRelaxRatio );
Abc_FrameUpdateGia( pAbc, pTemp );
return 0;
usage:
- Abc_Print( -2, "usage: &synch2 [-WCSK num] [-fvh]\n" );
+ Abc_Print( -2, "usage: &synch2 [-WCSKR num] [-fvh]\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 );
Abc_Print( -2, "\t-S num : the max number of SAT variables [default = %d]\n", pPars->nSatVarMax );
Abc_Print( -2, "\t-K num : the target LUT size for downstream mapping [default = %d]\n", nLutSize );
+ Abc_Print( -2, "\t-R num : the delay relaxation ratio (num >= 0) [default = %d]\n", nRelaxRatio );
Abc_Print( -2, "\t-f : toggle using lighter logic synthesis [default = %s]\n", pPars->fLightSynth? "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");