summaryrefslogtreecommitdiffstats
path: root/src/base/abci
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/abci')
-rw-r--r--src/base/abci/abc.c4
-rw-r--r--src/base/abci/abcIf.c8
-rw-r--r--src/base/abci/abcIfMux.c4
-rw-r--r--src/base/abci/abcRec.c8
-rw-r--r--src/base/abci/abcRec2.c6
-rw-r--r--src/base/abci/abcRec3.c32
-rw-r--r--src/base/abci/abcRenode.c44
7 files changed, 48 insertions, 58 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 1b53285a..08104383 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -15854,7 +15854,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( fLutMux )
{
- extern int Abc_NtkCutCostMux( If_Cut_t * pCut );
+ extern int Abc_NtkCutCostMux( If_Man_t * p, If_Cut_t * pCut );
pPars->fCutMin = 1;
pPars->fTruth = 1;
pPars->pFuncCost = Abc_NtkCutCostMux;
@@ -30228,6 +30228,8 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
{
pPars->fTruth = 1;
pPars->fExpRed = 0;
+ if ( pPars->pLutStruct == NULL )
+ pPars->fDeriveLuts = 1;
}
// modify the subgraph recording
if ( pPars->fUserRecLib )
diff --git a/src/base/abci/abcIf.c b/src/base/abci/abcIf.c
index 312e0591..dd2e4d9c 100644
--- a/src/base/abci/abcIf.c
+++ b/src/base/abci/abcIf.c
@@ -448,17 +448,17 @@ Abc_Obj_t * Abc_NodeFromIf_rec( Abc_Ntk_t * pNtkNew, If_Man_t * pIfMan, If_Obj_t
if ( pIfMan->pPars->fUseBdds )
{
// transform truth table into the BDD
- pNodeNew->pData = Kit_TruthToBdd( (DdManager *)pNtkNew->pManFunc, If_CutTruth(pCutBest), If_CutLeaveNum(pCutBest), 0 ); Cudd_Ref((DdNode *)pNodeNew->pData);
+ pNodeNew->pData = Kit_TruthToBdd( (DdManager *)pNtkNew->pManFunc, If_CutTruth(pIfMan, pCutBest), If_CutLeaveNum(pCutBest), 0 ); Cudd_Ref((DdNode *)pNodeNew->pData);
}
else if ( pIfMan->pPars->fUseCnfs || pIfMan->pPars->fUseMv )
{
// transform truth table into the BDD
- pNodeNew->pData = Kit_TruthToBdd( (DdManager *)pNtkNew->pManFunc, If_CutTruth(pCutBest), If_CutLeaveNum(pCutBest), 1 ); Cudd_Ref((DdNode *)pNodeNew->pData);
+ pNodeNew->pData = Kit_TruthToBdd( (DdManager *)pNtkNew->pManFunc, If_CutTruth(pIfMan, pCutBest), If_CutLeaveNum(pCutBest), 1 ); Cudd_Ref((DdNode *)pNodeNew->pData);
}
else if ( pIfMan->pPars->fUseSops || pIfMan->pPars->nGateSize > 0 )
{
// transform truth table into the SOP
- int RetValue = Kit_TruthIsop( If_CutTruth(pCutBest), If_CutLeaveNum(pCutBest), vCover, 1 );
+ int RetValue = Kit_TruthIsop( If_CutTruth(pIfMan, pCutBest), If_CutLeaveNum(pCutBest), vCover, 1 );
assert( RetValue == 0 || RetValue == 1 );
// check the case of constant cover
if ( Vec_IntSize(vCover) == 0 || (Vec_IntSize(vCover) == 1 && Vec_IntEntry(vCover,0) == 0) )
@@ -496,7 +496,7 @@ Abc_Obj_t * Abc_NodeFromIf_rec( Abc_Ntk_t * pNtkNew, If_Man_t * pIfMan, If_Obj_t
else
{
extern Hop_Obj_t * Kit_TruthToHop( Hop_Man_t * pMan, unsigned * pTruth, int nVars, Vec_Int_t * vMemory );
- pNodeNew->pData = Kit_TruthToHop( (Hop_Man_t *)pNtkNew->pManFunc, If_CutTruth(pCutBest), If_CutLeaveNum(pCutBest), vCover );
+ pNodeNew->pData = Kit_TruthToHop( (Hop_Man_t *)pNtkNew->pManFunc, If_CutTruth(pIfMan, pCutBest), If_CutLeaveNum(pCutBest), vCover );
}
// complement the node if the cut was complemented
if ( pCutBest->fCompl )
diff --git a/src/base/abci/abcIfMux.c b/src/base/abci/abcIfMux.c
index 69098b4f..035345b6 100644
--- a/src/base/abci/abcIfMux.c
+++ b/src/base/abci/abcIfMux.c
@@ -145,7 +145,7 @@ void Abc_NtkCutCostMuxPrecompute()
SeeAlso []
***********************************************************************/
-int Abc_NtkCutCostMux( If_Cut_t * pCut )
+int Abc_NtkCutCostMux( If_Man_t * p, If_Cut_t * pCut )
{
static char uLookup[256] = {
1, // 0 0x00
@@ -407,7 +407,7 @@ int Abc_NtkCutCostMux( If_Cut_t * pCut )
};
if ( pCut->nLeaves < 3 )
return 1;
- if ( pCut->nLeaves == 3 && uLookup[0xff & *If_CutTruth(pCut)] )
+ if ( pCut->nLeaves == 3 && uLookup[0xff & *If_CutTruth(p, pCut)] )
return 1;
return (1 << pCut->nLeaves) - 1;
}
diff --git a/src/base/abci/abcRec.c b/src/base/abci/abcRec.c
index 4cc1b86e..40a05661 100644
--- a/src/base/abci/abcRec.c
+++ b/src/base/abci/abcRec.c
@@ -865,7 +865,7 @@ Hop_Obj_t * Abc_RecToHop( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut,
nLeaves = If_CutLeaveNum(pCut);
// if (nLeaves < 3)
// return Abc_NodeTruthToHop(pMan, pIfMan, pCut);
- Kit_TruthCopy(pInOut, If_CutTruth(pCut), pCut->nLimit);
+ Kit_TruthCopy(pInOut, If_CutTruth(pIfMan, pCut), pCut->nLimit);
//special cases when cut-minimization return 2, that means there is only one leaf in the cut.
if ((Kit_TruthIsConst0(pInOut, nLeaves) && pCut->fCompl == 0) || (Kit_TruthIsConst1(pInOut, nLeaves) && pCut->fCompl == 1))
return Hop_ManConst0(pMan);
@@ -2513,7 +2513,7 @@ void Abc_NtkRecBackUpCut(If_Cut_t* pCut)
s_pMan->tempNleaves = pCut->nLeaves;
for (i = 0; i < (int)pCut->nLeaves; i++)
s_pMan->pTempleaves[i] = pCut->pLeaves[i];
- Kit_TruthCopy(s_pMan->pTempTruth, pCut->pTruth, s_pMan->nVars);
+// Kit_TruthCopy(s_pMan->pTempTruth, pCut->pTruth, s_pMan->nVars);
}
/**Function*************************************************************
@@ -2534,7 +2534,7 @@ void Abc_NtkRecRestoreCut(If_Cut_t* pCut)
pCut->nLeaves = s_pMan->tempNleaves;
for (i = 0; i < (int)pCut->nLeaves; i++)
pCut->pLeaves[i] = s_pMan->pTempleaves[i];
- Kit_TruthCopy(pCut->pTruth ,s_pMan->pTempTruth, s_pMan->nVars);
+// Kit_TruthCopy(pCut->pTruth ,s_pMan->pTempTruth, s_pMan->nVars);
}
/**Function*************************************************************
@@ -2791,7 +2791,7 @@ int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
nLeaves = If_CutLeaveNum(pCut);
s_pMan->nFunsTried++;
assert( nLeaves >= 2 && nLeaves <= nVars );
- Kit_TruthCopy(pInOut, If_CutTruth(pCut), nLeaves);
+ Kit_TruthCopy(pInOut, If_CutTruth(p, pCut), nLeaves);
//if not every variables are in the support, skip this cut.
if ( Kit_TruthSupport(pInOut, nLeaves) != Kit_BitMask(nLeaves) )
{
diff --git a/src/base/abci/abcRec2.c b/src/base/abci/abcRec2.c
index cdc1fe13..c62068c2 100644
--- a/src/base/abci/abcRec2.c
+++ b/src/base/abci/abcRec2.c
@@ -1858,7 +1858,7 @@ int If_CutDelayRecCost2(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
nLeaves = If_CutLeaveNum(pCut);
s_pMan->nFunsTried++;
assert( nLeaves >= 2 && nLeaves <= nVars );
- Kit_TruthCopy(pInOut, If_CutTruth(pCut), nLeaves);
+ Kit_TruthCopy(pInOut, If_CutTruth(p, pCut), nLeaves);
//if not every variables are in the support, skip this cut.
if ( Kit_TruthSupport(pInOut, nLeaves) != Kit_BitMask(nLeaves) )
{
@@ -1980,7 +1980,7 @@ Hop_Obj_t * Abc_RecToHop2( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut,
nLeaves = If_CutLeaveNum(pCut);
// if (nLeaves < 3)
// return Abc_NodeTruthToHop(pMan, pIfMan, pCut);
- Kit_TruthCopy(pInOut, If_CutTruth(pCut), pCut->nLimit);
+ Kit_TruthCopy(pInOut, If_CutTruth(pIfMan, pCut), pCut->nLimit);
//special cases when cut-minimization return 2, that means there is only one leaf in the cut.
if ((Kit_TruthIsConst0(pInOut, nLeaves) && pCut->fCompl == 0) || (Kit_TruthIsConst1(pInOut, nLeaves) && pCut->fCompl == 1))
return Hop_ManConst0(pMan);
@@ -2093,7 +2093,7 @@ int Abc_RecToGia2( Gia_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut, If_Obj_
nLeaves = If_CutLeaveNum(pCut);
// if (nLeaves < 3)
// return Abc_NodeTruthToHop(pMan, pIfMan, pCut);
- Kit_TruthCopy(pInOut, If_CutTruth(pCut), pCut->nLimit);
+ Kit_TruthCopy(pInOut, If_CutTruth(pIfMan, pCut), pCut->nLimit);
//special cases when cut-minimization return 2, that means there is only one leaf in the cut.
if ((Kit_TruthIsConst0(pInOut, nLeaves) && pCut->fCompl == 0) || (Kit_TruthIsConst1(pInOut, nLeaves) && pCut->fCompl == 1))
return 0;
diff --git a/src/base/abci/abcRec3.c b/src/base/abci/abcRec3.c
index 8bf46feb..c0abba34 100644
--- a/src/base/abci/abcRec3.c
+++ b/src/base/abci/abcRec3.c
@@ -705,7 +705,7 @@ int Abc_NtkRecAddCut3( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
// skip small cuts
assert( p->nVars == (int)pCut->nLimit );
- if ( nLeaves < 2 || (nLeaves == 2 && Abc_TtSupportSize(If_CutTruthW(pCut), 2) != 2) )
+ if ( nLeaves < 2 || (nLeaves == 2 && Abc_TtSupportSize(If_CutTruthW(pIfMan, pCut), 2) != 2) )
{
p->nFilterSize++;
return 1;
@@ -716,7 +716,7 @@ int Abc_NtkRecAddCut3( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
// semi-canonicize truth table
clk = Abc_Clock();
- memcpy( p->pTemp1, If_CutTruthW(pCut), p->nWords * sizeof(word) );
+ memcpy( p->pTemp1, If_CutTruthW(pIfMan, pCut), p->nWords * sizeof(word) );
#ifdef LMS_USE_OLD_FORM
uCanonPhase = Kit_TruthSemiCanonicize( (unsigned *)p->pTemp1, (unsigned *)p->pTemp2, nLeaves, pCanonPerm );
#else
@@ -908,10 +908,9 @@ static inline int If_CutFindBestStruct( If_Man_t * pIfMan, If_Cut_t * pCut, char
int uSupport, nLeaves = If_CutLeaveNum( pCut );
word DelayProfile;
abctime clk;
- assert( nLeaves > 1 );
pCut->fUser = 1;
// compute support
- uSupport = Abc_TtSupport( If_CutTruthW(pCut), nLeaves );
+ uSupport = Abc_TtSupport( If_CutTruthW(pIfMan, pCut), nLeaves );
if ( uSupport == 0 )
{
pCut->Cost = 1;
@@ -932,7 +931,7 @@ static inline int If_CutFindBestStruct( If_Man_t * pIfMan, If_Cut_t * pCut, char
// semicanonicize the function
clk = Abc_Clock();
- memcpy( p->pTemp1, If_CutTruthW(pCut), p->nWords * sizeof(word) );
+ memcpy( p->pTemp1, If_CutTruthW(pIfMan, pCut), p->nWords * sizeof(word) );
#ifdef LMS_USE_OLD_FORM
*puCanonPhase = Kit_TruthSemiCanonicize( (unsigned *)p->pTemp1, (unsigned *)p->pTemp2, nLeaves, pCanonPerm );
#else
@@ -1018,16 +1017,15 @@ Hop_Obj_t * Abc_RecToHop3( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut,
Gia_Obj_t * pGiaPo, * pGiaTemp = NULL;
int i, uSupport, BestPo = -1, nLeaves = If_CutLeaveNum(pCut);
assert( pIfMan->pPars->fCutMin == 1 );
- assert( nLeaves > 1 );
// compute support
- uSupport = Abc_TtSupport( If_CutTruthW(pCut), nLeaves );
+ uSupport = Abc_TtSupport( If_CutTruthW(pIfMan, pCut), nLeaves );
if ( uSupport == 0 )
- return Hop_NotCond( Hop_ManConst0(pMan), (int)(*If_CutTruthW(pCut) & 1) );
+ return Hop_NotCond( Hop_ManConst0(pMan), If_CutTruthIsCompl(pCut) );
if ( !Abc_TtSuppIsMinBase(uSupport) || uSupport == 1 )
{
assert( Abc_TtSuppOnlyOne(uSupport) );
- return Hop_NotCond( Hop_IthVar(pMan, Abc_TtSuppFindFirst(uSupport)), (int)(*If_CutTruthW(pCut) & 1) );
+ return Hop_NotCond( Hop_IthVar(pMan, Abc_TtSuppFindFirst(uSupport)), If_CutTruthIsCompl(pCut) );
}
assert( Gia_WordCountOnes(uSupport) == nLeaves );
@@ -1035,15 +1033,6 @@ Hop_Obj_t * Abc_RecToHop3( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut,
If_CutFindBestStruct( pIfMan, pCut, pCanonPerm, &uCanonPhase, &BestPo );
assert( BestPo >= 0 );
pGiaPo = Gia_ManCo( pGia, BestPo );
-/*
-if ( If_CutLeaveNum(pCut) == 6 )
-{
-printf( "\n" );
-Kit_DsdPrintFromTruth( If_CutTruth(pCut), If_CutLeaveNum(pCut) ); printf( "\n" );
-//Gia_ManPrintCo( pGia, pGiaPo );
-Gia_ManPrintCone2( pGia, pGiaPo );
-}
-*/
// collect internal nodes into pGia->vTtNodes
if ( pGia->vTtNodes == NULL )
pGia->vTtNodes = Vec_IntAlloc( 256 );
@@ -1102,17 +1091,16 @@ int Abc_RecToGia3( Gia_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut, Vec_Int
Gia_Obj_t * pGiaPo, * pGiaTemp = NULL;
int i, uSupport, BestPo = -1, nLeaves = If_CutLeaveNum(pCut);
assert( pIfMan->pPars->fCutMin == 1 );
- assert( nLeaves > 1 );
assert( nLeaves == Vec_IntSize(vLeaves) );
// compute support
- uSupport = Abc_TtSupport( If_CutTruthW(pCut), nLeaves );
+ uSupport = Abc_TtSupport( If_CutTruthW(pIfMan, pCut), nLeaves );
if ( uSupport == 0 )
- return Abc_LitNotCond( 0, (int)(*If_CutTruthW(pCut) & 1) );
+ return Abc_LitNotCond( 0, If_CutTruthIsCompl(pCut) );
if ( !Abc_TtSuppIsMinBase(uSupport) || uSupport == 1 )
{
assert( Abc_TtSuppOnlyOne(uSupport) );
- return Abc_LitNotCond( Vec_IntEntry(vLeaves, Abc_TtSuppFindFirst(uSupport)), (int)(*If_CutTruthW(pCut) & 1) );
+ return Abc_LitNotCond( Vec_IntEntry(vLeaves, Abc_TtSuppFindFirst(uSupport)), If_CutTruthIsCompl(pCut) );
}
assert( Gia_WordCountOnes(uSupport) == nLeaves );
diff --git a/src/base/abci/abcRenode.c b/src/base/abci/abcRenode.c
index 9fd6d0eb..3d5ebc66 100644
--- a/src/base/abci/abcRenode.c
+++ b/src/base/abci/abcRenode.c
@@ -31,11 +31,11 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
-static int Abc_NtkRenodeEvalAig( If_Cut_t * pCut );
-static int Abc_NtkRenodeEvalBdd( If_Cut_t * pCut );
-static int Abc_NtkRenodeEvalSop( If_Cut_t * pCut );
-static int Abc_NtkRenodeEvalCnf( If_Cut_t * pCut );
-static int Abc_NtkRenodeEvalMv( If_Cut_t * pCut );
+static int Abc_NtkRenodeEvalAig( If_Man_t * p, If_Cut_t * pCut );
+static int Abc_NtkRenodeEvalBdd( If_Man_t * p, If_Cut_t * pCut );
+static int Abc_NtkRenodeEvalSop( If_Man_t * p, If_Cut_t * pCut );
+static int Abc_NtkRenodeEvalCnf( If_Man_t * p, If_Cut_t * pCut );
+static int Abc_NtkRenodeEvalMv( If_Man_t * p, If_Cut_t * pCut );
static reo_man * s_pReo = NULL;
static DdManager * s_pDd = NULL;
@@ -162,7 +162,7 @@ Abc_Ntk_t * Abc_NtkRenode( Abc_Ntk_t * pNtk, int nFaninMax, int nCubeMax, int nF
SeeAlso []
***********************************************************************/
-int Abc_NtkRenodeEvalAig( If_Cut_t * pCut )
+int Abc_NtkRenodeEvalAig( If_Man_t * p, If_Cut_t * pCut )
{
Kit_Graph_t * pGraph;
int i, nNodes;
@@ -171,10 +171,10 @@ extern void Kit_DsdTest( unsigned * pTruth, int nVars );
if ( If_CutLeaveNum(pCut) == 8 )
{
nDsdCounter++;
- Kit_DsdTest( If_CutTruth(pCut), If_CutLeaveNum(pCut) );
+ Kit_DsdTest( If_CutTruth(p, pCut), If_CutLeaveNum(pCut) );
}
*/
- pGraph = Kit_TruthToGraph( If_CutTruth(pCut), If_CutLeaveNum(pCut), s_vMemory );
+ pGraph = Kit_TruthToGraph( If_CutTruth(p, pCut), If_CutLeaveNum(pCut), s_vMemory );
if ( pGraph == NULL )
{
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
@@ -199,14 +199,14 @@ if ( If_CutLeaveNum(pCut) == 8 )
SeeAlso []
***********************************************************************/
-int Abc_NtkRenodeEvalBdd( If_Cut_t * pCut )
+int Abc_NtkRenodeEvalBdd( If_Man_t * p, If_Cut_t * pCut )
{
int pOrder[IF_MAX_LUTSIZE];
DdNode * bFunc, * bFuncNew;
int i, k, nNodes;
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
pCut->pPerm[i] = pOrder[i] = -100;
- bFunc = Kit_TruthToBdd( s_pDd, If_CutTruth(pCut), If_CutLeaveNum(pCut), 0 ); Cudd_Ref( bFunc );
+ bFunc = Kit_TruthToBdd( s_pDd, If_CutTruth(p, pCut), If_CutLeaveNum(pCut), 0 ); Cudd_Ref( bFunc );
bFuncNew = Extra_Reorder( s_pReo, s_pDd, bFunc, pOrder ); Cudd_Ref( bFuncNew );
for ( i = k = 0; i < If_CutLeaveNum(pCut); i++ )
if ( pOrder[i] >= 0 )
@@ -228,12 +228,12 @@ int Abc_NtkRenodeEvalBdd( If_Cut_t * pCut )
SeeAlso []
***********************************************************************/
-int Abc_NtkRenodeEvalSop( If_Cut_t * pCut )
+int Abc_NtkRenodeEvalSop( If_Man_t * p, If_Cut_t * pCut )
{
int i, RetValue;
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
pCut->pPerm[i] = 1;
- RetValue = Kit_TruthIsop( If_CutTruth(pCut), If_CutLeaveNum(pCut), s_vMemory, 1 );
+ RetValue = Kit_TruthIsop( If_CutTruth(p, pCut), If_CutLeaveNum(pCut), s_vMemory, 1 );
if ( RetValue == -1 )
return IF_COST_MAX;
assert( RetValue == 0 || RetValue == 1 );
@@ -251,22 +251,22 @@ int Abc_NtkRenodeEvalSop( If_Cut_t * pCut )
SeeAlso []
***********************************************************************/
-int Abc_NtkRenodeEvalCnf( If_Cut_t * pCut )
+int Abc_NtkRenodeEvalCnf( If_Man_t * p, If_Cut_t * pCut )
{
int i, RetValue, nClauses;
// set internal mapper parameters
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
pCut->pPerm[i] = 1;
// compute ISOP for the positive phase
- RetValue = Kit_TruthIsop( If_CutTruth(pCut), If_CutLeaveNum(pCut), s_vMemory, 0 );
+ RetValue = Kit_TruthIsop( If_CutTruth(p, pCut), If_CutLeaveNum(pCut), s_vMemory, 0 );
if ( RetValue == -1 )
return IF_COST_MAX;
assert( RetValue == 0 || RetValue == 1 );
nClauses = Vec_IntSize( s_vMemory );
// compute ISOP for the negative phase
- Kit_TruthNot( If_CutTruth(pCut), If_CutTruth(pCut), If_CutLeaveNum(pCut) );
- RetValue = Kit_TruthIsop( If_CutTruth(pCut), If_CutLeaveNum(pCut), s_vMemory, 0 );
- Kit_TruthNot( If_CutTruth(pCut), If_CutTruth(pCut), If_CutLeaveNum(pCut) );
+ Kit_TruthNot( If_CutTruth(p, pCut), If_CutTruth(p, pCut), If_CutLeaveNum(pCut) );
+ RetValue = Kit_TruthIsop( If_CutTruth(p, pCut), If_CutLeaveNum(pCut), s_vMemory, 0 );
+ Kit_TruthNot( If_CutTruth(p, pCut), If_CutTruth(p, pCut), If_CutLeaveNum(pCut) );
if ( RetValue == -1 )
return IF_COST_MAX;
assert( RetValue == 0 || RetValue == 1 );
@@ -285,21 +285,21 @@ int Abc_NtkRenodeEvalCnf( If_Cut_t * pCut )
SeeAlso []
***********************************************************************/
-int Abc_NtkRenodeEvalMv( If_Cut_t * pCut )
+int Abc_NtkRenodeEvalMv( If_Man_t * p, If_Cut_t * pCut )
{
int i, RetValue;
// set internal mapper parameters
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
pCut->pPerm[i] = 1;
// compute ISOP for the positive phase
- RetValue = Kit_TruthIsop( If_CutTruth(pCut), If_CutLeaveNum(pCut), s_vMemory, 0 );
+ RetValue = Kit_TruthIsop( If_CutTruth(p, pCut), If_CutLeaveNum(pCut), s_vMemory, 0 );
if ( RetValue == -1 )
return IF_COST_MAX;
assert( RetValue == 0 || RetValue == 1 );
// compute ISOP for the negative phase
- Kit_TruthNot( If_CutTruth(pCut), If_CutTruth(pCut), If_CutLeaveNum(pCut) );
- RetValue = Kit_TruthIsop( If_CutTruth(pCut), If_CutLeaveNum(pCut), s_vMemory2, 0 );
- Kit_TruthNot( If_CutTruth(pCut), If_CutTruth(pCut), If_CutLeaveNum(pCut) );
+ Kit_TruthNot( If_CutTruth(p, pCut), If_CutTruth(p, pCut), If_CutLeaveNum(pCut) );
+ RetValue = Kit_TruthIsop( If_CutTruth(p, pCut), If_CutLeaveNum(pCut), s_vMemory2, 0 );
+ Kit_TruthNot( If_CutTruth(p, pCut), If_CutTruth(p, pCut), If_CutLeaveNum(pCut) );
if ( RetValue == -1 )
return IF_COST_MAX;
assert( RetValue == 0 || RetValue == 1 );