88 static inline int Cba_CharIsSpace(
char c ) {
return c ==
' ' || c ==
'\t' || c ==
'\r'; }
89 static inline int Cba_CharIsStop(
char c ) {
return c ==
'#' || c ==
'\\' || c ==
'\n' || c ==
'='; }
90 static inline int Cba_CharIsLit(
char c ) {
return c ==
'0' || c ==
'1' || c ==
'-'; }
146 if ( pStart == p->
pCur )
176 if ( iToken == 0 )
return Cba_PrsErrorSet(p,
"Cannot read formal name.", 1);
181 if ( iToken == 0 )
return Cba_PrsErrorSet(p,
"Cannot read actual name.", 1);
276 if ( iToken == 0 )
return Cba_PrsErrorSet(p,
"Cannot read model name.", 1);
288 if ( iToken == 0 )
return Cba_PrsErrorSet(p,
"Cannot read latch input.", 1);
291 if ( iToken == 0 )
return Cba_PrsErrorSet(p,
"Cannot read latch output.", 1);
311 if ( iToken == 0 )
return Cba_PrsErrorSet(p,
"Cannot read .short input.", 1);
314 if ( iToken == 0 )
return Cba_PrsErrorSet(p,
"Cannot read .short output.", 1);
376 while ( p->
pCur[1] !=
'\0' )
431 printf(
"Finished reading %d networks. ",
Cba_ManNtkNum(p) );
433 printf(
"Memory = %.2f MB. ", 1.0*
Cba_ManMemory(p)/(1<<20) );
static int Cba_PrsReadList3(Cba_Prs_t *p)
static int Cba_PrsErrorSet(Cba_Prs_t *p, char *pError, int Value)
MACRO DEFINITIONS ///.
static char Cba_PrsSkip2(Cba_Prs_t *p)
static int Cba_PrsReadBox(Cba_Prs_t *p, int fGate)
static int Cba_PrsReadCube(Cba_Prs_t *p)
static char * Vec_StrArray(Vec_Str_t *p)
static int Cba_PrsIsChar(Cba_Prs_t *p, char c)
static void Cba_PrsSkipSpaces(Cba_Prs_t *p)
static int Cba_PrsReadLines(Cba_Prs_t *p)
static void Cba_PrsSaveCover(Cba_Prs_t *p)
int Abc_NamObjNumMax(Abc_Nam_t *p)
static Vec_Int_t * Vec_WecPushLevel(Vec_Wec_t *p)
static int Cba_PrsIsSpace(Cba_Prs_t *p)
static int Cba_PrsReadName(Cba_Prs_t *p)
static void Vec_StrClear(Vec_Str_t *p)
static int Cba_PrsReadList2(Cba_Prs_t *p)
int Abc_NamStrFindOrAdd(Abc_Nam_t *p, char *pStr, int *pfFound)
static abctime Abc_Clock()
static void Vec_StrPush(Vec_Str_t *p, char Entry)
#define ABC_SWAP(Type, a, b)
int Abc_NamStrFindOrAddLim(Abc_Nam_t *p, char *pStr, char *pLim, int *pfFound)
static void Abc_PrintTime(int level, const char *pStr, abctime time)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static void Vec_StrWriteEntry(Vec_Str_t *p, int i, char Entry)
static char Vec_StrEntry(Vec_Str_t *p, int i)
static int Cba_PrsReadModel(Cba_Prs_t *p)
static int Cba_CharIsStop(char c)
static void Cba_ManFree(Cba_Man_t *p)
static int Cba_PrsReadNode(Cba_Prs_t *p)
static void Cba_PrsSetupVecInt(Cba_Prs_t *p, Vec_Int_t *vTo, Vec_Int_t *vFrom)
static int Cba_PrsReadInputs(Cba_Prs_t *p)
void Cba_PrsReadBlifTest(char *pFileName)
#define ABC_NAMESPACE_IMPL_END
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
static int Cba_PrsIsChar2(Cba_Prs_t *p, char c)
static void Cba_PrsSkip(Cba_Prs_t *p)
static Cba_Prs_t * Cba_PrsAlloc(char *pFileName)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static int Cba_PrsErrorPrint(Cba_Prs_t *p)
static int Cba_PrsReadShort(Cba_Prs_t *p)
static int Cba_CharIsSpace(char c)
FUNCTION DEFINITIONS ///.
static Cba_Ntk_t * Cba_PrsAddCurrentModel(Cba_Prs_t *p, int iNameId)
static int Cba_PrsReadEnd(Cba_Prs_t *p)
static int Cba_ManMemory(Cba_Man_t *p)
char * Abc_NamStr(Abc_Nam_t *p, int NameId)
#define ABC_NAMESPACE_IMPL_START
static int Cba_ManNtkNum(Cba_Man_t *p)
static int Cba_CharIsLit(char c)
static int Vec_StrSize(Vec_Str_t *p)
static void Cba_PrsAddBlifDirectives(Cba_Prs_t *p)
const char * s_BlifTypes[CBA_BLIF_UNKNOWN+1]
static int Vec_IntEntryLast(Vec_Int_t *p)
static int Vec_IntSize(Vec_Int_t *p)
Cba_Man_t * Cba_PrsReadBlif(char *pFileName)
static void Cba_PrsFree(Cba_Prs_t *p)
static int Cba_PrsReadInouts(Cba_Prs_t *p)
static int Cba_PrsReadOutputs(Cba_Prs_t *p)
void Cba_PrsWriteBlif(char *pFileName, Cba_Man_t *pDes)
static int Cba_PrsReadList(Cba_Prs_t *p)
static void Cba_PrsSkipToChar(Cba_Prs_t *p, char c)
static int Cba_PrsReadLatch(Cba_Prs_t *p)
static int Cba_PrsReadDirective(Cba_Prs_t *p)
Cba_BlifType_t
DECLARATIONS ///.
static void Vec_IntClear(Vec_Int_t *p)
static int Cba_PrsIsStop(Cba_Prs_t *p)
static int Cba_PrsIsLit(Cba_Prs_t *p)