98 Abc_Obj_t * pObjC, * pObj0, * pObj1, * pRoot = NULL;
101 int i, k, fCompl = 0;
147 if ( Num == NumNext )
162 Abc_Obj_t * pObj0, * pObj1, * pRoot = NULL;
211 if ( Num + 1 == NumNext && (NumNext & 1) )
256 if ( vInput == NULL )
296 if ( vInput == NULL )
346 for ( i = 0; i <= nOnesMax; i++ )
385 pBuffer[ObjId] =
'1';
392 if ( pCounters[i] > 0 )
393 printf(
"%d=%d ", i, pCounters[i] );
398 nTotal += pCounters[i] - 1;
399 printf(
"Total = %d. ", nTotal );
405 printf(
"Bucket contents: " );
428 pFile = fopen(
"multi_and.blif",
"wb" );
431 printf(
"Cannot open output file.\n" );
434 fprintf( pFile,
".model %s\n",
"multi_and" );
435 fprintf( pFile,
".inputs" );
437 fprintf( pFile,
" i%d", i );
438 fprintf( pFile,
"\n" );
439 fprintf( pFile,
".outputs" );
441 fprintf( pFile,
" o%d", i );
442 fprintf( pFile,
"\n" );
449 fprintf( pFile,
".names" );
451 fprintf( pFile,
" i%d", pObj->
iTemp );
452 fprintf( pFile,
" o%d\n", i );
454 fprintf( pFile,
"1" );
455 fprintf( pFile,
" 1\n" );
458 fprintf( pFile,
".end\n\n" );
479 Vec_Int_t * vInput, * vInput2, * vInputBest = NULL, * vInputBest2 = NULL;
480 int i, k, Cost, CostBest = 0, Delay, DelayBest = 0;
514 if ( CostBest < Cost || (CostBest == Cost && (DelayBest > Delay)) )
519 vInputBest2 = vInput2;
524 *pvInput = vInputBest;
525 *pvInput2 = vInputBest2;
527 if ( vInputBest == NULL )
542 if ( vInput == NULL )
603 int i, j, k, ObjId, iLit;
635 assert( ObjId < p->nStartCols );
669 if ( iLit == iLitConst1 && fAnd )
686 if ( iLit == iLitConst1 && fAnd )
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
static Vec_Ptr_t * Vec_PtrStart(int nSize)
static int Abc_NtkIsStrash(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_ObjFromLit(Abc_Ntk_t *p, int iLit)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static Abc_Obj_t * Abc_ObjFanin1(Abc_Obj_t *pObj)
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
#define Vec_PtrForEachEntryReverse(Type, vVec, pEntry, i)
static void Vec_WrdPush(Vec_Wrd_t *p, word Entry)
static int Abc_Var2Lit(int Var, int fCompl)
static void Vec_WrdPushOrder(Vec_Wrd_t *p, word Entry)
ABC_DLL Abc_Ntk_t * Abc_NtkBalanceExor(Abc_Ntk_t *pNtk, int fUpdateLevel, int fVerbose)
ABC_DLL Abc_Ntk_t * Abc_NtkDup(Abc_Ntk_t *pNtk)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static int Abc_NtkCiNum(Abc_Ntk_t *pNtk)
#define ABC_ALLOC(type, num)
#define Abc_NtkForEachCo(pNtk, pCo, i)
static int Abc_MaxInt(int a, int b)
static Abc_Obj_t * Abc_NtkObj(Abc_Ntk_t *pNtk, int i)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Vec_VecFree(Vec_Vec_t *p)
static int Vec_WrdSize(Vec_Wrd_t *p)
#define Vec_WrdForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static Vec_Int_t * Vec_IntStartFull(int nSize)
static int Vec_IntTwoCountCommon(Vec_Int_t *vArr1, Vec_Int_t *vArr2)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static int Abc_ObjFaninId0(Abc_Obj_t *pObj)
static int Abc_NtkCoNum(Abc_Ntk_t *pNtk)
static void Vec_PtrRemove(Vec_Ptr_t *p, void *Entry)
static int Abc_ObjIsCo(Abc_Obj_t *pObj)
static Abc_Obj_t * Abc_NtkCo(Abc_Ntk_t *pNtk, int i)
ABC_DLL Abc_Obj_t * Abc_AigXor(Abc_Aig_t *pMan, Abc_Obj_t *p0, Abc_Obj_t *p1)
static Abc_Obj_t * Abc_ObjChild0(Abc_Obj_t *pObj)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
ABC_DLL Abc_Obj_t * Abc_AigAnd(Abc_Aig_t *pMan, Abc_Obj_t *p0, Abc_Obj_t *p1)
static int Abc_LitIsCompl(int Lit)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Vec_IntTwoSplit(Vec_Int_t *vArr1, Vec_Int_t *vArr2, Vec_Int_t *vArr, Vec_Int_t *vArr1n, Vec_Int_t *vArr2n)
static void Vec_WrdClear(Vec_Wrd_t *p)
static int Abc_ObjLevel(Abc_Obj_t *pObj)
static void Vec_WrdShrink(Vec_Wrd_t *p, int nSizeNew)
static void Vec_WrdWriteEntry(Vec_Wrd_t *p, int i, word Entry)
static int Vec_IntEntry(Vec_Int_t *p, int i)
unsigned __int64 word
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_END
static void Vec_WrdFree(Vec_Wrd_t *p)
ABC_DLL Vec_Ptr_t * Abc_NtkNodeSupport(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
static void Vec_IntFreeP(Vec_Int_t **p)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
static Vec_Wrd_t * Vec_WrdAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static int Abc_NodeIsTravIdCurrent(Abc_Obj_t *p)
static Abc_Obj_t * Abc_ObjRegular(Abc_Obj_t *p)
static int Vec_IntSize(Vec_Int_t *p)
#define Abc_NtkForEachCi(pNtk, pCi, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Abc_NtkIncrementTravId(Abc_Ntk_t *p)
ABC_DLL Abc_Ntk_t * Abc_NtkBalance(Abc_Ntk_t *pNtk, int fDuplicate, int fSelective, int fUpdateLevel)
FUNCTION DEFINITIONS ///.
static int Vec_WrdRemove(Vec_Wrd_t *p, word Entry)
static word Vec_WrdEntry(Vec_Wrd_t *p, int i)
static int Abc_Lit2Var(int Lit)
#define ABC_CALLOC(type, num)
static int Abc_ObjToLit(Abc_Obj_t *p)
static void Vec_PtrFreeP(Vec_Ptr_t **p)
static Abc_Obj_t * Abc_ObjNotCond(Abc_Obj_t *p, int c)
#define Vec_WrdForEachEntryStart(vVec, Entry, i, Start)
static Abc_Obj_t * Abc_ObjNot(Abc_Obj_t *p)
static Abc_Ntk_t * Abc_ObjNtk(Abc_Obj_t *pObj)
static int Abc_ObjFaninId1(Abc_Obj_t *pObj)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static int Abc_ObjIsComplement(Abc_Obj_t *p)
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
static Abc_Obj_t * Abc_ObjChild1(Abc_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
ABC_DLL int Abc_NodeIsExorType(Abc_Obj_t *pNode)
ABC_DLL Abc_Obj_t * Abc_NodeRecognizeMux(Abc_Obj_t *pNode, Abc_Obj_t **ppNodeT, Abc_Obj_t **ppNodeE)
int nTotal
DECLARATIONS ///.
static void Abc_NodeSetTravIdCurrent(Abc_Obj_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)
#define Vec_WrdForEachEntryReverse(vVec, pEntry, i)