47 static char Buffer[100];
48 if ( Wln_NtkHasNameId(
p) && Wln_ObjNameId(
p, iObj) )
49 return Abc_NamStr(
p->pManName, Wln_ObjNameId(
p, iObj) );
55 assert( Wln_ObjIsConst(
p, iObj) );
56 return Abc_NamStr(
p->pManName, Wln_ObjFanin0(
p, iObj) );
60 assert( Wln_ObjIsNone(
p, iObj) );
61 p->nObjs[Wln_ObjType(
p, iObj)]--;
62 Vec_IntWriteEntry( &
p->vTypes, iObj, Type );
63 p->nObjs[Wln_ObjType(
p, iObj)]++;
67 assert( Wln_ObjIsConst(
p, iObj) );
68 Wln_ObjSetFanin(
p, iObj, 0, NameId );
72 assert( Wln_ObjIsSlice(
p, iObj) );
73 Wln_ObjSetFanin(
p, iObj, 1, SliceId );
78 if ( Wln_ObjFaninNum(
p, iObj) < 2 )
79 pVec->Array[pVec->nSize++] = i;
80 else if ( Wln_ObjFaninNum(
p, iObj) == 2 )
83 pArray[0] = pVec->Array[0];
84 pArray[1] = pVec->Array[1];
86 pVec->pArray[0] = pArray;
92 if ( pVec->nSize == pVec->nCap )
93 pVec->pArray[0] =
ABC_REALLOC(
int, pVec->pArray[0], (pVec->nCap = 2*pVec->nSize) );
94 assert( pVec->nSize < pVec->nCap );
95 pVec->pArray[0][pVec->nSize++] = i;
107 int iObj = Vec_IntSize(&
p->vTypes);
108 if ( iObj == Vec_IntCap(&
p->vTypes) )
112 Vec_IntGrow( &
p->vTypes, 2 * iObj );
114 assert( iObj == Vec_StrSize(&
p->vSigns) );
115 assert( iObj == Vec_IntSize(&
p->vRanges) );
116 Vec_IntPush( &
p->vTypes, Type );
117 Vec_StrPush( &
p->vSigns, (
char)Signed );
118 Vec_IntPush( &
p->vRanges, Hash_Int2ManInsert(
p->pRanges, End, Beg, 0) );
119 if ( Wln_ObjIsCi(
p, iObj) ) Wln_ObjSetFanin(
p, iObj, 1, Vec_IntSize(&
p->vCis) ), Vec_IntPush( &
p->vCis, iObj );
120 if ( Wln_ObjIsCo(
p, iObj) ) Wln_ObjSetFanin(
p, iObj, 1, Vec_IntSize(&
p->vCos) ), Vec_IntPush( &
p->vCos, iObj );
121 if ( Wln_ObjIsFf(
p, iObj) ) Vec_IntPush( &
p->vFfs, iObj );
127 return Wln_ObjAlloc( pNew, Wln_ObjType(
p, iObj), Wln_ObjIsSigned(
p, iObj), Wln_ObjRangeEnd(
p, iObj), Wln_ObjRangeBeg(
p, iObj) );
138 int k, iFanin, Type = Wln_ObjType(
p, iObj);
139 printf(
"Obj %6d : Type = %6s Fanins = %d : ", iObj, Abc_OperName(Type), Wln_ObjFaninNum(
p, iObj) );
141 printf(
"%5d ", iFanin );
#define ABC_ALLOC(type, num)
#define ABC_REALLOC(type, obj, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
char * Abc_NamStr(Abc_Nam_t *p, int NameId)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
void Wln_ObjPrint(Wln_Ntk_t *p, int iObj)
void Wln_ObjSetSlice(Wln_Ntk_t *p, int iObj, int SliceId)
void Wln_ObjUpdateType(Wln_Ntk_t *p, int iObj, int Type)
void Wln_ObjAddFanin(Wln_Ntk_t *p, int iObj, int i)
int Wln_ObjCreateCo(Wln_Ntk_t *p, int iFanin)
char * Wln_ObjConstString(Wln_Ntk_t *p, int iObj)
int Wln_ObjAlloc(Wln_Ntk_t *p, int Type, int Signed, int End, int Beg)
int Wln_ObjClone(Wln_Ntk_t *pNew, Wln_Ntk_t *p, int iObj)
void Wln_ObjSetConst(Wln_Ntk_t *p, int iObj, int NameId)
ABC_NAMESPACE_IMPL_START char * Wln_ObjName(Wln_Ntk_t *p, int iObj)
DECLARATIONS ///.
int Wln_ObjAddFanins(Wln_Ntk_t *p, int iObj, Vec_Int_t *vFanins)
typedefABC_NAMESPACE_HEADER_START struct Wln_Vec_t_ Wln_Vec_t
INCLUDES ///.
#define Wln_ObjForEachFanin(p, iObj, iFanin, i)
struct Wln_Ntk_t_ Wln_Ntk_t