From 7e0f7eba792e7fc854345d45f6f49bb562e63d3a Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 19 Feb 2014 23:49:41 -0800 Subject: Changes to LUT mappers. --- src/aig/gia/giaJf.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'src/aig') 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 ) -- cgit v1.2.3