summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abcRenode.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-04-14 09:06:14 -0500
committerAlan Mishchenko <alanmi@berkeley.edu>2014-04-14 09:06:14 -0500
commit02cf86939178ce0f95b98a4c7b432d4375a872e5 (patch)
tree2050cb947436114aa3fd7f4edb0d66bbb3109d38 /src/base/abci/abcRenode.c
parent5cd9145046219f25d6d2ba2d746fcd7bb9531ef2 (diff)
downloadabc-02cf86939178ce0f95b98a4c7b432d4375a872e5.tar.gz
abc-02cf86939178ce0f95b98a4c7b432d4375a872e5.tar.bz2
abc-02cf86939178ce0f95b98a4c7b432d4375a872e5.zip
Changes in the LUT mapper data-structures.
Diffstat (limited to 'src/base/abci/abcRenode.c')
-rw-r--r--src/base/abci/abcRenode.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/base/abci/abcRenode.c b/src/base/abci/abcRenode.c
index c00413f4..ad97aa22 100644
--- a/src/base/abci/abcRenode.c
+++ b/src/base/abci/abcRenode.c
@@ -163,26 +163,19 @@ Abc_Ntk_t * Abc_NtkRenode( Abc_Ntk_t * pNtk, int nFaninMax, int nCubeMax, int nF
***********************************************************************/
int Abc_NtkRenodeEvalAig( If_Man_t * p, If_Cut_t * pCut )
{
+ char * pPerm = If_CutPerm( pCut );
Kit_Graph_t * pGraph;
int i, nNodes;
-/*
-extern void Kit_DsdTest( unsigned * pTruth, int nVars );
-if ( If_CutLeaveNum(pCut) == 8 )
-{
- nDsdCounter++;
- Kit_DsdTest( If_CutTruth(p, pCut), If_CutLeaveNum(pCut) );
-}
-*/
pGraph = Kit_TruthToGraph( If_CutTruth(p, pCut), If_CutLeaveNum(pCut), s_vMemory );
if ( pGraph == NULL )
{
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
- pCut->pPerm[i] = 100;
+ pPerm[i] = 100;
return IF_COST_MAX;
}
nNodes = Kit_GraphNodeNum( pGraph );
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
- pCut->pPerm[i] = Kit_GraphLeafDepth_rec( pGraph, Kit_GraphNodeLast(pGraph), Kit_GraphNode(pGraph, i) );
+ pPerm[i] = Kit_GraphLeafDepth_rec( pGraph, Kit_GraphNodeLast(pGraph), Kit_GraphNode(pGraph, i) );
Kit_GraphFree( pGraph );
return nNodes;
}
@@ -200,16 +193,17 @@ if ( If_CutLeaveNum(pCut) == 8 )
***********************************************************************/
int Abc_NtkRenodeEvalBdd( If_Man_t * p, If_Cut_t * pCut )
{
+ char * pPerm = If_CutPerm( 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;
+ pPerm[i] = pOrder[i] = -100;
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 )
- pCut->pPerm[pOrder[i]] = ++k; // double-check this!
+ pPerm[pOrder[i]] = ++k; // double-check this!
nNodes = -1 + Cudd_DagSize( bFuncNew );
Cudd_RecursiveDeref( s_pDd, bFuncNew );
Cudd_RecursiveDeref( s_pDd, bFunc );
@@ -229,9 +223,10 @@ int Abc_NtkRenodeEvalBdd( If_Man_t * p, If_Cut_t * pCut )
***********************************************************************/
int Abc_NtkRenodeEvalSop( If_Man_t * p, If_Cut_t * pCut )
{
+ char * pPerm = If_CutPerm( pCut );
int i, RetValue;
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
- pCut->pPerm[i] = 1;
+ pPerm[i] = 1;
RetValue = Kit_TruthIsop( If_CutTruth(p, pCut), If_CutLeaveNum(pCut), s_vMemory, 1 );
if ( RetValue == -1 )
return IF_COST_MAX;
@@ -252,10 +247,11 @@ int Abc_NtkRenodeEvalSop( If_Man_t * p, If_Cut_t * pCut )
***********************************************************************/
int Abc_NtkRenodeEvalCnf( If_Man_t * p, If_Cut_t * pCut )
{
+ char * pPerm = If_CutPerm( pCut );
int i, RetValue, nClauses;
// set internal mapper parameters
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
- pCut->pPerm[i] = 1;
+ pPerm[i] = 1;
// compute ISOP for the positive phase
RetValue = Kit_TruthIsop( If_CutTruth(p, pCut), If_CutLeaveNum(pCut), s_vMemory, 0 );
if ( RetValue == -1 )
@@ -286,10 +282,11 @@ int Abc_NtkRenodeEvalCnf( If_Man_t * p, If_Cut_t * pCut )
***********************************************************************/
int Abc_NtkRenodeEvalMv( If_Man_t * p, If_Cut_t * pCut )
{
+ char * pPerm = If_CutPerm( pCut );
int i, RetValue;
// set internal mapper parameters
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
- pCut->pPerm[i] = 1;
+ pPerm[i] = 1;
// compute ISOP for the positive phase
RetValue = Kit_TruthIsop( If_CutTruth(p, pCut), If_CutLeaveNum(pCut), s_vMemory, 0 );
if ( RetValue == -1 )