diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-07-14 15:04:25 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-07-14 15:04:25 -0700 |
commit | c0ac159888963dae8dabeb2ee9215f3efdf48a1a (patch) | |
tree | d8f2d17b8d4fe30a3f0a53bee480a973440cb122 /src/base | |
parent | b3e0f5b2e94e5e0da72e1ec7a41f90a3f4d302d7 (diff) | |
download | abc-c0ac159888963dae8dabeb2ee9215f3efdf48a1a.tar.gz abc-c0ac159888963dae8dabeb2ee9215f3efdf48a1a.tar.bz2 abc-c0ac159888963dae8dabeb2ee9215f3efdf48a1a.zip |
New technology mapper.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abci/abc.c | 20 | ||||
-rw-r--r-- | src/base/abci/abcDec.c | 7 |
2 files changed, 23 insertions, 4 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 373db069..601e0910 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -29522,7 +29522,7 @@ int Abc_CommandAbc9If2( Abc_Frame_t * pAbc, int argc, char ** argv ) // set defaults Mpm_ManSetParsDefault( pPars ); Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "KDtmzvwh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "KDtmzrcuvwh" ) ) != EOF ) { switch ( c ) { @@ -29532,8 +29532,8 @@ int Abc_CommandAbc9If2( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Command line switch \"-K\" should be followed by a positive integer.\n" ); goto usage; } - globalUtilOptind++; nLutSize = atoi(argv[globalUtilOptind]); + globalUtilOptind++; if ( nLutSize < 2 || nLutSize > 16 ) { Abc_Print( -1, "LUT size %d is not supported.\n", nLutSize ); @@ -29562,6 +29562,15 @@ int Abc_CommandAbc9If2( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'z': pPars->fDeriveLuts ^= 1; break; + case 'r': + pPars->fOneRound ^= 1; + break; + case 'c': + pPars->fMap4Cnf ^= 1; + break; + case 'u': + pPars->fMap4Aig ^= 1; + break; case 'v': pPars->fVerbose ^= 1; break; @@ -29575,6 +29584,8 @@ int Abc_CommandAbc9If2( Abc_Frame_t * pAbc, int argc, char ** argv ) } if ( pPars->pLib == NULL ) pPars->pLib = Mpm_LibLutSetSimple( nLutSize ); + if ( pPars->fMap4Cnf ) + pPars->fUseDsd = 1; if ( pPars->fCutMin ) // pPars->fUseTruth = 1; pPars->fUseDsd = 1; @@ -29594,13 +29605,16 @@ usage: sprintf(Buffer, "best possible" ); else sprintf(Buffer, "%d", pPars->DelayTarget ); - Abc_Print( -2, "usage: &if2 [-KD num] [-tmzvwh]\n" ); + Abc_Print( -2, "usage: &if2 [-KD num] [-tmzrcuvwh]\n" ); Abc_Print( -2, "\t performs technology mapping of the network\n" ); Abc_Print( -2, "\t-K num : sets the LUT size for the mapping [default = %d]\n", nLutSize ); Abc_Print( -2, "\t-D num : sets the delay constraint for the mapping [default = %s]\n", Buffer ); Abc_Print( -2, "\t-t : enables using AND/XOR/MUX nodes instead of simple AIG [default = %s]\n", pPars->fUseGates? "yes": "no" ); Abc_Print( -2, "\t-m : enables cut minimization by removing vacuous variables [default = %s]\n", pPars->fCutMin? "yes": "no" ); Abc_Print( -2, "\t-z : toggles deriving LUTs when mapping into LUT structures [default = %s]\n", pPars->fDeriveLuts? "yes": "no" ); + Abc_Print( -2, "\t-r : toggles using one round of mapping [default = %s]\n", pPars->fOneRound? "yes": "no" ); + Abc_Print( -2, "\t-c : toggles mapping for CNF computation [default = %s]\n", pPars->fMap4Cnf? "yes": "no" ); + Abc_Print( -2, "\t-u : toggles mapping for AIG computation [default = %s]\n", pPars->fMap4Aig? "yes": "no" ); Abc_Print( -2, "\t-v : toggles verbose output [default = %s]\n", pPars->fVerbose? "yes": "no" ); Abc_Print( -2, "\t-w : toggles very verbose output [default = %s]\n", pPars->fVeryVerbose? "yes": "no" ); Abc_Print( -2, "\t-h : prints the command usage\n"); diff --git a/src/base/abci/abcDec.c b/src/base/abci/abcDec.c index 57a17ffe..60fbcbd4 100644 --- a/src/base/abci/abcDec.c +++ b/src/base/abci/abcDec.c @@ -357,6 +357,7 @@ void Abc_TruthStoreRead( char * pFileName, Abc_TtStore_t * p ) void Abc_TtStoreWrite( char * pFileName, Abc_TtStore_t * p, int fBinary ) { FILE * pFile; + char pBuffer[1000]; int i, nBytes = 8 * Abc_Truth6WordNum( p->nVars ); pFile = fopen( pFileName, "wb" ); if ( pFile == NULL ) @@ -369,7 +370,11 @@ void Abc_TtStoreWrite( char * pFileName, Abc_TtStore_t * p, int fBinary ) if ( fBinary ) fwrite( p->pFuncs[i], nBytes, 1, pFile ); else - Abc_TruthWriteHex( pFile, p->pFuncs[i], p->nVars ), fprintf( pFile, "\n" ); + { + Abc_TruthWriteHex( pFile, p->pFuncs[i], p->nVars ), fprintf( pFile, " " ); + Dau_DsdDecompose( p->pFuncs[i], p->nVars, 0, (int)(p->nVars <= 10), pBuffer ); + fprintf( pFile, "%s\n", pBuffer ); + } } fclose( pFile ); } |