diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-12-09 01:05:18 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-12-09 01:05:18 -0800 |
commit | eb35f0ef65681f11e7da9c378d8b937d05e3dc03 (patch) | |
tree | 30846d97c3e887743569358991c3de6a65aefbb7 | |
parent | 36a80c7579c99ba307a8d5bcbe24e0b1b70cc5a6 (diff) | |
download | abc-eb35f0ef65681f11e7da9c378d8b937d05e3dc03.tar.gz abc-eb35f0ef65681f11e7da9c378d8b937d05e3dc03.tar.bz2 abc-eb35f0ef65681f11e7da9c378d8b937d05e3dc03.zip |
Added support for generating a library of real-life truth-tables.
-rw-r--r-- | src/base/abci/abcRec.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/base/abci/abcRec.c b/src/base/abci/abcRec.c index a9255ce6..1b9700f1 100644 --- a/src/base/abci/abcRec.c +++ b/src/base/abci/abcRec.c @@ -284,20 +284,21 @@ p->timeTotal += clock() - clkTotal; ***********************************************************************/ void Abc_NtkRecDumpTruthTables( Abc_ManRec_t * p ) { + int nVars = 10; FILE * pFile; Abc_Obj_t * pObj; unsigned * pTruth; int i; - pFile = fopen( "tt16.txt", "wb" ); + pFile = fopen( "tt10.txt", "wb" ); for ( i = 0; i < p->nBins; i++ ) for ( pObj = p->pBins[i]; pObj; pObj = pObj->pCopy ) { pTruth = Vec_PtrEntry(p->vTtNodes, pObj->Id); - if ( Kit_TruthSupport(pTruth, 16) != (1<<16)-1 ) + if ( (int)Kit_TruthSupport(pTruth, nVars) != (1<<nVars)-1 ) continue; - Extra_PrintHex( pFile, pTruth, 16 ); + Extra_PrintHex( pFile, pTruth, nVars ); fprintf( pFile, " " ); - Kit_DsdPrintFromTruth2( pFile, pTruth, 16 ); + Kit_DsdPrintFromTruth2( pFile, pTruth, nVars ); fprintf( pFile, "\n" ); } fclose( pFile ); @@ -317,8 +318,7 @@ void Abc_NtkRecDumpTruthTables( Abc_ManRec_t * p ) void Abc_NtkRecStop() { assert( s_pMan != NULL ); - Abc_NtkRecDumpTruthTables( s_pMan ); - +// Abc_NtkRecDumpTruthTables( s_pMan ); if ( s_pMan->pNtk ) Abc_NtkDelete( s_pMan->pNtk ); // Vec_PtrFree( s_pMan->vTtNodes ); |