summaryrefslogtreecommitdiffstats
path: root/src/map/if
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-01-17 23:38:11 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2012-01-17 23:38:11 -0800
commit2a236864ab0b9f96f917addc96ee7442abb09d9d (patch)
treebc770cf75a0eb36c6413e75a9beef00fc39bf9a9 /src/map/if
parentd8d705c717c077ee8b618d32fcd4fdaa1f0656d5 (diff)
downloadabc-2a236864ab0b9f96f917addc96ee7442abb09d9d.tar.gz
abc-2a236864ab0b9f96f917addc96ee7442abb09d9d.tar.bz2
abc-2a236864ab0b9f96f917addc96ee7442abb09d9d.zip
Changes to the lazy man's synthesis code.
Diffstat (limited to 'src/map/if')
-rw-r--r--src/map/if/if.h2
-rw-r--r--src/map/if/ifCut.c2
-rw-r--r--src/map/if/ifMap.c10
3 files changed, 7 insertions, 7 deletions
diff --git a/src/map/if/if.h b/src/map/if/if.h
index ea830065..9f04902b 100644
--- a/src/map/if/if.h
+++ b/src/map/if/if.h
@@ -500,7 +500,7 @@ extern Vec_Int_t * If_ManCollectMappingInt( If_Man_t * p );
extern int If_ManCountSpecialPos( If_Man_t * p );
/*=== abcRec.c ============================================================*/
-extern int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut);
+extern int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj);
// othe packages
extern int Bat_ManCellFuncLookup( unsigned * pTruth, int nVars, int nLeaves );
diff --git a/src/map/if/ifCut.c b/src/map/if/ifCut.c
index 35d6376c..36aa935d 100644
--- a/src/map/if/ifCut.c
+++ b/src/map/if/ifCut.c
@@ -685,7 +685,7 @@ void If_CutSort( If_Man_t * p, If_Set_t * pCutSet, If_Cut_t * pCut )
return;
}
- if ( (p->pPars->fUseBat || p->pPars->fEnableCheck07 || p->pPars->fEnableCheck08 || p->pPars->fEnableCheck10 || p->pPars->pLutStruct) && !pCut->fUseless )
+ if ( (p->pPars->fUseBat || p->pPars->fEnableCheck07 || p->pPars->fEnableCheck08 || p->pPars->fEnableCheck10 || p->pPars->pLutStruct || p->pPars->fUserRecLib) && !pCut->fUseless )
{
If_Cut_t * pFirst = pCutSet->ppCuts[0];
if ( pFirst->fUseless || If_ManSortCompare(p, pFirst, pCut) == 1 )
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c
index c6547fce..f40244ca 100644
--- a/src/map/if/ifMap.c
+++ b/src/map/if/ifMap.c
@@ -157,7 +157,7 @@ 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 );
// else if ( p->pPars->fDelayOpt )
if ( p->pPars->fUserRecLib )
- pCut->Delay = If_CutDelayRecCost(p, pCut);
+ pCut->Delay = If_CutDelayRecCost(p, pCut, pObj);
else if(p->pPars->fDelayOpt)
pCut->Delay = If_CutDelaySopCost(p,pCut);
else
@@ -180,7 +180,6 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
If_ObjForEachCut( pObj->pFanin0, pCut0, i )
If_ObjForEachCut( pObj->pFanin1, pCut1, k )
{
-
// get the next free cut
assert( pCutSet->nCuts <= pCutSet->nCutsMax );
pCut = pCutSet->ppCuts[pCutSet->nCuts];
@@ -218,6 +217,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
}
}
+
// compute the application-specific cost and depth
pCut->fUser = (p->pPars->pFuncCost != NULL);
pCut->Cost = p->pPars->pFuncCost? p->pPars->pFuncCost(pCut) : 0;
@@ -228,13 +228,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 );
// else if ( p->pPars->fDelayOpt )
if ( p->pPars->fUserRecLib )
- pCut->Delay = If_CutDelayRecCost(p, pCut);
+ pCut->Delay = If_CutDelayRecCost(p, pCut, pObj);
else if (p->pPars->fDelayOpt)
pCut->Delay = If_CutDelaySopCost(p, pCut);
else
pCut->Delay = If_CutDelay( p, pObj, pCut );
- if ( pCut->Cost == IF_COST_MAX )
- continue;
+ //if ( pCut->Cost == IF_COST_MAX )
+ // continue;
// Abc_Print( 1, "%.2f ", pCut->Delay );
if ( Mode && pCut->Delay > pObj->Required + p->fEpsilon )
continue;