From 287f9efcceb540fb09f5d81250699a9277967ec5 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 20 Sep 2017 19:27:46 -0700 Subject: Maintenance and updates. --- src/map/if/if.h | 6 ++++-- src/map/if/ifMap.c | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/map') diff --git a/src/map/if/if.h b/src/map/if/if.h index 0dd5e01c..7cc852af 100644 --- a/src/map/if/if.h +++ b/src/map/if/if.h @@ -167,8 +167,10 @@ struct If_Par_t_ float * pTimesArr; // arrival times float * pTimesReq; // required times int (* pFuncCost) (If_Man_t *, If_Cut_t *); // procedure to compute the user's cost of a cut - int (* pFuncUser) (If_Man_t *, If_Obj_t *, If_Cut_t *); // procedure called for each cut when cut computation is finished - int (* pFuncCell) (If_Man_t *, unsigned *, int, int, char *); // procedure called for cut functions + int (* pFuncUser) (If_Man_t *, If_Obj_t *, If_Cut_t *); // procedure called for each cut when cut computation is finished + int (* pFuncCell) (If_Man_t *, unsigned *, int, int, char *); // procedure called for cut functions + int (* pFuncCell2) (If_Man_t *, word *, int, Vec_Str_t *, char **); // procedure called for cut functions + int (* pFuncWrite) (If_Man_t *); // procedure called for cut functions void * pReoMan; // reordering manager }; diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c index 51865851..6c25921a 100644 --- a/src/map/if/ifMap.c +++ b/src/map/if/ifMap.c @@ -312,12 +312,14 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep } // run user functions pCut->fUseless = 0; - if ( p->pPars->pFuncCell ) + if ( p->pPars->pFuncCell || p->pPars->pFuncCell2 ) { assert( p->pPars->fUseTtPerm == 0 ); assert( pCut->nLimit >= 4 && pCut->nLimit <= 16 ); if ( p->pPars->fUseDsd ) pCut->fUseless = If_DsdManCheckDec( p->pIfDsdMan, If_CutDsdLit(p, pCut) ); + else if ( p->pPars->pFuncCell2 ) + pCut->fUseless = !p->pPars->pFuncCell2( p, (word *)If_CutTruth(p, pCut), pCut->nLeaves, NULL, NULL ); else pCut->fUseless = !p->pPars->pFuncCell( p, If_CutTruth(p, pCut), Abc_MaxInt(6, pCut->nLeaves), pCut->nLeaves, p->pPars->pLutStruct ); p->nCutsUselessAll += pCut->fUseless; -- cgit v1.2.3