78 #define Shr_ObjForEachFanout( p, iNode, iFan ) \
79 for ( iFan = Shr_ManFanIterStart(p, iNode); iFan; iFan = Shr_ManFanIterNext(p) )
177 FanStr.sFan.
iFan = iFanout;
210 int iPlace, * pArray;
218 ABC_SWAP(
int, pArray[iPlace-1], pArray[iPlace] )
226 int i, c, iDiv, iFan, iPlace;
243 if ( c++ == nFanoutMax )
279 int i, iVar, iLit, nNodes, iLast;
281 assert( uTruth1 != 0 && uTruthC != 0 );
282 Bdc_ManDecompose( pManDec, (
unsigned *)&uTruth1, (
unsigned *)&uTruthC, nVars, NULL, 1000 );
287 for ( i = nVars + 1; i < nNodes; i++ )
333 return Truth0 & Truth1;
405 word uTruth, uTruth0, uTruth1;
406 int i, k, nDivs, iNode;
407 int RetValue, Counter1 = 0, Counter2 = 0;
436 if ( uTruth == 0 || ~uTruth == 0 )
440 if ( uTruth ==
Truth[k] || ~uTruth ==
Truth[k] )
442 if ( pObj->
Value != ~0 )
448 uTruth = ((uTruth &
Truth[k]) >> (1 << k)) | ((uTruth & ~
Truth[k]) << (1 << k));
454 assert( nDivs <= pMan->nDivMax );
478 printf(
"Performed %d resubs and %d decomps. ", Counter1, Counter2 );
Bdc_Fun_t * Bdc_ManRoot(Bdc_Man_t *p)
static int * Vec_IntArray(Vec_Int_t *p)
Gia_Man_t * Shr_ManFree(Shr_Man_t *p)
#define Vec_IntForEachEntryStop(vVec, Entry, i, Stop)
void Gia_ManStop(Gia_Man_t *p)
static void Shr_ManAddFanout(Shr_Man_t *p, int iFanin, int iFanout)
static int Bdc_FunFanin1Copy(Bdc_Fun_t *pObj)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static Gia_Obj_t * Gia_ObjFromLit(Gia_Man_t *p, int iLit)
static void Vec_WrdPush(Vec_Wrd_t *p, word Entry)
static int Gia_ManAppendCi(Gia_Man_t *p)
static int Abc_Var2Lit(int Var, int fCompl)
Bdc_Man_t * Bdc_ManAlloc(Bdc_Par_t *pPars)
MACRO DEFINITIONS ///.
static int Gia_ObjValue(Gia_Obj_t *pObj)
static int Gia_ObjFaninId1p(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Shr_ManDivPushOrderByLevel(Shr_Man_t *p, int iDiv)
typedefABC_NAMESPACE_HEADER_START struct Rsb_Man_t_ Rsb_Man_t
INCLUDES ///.
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
int Shr_ObjPerformBidec(Shr_Man_t *p, Bdc_Man_t *pManDec, Gia_Man_t *pNew, Vec_Int_t *vLeafLits, word uTruth1, word uTruthC)
int Bdc_ManDecompose(Bdc_Man_t *p, unsigned *puFunc, unsigned *puCare, int nVars, Vec_Ptr_t *vDivs, int nNodesMax)
static abctime Abc_Clock()
static int Vec_WrdSize(Vec_Wrd_t *p)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
static int Abc_LitNotCond(int Lit, int c)
#define ABC_SWAP(Type, a, b)
void Gia_ManStopP(Gia_Man_t **p)
int Gia_ManHasDangling(Gia_Man_t *p)
Bdc_Fun_t * Bdc_ManFunc(Bdc_Man_t *p, int i)
DECLARATIONS ///.
word Shr_ManComputeTruth6_rec(Gia_Man_t *p, int iNode, Vec_Wrd_t *vTruths)
Rsb_Man_t * Rsb_ManAlloc(int nLeafMax, int nDivMax, int nDecMax, int fVerbose)
MACRO DEFINITIONS ///.
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Gia_ManAndNum(Gia_Man_t *p)
static int Gia_ObjLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
static Vec_Int_t * Vec_IntStart(int nSize)
void Rsb_ManFree(Rsb_Man_t *p)
static int Abc_LitIsCompl(int Lit)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Bdc_Fun_t_ Bdc_Fun_t
INCLUDES ///.
static void Vec_WrdClear(Vec_Wrd_t *p)
static void Vec_WrdWriteEntry(Vec_Wrd_t *p, int i, word Entry)
static void Gia_ObjSetAndLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Vec_IntEntry(Vec_Int_t *p, int i)
unsigned __int64 word
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_END
void Bdc_FuncSetCopyInt(Bdc_Fun_t *p, int iCopy)
static void Vec_WrdFree(Vec_Wrd_t *p)
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_ManCleanLevels(Gia_Man_t *p, int Size)
word Shr_ManComputeTruth6(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vLeaves, Vec_Wrd_t *vTruths)
void Gia_ManFillValue(Gia_Man_t *p)
static int Shr_ManCollectDivisors(Shr_Man_t *p, Vec_Int_t *vLeaves, int Limit, int nFanoutMax)
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
static void Vec_IntFreeP(Vec_Int_t **p)
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
static int Gia_ObjIsTravIdCurrentId(Gia_Man_t *p, int Id)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
static Vec_Wrd_t * Vec_WrdAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
#define ABC_NAMESPACE_IMPL_START
Shr_Man_t * Shr_ManAlloc(Gia_Man_t *pGia)
FUNCTION DEFINITIONS ///.
static Vec_Wrd_t * Vec_WrdStart(int nSize)
static ABC_NAMESPACE_IMPL_START word Truth[8]
DECLARATIONS ///.
static int Vec_IntSize(Vec_Int_t *p)
static int Gia_ManHasMapping(Gia_Man_t *p)
#define ABC_CONST(number)
PARAMETERS ///.
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
static word Vec_WrdEntry(Vec_Wrd_t *p, int i)
static int Abc_Lit2Var(int Lit)
#define ABC_CALLOC(type, num)
static int Gia_ObjFaninId0p(Gia_Man_t *p, Gia_Obj_t *pObj)
Vec_Int_t * Rsb_ManGetFanins(Rsb_Man_t *p)
static int Shr_ManFanIterStart(Shr_Man_t *p, int iNode)
static int Bdc_FunFanin0Copy(Bdc_Fun_t *pObj)
int Bdc_ManNodeNum(Bdc_Man_t *p)
static int Shr_ManFanIterNext(Shr_Man_t *p)
void Bdc_ManFree(Bdc_Man_t *p)
static int Gia_ObjIsLut(Gia_Man_t *p, int Id)
void Gia_ManHashAlloc(Gia_Man_t *p)
static int Bdc_FunObjCopy(Bdc_Fun_t *pObj)
#define Gia_ManForEachObj1(p, pObj, i)
void Gia_ManIncrementTravId(Gia_Man_t *p)
Gia_Man_t * Gia_ManMapShrink6(Gia_Man_t *p, int nFanoutMax, int fKeepLevel, int fVerbose)
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
static void Vec_IntFree(Vec_Int_t *p)
static void Vec_IntClear(Vec_Int_t *p)
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
int Rsb_ManPerformResub6(Rsb_Man_t *p, int nVars, word uTruth, Vec_Wrd_t *vDivTruths, word *puTruth0, word *puTruth1, int fVerbose)
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
static void Gia_ObjSetTravIdCurrentId(Gia_Man_t *p, int Id)
char * Abc_UtilStrsav(char *s)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
void Shr_ManComputeTruths(Gia_Man_t *p, int nVars, Vec_Int_t *vDivs, Vec_Wrd_t *vDivTruths, Vec_Wrd_t *vTruths)
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
#define Gia_LutForEachFanin(p, i, iFan, k)
#define Shr_ObjForEachFanout(p, iNode, iFan)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
static int Gia_ManObjNum(Gia_Man_t *p)
static int Gia_ObjFaninId0(Gia_Obj_t *pObj, int ObjId)
void Gia_ManHashStop(Gia_Man_t *p)
static void Gia_ObjSetLevel(Gia_Man_t *p, Gia_Obj_t *pObj, int l)
static word * Vec_WrdEntryP(Vec_Wrd_t *p, int i)
static int Gia_ManRegNum(Gia_Man_t *p)