diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2016-06-14 20:43:50 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2016-06-14 20:43:50 -0700 |
commit | db43d6fbd894474024c13cb2af4691f290299b69 (patch) | |
tree | 002fc0db76c2848b5b1f7fe7c379ca91c3d54d1c /src/base/abci | |
parent | 0a1b6f8fcc72d24e11171a31dc1aeced322ea4bf (diff) | |
download | abc-db43d6fbd894474024c13cb2af4691f290299b69.tar.gz abc-db43d6fbd894474024c13cb2af4691f290299b69.tar.bz2 abc-db43d6fbd894474024c13cb2af4691f290299b69.zip |
Adding switch -P <num> to command 'cover'.
Diffstat (limited to 'src/base/abci')
-rw-r--r-- | src/base/abci/abc.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 5ac2cd09..1a80fda8 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -10952,6 +10952,7 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv ) int fUseEsop; int fUseInvs; int nFaninMax; + int nCubesMax; pNtk = Abc_FrameReadNtk(pAbc); // set defaults @@ -10960,15 +10961,16 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv ) fVerbose = 0; fUseInvs = 1; nFaninMax = 8; + nCubesMax = 8; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "Nsxivh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "IPsxivh" ) ) != EOF ) { switch ( c ) { - case 'N': + case 'I': if ( globalUtilOptind >= argc ) { - Abc_Print( -1, "Command line switch \"-N\" should be followed by an integer.\n" ); + Abc_Print( -1, "Command line switch \"-I\" should be followed by an integer.\n" ); goto usage; } nFaninMax = atoi(argv[globalUtilOptind]); @@ -10976,6 +10978,17 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( nFaninMax < 0 ) goto usage; break; + case 'P': + if ( globalUtilOptind >= argc ) + { + Abc_Print( -1, "Command line switch \"-P\" should be followed by an integer.\n" ); + goto usage; + } + nCubesMax = atoi(argv[globalUtilOptind]); + globalUtilOptind++; + if ( nCubesMax < 0 ) + goto usage; + break; case 's': fUseSop ^= 1; break; @@ -11007,7 +11020,7 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv ) } // run the command - pNtkRes = Abc_NtkSopEsopCover( pNtk, nFaninMax, fUseEsop, fUseSop, fUseInvs, fVerbose ); + pNtkRes = Abc_NtkSopEsopCover( pNtk, nFaninMax, nCubesMax, fUseEsop, fUseSop, fUseInvs, fVerbose ); if ( pNtkRes == NULL ) { Abc_Print( -1, "Command has failed.\n" ); @@ -11018,10 +11031,11 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv ) return 0; usage: - Abc_Print( -2, "usage: cover [-N num] [-sxvh]\n" ); + Abc_Print( -2, "usage: cover [-IP num] [-sxvh]\n" ); Abc_Print( -2, "\t decomposition into a network of SOP/ESOP PLAs\n" ); Abc_Print( -2, "\t (this command is known to have bugs)\n"); - Abc_Print( -2, "\t-N num : maximum number of inputs [default = %d]\n", nFaninMax ); + Abc_Print( -2, "\t-I num : maximum number of inputs [default = %d]\n", nFaninMax ); + Abc_Print( -2, "\t-P num : maximum number of products [default = %d]\n", nCubesMax ); Abc_Print( -2, "\t-s : toggle the use of SOPs [default = %s]\n", fUseSop? "yes": "no" ); Abc_Print( -2, "\t-x : toggle the use of ESOPs [default = %s]\n", fUseEsop? "yes": "no" ); // Abc_Print( -2, "\t-i : toggle the use of interters [default = %s]\n", fUseInvs? "yes": "no" ); |