30 static inline int Extra_TruthWordNum(
int nVars ) {
return nVars <= 5 ? 1 : (1 << (nVars - 5)); }
31 static inline void Extra_TruthNot(
unsigned * pOut,
unsigned * pIn,
int nVars )
37 static inline void Extra_TruthOr(
unsigned * pOut,
unsigned * pIn0,
unsigned * pIn1,
int nVars )
41 pOut[w] = pIn0[w] | pIn1[w];
43 static inline void Extra_TruthSharp(
unsigned * pOut,
unsigned * pIn0,
unsigned * pIn1,
int nVars )
47 pOut[w] = pIn0[w] & ~pIn1[w];
77 pTruth[i] = ~pTruth[i];
81 float Prob = (float)2.0 * dProb * (1.0 - dProb);
82 assert( Prob >= 0.0 && Prob <= 0.5 );
107 for ( i = 0; i < nVars; i++ )
110 for ( i = nVars + 1; i < nNodes; i++ )
135 int i, nGainTotal = 0, nNodes1, nNodes2;
138 pPars->fVerbose = fVerbose;
139 if ( pPars->nVarsMax < 2 )
141 printf(
"Resynthesis is not performed for networks whose nodes are less than 2 inputs.\n" );
144 if ( pPars->nVarsMax > 15 )
147 printf(
"Resynthesis is not performed for nodes with more than 15 inputs.\n" );
148 pPars->nVarsMax = 15;
159 nGainTotal += nNodes1 - nNodes2;
165 printf(
"Total gain in AIG nodes = %d. ", nGainTotal );
Bdc_Fun_t * Bdc_ManRoot(Bdc_Man_t *p)
void Nwk_ManBidecResyn(Nwk_Man_t *pNtk, int fVerbose)
static Hop_Obj_t * Bdc_FunCopyHop(Bdc_Fun_t *pObj)
static Hop_Obj_t * Hop_ManConst1(Hop_Man_t *p)
Hop_Obj_t * Hop_And(Hop_Man_t *p, Hop_Obj_t *p0, Hop_Obj_t *p1)
int Hop_DagSize(Hop_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Nwk_Obj_t_ Nwk_Obj_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Bdc_Man_t * Bdc_ManAlloc(Bdc_Par_t *pPars)
MACRO DEFINITIONS ///.
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 abctime Abc_Clock()
static int Nwk_ObjFaninNum(Nwk_Obj_t *p)
Bdc_Fun_t * Bdc_ManFunc(Bdc_Man_t *p, int i)
DECLARATIONS ///.
static Hop_Obj_t * Hop_ManPi(Hop_Man_t *p, int i)
void Bdc_FuncSetCopy(Bdc_Fun_t *p, void *pCopy)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Bdc_Fun_t_ Bdc_Fun_t
INCLUDES ///.
static void Extra_TruthNot(unsigned *pOut, unsigned *pIn, int nVars)
#define ABC_NAMESPACE_IMPL_END
static int Hop_IsComplement(Hop_Obj_t *p)
static void Extra_TruthSharp(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars)
Bdc_Fun_t * Bdc_FuncFanin0(Bdc_Fun_t *p)
ABC_DLL int Nwk_ManGetFaninMax(Nwk_Man_t *pNtk)
#define ABC_NAMESPACE_IMPL_START
static int Bdc_IsComplement(Bdc_Fun_t *p)
static Hop_Obj_t * Hop_NotCond(Hop_Obj_t *p, int c)
static ABC_NAMESPACE_IMPL_START int Extra_TruthWordNum(int nVars)
DECLARATIONS ///.
static void Extra_TruthOr(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars)
unsigned * Hop_ManConvertAigToTruth(Hop_Man_t *p, Hop_Obj_t *pRoot, int nVars, Vec_Int_t *vTruth, int fMsbFirst)
int Bdc_ManNodeNum(Bdc_Man_t *p)
Hop_Obj_t * Nwk_NodeIfNodeResyn(Bdc_Man_t *p, Hop_Man_t *pHop, Hop_Obj_t *pRoot, int nVars, Vec_Int_t *vTruth, unsigned *puCare, float dProb)
FUNCTION DEFINITIONS ///.
void Bdc_ManFree(Bdc_Man_t *p)
Bdc_Fun_t * Bdc_FuncFanin1(Bdc_Fun_t *p)
void * Bdc_FuncCopy(Bdc_Fun_t *p)
static void Vec_IntFree(Vec_Int_t *p)
static Hop_Obj_t * Hop_Regular(Hop_Obj_t *p)
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
static Bdc_Fun_t * Bdc_Regular(Bdc_Fun_t *p)
#define Nwk_ManForEachNode(p, pObj, i)