50 memcpy( pNew, pCut, nBytes );
149 int i, iFanin, fComplFanin;
151 if ( pObj->
nFouts[fCompl]++ + pObj->
nFouts[!fCompl] > 0 )
158 for ( i = 0; i < (int)pGate->
nPins; i++ )
283 if ( (
int)pFanin->
fPolar != fCompl && pFanin->
nFouts[fCompl] == 1 )
310 if ( (
int)pFanin->
fPolar != fCompl && pFanin->
nFouts[fCompl] == 0 )
331 float aResult, aResult2;
336 assert( aResult < aResult2 + p->fEpsilonInternal );
339 if ( pNode->
nFouts[fComplNew] == 0 && pNode->
nFouts[!fComplNew] > 0 )
357 float aResult, aResult2;
363 assert( aResult < aResult2 + p->fEpsilonInternal );
370 assert( aResult < aResult2 + p->fEpsilonInternal );
399 pMFanin = &pFanin->
Best;
435 pMFanin = &pFanin->
Best;
458 int fVeryVerbose = fVerbose;
461 Amap_Mat_t * pMBestA = &MA, * pMBestD = &MD, * pMThis = &
M, * pMBest;
475 printf(
"\nNode %d (%d)\n", pNode->
Id, pNode->
Level );
477 pMBestA->
pCut = pMBestD->pCut = NULL;
480 if ( pCut->
iMat == 0 )
497 printf(
"Cut %2d (%d) : ", i, pCut->
nFans );
499 printf(
"%s ", pMThis->pSet->fInv ?
"inv" :
" " );
500 printf(
"Delay %5.2f ", pMThis->Delay );
501 printf(
"Area %5.2f ", pMThis->Area );
514 printf(
"BEST MATCHA: " );
516 printf(
"%s ", pMBestA->
pSet->
fInv ?
"inv" :
" " );
517 printf(
"Delay %5.2f ", pMBestA->
Delay );
518 printf(
"Area %5.2f ", pMBestA->
Area );
521 printf(
"BEST MATCHD: " );
523 printf(
"%s ", pMBestD->pSet->fInv ?
"inv" :
" " );
524 printf(
"Delay %5.2f ", pMBestD->Delay );
525 printf(
"Area %5.2f ", pMBestD->Area );
528 printf(
"BEST MATCH : " );
530 printf(
"%s ", pMBest->pSet->fInv ?
"inv" :
" " );
531 printf(
"Delay %5.2f ", pMBest->Delay );
532 printf(
"Area %5.2f ", pMBest->Area );
536 pNode->
fPolar = pMBest->pCut->fInv ^ pMBest->pSet->fInv;
537 pNode->
Best = *pMBest;
571 printf(
"Area =%9.2f. Gate =%9.2f. Inv =%9.2f. (%6d.) Delay =%6.2f. ",
void Amap_ManMerge(Amap_Man_t *p)
static Amap_Gat_t * Amap_LibGate(Amap_Lib_t *p, int i)
static float Abc_AbsFloat(float a)
#define Amap_NodeForEachCut(pNode, pCut, i)
static Amap_Obj_t * Amap_ObjFanin0(Amap_Man_t *p, Amap_Obj_t *pObj)
static float Amap_CutAreaDeref(Amap_Man_t *p, Amap_Mat_t *pM)
void Amap_ManCleanRefs(Amap_Man_t *p)
static int Amap_CutCompareArea(Amap_Man_t *p, Amap_Mat_t *pM0, Amap_Mat_t *pM1)
ABC_NAMESPACE_IMPL_START Amap_Cut_t * Amap_ManDupCut(Amap_Man_t *p, Amap_Cut_t *pCut)
DECLARATIONS ///.
#define Amap_MatchForEachFaninCompl(p, pM, pFanin, fCompl, i)
char * Aig_MmFlexEntryFetch(Aig_MmFlex_t *p, int nBytes)
static void Amap_CutAreaTest(Amap_Man_t *p, Amap_Obj_t *pNode)
#define Amap_ManForEachObj(p, pObj, i)
static abctime Abc_Clock()
static int Abc_MaxInt(int a, int b)
word M(word f1, word f2, int n)
Aig_MmFlex_t * pMemCutBest
static int Amap_ObjIsPi(Amap_Obj_t *pObj)
#define Amap_ManForEachNode(p, pObj, i)
float Amap_ManMaxDelay(Amap_Man_t *p)
static int Amap_ObjIsNode(Amap_Obj_t *pObj)
static int Amap_ObjRefsTotal(Amap_Obj_t *pObj)
static void Amap_ManMatchStart(Amap_Mat_t *p, Amap_Cut_t *pCut, Amap_Set_t *pSet)
static int Abc_LitIsCompl(int Lit)
void Amap_ManCleanData(Amap_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
static int Amap_ObjIsConst1(Amap_Obj_t *pObj)
#define Amap_LibNodeForEachSet(pNod, pSet)
#define ABC_NAMESPACE_IMPL_START
static Amap_Obj_t * Amap_ManObj(Amap_Man_t *p, int i)
float Amap_ManComputeMapping_rec(Amap_Man_t *p, Amap_Obj_t *pObj, int fCompl)
static float Amap_CutAreaDerefed(Amap_Man_t *p, Amap_Obj_t *pNode, Amap_Mat_t *pM)
Aig_MmFlex_t * Aig_MmFlexStart()
static void Amap_ManMatchGetExacts(Amap_Man_t *p, Amap_Obj_t *pNode, Amap_Mat_t *pM)
void Aig_MmFlexStop(Aig_MmFlex_t *p, int fVerbose)
struct Amap_Cut_t_ Amap_Cut_t
static int Abc_Lit2Var(int Lit)
int Amap_ManCountInverters(Amap_Man_t *p)
static void Amap_ManMatchGetFlows(Amap_Man_t *p, Amap_Mat_t *pM)
#define Amap_MatchForEachFanin(p, pM, pFanin, i)
void Amap_ManMap(Amap_Man_t *p)
static float Amap_CutAreaRef(Amap_Man_t *p, Amap_Mat_t *pM)
static int Amap_ObjFaninC0(Amap_Obj_t *pObj)
static Amap_Nod_t * Amap_LibNod(Amap_Lib_t *p, int i)
void Amap_ManMatch(Amap_Man_t *p, int fFlow, int fRefs)
void Amap_ManMatchNode(Amap_Man_t *p, Amap_Obj_t *pNode, int fFlow, int fRefs)
float Amap_ManComputeMapping(Amap_Man_t *p)
#define Amap_ManForEachPo(p, pObj, i)
static int Amap_CutCompareDelay(Amap_Man_t *p, Amap_Mat_t *pM0, Amap_Mat_t *pM1)