summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-08-14 22:54:25 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-08-14 22:54:25 -0700
commit9c2b00755629ec8406043133a26fd43e7e96424d (patch)
treed83b075cc5c998fba38250245281c91811ecd995 /src
parent426b1d2d43a9d3f2eef61ffc49239cbe60a3b23d (diff)
downloadabc-9c2b00755629ec8406043133a26fd43e7e96424d.tar.gz
abc-9c2b00755629ec8406043133a26fd43e7e96424d.tar.bz2
abc-9c2b00755629ec8406043133a26fd43e7e96424d.zip
Enabling LUT decomposition in two special cases.
Diffstat (limited to 'src')
-rw-r--r--src/aig/gia/giaIf.c10
-rw-r--r--src/map/mpm/mpmAbc.c6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c
index 0cf97f26..c4c5fcda 100644
--- a/src/aig/gia/giaIf.c
+++ b/src/aig/gia/giaIf.c
@@ -643,13 +643,13 @@ int Gia_ManFromIfLogicCreateLut( Gia_Man_t * pNew, word * pRes, Vec_Int_t * vLea
SeeAlso []
***********************************************************************/
-int Gia_ManFromIfLogicNode( If_Man_t * p, Gia_Man_t * pNew, int iObj, Vec_Int_t * vLeaves, Vec_Int_t * vLeavesTemp,
- word * pRes, char * pStr, Vec_Int_t * vCover, Vec_Int_t * vMapping, Vec_Int_t * vMapping2, Vec_Int_t * vPacking )
+int Gia_ManFromIfLogicNode( Gia_Man_t * pNew, int iObj, Vec_Int_t * vLeaves, Vec_Int_t * vLeavesTemp,
+ word * pRes, char * pStr, Vec_Int_t * vCover, Vec_Int_t * vMapping, Vec_Int_t * vMapping2, Vec_Int_t * vPacking, int fCheck75 )
{
int nLeaves = Vec_IntSize(vLeaves);
int i, Length, nLutLeaf, nLutLeaf2, nLutRoot, iObjLit1, iObjLit2, iObjLit3;
// workaround for the special case
- if ( p && (p->pPars->fEnableCheck75 || p->pPars->fEnableCheck75u) )
+ if ( fCheck75 )
pStr = "54";
// check if there is no LUT structures
if ( pStr == NULL )
@@ -746,7 +746,7 @@ int Gia_ManFromIfLogicNode( If_Man_t * p, Gia_Man_t * pNew, int iObj, Vec_Int_t
}
// perform decomposition
- if ( p && (p->pPars->fEnableCheck75 || p->pPars->fEnableCheck75u) )
+ if ( fCheck75 )
{
// if ( nLeaves < 8 && If_CutPerformCheck16( p, (unsigned *)pTruth, nVars, nLeaves, "44" ) )
if ( nLeaves < 8 && If_CluCheckExt( NULL, pRes, nLeaves, 4, 4, pLut0, pLut1, &Func0, &Func1 ) )
@@ -1049,7 +1049,7 @@ Gia_Man_t * Gia_ManFromIfLogic( If_Man_t * pIfMan )
pTruthTable = &Truth;
}
// perform decomposition of the cut
- pIfObj->iCopy = Gia_ManFromIfLogicNode( pIfMan, pNew, i, vLeaves, vLeaves2, pTruthTable, pIfMan->pPars->pLutStruct, vCover, vMapping, vMapping2, vPacking );
+ pIfObj->iCopy = Gia_ManFromIfLogicNode( pNew, i, vLeaves, vLeaves2, pTruthTable, pIfMan->pPars->pLutStruct, vCover, vMapping, vMapping2, vPacking, (pIfMan->pPars->fEnableCheck75 || pIfMan->pPars->fEnableCheck75u) );
pIfObj->iCopy = Abc_LitNotCond( pIfObj->iCopy, pCutBest->fCompl );
}
else
diff --git a/src/map/mpm/mpmAbc.c b/src/map/mpm/mpmAbc.c
index 2b809e73..9b2e8080 100644
--- a/src/map/mpm/mpmAbc.c
+++ b/src/map/mpm/mpmAbc.c
@@ -248,15 +248,15 @@ void * Mpm_ManFromIfLogic( Mpm_Man_t * pMan )
Vec_IntPush( vLeaves, Mig_ObjCopy(pFanin) );
if ( pMan->pPars->fDeriveLuts && (pMan->pPars->fUseTruth || pMan->pPars->fUseDsd) )
{
- extern int Gia_ManFromIfLogicNode( void * p, Gia_Man_t * pNew, int iObj, Vec_Int_t * vLeaves, Vec_Int_t * vLeavesTemp,
- word * pRes, char * pStr, Vec_Int_t * vCover, Vec_Int_t * vMapping, Vec_Int_t * vMapping2, Vec_Int_t * vPacking );
+ extern int Gia_ManFromIfLogicNode( Gia_Man_t * pNew, int iObj, Vec_Int_t * vLeaves, Vec_Int_t * vLeavesTemp,
+ word * pRes, char * pStr, Vec_Int_t * vCover, Vec_Int_t * vMapping, Vec_Int_t * vMapping2, Vec_Int_t * vPacking, int fCheck75 );
if ( pMan->pPars->fUseTruth )
pTruth = Mpm_CutTruth(pMan, Abc_Lit2Var(pCutBest->iFunc));
else
uTruth = Mpm_CutTruthFromDsd( pMan, pCutBest, Abc_Lit2Var(pCutBest->iFunc) );
// Kit_DsdPrintFromTruth( pTruth, Vec_IntSize(vLeaves) ); printf( "\n" );
// perform decomposition of the cut
- iLitNew = Gia_ManFromIfLogicNode( NULL, pNew, Mig_ObjId(pObj), vLeaves, vLeaves2, pTruth, NULL, vCover, vMapping, vMapping2, vPacking );
+ iLitNew = Gia_ManFromIfLogicNode( pNew, Mig_ObjId(pObj), vLeaves, vLeaves2, pTruth, NULL, vCover, vMapping, vMapping2, vPacking, 0 );
iLitNew = Abc_LitNotCond( iLitNew, pCutBest->fCompl ^ Abc_LitIsCompl(pCutBest->iFunc) );
}
else