diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-02-19 23:49:41 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-02-19 23:49:41 -0800 |
commit | 7e0f7eba792e7fc854345d45f6f49bb562e63d3a (patch) | |
tree | ebe90c25e7ad750bfcbd2b5ed980b17e5783a874 /src/aig | |
parent | 6ad7dae1aefdecbe4cdc4f4f80548004f86af451 (diff) | |
download | abc-7e0f7eba792e7fc854345d45f6f49bb562e63d3a.tar.gz abc-7e0f7eba792e7fc854345d45f6f49bb562e63d3a.tar.bz2 abc-7e0f7eba792e7fc854345d45f6f49bb562e63d3a.zip |
Changes to LUT mappers.
Diffstat (limited to 'src/aig')
-rw-r--r-- | src/aig/gia/giaJf.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/aig/gia/giaJf.c b/src/aig/gia/giaJf.c index 0e737adc..04dfb719 100644 --- a/src/aig/gia/giaJf.c +++ b/src/aig/gia/giaJf.c @@ -371,16 +371,7 @@ Jf_Man_t * Jf_ManAlloc( Gia_Man_t * pGia, Jf_Par_t * pPars ) p->pGia = pGia; p->pPars = pPars; if ( pPars->fCutMin && !pPars->fFuncDsd ) - { - word uTruth[JF_WORD_MAX]; - int Value, nWords = Abc_Truth6WordNum(pPars->nLutSize); - p->vTtMem = Vec_MemAlloc( nWords, 12 ); // 32 KB/page for 6-var functions - Vec_MemHashAlloc( p->vTtMem, 10000 ); - memset( uTruth, 0x00, sizeof(word) * nWords ); - Value = Vec_MemHashInsert( p->vTtMem, uTruth ); assert( Value == 0 ); - memset( uTruth, 0xAA, sizeof(word) * nWords ); - Value = Vec_MemHashInsert( p->vTtMem, uTruth ); assert( Value == 1 ); - } + p->vTtMem = Vec_MemAllocForTT( pPars->nLutSize ); else if ( pPars->fCutMin && pPars->fFuncDsd ) { p->pDsd = Sdm_ManRead(); @@ -401,18 +392,6 @@ Jf_Man_t * Jf_ManAlloc( Gia_Man_t * pGia, Jf_Par_t * pPars ) p->clkStart = Abc_Clock(); return p; } -void Jf_ManDumpTruthTables( Jf_Man_t * p ) -{ - char pFileName[1000]; - FILE * pFile; - sprintf( pFileName, "tt_%s_%02d.txt", Gia_ManName(p->pGia), p->pPars->nLutSize ); - pFile = fopen( pFileName, "wb" ); - Vec_MemDump( pFile, p->vTtMem ); - fclose( pFile ); - printf( "Dumped %d %d-var truth tables into file \"%s\" (%.2f MB).\n", - Vec_MemEntryNum(p->vTtMem), p->pPars->nLutSize, pFileName, - 17.0 * Vec_MemEntryNum(p->vTtMem) / (1 << 20) ); -} void Jf_ManFree( Jf_Man_t * p ) { if ( p->pPars->fVerbose && p->pDsd ) @@ -1748,7 +1727,7 @@ Gia_Man_t * Jf_ManPerformMapping( Gia_Man_t * pGia, Jf_Par_t * pPars ) Jf_ManPropagateEla( p, 1 ); Jf_ManPrintStats( p, "Edge " ); } if ( p->pPars->fVeryVerbose && p->pPars->fCutMin && !p->pPars->fFuncDsd ) - Jf_ManDumpTruthTables( p ); + Vec_MemDumpTruthTables( p->vTtMem, Gia_ManName(p->pGia), p->pPars->nLutSize ); if ( p->pPars->fPureAig ) pNew = Jf_ManDeriveGia(p); else if ( p->pPars->fCutMin ) |