summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-09-16 14:59:28 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-09-16 14:59:28 -0700
commit288d64d033516f992b7c07620e43ee6fbbf9e26a (patch)
tree15947c3418400ce2fb2e2b3c4f7134958cbea3ca /src/base
parente033a62282ef94ddca87a1778d66a4a4270ac1c3 (diff)
downloadabc-288d64d033516f992b7c07620e43ee6fbbf9e26a.tar.gz
abc-288d64d033516f992b7c07620e43ee6fbbf9e26a.tar.bz2
abc-288d64d033516f992b7c07620e43ee6fbbf9e26a.zip
New choice computation.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abci/abc.c75
1 files changed, 65 insertions, 10 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index ca7be1d9..dad29ae5 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -28453,16 +28453,66 @@ usage:
***********************************************************************/
int Abc_CommandAbc9Synch2( Abc_Frame_t * pAbc, int argc, char ** argv )
{
- extern Gia_Man_t * Gia_ManAigSynch2( Gia_Man_t * p, int fVerbose );
+ extern Gia_Man_t * Gia_ManAigSynch2( Gia_Man_t * p, void * pPars, int nLutSize );
Gia_Man_t * pTemp;
- int c, fVerbose = 0;
+ Dch_Pars_t Pars, * pPars = &Pars;
+ int c, nLutSize = 6;
+ // set defaults
+ Dch_ManSetDefaultParams( pPars );
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "WCSKfvh" ) ) != EOF )
{
switch ( c )
{
+ case 'W':
+ if ( globalUtilOptind >= argc )
+ {
+ Abc_Print( -1, "Command line switch \"-W\" should be followed by an integer.\n" );
+ goto usage;
+ }
+ pPars->nWords = atoi(argv[globalUtilOptind]);
+ globalUtilOptind++;
+ if ( pPars->nWords < 0 )
+ goto usage;
+ break;
+ case 'C':
+ if ( globalUtilOptind >= argc )
+ {
+ Abc_Print( -1, "Command line switch \"-C\" should be followed by an integer.\n" );
+ goto usage;
+ }
+ pPars->nBTLimit = atoi(argv[globalUtilOptind]);
+ globalUtilOptind++;
+ if ( pPars->nBTLimit < 0 )
+ goto usage;
+ break;
+ case 'S':
+ if ( globalUtilOptind >= argc )
+ {
+ Abc_Print( -1, "Command line switch \"-S\" should be followed by an integer.\n" );
+ goto usage;
+ }
+ pPars->nSatVarMax = atoi(argv[globalUtilOptind]);
+ globalUtilOptind++;
+ if ( pPars->nSatVarMax < 0 )
+ goto usage;
+ break;
+ case 'K':
+ if ( globalUtilOptind >= argc )
+ {
+ Abc_Print( -1, "Command line switch \"-K\" should be followed by a char string.\n" );
+ goto usage;
+ }
+ nLutSize = atoi(argv[globalUtilOptind]);
+ globalUtilOptind++;
+ if ( nLutSize < 0 )
+ goto usage;
+ break;
+ case 'f':
+ pPars->fLightSynth ^= 1;
+ break;
case 'v':
- fVerbose ^= 1;
+ pPars->fVerbose ^= 1;
break;
case 'h':
goto usage;
@@ -28472,18 +28522,23 @@ int Abc_CommandAbc9Synch2( Abc_Frame_t * pAbc, int argc, char ** argv )
}
if ( pAbc->pGia == NULL )
{
- Abc_Print( -1, "Abc_CommandAbc9Synch2(): There is no AIG.\n" );
+ Abc_Print( -1, "Abc_CommandAbc9Dch(): There is no AIG.\n" );
return 1;
}
- pTemp = Gia_ManAigSynch2( pAbc->pGia, fVerbose );
+ pTemp = Gia_ManAigSynch2( pAbc->pGia, pPars, nLutSize );
Abc_FrameUpdateGia( pAbc, pTemp );
return 0;
usage:
- Abc_Print( -2, "usage: &synch2 [-vh]\n" );
- Abc_Print( -2, "\t performs synthesis and computes structural choices\n" );
- Abc_Print( -2, "\t-v : toggles printing additional information [default = %s]\n", fVerbose? "yes": "no" );
- Abc_Print( -2, "\t-h : print the command usage\n");
+ Abc_Print( -2, "usage: &synch2 [-WCSK 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-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");
return 1;
}