21 #ifndef ABC__map__amap__amapInt_h
22 #define ABC__map__amap__amapInt_h
44 #define AMAP_MAXINS 15
46 #define AMAP_STRING_CONST0 "CONST0"
47 #define AMAP_STRING_CONST1 "CONST1"
280 #define Amap_ManForEachPi( p, pObj, i ) \
281 Vec_PtrForEachEntry( Amap_Obj_t *, p->vPis, pObj, i )
283 #define Amap_ManForEachPo( p, pObj, i ) \
284 Vec_PtrForEachEntry( Amap_Obj_t *, p->vPos, pObj, i )
286 #define Amap_ManForEachObj( p, pObj, i ) \
287 Vec_PtrForEachEntry( Amap_Obj_t *, p->vObjs, pObj, i ) if ( (pObj) == NULL ) {} else
289 #define Amap_ManForEachNode( p, pObj, i ) \
290 Vec_PtrForEachEntry( Amap_Obj_t *, p->vObjs, pObj, i ) if ( (pObj) == NULL || !Amap_ObjIsNode(pObj) ) {} else
293 #define Amap_LibForEachGate( pLib, pGate, i ) \
294 Vec_PtrForEachEntry( Amap_Gat_t *, pLib->vGates, pGate, i )
296 #define Amap_GateForEachPin( pGate, pPin ) \
297 for ( pPin = pGate->Pins; pPin < pGate->Pins + pGate->nPins; pPin++ )
300 #define Amap_NodeForEachCut( pNode, pCut, i ) \
301 for ( i = 0, pCut = (Amap_Cut_t *)pNode->pData; i < (int)pNode->nCuts; \
302 i++, pCut = Amap_ManCutNext(pCut) )
305 #define Amap_LibNodeForEachSet( pNod, pSet ) \
306 for ( pSet = pNod->pSets; pSet; pSet = pSet->pNext )
309 #define Amap_MatchForEachFaninCompl( p, pM, pFanin, fCompl, i ) \
310 for ( i = 0; i < (int)(pM)->pCut->nFans && \
311 ((pFanin = Amap_ManObj((p), Abc_Lit2Var((pM)->pCut->Fans[Abc_Lit2Var((pM)->pSet->Ins[i])]))), 1) && \
312 ((fCompl = Abc_LitIsCompl((pM)->pSet->Ins[i]) ^ Abc_LitIsCompl((pM)->pCut->Fans[Abc_Lit2Var((pM)->pSet->Ins[i])])), 1); \
316 #define Amap_MatchForEachFanin( p, pM, pFanin, i ) \
317 for ( i = 0; i < (int)(pM)->pCut->nFans && \
318 ((pFanin = Amap_ManObj((p), Abc_Lit2Var((pM)->pCut->Fans[Abc_Lit2Var((pM)->pSet->Ins[i])]))), 1); \
int Amap_LibNumPinsMax(Amap_Lib_t *p)
void Amap_ManMerge(Amap_Man_t *p)
Amap_Lib_t * Amap_LibReadFile(char *pFileName, int fVerbose)
static Amap_Gat_t * Amap_LibGate(Amap_Lib_t *p, int i)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static void Amap_ObjSetLevel(Amap_Obj_t *pObj, int Level)
static int Amap_ObjFaninC2(Amap_Obj_t *pObj)
static int Amap_ManPiNum(Amap_Man_t *p)
static int Amap_ObjIsXor(Amap_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Amap_ManCreateChoice(Amap_Man_t *p, Amap_Obj_t *pObj)
void Amap_ManCreate(Amap_Man_t *p, Aig_Man_t *pAig)
void Amap_LibWrite(FILE *pFile, Amap_Lib_t *pLib, int fPrintDsd)
void Kit_DsdPrintFromTruth(unsigned *pTruth, int nVars)
static int Amap_ObjPhaseReal(Amap_Obj_t *pObj)
static Amap_Obj_t * Amap_ObjFanin0(Amap_Man_t *p, Amap_Obj_t *pObj)
static Amap_Obj_t * Amap_ManPi(Amap_Man_t *p, int i)
static void Amap_ObjSetChoice(Amap_Obj_t *pObj, Amap_Obj_t *pEqu)
static int Abc_Var2Lit(int Var, int fCompl)
void Amap_ManMap(Amap_Man_t *p)
Amap_Lib_t * Amap_LibAlloc()
DECLARATIONS ///.
static void * Amap_ObjCopy(Amap_Obj_t *pObj)
static int Amap_ManPoNum(Amap_Man_t *p)
static int Vec_PtrSize(Vec_Ptr_t *p)
int Amap_LibFindMux(Amap_Lib_t *p, int iFan0, int iFan1, int iFan2)
Aig_MmFlex_t * pMemCutBest
static int Amap_ObjIsPi(Amap_Obj_t *pObj)
static int Amap_ManAndNum(Amap_Man_t *p)
Vec_Ptr_t * Amap_LibSelectGates(Amap_Lib_t *p, int fVerbose)
static int Amap_ObjIsNode(Amap_Obj_t *pObj)
static int Amap_ObjRefsTotal(Amap_Obj_t *pObj)
static int Amap_ObjIsPo(Amap_Obj_t *pObj)
static int Abc_LitIsCompl(int Lit)
static Amap_Obj_t * Amap_Regular(Amap_Obj_t *p)
int Amap_LibCreateVar(Amap_Lib_t *p)
short * Amap_LibTableFindNode(Amap_Lib_t *p, int iFan0, int iFan1, int fXor)
static int Amap_ObjToLit(Amap_Obj_t *pObj)
static int Amap_ManXorNum(Amap_Man_t *p)
static int Amap_ObjIsMux(Amap_Obj_t *pObj)
#define AMAP_MAXINS
INCLUDES ///.
int ** Amap_LibLookupTableAlloc(Vec_Ptr_t *vVec, int fVerbose)
Amap_Obj_t * Amap_ManCreateMux(Amap_Man_t *p, Amap_Obj_t *pFanC, Amap_Obj_t *pFan1, Amap_Obj_t *pFan0)
static int Amap_IsComplement(Amap_Obj_t *p)
static Amap_Cut_t * Amap_ManCutNext(Amap_Cut_t *pCut)
Amap_Obj_t * Amap_ManCreateAnd(Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1)
Amap_Obj_t * Amap_ManCreatePi(Amap_Man_t *p)
FUNCTION DECLARATIONS ///.
static Amap_Obj_t * Amap_ManConst1(Amap_Man_t *p)
static int Amap_ObjIsConst1(Amap_Obj_t *pObj)
static Amap_Obj_t * Amap_ManPo(Amap_Man_t *p, int i)
int Amap_LibCreateMux(Amap_Lib_t *p, int iFan0, int iFan1, int iFan2)
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
int Amap_LibCreateNode(Amap_Lib_t *p, int iFan0, int iFan1, int fXor)
Amap_Obj_t * Amap_ManCreateXor(Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1)
#define ABC_NAMESPACE_HEADER_END
static Amap_Obj_t * Amap_ObjChoice(Amap_Man_t *p, Amap_Obj_t *pObj)
static Amap_Obj_t * Amap_NotCond(Amap_Obj_t *p, int c)
static int Amap_ManNodeNum(Amap_Man_t *p)
static void Amap_ObjSetCopy(Amap_Obj_t *pObj, void *pCopy)
static int Amap_ManObjNum(Amap_Man_t *p)
static Amap_Obj_t * Amap_ManObj(Amap_Man_t *p, int i)
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static int Amap_ObjFaninC1(Amap_Obj_t *pObj)
static Amap_Obj_t * Amap_ObjFanin1(Amap_Man_t *p, Amap_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Amap_Lib_t_ Amap_Lib_t
INCLUDES ///.
void Amap_ManStop(Amap_Man_t *p)
static int Abc_Lit2Var(int Lit)
Amap_Man_t * Amap_ManStart(int nNodes)
DECLARATIONS ///.
static int Amap_ObjLevel(Amap_Obj_t *pObj)
Vec_Ptr_t * Amap_ManProduceMapped(Amap_Man_t *p)
static Amap_Obj_t * Amap_ObjFanin2(Amap_Man_t *p, Amap_Obj_t *pObj)
Amap_Lib_t * Amap_LibReadBuffer(char *pBuffer, int fVerbose)
int Amap_LibParseEquations(Amap_Lib_t *p, int fVerbose)
static Amap_Obj_t * Amap_Not(Amap_Obj_t *p)
static int Amap_ObjFaninC0(Amap_Obj_t *pObj)
int Amap_LibFindNode(Amap_Lib_t *pLib, int iFan0, int iFan1, int fXor)
Amap_Obj_t * Amap_ManCreatePo(Amap_Man_t *p, Amap_Obj_t *pFan0)
static Amap_Nod_t * Amap_LibNod(Amap_Lib_t *p, int i)
void Amap_LibCreateRules(Amap_Lib_t *p, int fVeryVerbose)
static int Amap_ObjIsAnd(Amap_Obj_t *pObj)
static Amap_Cut_t ** Amap_ManCutNextP(Amap_Cut_t *pCut)
static int Amap_ManMuxNum(Amap_Man_t *p)