49 int i, nBytes =
sizeof(
Amap_Cut_t) +
sizeof(
int);
116 for ( i = 0; i < (int)pCut0->
nFans; i++ )
118 for ( i = 0; i < (int)pCut1->
nFans; i++ )
149 for ( i = 0; i < (int)pCut0->
nFans; i++ )
150 pCut->Fans[i] = pCut0->
Fans[i];
151 for ( i = 0; i < (int)pCut1->
nFans; i++ )
152 pCut->Fans[pCut0->
nFans+i] = pCut1->
Fans[i];
153 for ( i = 0; i < (int)pCut2->
nFans; i++ )
179 int i,
nWords, Entry, nCuts, nCuts2;
189 if ( nCuts < nMaxCuts )
190 nWords += pCut->
nFans + 1;
210 if ( nCuts2 < nMaxCuts )
212 memcpy( pNext, pCut,
sizeof(
int) * (pCut->
nFans + 1) );
218 assert( nCuts == nCuts2 );
219 assert( (
int *)pNext - pBuffer == nWords );
223 for ( i = 0; i < 2*p->
pLib->nNodes; i++ )
225 printf(
"Amap_ManCutSaveStored(): Error!\n" );
228 assert( nCuts < (1<<20) );
259 int Entry, c0, c1, iCompl0, iCompl1, iFan0, iFan1;
269 Counter += ( Entry >=0 );
291 printf(
"NODE %5d : Type = ", pNode->
Id );
298 printf(
" Cuts = %d\n", pNode->
nCuts );
301 printf(
"%3d : Mat= %3d Inv=%d ", c, pCut->
iMat, pCut->
fInv );
302 for ( i = 0; i < (int)pCut->
nFans; i++ )
358 iCompl = pCut->
fInv ^ fComplFanin;
405 if ( pNod->
pSets == NULL )
408 if ( pCut0->
nFans == 1 && (pCut0->
fInv ^ fComplFanin0) )
410 if ( pCut1->
nFans == 1 && (pCut1->
fInv ^ fComplFanin1) )
412 if ( pCut2->
nFans == 1 && (pCut2->
fInv ^ fComplFanin2) )
417 if ( pCut0->
nFans == 1 && (pCut0->
fInv ^ fComplFanin0) )
419 if ( pCut1->
nFans == 1 && (pCut1->
fInv ^ fComplFanin1) )
421 if ( pCut2->
nFans == 1 && (pCut2->
fInv ^ fComplFanin2) )
448 int ** pRules, Entry, i, k, c, iCompl0, iCompl1, iFan0, iFan1;
462 if ( pCut0->
nFans == 1 && iCompl0 )
465 for ( i = 0; (Entry = pRules[iFan0][i]); i++ )
466 p->
pMatsTemp[Entry & 0xffff] = (Entry >> 16);
475 if ( pCut1->
nFans == 1 && iCompl1 )
478 if ( iFan0 >= iFan1 )
483 if ( pCut1->
nFans == 1 && iCompl1 )
487 if ( pCut0->
nFans == 1 && iCompl0 )
490 for ( i = 0; (Entry = pRules[iFan0][i]); i++ )
524 printf(
"AIG object is %d bytes. ", (
int)
sizeof(
Amap_Obj_t) );
525 printf(
"Internal AIG = %5.2f MB. Cuts = %5.2f MB. CutsMax = %d.\n",
527 printf(
"Node =%6d. Try =%9d. Try3 =%10d. Used =%7d. R =%6.2f. ",
void Amap_ManMerge(Amap_Man_t *p)
static void Vec_IntPushOrder(Vec_Int_t *p, int Entry)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
void Amap_ManMergeNodeCuts(Amap_Man_t *p, Amap_Obj_t *pNode)
static int Amap_ObjFaninC2(Amap_Obj_t *pObj)
static int Amap_ManPiNum(Amap_Man_t *p)
void Aig_MmFlexRestart(Aig_MmFlex_t *p)
Amap_Cut_t * Amap_ManCutCreate3(Amap_Man_t *p, Amap_Cut_t *pCut0, Amap_Cut_t *pCut1, Amap_Cut_t *pCut2, int iMat)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
#define Amap_NodeForEachCut(pNode, pCut, i)
static Amap_Obj_t * Amap_ObjFanin0(Amap_Man_t *p, Amap_Obj_t *pObj)
static int Abc_Var2Lit(int Var, int fCompl)
char * Aig_MmFlexEntryFetch(Aig_MmFlex_t *p, int nBytes)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define ABC_ALLOC(type, num)
Amap_Cut_t * Amap_ManCutStore(Amap_Man_t *p, Amap_Cut_t *pCut, int fCompl)
#define Amap_ManForEachPi(p, pObj, i)
MACRO DEFINITIONS ///.
static abctime Abc_Clock()
static int Vec_PtrSize(Vec_Ptr_t *p)
#define Amap_ManForEachNode(p, pObj, i)
static int Abc_MinInt(int a, int b)
static int Abc_LitIsCompl(int Lit)
void Amap_ManMergeNodeCutsMux(Amap_Man_t *p, Amap_Obj_t *pNode)
void Amap_ManMergeNodeChoice(Amap_Man_t *p, Amap_Obj_t *pNode)
static int Vec_IntEntry(Vec_Int_t *p, int i)
#define ABC_NAMESPACE_IMPL_END
static Amap_Obj_t * Amap_ObjChoice(Amap_Man_t *p, Amap_Obj_t *pObj)
int Amap_ManMergeCountCuts(Amap_Man_t *p, Amap_Obj_t *pNode)
static int Amap_ManNodeNum(Amap_Man_t *p)
static int Amap_ManObjNum(Amap_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
int Amap_ManFindCut(Amap_Obj_t *pNode, Amap_Obj_t *pFanin, int fComplFanin, int Val, Vec_Ptr_t *vCuts)
static int Abc_LitNot(int Lit)
void Amap_ManCutSaveStored(Amap_Man_t *p, Amap_Obj_t *pNode)
static int Amap_ObjFaninC1(Amap_Obj_t *pObj)
static int Vec_IntSize(Vec_Int_t *p)
static Amap_Obj_t * Amap_ObjFanin1(Amap_Man_t *p, Amap_Obj_t *pObj)
ABC_NAMESPACE_IMPL_START Amap_Cut_t * Amap_ManSetupPis(Amap_Man_t *p)
DECLARATIONS ///.
struct Amap_Cut_t_ Amap_Cut_t
void Amap_ManPrintCuts(Amap_Obj_t *pNode)
static int Abc_Lit2Var(int Lit)
Amap_Cut_t * Amap_ManCutCreate(Amap_Man_t *p, Amap_Cut_t *pCut0, Amap_Cut_t *pCut1, int iMat)
static Amap_Obj_t * Amap_ObjFanin2(Amap_Man_t *p, Amap_Obj_t *pObj)
static void Vec_PtrClear(Vec_Ptr_t *p)
static int Amap_ObjFaninC0(Amap_Obj_t *pObj)
int Amap_LibFindNode(Amap_Lib_t *pLib, int iFan0, int iFan1, int fXor)
static Amap_Nod_t * Amap_LibNod(Amap_Lib_t *p, int i)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static void Vec_IntClear(Vec_Int_t *p)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static Amap_Cut_t ** Amap_ManCutNextP(Amap_Cut_t *pCut)