21 #ifndef ABC__map__mpm__mig__h
22 #define ABC__map__mpm__mig__h
37 #define MIG_NONE 0x7FFFFFFF
40 #define MIG_MASK 0x0000FFF
226 *((
void **)pPage) =
p;
282 assert( iLit0 != iLit1 && iLit0 != iCtrl && iLit1 != iCtrl );
292 assert( iLit0 != iLit1 && iLit0 != iLit2 && iLit1 != iLit2 );
304 #define Mig_ManForEachObj( p, pObj ) \
305 for ( p->iPage = 0; p->iPage < Vec_PtrSize(&p->vPages) && \
306 ((p->pPage) = (Mig_Obj_t *)Vec_PtrEntry(&p->vPages, p->iPage)); p->iPage++ ) \
307 for ( pObj = p->pPage; !Mig_ObjIsNone(pObj); pObj++ )
308 #define Mig_ManForEachObj1( p, pObj ) \
309 for ( p->iPage = 0; p->iPage < Vec_PtrSize(&p->vPages) && \
310 ((p->pPage) = (Mig_Obj_t *)Vec_PtrEntry(&p->vPages, p->iPage)); p->iPage++ ) \
311 for ( pObj = p->pPage + (p->iPage == 0); !Mig_ObjIsNone(pObj); pObj++ )
312 #define Mig_ManForEachObjReverse( p, pObj ) \
313 for ( p->iPage = Vec_PtrSize(&p->vPages) - 1; p->iPage >= 0 && \
314 ((p->pPage) = (Mig_Obj_t *)Vec_PtrEntry(&p->vPages, p->iPage)); p->iPage-- ) \
315 for ( pObj = (p->iPage == Vec_PtrSize(&p->vPages) - 1) ? \
316 Mig_ManObj(p, Mig_ManObjNum(p)-1) : p->pPage + MIG_MASK; \
317 pObj - p->pPage >= 0; pObj-- )
319 #define Mig_ManForEachObjVec( vVec, p, pObj, i ) \
320 for ( i = 0; (i < Vec_IntSize(vVec)) && ((pObj) = Mig_ManObj(p, Vec_IntEntry(vVec,i))); i++ )
322 #define Mig_ManForEachNode( p, pObj ) \
323 Mig_ManForEachObj( p, pObj ) if ( !Mig_ObjIsNode(pObj) ) {} else
324 #define Mig_ManForEachCand( p, pObj ) \
325 Mig_ManForEachObj( p, pObj ) if ( !Mig_ObjIsCand(pObj) ) {} else
327 #define Mig_ManForEachCi( p, pObj, i ) \
328 for ( i = 0; (i < Vec_IntSize(&p->vCis)) && ((pObj) = Mig_ManCi(p, i)); i++ )
329 #define Mig_ManForEachCo( p, pObj, i ) \
330 for ( i = 0; (i < Vec_IntSize(&p->vCos)) && ((pObj) = Mig_ManCo(p, i)); i++ )
333 #define Mig_ObjForEachFaninId( p, iFanin, i ) \
334 for ( i = 0; Mig_ObjHasFanin(p, i) && ((iFanin) = Mig_ObjFaninId(p, i)); i++ )
335 #define Mig_ObjForEachFanin( p, pFanin, i ) \
336 for ( i = 0; Mig_ObjHasFanin(p, i) && ((pFanin) = Mig_ObjFanin(p, i)); i++ )
static void Mig_ObjSetCioId(Mig_Obj_t *p, int v)
static int Mig_ManNodeNum(Mig_Man_t *p)
static Mig_Obj_t * Mig_ManPo(Mig_Man_t *p, int v)
static int Mig_ObjCopy(Mig_Obj_t *p)
static int Mig_ManObjNum(Mig_Man_t *p)
static void Mig_ObjSetSiblId(Mig_Obj_t *p, int s)
static void Mig_ObjSetId(Mig_Obj_t *p, int v)
static int Mig_ManChoiceNum(Mig_Man_t *p)
static int Mig_ObjIsMux(Mig_Obj_t *p)
static Mig_Man_t * Mig_ObjMan(Mig_Obj_t *p)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static Mig_Obj_t * Mig_ManConst0(Mig_Man_t *p)
static int Mig_ObjIsAnd(Mig_Obj_t *p)
static int Mig_FanId(Mig_Obj_t *p, int i)
static void Mig_ObjSetPhase(Mig_Obj_t *p, int v)
static Mig_Obj_t * Mig_ManObj(Mig_Man_t *p, int v)
static int Mig_ObjIsNode3(Mig_Obj_t *p)
Mig_Man_t * Mig_ManStart()
FUNCTION DECLARATIONS ///.
static Mig_Obj_t * Mig_ObjFanin(Mig_Obj_t *p, int i)
static int Mig_ObjIsNode2(Mig_Obj_t *p)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Mig_ObjIsTerm(Mig_Obj_t *p)
static int Mig_ManIdToCioId(Mig_Man_t *p, int Id)
#define MIG_NONE
INCLUDES ///.
static int Mig_ObjFaninC0(Mig_Obj_t *p)
static int Mig_ObjRefNum(Mig_Obj_t *p)
static int Mig_IdCell(int v)
static int Mig_ObjIsRo(Mig_Obj_t *p)
static int Mig_ManAppendXor(Mig_Man_t *p, int iLit0, int iLit1)
static int Abc_Var2Lit(int Var, int fCompl)
static int Mig_ManCandNum(Mig_Man_t *p)
static int Mig_ObjIsNode(Mig_Obj_t *p)
static int Mig_ObjIsNone(Mig_Obj_t *p)
static int Mig_ManCoNum(Mig_Man_t *p)
static int Mig_IdPage(int v)
int Mig_ManAndNum(Mig_Man_t *p)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static void Vec_IntSetEntry(Vec_Int_t *p, int i, int Entry)
static int Mig_ObjFaninC(Mig_Obj_t *p, int i)
static int Mig_ObjIsRi(Mig_Obj_t *p)
static int Mig_ManCoIdToId(Mig_Man_t *p, int CoId)
static int Mig_ObjPhase(Mig_Obj_t *p)
static int Mig_ManAppendCo(Mig_Man_t *p, int iLit0)
static int Vec_IntGetEntry(Vec_Int_t *p, int i)
static Mig_Obj_t * Mig_ManRi(Mig_Man_t *p, int v)
static Mig_Obj_t * Mig_ManAppendObj(Mig_Man_t *p)
static int Mig_ObjIsCi(Mig_Obj_t *p)
static Mig_Obj_t * Mig_ObjSibl(Mig_Obj_t *p)
static int Mig_ObjIsTravIdCurrent(Mig_Obj_t *p)
static int Vec_PtrSize(Vec_Ptr_t *p)
static int Mig_ObjIsTravIdPrevious(Mig_Obj_t *p)
static int Mig_FanIsNone(Mig_Obj_t *p, int i)
void Mig_ManStop(Mig_Man_t *p)
static int Mig_ObjId(Mig_Obj_t *p)
int Mig_ManXorNum(Mig_Man_t *p)
static void Mig_ObjSetFaninLit(Mig_Obj_t *p, int i, int l)
static int Mig_ObjCioId(Mig_Obj_t *p)
static Mig_Obj_t * Mig_ObjRoToRi(Mig_Obj_t *p)
static int Mig_ManCiNum(Mig_Man_t *p)
static int Mig_ObjIsPi(Mig_Obj_t *p)
static int Mig_ObjHasFanin(Mig_Obj_t *p, int i)
static int Mig_ObjIsConst0(Mig_Obj_t *p)
static Mig_Obj_t * Mig_ObjFanin1(Mig_Obj_t *p)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static Mig_Obj_t * Mig_ManPi(Mig_Man_t *p, int v)
static int Abc_LitIsCompl(int Lit)
static int Mig_ObjIsCand(Mig_Obj_t *p)
static int Mig_ObjIsBuf(Mig_Obj_t *p)
static int Mig_ObjIsPo(Mig_Obj_t *p)
static int Mig_ManAppendBuf(Mig_Man_t *p, int iLit0)
static void Mig_ObjSetTravIdCurrent(Mig_Obj_t *p)
static Mig_Obj_t * Mig_ManRo(Mig_Man_t *p, int v)
static Mig_Obj_t * Mig_ManPage(Mig_Man_t *p, int v)
static int Mig_ObjWhatFanin(Mig_Obj_t *p, int i)
static void Mig_ManSetRegNum(Mig_Man_t *p, int v)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Mig_ObjFaninId1(Mig_Obj_t *p)
static int Mig_ObjFaninId2(Mig_Obj_t *p)
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
static Mig_Obj_t * Mig_ObjFanin0(Mig_Obj_t *p)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
int Mig_ManMuxNum(Mig_Man_t *p)
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
static int Mig_ObjIsXor(Mig_Obj_t *p)
static int Mig_ManPoNum(Mig_Man_t *p)
static int Mig_ManCiIdToId(Mig_Man_t *p, int CiId)
static void Mig_ManCleanCopy(Mig_Man_t *p)
static int Mig_FanCompl(Mig_Obj_t *p, int i)
static int Mig_ObjIsTravIdCurrentId(Mig_Man_t *p, int Id)
static Mig_Obj_t * Mig_ObjFanin2(Mig_Obj_t *p)
#define ABC_NAMESPACE_HEADER_END
static int Mig_ObjSiblId(Mig_Obj_t *p)
static int Mig_ObjFaninC1(Mig_Obj_t *p)
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static Mig_Obj_t * Mig_ManCi(Mig_Man_t *p, int v)
static int Mig_ObjFaninId(Mig_Obj_t *p, int i)
static int Abc_LitNot(int Lit)
static void Mig_ManIncrementTravId(Mig_Man_t *p)
static int Vec_IntSize(Vec_Int_t *p)
static int Mig_ObjFaninC2(Mig_Obj_t *p)
static void Mig_ObjSetCopy(Mig_Obj_t *p, int i)
static int Mig_ObjFaninId0(Mig_Obj_t *p)
static int Mig_ManAppendMux(Mig_Man_t *p, int iLit0, int iLit1, int iCtrl)
void Mig_ManSetRefs(Mig_Man_t *p)
static int Mig_FanSetId(Mig_Obj_t *p, int i, int v)
static int Mig_FanSetCompl(Mig_Obj_t *p, int i, int v)
static int Mig_ManPiNum(Mig_Man_t *p)
static int Mig_ManAppendMaj(Mig_Man_t *p, int iLit0, int iLit1, int iLit2)
static int Abc_Lit2Var(int Lit)
static int Mig_ManAppendAnd(Mig_Man_t *p, int iLit0, int iLit1)
static Mig_Obj_t * Mig_ObjObj(Mig_Obj_t *p, int i)
static void Mig_ObjFlipFaninC(Mig_Obj_t *p, int i)
static Mig_Obj_t * Mig_ManCo(Mig_Man_t *p, int v)
static int Mig_ManAppendCi(Mig_Man_t *p)
static void Mig_ObjSetTravIdCurrentId(Mig_Man_t *p, int Id)
static char * Mig_ManName(Mig_Man_t *p)
static int Mig_ObjNodeType(Mig_Obj_t *p)
static int Mig_ObjIsCo(Mig_Obj_t *p)
static Mig_Obj_t * Mig_ObjRiToRo(Mig_Obj_t *p)
#define ABC_FALLOC(type, num)
static int Mig_ObjFaninLit(Mig_Obj_t *p, int i)
static void Mig_ObjIncrementTravId(Mig_Obj_t *p)
static int Mig_ManRegNum(Mig_Man_t *p)
static void Mig_ObjSetTravIdPrevious(Mig_Obj_t *p)