54 #define Aig_DomForEachNode( pAig, pDom, pNode, i ) \
55 for ( i = 0; (i < pDom->nNodes) && ((pNode) = Aig_ManObj(pAig, (pDom)->pNodes[i])); i++ )
100 pDom->
uSign = (1 << (Id % 63));
168 printf(
"%4d : {", Num );
169 for ( k = 0; k < pDom->
nNodes; k++ )
170 printf(
" %4d", pDom->
pNodes[k] );
171 for ( ; k < pSto->Limit; k++ )
212 printf(
"*** PI %4d %4d :\n", i, pObj->
Id );
257 for ( i = 1; i < pDom->
nNodes; i++ )
261 Abc_Print( -1,
"Aig_ObjDomCheck(): Cut has wrong ordering of inputs.\n" );
283 for ( i = 0; i < pDom->
nNodes; i++ )
285 for ( k = 0; k < (int)pCut->
nNodes; k++ )
288 if ( k == (
int)pCut->
nNodes )
326 pSto->nDomsFilter1++;
337 pSto->nDomsFilter2++;
363 for ( i = 0; i < pD0->
nNodes; i++ )
366 for ( i = 0; i < pD0->
nNodes; i++ )
372 if ( pD0->
nNodes == Limit )
374 for ( i = 0; i < pD1->
nNodes; i++ )
376 for ( k = pD0->
nNodes - 1; k >= 0; k-- )
382 for ( i = 0; i < pD0->
nNodes; i++ )
390 for ( c = 0; c < (int)Limit; c++ )
425 if ( i < pD0->nNodes || k < pD1->nNodes )
542 Vec_Ptr_t * vDoms0, * vDoms1, * vDoms2, * vDomsT;
643 printf(
"Nodes =%4d. Flops =%4d. Doms =%9d. Ave =%8.2f. ",
644 pSto->nDomNodes,
Aig_ManRegNum(pSto->pAig), pSto->nDomsTotal,
646 1.0 * pSto->nDomsTotal / (pSto->nDomNodes +
Aig_ManRegNum(pSto->pAig)) );
684 printf(
"Nodes =%4d. PIs =%4d. Doms =%9d. Ave =%8.2f. ",
685 pSto->nDomNodes,
Saig_ManPiNum(pSto->pAig), pSto->nDomsTotal,
687 1.0 * pSto->nDomsTotal / (pSto->nDomNodes +
Saig_ManPiNum(pSto->pAig)) );
723 printf(
"Nodes =%6d. Doms =%9d. Ave =%8.2f. ",
724 pSto->nDomNodes, pSto->nDomsTotal,
726 1.0 * pSto->nDomsTotal / pSto->nDomNodes );
751 if ( vDoms1 == NULL )
827 if ( --pNode->
nRefs > 0 )
855 if ( pNode->
nRefs++ > 0 )
882 int i, Counter0, Counter1;
899 assert( Counter0 == Counter1 );
987 printf(
"The cut has %d non-trivial %d-dominators.\n",
Vec_PtrSize(vDoms), pSto->Limit );
1024 printf(
"ITERATION %d:\n", Num );
1075 int i, k, Entry, iFanout, fPrint = 0;
1095 printf(
"%6d : Level =%4d. Fanout =%6d.\n",
1099 printf(
"%d(%d) ", Entry,
Vec_IntEntry(pSto->vTimes, Entry) );
#define Aig_ObjForEachFanout(p, pObj, pFanout, iFan, i)
static Vec_Ptr_t * Vec_PtrStart(int nSize)
void Aig_ManDomStop(Aig_Sto_t *pSto)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static int Aig_ObjDomCheckDominance(Aig_Dom_t *pDom, Aig_Dom_t *pCut)
void Aig_ObjDomCount(Aig_Sto_t *pSto, Aig_Obj_t *pObj)
int Aig_ObjDomVolume_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
#define Vec_PtrForEachEntryStart(Type, vVec, pEntry, i, Start)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
void Aig_ObjPoLogicRef(Aig_Sto_t *pSto)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
void Aig_ManMarkFlopTfi(Aig_Man_t *p)
int Aig_ManMarkFlopTfi_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
Aig_Sto_t * Aig_ManComputeDomsFlops(Aig_Man_t *pAig, int Limit)
void Aig_MmFixedStop(Aig_MmFixed_t *p, int fVerbose)
static int Aig_ObjDomMergeOrdered(Aig_Dom_t *pD0, Aig_Dom_t *pD1, Aig_Dom_t *pD, int Limit)
int Aig_ObjDomRef_rec(Aig_Obj_t *pNode)
void Aig_ObjAddTriv(Aig_Sto_t *pSto, int Id, Vec_Ptr_t *vDoms)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
int Aig_ObjDomDomed(Aig_Sto_t *pSto, Aig_Dom_t *pDom)
void Aig_ManDomPrint(Aig_Sto_t *pSto)
static int Aig_IsComplement(Aig_Obj_t *p)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define Aig_ManForEachCo(p, pObj, i)
void Aig_ObjPoLogicDeref(Aig_Sto_t *pSto)
void Aig_MmFixedEntryRecycle(Aig_MmFixed_t *p, char *pEntry)
static abctime Abc_Clock()
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
int Aig_ObjDomMergeTwo(Aig_Dom_t *pDom0, Aig_Dom_t *pDom1, Aig_Dom_t *pDom, int Limit)
static int Vec_PtrSize(Vec_Ptr_t *p)
Aig_MmFixed_t * Aig_MmFixedStart(int nEntrySize, int nEntriesMax)
FUNCTION DEFINITIONS ///.
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
static void Vec_PtrRemove(Vec_Ptr_t *p, void *Entry)
void Aig_ManFanoutStart(Aig_Man_t *p)
FUNCTION DEFINITIONS ///.
Vec_Ptr_t * Aig_ObjDomCollect(Aig_Sto_t *pSto, Vec_Int_t *vCut)
void Aig_ManFanoutStop(Aig_Man_t *p)
Vec_Ptr_t * Aig_ObjDomVecDup(Aig_Sto_t *pSto, Vec_Ptr_t *vDoms, int fSkip1)
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
static void Abc_PrintTime(int level, const char *pStr, abctime time)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
void Aig_ObjDomUnion(Aig_Sto_t *pSto, Vec_Ptr_t *vDoms2, Vec_Ptr_t *vDoms1)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static Vec_Int_t * Vec_IntStart(int nSize)
int Aig_ObjDomDeref_rec(Aig_Obj_t *pNode)
static int Aig_WordCountOnes(unsigned uWord)
Vec_Int_t * Aig_ObjDomCollectLos(Aig_Sto_t *pSto)
void Aig_ManComputeDomsTest2(Aig_Man_t *pAig, int Num)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Vec_PtrPushFirst(Vec_Ptr_t *p, void *Entry)
#define Saig_ManForEachLi(p, pObj, i)
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
int Aig_ObjDomVolume(Aig_Sto_t *pSto, Aig_Dom_t *pDom)
void Aig_ObjDomCompute(Aig_Sto_t *pSto, Aig_Obj_t *pObj)
int Aig_ObjDomCheck(Aig_Dom_t *pDom)
static int Vec_IntEntry(Vec_Int_t *p, int i)
#define ABC_NAMESPACE_IMPL_END
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
char * Aig_MmFixedEntryFetch(Aig_MmFixed_t *p)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
void Aig_ObjDomVecRecycle(Aig_Sto_t *pSto, Vec_Ptr_t *vDoms)
#define Saig_ManForEachLo(p, pObj, i)
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
static void Abc_Print(int level, const char *format,...)
int Aig_ObjDomFilter(Aig_Sto_t *pSto, Vec_Ptr_t *vDoms, Aig_Dom_t *pDom)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
static int Aig_ManObjNumMax(Aig_Man_t *p)
Vec_Ptr_t * Aig_ManDfsReverse(Aig_Man_t *p)
Aig_Sto_t * Aig_ManDomStart(Aig_Man_t *pAig, int Limit)
FUNCTION DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_START
void Aig_ObjDomPrint(Aig_Sto_t *pSto, Aig_Dom_t *pDom, int Num)
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
void Aig_ObjDomFindGood(Aig_Sto_t *pSto)
static int Aig_ManRegNum(Aig_Man_t *p)
static int Vec_IntSize(Vec_Int_t *p)
#define Aig_ManForEachObj(p, pObj, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
Aig_Sto_t * Aig_ManComputeDomsPis(Aig_Man_t *pAig, int Limit)
void Aig_ManComputeDomsTest(Aig_Man_t *pAig)
void Aig_ManCleanMarkA(Aig_Man_t *p)
#define ABC_CALLOC(type, num)
static int Aig_ObjLevel(Aig_Obj_t *pObj)
Vec_Ptr_t * Aig_ObjDomMerge(Aig_Sto_t *pSto, Vec_Ptr_t *vDoms0, Vec_Ptr_t *vDoms1)
#define Saig_ManForEachPo(p, pObj, i)
static int Aig_ObjId(Aig_Obj_t *pObj)
typedefABC_NAMESPACE_IMPL_START struct Aig_Sto_t_ Aig_Sto_t
DECLARATIONS ///.
void Aig_ObjDomVecPrint(Aig_Sto_t *pSto, Vec_Ptr_t *vDoms)
void Aig_ManComputeDomsForCofactoring(Aig_Man_t *pAig)
static int Aig_ObjRefs(Aig_Obj_t *pObj)
#define Aig_DomForEachNode(pAig, pDom, pNode, i)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static int Vec_IntPushUnique(Vec_Int_t *p, int Entry)
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
static void Vec_IntClear(Vec_Int_t *p)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Aig_Sto_t * Aig_ManComputeDomsNodes(Aig_Man_t *pAig, int Limit)
static void Vec_PtrFree(Vec_Ptr_t *p)
#define Saig_ManForEachPi(p, pObj, i)