summaryrefslogtreecommitdiffstats
path: root/src/map/if/ifMap.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2016-07-29 16:34:47 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2016-07-29 16:34:47 -0700
commitcf91699e05606dca1f6146943e82ce04413f99a7 (patch)
tree33e712a36be3d66b003a558952f412ab88a4a8e9 /src/map/if/ifMap.c
parent71a051f8cd545d7fa4577dcf201025137e11c204 (diff)
downloadabc-cf91699e05606dca1f6146943e82ce04413f99a7.tar.gz
abc-cf91699e05606dca1f6146943e82ce04413f99a7.tar.bz2
abc-cf91699e05606dca1f6146943e82ce04413f99a7.zip
Infrastructure for using the results of exact SAT-based synthesis during mapping.
Diffstat (limited to 'src/map/if/ifMap.c')
-rw-r--r--src/map/if/ifMap.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c
index c764c74c..7e102312 100644
--- a/src/map/if/ifMap.c
+++ b/src/map/if/ifMap.c
@@ -29,7 +29,7 @@ ABC_NAMESPACE_IMPL_START
extern char * Dau_DsdMerge( char * pDsd0i, int * pPerm0, char * pDsd1i, int * pPerm1, int fCompl0, int fCompl1, int nVars );
extern int If_CutDelayRecCost3( If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj );
-extern int Abc_ExactDelayCost( int nVars, word * pTruth, int * pArrTimeProfile );
+extern int Abc_ExactDelayCost( word * pTruth, int nVars, int * pArrTimeProfile, char * pPerm, int * Cost );
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -149,7 +149,18 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
else if ( p->pPars->fUserRecLib )
pCut->Delay = If_CutDelayRecCost3( p, pCut, pObj );
else if ( p->pPars->fUserSesLib )
- pCut->Delay = Abc_ExactDelayCost( If_CutLeaveNum(pCut), If_CutTruthW(p, pCut), If_CutArrTimeProfile(p, pCut) );
+ {
+ int Cost = 0;
+ pCut->fUser = 1;
+ pCut->Delay = (float)Abc_ExactDelayCost( If_CutTruthW(p, pCut), If_CutLeaveNum(pCut), If_CutArrTimeProfile(p, pCut), If_CutPerm(pCut), &Cost );
+ if ( Cost == ABC_INFINITY )
+ {
+ for ( v = 0; v < If_CutLeaveNum(pCut); v++ )
+ If_CutPerm(pCut)[v] = IF_BIG_CHAR;
+ pCut->Cost = IF_COST_MAX;
+ pCut->fUseless = 1;
+ }
+ }
else if ( p->pPars->fDelayOptLut )
pCut->Delay = If_CutLutBalanceEval( p, pCut );
else if( p->pPars->nGateSize > 0 )
@@ -362,7 +373,18 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
else if ( p->pPars->fUserRecLib )
pCut->Delay = If_CutDelayRecCost3( p, pCut, pObj );
else if ( p->pPars->fUserSesLib )
- pCut->Delay = Abc_ExactDelayCost( If_CutLeaveNum(pCut), If_CutTruthW(p, pCut), If_CutArrTimeProfile(p, pCut) );
+ {
+ int Cost = 0;
+ pCut->fUser = 1;
+ pCut->Delay = (float)Abc_ExactDelayCost( If_CutTruthW(p, pCut), If_CutLeaveNum(pCut), If_CutArrTimeProfile(p, pCut), If_CutPerm(pCut), &Cost );
+ if ( Cost == ABC_INFINITY )
+ {
+ for ( v = 0; v < If_CutLeaveNum(pCut); v++ )
+ If_CutPerm(pCut)[v] = IF_BIG_CHAR;
+ pCut->Cost = IF_COST_MAX;
+ pCut->fUseless = 1;
+ }
+ }
else if ( p->pPars->fDelayOptLut )
pCut->Delay = If_CutLutBalanceEval( p, pCut );
else if( p->pPars->nGateSize > 0 )