summaryrefslogtreecommitdiffstats
path: root/src/opt/rwr
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2005-10-02 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2005-10-02 08:01:00 -0700
commit91ca630b0fd316f0843dee8b9e6d236d849eb445 (patch)
treee43afba1c8b2180e981bf75aa02551fa7b2f7793 /src/opt/rwr
parent78fbd336aa584c4d285123ad18617aa9277016b4 (diff)
downloadabc-91ca630b0fd316f0843dee8b9e6d236d849eb445.tar.gz
abc-91ca630b0fd316f0843dee8b9e6d236d849eb445.tar.bz2
abc-91ca630b0fd316f0843dee8b9e6d236d849eb445.zip
Version abc51002
Diffstat (limited to 'src/opt/rwr')
-rw-r--r--src/opt/rwr/rwrEva.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/opt/rwr/rwrEva.c b/src/opt/rwr/rwrEva.c
index 8a00cec8..fee7bfbd 100644
--- a/src/opt/rwr/rwrEva.c
+++ b/src/opt/rwr/rwrEva.c
@@ -55,7 +55,7 @@ int Rwr_NodeRewrite( Rwr_Man_t * p, Cut_Man_t * pManCut, Abc_Obj_t * pNode, int
Dec_Graph_t * pGraph;
Cut_Cut_t * pCut;
Abc_Obj_t * pFanin;
- unsigned uPhase, uTruthBest;
+ unsigned uPhase, uTruthBest, uTruth;
char * pPerm;
int Required, nNodesSaved;
int i, GainCur, GainBest = -1;
@@ -78,8 +78,9 @@ clk = clock();
if ( pCut->nLeaves < 4 )
continue;
// get the fanin permutation
- pPerm = p->pPerms4[ p->pPerms[pCut->uTruth] ];
- uPhase = p->pPhases[pCut->uTruth];
+ uTruth = 0xFFFF & *Cut_CutReadTruth(pCut);
+ pPerm = p->pPerms4[ p->pPerms[uTruth] ];
+ uPhase = p->pPhases[uTruth];
// collect fanins with the corresponding permutation/phase
Vec_PtrClear( p->vFaninsCur );
Vec_PtrFill( p->vFaninsCur, (int)pCut->nLeaves, 0 );
@@ -122,7 +123,7 @@ p->timeEval += clock() - clk2;
GainBest = GainCur;
p->pGraph = pGraph;
p->fCompl = ((uPhase & (1<<4)) > 0);
- uTruthBest = pCut->uTruth;
+ uTruthBest = 0xFFFF & *Cut_CutReadTruth(pCut);
// collect fanins in the
Vec_PtrClear( p->vFanins );
Vec_PtrForEachEntry( p->vFaninsCur, pFanin, i )
@@ -171,8 +172,10 @@ Dec_Graph_t * Rwr_CutEvaluate( Rwr_Man_t * p, Abc_Obj_t * pRoot, Cut_Cut_t * pCu
Dec_Graph_t * pGraphBest, * pGraphCur;
Rwr_Node_t * pNode, * pFanin;
int nNodesAdded, GainBest, i, k;
+ unsigned uTruth;
// find the matching class of subgraphs
- vSubgraphs = Vec_VecEntry( p->vClasses, p->pMap[pCut->uTruth] );
+ uTruth = 0xFFFF & *Cut_CutReadTruth(pCut);
+ vSubgraphs = Vec_VecEntry( p->vClasses, p->pMap[uTruth] );
p->nSubgraphs += vSubgraphs->nSize;
// determine the best subgraph
GainBest = -1;