diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-09-28 23:14:43 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-09-28 23:14:43 -0700 |
commit | 797cb49584c8103d587afff82e5e7c50703c6a87 (patch) | |
tree | 4c1190f8098eebdd4bcc61a95965f53aedcb91a2 | |
parent | 68011de61560ac0f9f2caa8ede0ba1a5fffcd3ce (diff) | |
download | abc-797cb49584c8103d587afff82e5e7c50703c6a87.tar.gz abc-797cb49584c8103d587afff82e5e7c50703c6a87.tar.bz2 abc-797cb49584c8103d587afff82e5e7c50703c6a87.zip |
Changing default values.
-rw-r--r-- | src/aig/gia/gia.h | 2 | ||||
-rw-r--r-- | src/aig/gia/giaJf.c | 44 | ||||
-rw-r--r-- | src/base/abci/abc.c | 10 | ||||
-rw-r--r-- | src/base/abci/abcFxu.c | 2 |
4 files changed, 29 insertions, 29 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h index 12438bfe..a5ce3f65 100644 --- a/src/aig/gia/gia.h +++ b/src/aig/gia/gia.h @@ -249,7 +249,7 @@ struct Jf_Par_t_ int fOptEdge; int fCoarsen; int fCutMin; - int fUseTts; + int fFuncDsd; int fGenCnf; int fPureAig; int fVerbose; diff --git a/src/aig/gia/giaJf.c b/src/aig/gia/giaJf.c index f243dd8f..4e66e7f1 100644 --- a/src/aig/gia/giaJf.c +++ b/src/aig/gia/giaJf.c @@ -252,7 +252,7 @@ Jf_Man_t * Jf_ManAlloc( Gia_Man_t * pGia, Jf_Par_t * pPars ) p = ABC_CALLOC( Jf_Man_t, 1 ); p->pGia = pGia; p->pPars = pPars; - if ( pPars->fCutMin && pPars->fUseTts ) + if ( pPars->fCutMin && !pPars->fFuncDsd ) { word uTruth; int Value; p->vTtMem = Vec_MemAlloc( 1, 12 ); // 32 KB/page for 6-var functions @@ -260,7 +260,7 @@ Jf_Man_t * Jf_ManAlloc( Gia_Man_t * pGia, Jf_Par_t * pPars ) uTruth = ABC_CONST(0x0000000000000000); Value = Vec_MemHashInsert( p->vTtMem, &uTruth ); assert( Value == 0 ); uTruth = ABC_CONST(0xAAAAAAAAAAAAAAAA); Value = Vec_MemHashInsert( p->vTtMem, &uTruth ); assert( Value == 1 ); } - else if ( pPars->fCutMin && !pPars->fUseTts ) + else if ( pPars->fCutMin && pPars->fFuncDsd ) { p->pDsd = Sdm_ManRead(); if ( pPars->fGenCnf ) @@ -286,7 +286,9 @@ void Jf_ManFree( Jf_Man_t * p ) Sdm_ManPrintDsdStats( p->pDsd, 0 ); if ( p->pPars->fVerbose && p->vTtMem ) printf( "Unique truth tables = %d. Memory = %.2f MB\n", Vec_MemEntryNum(p->vTtMem), Vec_MemMemory(p->vTtMem) / (1<<20) ); - if ( p->pPars->fVeryVerbose && p->pPars->fUseTts ) + if ( p->pPars->fVeryVerbose && p->pPars->fCutMin && p->pPars->fFuncDsd ) + Jf_ManProfileClasses( p ); + if ( p->pPars->fVeryVerbose && p->pPars->fCutMin && !p->pPars->fFuncDsd ) { char * pFileName = "truths.txt"; FILE * pFile = fopen( pFileName, "wb" ); @@ -296,8 +298,6 @@ void Jf_ManFree( Jf_Man_t * p ) Vec_MemEntryNum(p->vTtMem), p->pPars->nLutSize, pFileName, 17.0 * Vec_MemEntryNum(p->vTtMem) / (1 << 20) ); } - if ( p->pPars->fVeryVerbose && !p->pPars->fUseTts && p->pPars->fCutMin ) - Jf_ManProfileClasses( p ); if ( p->pPars->fCoarsen ) Gia_ManCleanMark0( p->pGia ); ABC_FREE( p->pGia->pRefs ); @@ -306,7 +306,7 @@ void Jf_ManFree( Jf_Man_t * p ) ABC_FREE( p->vDep.pArray ); ABC_FREE( p->vFlow.pArray ); ABC_FREE( p->vRefs.pArray ); - if ( p->pPars->fCutMin && p->pPars->fUseTts ) + if ( p->pPars->fCutMin && !p->pPars->fFuncDsd ) { Vec_MemHashFree( p->vTtMem ); Vec_MemFree( p->vTtMem ); @@ -1049,33 +1049,33 @@ void Jf_ObjComputeCuts( Jf_Man_t * p, Gia_Obj_t * pObj, int fEdge ) continue; pSto[c]->Sign = Sign0[i] | Sign1[k]; } - else if ( p->pPars->fUseTts ) + else if ( p->pPars->fFuncDsd ) { - if ( !Jf_CutMergeOrder(pCut0, pCut1, pSto[c]->pCut, LutSize) ) + if ( !(Config = Jf_CutMerge2(pCut0, pCut1, pSto[c]->pCut, LutSize)) ) continue; pSto[c]->Sign = Sign0[i] | Sign1[k]; nOldSupp = pSto[c]->pCut[0]; - pSto[c]->iFunc = Jf_TtComputeForCut( p, Jf_ObjFunc0(pObj, pCut0), Jf_ObjFunc1(pObj, pCut1), pCut0, pCut1, pSto[c]->pCut ); + pSto[c]->iFunc = Sdm_ManComputeFunc( p->pDsd, Jf_ObjFunc0(pObj, pCut0), Jf_ObjFunc1(pObj, pCut1), pSto[c]->pCut, Config, 0 ); + if ( pSto[c]->iFunc == -1 ) + continue; + if ( p->pPars->fGenCnf && Jf_CutCnfSizeF(p, Abc_Lit2Var(pSto[c]->iFunc)) >= 12 ) // no more than 15 + continue; assert( pSto[c]->pCut[0] <= nOldSupp ); if ( pSto[c]->pCut[0] < nOldSupp ) pSto[c]->Sign = Jf_CutGetSign( pSto[c]->pCut ); - if ( pSto[c]->iFunc >= (1 << 24) ) - printf( "Hard limit on the number of different Boolean functions (2^23) is reached. Quitting...\n" ), exit(1); } else { - if ( !(Config = Jf_CutMerge2(pCut0, pCut1, pSto[c]->pCut, LutSize)) ) + if ( !Jf_CutMergeOrder(pCut0, pCut1, pSto[c]->pCut, LutSize) ) continue; pSto[c]->Sign = Sign0[i] | Sign1[k]; nOldSupp = pSto[c]->pCut[0]; - pSto[c]->iFunc = Sdm_ManComputeFunc( p->pDsd, Jf_ObjFunc0(pObj, pCut0), Jf_ObjFunc1(pObj, pCut1), pSto[c]->pCut, Config, 0 ); - if ( pSto[c]->iFunc == -1 ) - continue; - if ( p->pPars->fGenCnf && Jf_CutCnfSizeF(p, Abc_Lit2Var(pSto[c]->iFunc)) >= 12 ) // no more than 15 - continue; + pSto[c]->iFunc = Jf_TtComputeForCut( p, Jf_ObjFunc0(pObj, pCut0), Jf_ObjFunc1(pObj, pCut1), pCut0, pCut1, pSto[c]->pCut ); assert( pSto[c]->pCut[0] <= nOldSupp ); if ( pSto[c]->pCut[0] < nOldSupp ) pSto[c]->Sign = Jf_CutGetSign( pSto[c]->pCut ); + if ( pSto[c]->iFunc >= (1 << 24) ) + printf( "Hard limit on the number of different Boolean functions (2^23) is reached. Quitting...\n" ), exit(1); } p->CutCount[2]++; pSto[c]->Time = p->pPars->fAreaOnly ? 0 : Jf_CutArr(p, pSto[c]->pCut); @@ -1346,7 +1346,7 @@ Gia_Man_t * Jf_ManDeriveMappingGia( Jf_Man_t * p ) pCut = Jf_ObjCutBest( p, i ); // printf( "Best cut of node %d: ", i ); Jf_CutPrint(pCut); Class = Jf_CutFuncClass( pCut ); - uTruth = p->pPars->fUseTts ? *Vec_MemReadEntry(p->vTtMem, Class) : Sdm_ManReadDsdTruth(p->pDsd, Class); + uTruth = p->pPars->fFuncDsd ? Sdm_ManReadDsdTruth(p->pDsd, Class) : *Vec_MemReadEntry(p->vTtMem, Class); assert( p->pDsd == NULL || Sdm_ManReadDsdVarNum(p->pDsd, Class) == Jf_CutSize(pCut) ); if ( Jf_CutSize(pCut) == 0 ) { @@ -1465,7 +1465,7 @@ Gia_Man_t * Jf_ManDeriveGia( Jf_Man_t * p ) pCut = Jf_ObjCutBest( p, i ); // printf( "Best cut of node %d: ", i ); Jf_CutPrint(pCut); Class = Jf_CutFuncClass( pCut ); - uTruth = p->pPars->fUseTts ? *Vec_MemReadEntry(p->vTtMem, Class) : Sdm_ManReadDsdTruth(p->pDsd, Class); + uTruth = p->pPars->fFuncDsd ? Sdm_ManReadDsdTruth(p->pDsd, Class) : *Vec_MemReadEntry(p->vTtMem, Class); assert( p->pDsd == NULL || Sdm_ManReadDsdVarNum(p->pDsd, Class) == Jf_CutSize(pCut) ); if ( Jf_CutSize(pCut) == 0 ) { @@ -1527,7 +1527,7 @@ void Jf_ManSetDefaultPars( Jf_Par_t * pPars ) pPars->fOptEdge = 1; pPars->fCoarsen = 0; pPars->fCutMin = 0; - pPars->fUseTts = 0; + pPars->fFuncDsd = 0; pPars->fGenCnf = 0; pPars->fPureAig = 0; pPars->fVerbose = 0; @@ -1554,8 +1554,8 @@ Gia_Man_t * Jf_ManPerformMapping( Gia_Man_t * pGia, Jf_Par_t * pPars ) Jf_Man_t * p; int i; assert( !pPars->fCutMin || pPars->nLutSize <= 6 ); if ( pPars->fGenCnf ) - pPars->fCutMin = 1, pPars->fUseTts = pPars->fOptEdge = 0; - if ( pPars->fCutMin && pPars->fUseTts ) + pPars->fCutMin = 1, pPars->fFuncDsd = 1, pPars->fOptEdge = 0; + if ( pPars->fCutMin && !pPars->fFuncDsd ) pPars->fCoarsen = 0; p = Jf_ManAlloc( pGia, pPars ); p->pCutCmp = pPars->fAreaOnly ? Jf_CutCompareArea : Jf_CutCompareDelay; diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 461f4f5d..63b95a33 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -29970,7 +29970,7 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv ) Gia_Man_t * pNew; int c; Jf_ManSetDefaultPars( pPars ); Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "KCRDWaekmtcgvwh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "KCRDWaekmdcgvwh" ) ) != EOF ) { switch ( c ) { @@ -30047,8 +30047,8 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'm': pPars->fCutMin ^= 1; break; - case 't': - pPars->fUseTts ^= 1; + case 'd': + pPars->fFuncDsd ^= 1; break; case 'c': pPars->fGenCnf ^= 1; @@ -30094,7 +30094,7 @@ usage: sprintf(Buffer, "best possible" ); else sprintf(Buffer, "%d", pPars->DelayTarget ); - Abc_Print( -2, "usage: &jf [-KCRDW num] [-akmtcgvwh]\n" ); + Abc_Print( -2, "usage: &jf [-KCRDW num] [-akmdcgvwh]\n" ); Abc_Print( -2, "\t performs technology mapping of the network\n" ); Abc_Print( -2, "\t-K num : LUT size for the mapping (2 <= K <= %d) [default = %d]\n", pPars->nLutSizeMax, pPars->nLutSize ); Abc_Print( -2, "\t-C num : the max number of priority cuts (1 <= C <= %d) [default = %d]\n", pPars->nCutNumMax, pPars->nCutNum ); @@ -30105,7 +30105,7 @@ usage: Abc_Print( -2, "\t-e : toggles edge vs node minimization [default = %s]\n", pPars->fOptEdge? "yes": "no" ); Abc_Print( -2, "\t-k : toggles coarsening the subject graph [default = %s]\n", pPars->fCoarsen? "yes": "no" ); Abc_Print( -2, "\t-m : toggles cut minimization [default = %s]\n", pPars->fCutMin? "yes": "no" ); - Abc_Print( -2, "\t-t : toggles truth tables for minimization [default = %s]\n", pPars->fUseTts? "yes": "no" ); + Abc_Print( -2, "\t-d : toggles using DSD to represent cut functions [default = %s]\n", pPars->fFuncDsd? "yes": "no" ); Abc_Print( -2, "\t-c : toggles mapping for CNF generation [default = %s]\n", pPars->fGenCnf? "yes": "no" ); Abc_Print( -2, "\t-g : toggles generating AIG without mapping [default = %s]\n", pPars->fPureAig? "yes": "no" ); Abc_Print( -2, "\t-v : toggles verbose output [default = %s]\n", pPars->fVerbose? "yes": "no" ); diff --git a/src/base/abci/abcFxu.c b/src/base/abci/abcFxu.c index 15b304b0..64318ea0 100644 --- a/src/base/abci/abcFxu.c +++ b/src/base/abci/abcFxu.c @@ -54,7 +54,7 @@ void Abc_NtkSetDefaultFxParams( Fxu_Data_t * p ) memset( p, 0, sizeof(Fxu_Data_t) ); p->nSingleMax = 20000; p->nPairsMax = 30000; - p->nNodesExt = 100000; + p->nNodesExt =1000000; p->WeightMin = 0; p->LitCountMax= 0; p->fOnlyS = 0; |