summaryrefslogtreecommitdiffstats
path: root/src/map/if/ifMap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/if/ifMap.c')
-rw-r--r--src/map/if/ifMap.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c
index 6fcb8799..1f7ba898 100644
--- a/src/map/if/ifMap.c
+++ b/src/map/if/ifMap.c
@@ -75,7 +75,8 @@ float If_CutDelaySpecial( If_Man_t * p, If_Cut_t * pCut, int fCarry )
Delay = IF_MAX( Delay, Pin2Pin[fCarry][i] + DelayCur );
}
return Delay;
- }
+}
+
/**Function*************************************************************
@@ -157,12 +158,13 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
/// pCut->Delay = If_CutDelayLutStruct( p, pCut, p->pPars->pLutStruct, p->pPars->WireDelay );
if ( p->pPars->fUserRecLib )
{
- if((Abc_NtkRecIsRunning2()&& Abc_NtkRecIsRunning()) || (!Abc_NtkRecIsRunning2()&& !Abc_NtkRecIsRunning()))
- assert(0);
- else if(Abc_NtkRecIsRunning())
- pCut->Delay = If_CutDelayRecCost(p, pCut, pObj);
+ assert( Abc_NtkRecIsRunning() + Abc_NtkRecIsRunning2() + Abc_NtkRecIsRunning3() == 1 );
+ if ( Abc_NtkRecIsRunning3() )
+ pCut->Delay = If_CutDelayRecCost3(p, pCut, pObj);
+ else if( Abc_NtkRecIsRunning2() )
+ pCut->Delay = If_CutDelayRecCost2(p, pCut, pObj);
else
- pCut->Delay = If_CutDelayRecCost2(p, pCut, pObj);
+ pCut->Delay = If_CutDelayRecCost(p, pCut, pObj);
}
else if(p->pPars->fDelayOpt)
pCut->Delay = If_CutDelaySopCost(p,pCut);
@@ -211,8 +213,10 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
if ( p->pPars->fTruth )
{
// clock_t clk = clock();
- int RetValue = If_CutComputeTruth( p, pCut, pCut0, pCut1, pObj->fCompl0, pObj->fCompl1 );
+// int RetValue = If_CutComputeTruth( p, pCut, pCut0, pCut1, pObj->fCompl0, pObj->fCompl1 );
+ int RetValue = If_CutComputeTruth2( p, pCut, pCut0, pCut1, pObj->fCompl0, pObj->fCompl1 );
// p->timeTruth += clock() - clk;
+
pCut->fUseless = 0;
if ( p->pPars->pFuncCell && RetValue < 2 )
{
@@ -236,12 +240,13 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
/// pCut->Delay = If_CutDelayLutStruct( p, pCut, p->pPars->pLutStruct, p->pPars->WireDelay );
if ( p->pPars->fUserRecLib )
{
- if((Abc_NtkRecIsRunning2()&& Abc_NtkRecIsRunning()) || (!Abc_NtkRecIsRunning2()&& !Abc_NtkRecIsRunning()))
- assert(0);
- else if(Abc_NtkRecIsRunning())
- pCut->Delay = If_CutDelayRecCost(p, pCut, pObj);
- else
+ assert( Abc_NtkRecIsRunning() + Abc_NtkRecIsRunning2() + Abc_NtkRecIsRunning3() == 1 );
+ if ( Abc_NtkRecIsRunning3() )
+ pCut->Delay = If_CutDelayRecCost3(p, pCut, pObj);
+ else if( Abc_NtkRecIsRunning2() )
pCut->Delay = If_CutDelayRecCost2(p, pCut, pObj);
+ else
+ pCut->Delay = If_CutDelayRecCost(p, pCut, pObj);
}
else if (p->pPars->fDelayOpt)
pCut->Delay = If_CutDelaySopCost(p, pCut);
@@ -263,6 +268,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
pCut->AveRefs = (Mode == 0)? (float)0.0 : If_CutAverageRefs( p, pCut );
// insert the cut into storage
If_CutSort( p, pCutSet, pCut );
+// If_CutTraverse( p, pObj, pCut );
}
assert( pCutSet->nCuts > 0 );