50 for ( pEnd = pCur; *pEnd; pEnd++ )
54 else if ( *pEnd ==
')' )
75 int fAnd = 0, fXor = 0, fPri = 0, nParts = 0;
81 pParts[nParts++] = pCur;
86 if ( *pCur >=
'a' && *pCur <=
'z' )
91 while ( (*pCur >=
'0' && *pCur <=
'9') || (*pCur >=
'A' && *pCur <=
'F') )
96 printf(
"Cannot find the opening paranthesis.\n" );
103 printf(
"Cannot find the closing paranthesis.\n" );
112 if ( *pCur !=
'*' && *pCur !=
'+' && *pCur !=
',' )
114 printf(
"Wrong separating symbol.\n" );
118 fAnd |= (*pCur ==
'*');
119 fXor |= (*pCur ==
'+');
120 fPri |= (*pCur ==
',');
124 if ( fAnd + fXor + fPri > 1 )
126 printf(
"Different types of separating symbol ennPartsed.\n" );
147 char * pEnd, * pParts[32];
148 int i, nParts, TypeExor;
170 for ( i = 0; i < nParts; i++ )
173 if ( pFanin == NULL )
180 for ( i = 0; i < nParts; i++ )
183 if ( pFanin == NULL )
196 if ( *pCur >=
'a' && *pCur <=
'z' )
204 while ( (*pEnd >=
'0' && *pEnd <=
'9') || (*pEnd >=
'A' && *pEnd <=
'F') )
208 printf(
"Cannot find the end of hexidecimal truth table.\n" );
237 char * pCur, * pFormCopy;
242 for ( pCur = pForm; *pCur; pCur++ )
243 if ( *pCur >=
'a' && *pCur <=
'z' )
253 for ( i = 0; i < nInputs; i++ )
261 for ( ; *pForm; pForm++ )
267 else if ( *pForm ==
')' )
272 else if ( *pForm ==
',' )
297 fprintf( stdout,
"Io_ReadDsd(): Network check has failed.\n" );
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
ABC_NAMESPACE_IMPL_START char * Io_ReadDsdFindEnd(char *pCur)
DECLARATIONS ///.
ABC_DLL char * Abc_SopCreateAnd(Mem_Flex_t *pMan, int nVars, int *pfCompl)
#define ABC_ALLOC(type, num)
ABC_DLL int Abc_NtkCheck(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
ABC_DLL char * Abc_ObjAssignName(Abc_Obj_t *pObj, char *pName, char *pSuffix)
static int Abc_MaxInt(int a, int b)
ABC_DLL char * Abc_SopFromTruthHex(char *pTruth)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
ABC_DLL Abc_Ntk_t * Abc_NtkAlloc(Abc_NtkType_t Type, Abc_NtkFunc_t Func, int fUseMemMan)
DECLARATIONS ///.
ABC_DLL void Abc_NodeFreeNames(Vec_Ptr_t *vNames)
ABC_DLL char * Abc_SopRegister(Mem_Flex_t *pMan, char *pName)
DECLARATIONS ///.
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeInv(Abc_Ntk_t *pNtk, Abc_Obj_t *pFanin)
ABC_DLL Vec_Ptr_t * Abc_NodeGetFakeNames(int nNames)
#define ABC_NAMESPACE_IMPL_END
static Abc_Obj_t * Abc_NtkCreatePi(Abc_Ntk_t *pNtk)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
ABC_DLL char * Abc_SopCreateXorSpecial(Mem_Flex_t *pMan, int nVars)
static Abc_Obj_t * Abc_NtkCreateNode(Abc_Ntk_t *pNtk)
Abc_Ntk_t * Io_ReadDsd(char *pForm)
Abc_Obj_t * Io_ReadDsd_rec(Abc_Ntk_t *pNtk, char *pCur, char *pSop)
static Abc_Obj_t * Abc_NtkPi(Abc_Ntk_t *pNtk, int i)
static Abc_Obj_t * Abc_NtkCreatePo(Abc_Ntk_t *pNtk)
int Io_ReadDsdStrSplit(char *pCur, char *pParts[], int *pTypeXor)