87 static char Buffer[2000];
105 static char Buffer[2000];
123 static char Buffer[2000];
124 sprintf( Buffer,
"%s%0*d", pPrefix, nDigits, Num );
228 for ( i = 0; i < nNames; i++ )
237 Buffer[0] =
'a' + i%26;
238 Buffer[1] =
'0' + i/26;
260 if ( vNames == NULL )
262 for ( i = 0; i < vNames->nSize; i++ )
311 int Diff =
strcmp( (
char *)(*pp1)->pCopy, (
char *)(*pp2)->pCopy );
316 Diff = (*pp1)->Id - (*pp2)->Id;
420 char * pName, PrefLi[100], PrefLo[100];
422 int nDigits, i, k, CountCur, CountMax = 0;
429 for ( k = 0; pName[k]; k++ )
430 if ( pName[k] ==
'l' )
440 for ( k = 0; pName[k]; k++ )
441 if ( pName[k] ==
'l' )
448 assert( CountMax < 100-2 );
449 for ( i = 0; i <= CountMax; i++ )
450 PrefLi[i] = PrefLo[i] =
'l';
540 char pFileName[1000];
549 pFile = fopen( pFileName,
"wb" );
622 char pFileName[1000];
626 int i, c, iVar, fCompl, fSeenSpace,
Counter = 0;
631 pFile = fopen( pFileName,
"r+" );
636 while ( (c = fgetc(pFile)) != EOF && ++Counter )
637 if ( c ==
' ' && !fSeenSpace )
639 else if ( c ==
'\n' )
650 fprintf( pFile,
"%s%d", fCompl?
"-":
"", i );
652 printf(
"Saved %d names into file \"%s\".\n",
Vec_IntSize(vStarts)-1, pFileName );
Vec_Ptr_t * Abc_NodeGetFaninNames(Abc_Obj_t *pNode)
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
char * Abc_ObjNamePrefix(Abc_Obj_t *pObj, char *pPrefix)
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
void Abc_NtkTrasferNamesNoLatches(Abc_Ntk_t *pNtk, Abc_Ntk_t *pNtkNew)
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
void Abc_NtkTransferNameIds(Abc_Ntk_t *p, Abc_Ntk_t *pNew)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Abc_NtkStartNameIds(Abc_Ntk_t *p)
static int Abc_NtkIsNetlist(Abc_Ntk_t *pNtk)
int Nm_ManNumEntries(Nm_Man_t *p)
static int Abc_ObjIsLatch(Abc_Obj_t *pObj)
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
static int Abc_NtkBoxNum(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_ObjFanin0Ntk(Abc_Obj_t *pObj)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
void Abc_NtkMoveNames(Abc_Ntk_t *pNtk, Abc_Ntk_t *pOld)
static int Abc_NtkLatchNum(Abc_Ntk_t *pNtk)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static int Abc_NtkCiNum(Abc_Ntk_t *pNtk)
#define ABC_ALLOC(type, num)
#define Abc_NtkForEachCo(pNtk, pCo, i)
void Abc_NtkAddDummyPoNames(Abc_Ntk_t *pNtk)
ABC_DLL Vec_Ptr_t * Abc_NtkDfs(Abc_Ntk_t *pNtk, int fCollectAll)
static int Abc_MaxInt(int a, int b)
static int Vec_PtrSize(Vec_Ptr_t *p)
char * Abc_ObjAssignName(Abc_Obj_t *pObj, char *pName, char *pSuffix)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
void Abc_NtkAddDummyPiNames(Abc_Ntk_t *pNtk)
Vec_Ptr_t * Abc_NodeGetFakeNames(int nNames)
static int Abc_NtkCoNum(Abc_Ntk_t *pNtk)
char * Nm_ManStoreIdName(Nm_Man_t *p, int ObjId, int Type, char *pName, char *pSuffix)
void Abc_NodeFreeNames(Vec_Ptr_t *vNames)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static Vec_Int_t * Vec_IntStart(int nSize)
static int Abc_LitIsCompl(int Lit)
int Abc_NodeCompareNames(Abc_Obj_t **pp1, Abc_Obj_t **pp2)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Abc_Base10Log(unsigned n)
#define ABC_NAMESPACE_IMPL_END
static void Vec_IntPush(Vec_Int_t *p, int Entry)
void Abc_NtkTrasferNames(Abc_Ntk_t *pNtk, Abc_Ntk_t *pNtkNew)
ABC_NAMESPACE_IMPL_START char * Abc_ObjName(Abc_Obj_t *pObj)
DECLARATIONS ///.
#define Abc_NtkForEachLatch(pNtk, pObj, i)
static Abc_Obj_t * Abc_ObjFanout0Ntk(Abc_Obj_t *pObj)
static void Vec_IntFreeP(Vec_Int_t **p)
void Abc_NtkOrderObjsByName(Abc_Ntk_t *pNtk, int fComb)
#define Abc_NtkForEachBox(pNtk, pObj, i)
static Abc_Obj_t * Abc_NtkBox(Abc_Ntk_t *pNtk, int i)
#define ABC_NAMESPACE_IMPL_START
void Abc_NtkAddDummyBoxNames(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_ObjRegular(Abc_Obj_t *p)
static int Vec_IntSize(Vec_Int_t *p)
void Abc_NtkUpdateNameIds(Abc_Ntk_t *p)
static Abc_Obj_t * Abc_NtkPo(Abc_Ntk_t *pNtk, int i)
#define Abc_NtkForEachCi(pNtk, pCi, i)
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
char * Abc_ObjNameDummy(char *pPrefix, int Num, int nDigits)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define Abc_ObjForEachFanin(pObj, pFanin, i)
static int Abc_NtkPiNum(Abc_Ntk_t *pNtk)
char * Nm_ManCreateUniqueName(Nm_Man_t *p, int ObjId)
char ** Abc_NtkCollectCioNames(Abc_Ntk_t *pNtk, int fCollectCos)
static int Abc_Lit2Var(int Lit)
static int Abc_NtkHasOnlyLatchBoxes(Abc_Ntk_t *pNtk)
Nm_Man_t * Nm_ManCreate(int nSize)
MACRO DEFINITIONS ///.
void Nm_ManFree(Nm_Man_t *p)
void Abc_NtkShortNames(Abc_Ntk_t *pNtk)
static Abc_Ntk_t * Abc_ObjNtk(Abc_Obj_t *pObj)
static Abc_Obj_t * Abc_NtkPi(Abc_Ntk_t *pNtk, int i)
#define Abc_NtkForEachPo(pNtk, pPo, i)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static int Abc_ObjIsComplement(Abc_Obj_t *p)
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
char * Abc_UtilStrsav(char *s)
ABC_DLL void Abc_NtkOrderCisCos(Abc_Ntk_t *pNtk)
static void ** Vec_PtrArray(Vec_Ptr_t *p)
char * Abc_ObjNameSuffix(Abc_Obj_t *pObj, char *pSuffix)
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
#define Abc_NtkForEachPi(pNtk, pPi, i)
static void Vec_PtrFree(Vec_Ptr_t *p)