21#ifndef ABC__map__amap__amapInt_h
22#define ABC__map__amap__amapInt_h
46#define AMAP_STRING_CONST0 "CONST0"
47#define AMAP_STRING_CONST1 "CONST1"
225static inline int Amap_IsComplement(
Amap_Obj_t *
p ) {
return (
int )(((ABC_PTRUINT_T)
p) & 01); }
232static inline int Amap_ManObjNum(
Amap_Man_t *
p ) {
return Vec_PtrSize(
p->vObjs); }
248static inline int Amap_ObjToLit(
Amap_Obj_t * pObj ) {
return Abc_Var2Lit( Amap_Regular(pObj)->Id, Amap_IsComplement(pObj) ); }
252static inline int Amap_ObjFaninC0(
Amap_Obj_t * pObj ) {
return Abc_LitIsCompl(pObj->
Fan[0]); }
253static inline int Amap_ObjFaninC1(
Amap_Obj_t * pObj ) {
return Abc_LitIsCompl(pObj->
Fan[1]); }
254static inline int Amap_ObjFaninC2(
Amap_Obj_t * pObj ) {
return Abc_LitIsCompl(pObj->
Fan[2]); }
255static inline void * Amap_ObjCopy(
Amap_Obj_t * pObj ) {
return pObj->
pData; }
256static inline int Amap_ObjLevel(
Amap_Obj_t * pObj ) {
return pObj->
Level; }
257static inline void Amap_ObjSetLevel(
Amap_Obj_t * pObj,
int Level ) { pObj->
Level = Level; }
258static inline void Amap_ObjSetCopy(
Amap_Obj_t * pObj,
void * pCopy ) { pObj->
pData = pCopy; }
261static inline int Amap_ObjPhaseReal(
Amap_Obj_t * pObj ) {
return Amap_Regular(pObj)->fPhase ^ Amap_IsComplement(pObj); }
281#define Amap_ManForEachPi( p, pObj, i ) \
282 Vec_PtrForEachEntry( Amap_Obj_t *, p->vPis, pObj, i )
284#define Amap_ManForEachPo( p, pObj, i ) \
285 Vec_PtrForEachEntry( Amap_Obj_t *, p->vPos, pObj, i )
287#define Amap_ManForEachObj( p, pObj, i ) \
288 Vec_PtrForEachEntry( Amap_Obj_t *, p->vObjs, pObj, i ) if ( (pObj) == NULL ) {} else
290#define Amap_ManForEachNode( p, pObj, i ) \
291 Vec_PtrForEachEntry( Amap_Obj_t *, p->vObjs, pObj, i ) if ( (pObj) == NULL || !Amap_ObjIsNode(pObj) ) {} else
294#define Amap_LibForEachGate( pLib, pGate, i ) \
295 Vec_PtrForEachEntry( Amap_Gat_t *, pLib->vGates, pGate, i )
297#define Amap_GateForEachPin( pGate, pPin ) \
298 for ( pPin = pGate->Pins; pPin < pGate->Pins + pGate->nPins; pPin++ )
301#define Amap_NodeForEachCut( pNode, pCut, i ) \
302 for ( i = 0, pCut = (Amap_Cut_t *)pNode->pData; i < (int)pNode->nCuts; \
303 i++, pCut = Amap_ManCutNext(pCut) )
306#define Amap_LibNodeForEachSet( pNod, pSet ) \
307 for ( pSet = pNod->pSets; pSet; pSet = pSet->pNext )
310#define Amap_MatchForEachFaninCompl( p, pM, pFanin, fCompl, i ) \
311 for ( i = 0; i < (int)(pM)->pCut->nFans && \
312 ((pFanin = Amap_ManObj((p), Abc_Lit2Var((pM)->pCut->Fans[Abc_Lit2Var((pM)->pSet->Ins[i])]))), 1) && \
313 ((fCompl = Abc_LitIsCompl((pM)->pSet->Ins[i]) ^ Abc_LitIsCompl((pM)->pCut->Fans[Abc_Lit2Var((pM)->pSet->Ins[i])])), 1); \
317#define Amap_MatchForEachFanin( p, pM, pFanin, i ) \
318 for ( i = 0; i < (int)(pM)->pCut->nFans && \
319 ((pFanin = Amap_ManObj((p), Abc_Lit2Var((pM)->pCut->Fans[Abc_Lit2Var((pM)->pSet->Ins[i])]))), 1); \
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
struct Aig_MmFlex_t_ Aig_MmFlex_t
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
struct Aig_MmFixed_t_ Aig_MmFixed_t
struct Amap_Obj_t_ Amap_Obj_t
void Amap_LibCreateRules(Amap_Lib_t *p, int fVeryVerbose)
int Amap_LibNumPinsMax(Amap_Lib_t *p)
struct Amap_Man_t_ Amap_Man_t
void Amap_ManStop(Amap_Man_t *p)
Amap_Man_t * Amap_ManStart(int nNodes)
DECLARATIONS ///.
struct Amap_Set_t_ Amap_Set_t
Amap_Lib_t * Amap_LibReadFile(char *pFileName, int fVerbose)
int Amap_LibCreateMux(Amap_Lib_t *p, int iFan0, int iFan1, int iFan2)
int Amap_LibFindNode(Amap_Lib_t *pLib, int iFan0, int iFan1, int fXor)
void Amap_ManMerge(Amap_Man_t *p)
Amap_Lib_t * Amap_LibAlloc()
DECLARATIONS ///.
int Amap_LibCreateVar(Amap_Lib_t *p)
Amap_Obj_t * Amap_ManCreatePo(Amap_Man_t *p, Amap_Obj_t *pFan0)
Vec_Ptr_t * Amap_ManProduceMapped(Amap_Man_t *p)
struct Amap_Gat_t_ Amap_Gat_t
void Amap_ManCreate(Amap_Man_t *p, Aig_Man_t *pAig)
int ** Amap_LibLookupTableAlloc(Vec_Ptr_t *vVec, int fVerbose)
int Amap_LibParseEquations(Amap_Lib_t *p, int fVerbose)
void Kit_DsdPrintFromTruth(unsigned *pTruth, int nVars)
void Amap_ManCreateChoice(Amap_Man_t *p, Amap_Obj_t *pObj)
struct Amap_Mat_t_ Amap_Mat_t
Amap_Obj_t * Amap_ManCreatePi(Amap_Man_t *p)
FUNCTION DECLARATIONS ///.
Amap_Obj_t * Amap_ManCreateXor(Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1)
int Amap_LibCreateNode(Amap_Lib_t *p, int iFan0, int iFan1, int fXor)
Amap_Obj_t * Amap_ManCreateAnd(Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1)
Amap_Lib_t * Amap_LibReadBuffer(char *pBuffer, int fVerbose)
struct Amap_Nod_t_ Amap_Nod_t
Amap_Obj_t * Amap_ManCreateMux(Amap_Man_t *p, Amap_Obj_t *pFanC, Amap_Obj_t *pFan1, Amap_Obj_t *pFan0)
struct Amap_Cut_t_ Amap_Cut_t
#define AMAP_MAXINS
INCLUDES ///.
short * Amap_LibTableFindNode(Amap_Lib_t *p, int iFan0, int iFan1, int fXor)
void Amap_ManMap(Amap_Man_t *p)
void Amap_LibWrite(FILE *pFile, Amap_Lib_t *pLib, int fPrintDsd)
int Amap_LibFindMux(Amap_Lib_t *p, int iFan0, int iFan1, int iFan2)
Vec_Ptr_t * Amap_LibSelectGates(Amap_Lib_t *p, int fVerbose)
struct Amap_Pin_t_ Amap_Pin_t
BASIC TYPES ///.
struct Amap_Par_t_ Amap_Par_t
typedefABC_NAMESPACE_HEADER_START struct Amap_Lib_t_ Amap_Lib_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Aig_MmFlex_t * pMemCutBest
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.