48 unsigned * pTruth, * pTruth0, * pTruth1;
60 for ( i = 0; i <
nWords; i++ )
61 pTruth[i] = pTruth0[i] & pTruth1[i];
63 for ( i = 0; i <
nWords; i++ )
64 pTruth[i] = pTruth0[i] & ~pTruth1[i];
66 for ( i = 0; i <
nWords; i++ )
67 pTruth[i] = ~pTruth0[i] & pTruth1[i];
69 for ( i = 0; i <
nWords; i++ )
70 pTruth[i] = ~pTruth0[i] & ~pTruth1[i];
92 static unsigned uTruths[8][8] = {
93 { 0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA },
94 { 0xCCCCCCCC,0xCCCCCCCC,0xCCCCCCCC,0xCCCCCCCC,0xCCCCCCCC,0xCCCCCCCC,0xCCCCCCCC,0xCCCCCCCC },
95 { 0xF0F0F0F0,0xF0F0F0F0,0xF0F0F0F0,0xF0F0F0F0,0xF0F0F0F0,0xF0F0F0F0,0xF0F0F0F0,0xF0F0F0F0 },
96 { 0xFF00FF00,0xFF00FF00,0xFF00FF00,0xFF00FF00,0xFF00FF00,0xFF00FF00,0xFF00FF00,0xFF00FF00 },
97 { 0xFFFF0000,0xFFFF0000,0xFFFF0000,0xFFFF0000,0xFFFF0000,0xFFFF0000,0xFFFF0000,0xFFFF0000 },
98 { 0x00000000,0xFFFFFFFF,0x00000000,0xFFFFFFFF,0x00000000,0xFFFFFFFF,0x00000000,0xFFFFFFFF },
99 { 0x00000000,0x00000000,0xFFFFFFFF,0xFFFFFFFF,0x00000000,0x00000000,0xFFFFFFFF,0xFFFFFFFF },
100 { 0x00000000,0x00000000,0x00000000,0x00000000,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF }
173 int i, iFan, nVars, nNodes;
214 for ( i = nVars + 1; i < nNodes; i++ )
237 Vec_Int_t * vLeaves, * vTruth, * vVisited;
242 pPars->fVerbose = fVerbose;
243 if ( pPars->nVarsMax < 2 )
245 printf(
"Resynthesis is not performed when nodes have less than 2 inputs.\n" );
248 if ( pPars->nVarsMax > 15 )
250 printf(
"Resynthesis is not performed when nodes have more than 15 inputs.\n" );
static void Gia_ManTruthCopy(unsigned *pOut, unsigned *pIn, int nVars)
Bdc_Fun_t * Bdc_ManRoot(Bdc_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
void Gia_ManStop(Gia_Man_t *p)
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_Regular(Gia_Obj_t *p)
static int Gia_ManAppendCi(Gia_Man_t *p)
static int Gia_ObjIsConst0(Gia_Obj_t *pObj)
Bdc_Man_t * Bdc_ManAlloc(Bdc_Par_t *pPars)
MACRO DEFINITIONS ///.
static int Gia_ObjValue(Gia_Obj_t *pObj)
static void Vec_IntSetEntry(Vec_Int_t *p, int i, int Entry)
int Gia_ObjPerformBidec(Bdc_Man_t *pManDec, Gia_Man_t *pNew, Gia_Man_t *p, Gia_Obj_t *pRoot, Vec_Int_t *vLeaves, Vec_Int_t *vTruth, Vec_Int_t *vVisited)
static int Vec_IntGetEntry(Vec_Int_t *p, int i)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
static int Abc_TruthWordNum(int nVars)
int Bdc_ManDecompose(Bdc_Man_t *p, unsigned *puFunc, unsigned *puCare, int nVars, Vec_Ptr_t *vDivs, int nNodesMax)
static unsigned * Vec_IntFetch(Vec_Int_t *p, int nWords)
void Gia_ManCleanTruth(Gia_Man_t *p)
static Gia_Obj_t * Gia_ManConst1(Gia_Man_t *p)
int Gia_ManHasDangling(Gia_Man_t *p)
Bdc_Fun_t * Bdc_ManFunc(Bdc_Man_t *p, int i)
DECLARATIONS ///.
static int Gia_ManTruthIsConst0(unsigned *pIn, int nVars)
static Vec_Ptr_t * Vec_PtrAllocTruthTables(int nVars)
void Bdc_FuncSetCopy(Bdc_Fun_t *p, void *pCopy)
static int Gia_ManAndNum(Gia_Man_t *p)
ABC_NAMESPACE_IMPL_START unsigned * Gia_ManConvertAigToTruth_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vTruth, int nWords, Vec_Int_t *vVisited)
DECLARATIONS ///.
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Bdc_Fun_t_ Bdc_Fun_t
INCLUDES ///.
#define ABC_NAMESPACE_IMPL_END
void Bdc_FuncSetCopyInt(Bdc_Fun_t *p, int iCopy)
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_ManFillValue(Gia_Man_t *p)
static void Gia_ManTruthFill(unsigned *pOut, int nVars)
int Gia_ManLutSizeMax(Gia_Man_t *p)
static void Gia_ManTruthNot(unsigned *pOut, unsigned *pIn, int nVars)
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
#define ABC_NAMESPACE_IMPL_START
unsigned * Gia_ManConvertAigToTruth(Gia_Man_t *p, Gia_Obj_t *pRoot, Vec_Int_t *vLeaves, Vec_Int_t *vTruth, Vec_Int_t *vVisited)
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Gia_Man_t * Gia_ManPerformBidec(Gia_Man_t *p, int fVerbose)
static int Gia_ManTruthIsConst1(unsigned *pIn, int nVars)
static int Vec_IntSize(Vec_Int_t *p)
static int Gia_IsComplement(Gia_Obj_t *p)
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
static int Bdc_FunFanin0Copy(Bdc_Fun_t *pObj)
int Bdc_ManNodeNum(Bdc_Man_t *p)
static int * Vec_IntEntryP(Vec_Int_t *p, int i)
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)
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)
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
char * Abc_UtilStrsav(char *s)
#define Gia_LutForEachFanin(p, i, iFan, k)
static void Gia_ManTruthClear(unsigned *pOut, int nVars)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
static int Gia_ManObjNum(Gia_Man_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)
void Gia_ManHashStop(Gia_Man_t *p)
static int Gia_ManRegNum(Gia_Man_t *p)