52 printf(
"Currently this parser does not work!\n" );
69 printf(
"Io_ReadEdif: The network check has failed.\n" );
92 char * pGateName, * pNetName;
93 int fTokensReady, iLine, i;
97 if (
strcmp( (
char *)vTokens->pArray[0],
"edif" ) != 0 )
115 if (
strcmp( (
char *)vTokens->pArray[0],
"instance" ) == 0 )
117 pNetName = (
char *)vTokens->pArray[1];
121 pGateName = (
char *)vTokens->pArray[1];
122 if (
strncmp( pGateName,
"Flip", 4 ) == 0 )
135 else if (
strcmp( (
char *)vTokens->pArray[0],
"net" ) == 0 )
137 pNetName = (
char *)vTokens->pArray[1];
138 if (
strcmp( pNetName,
"CK" ) == 0 ||
strcmp( pNetName,
"RESET" ) == 0 )
140 if (
strcmp( pNetName +
strlen(pNetName) - 4,
"_out" ) == 0 )
141 pNetName[
strlen(pNetName) - 4] = 0;
147 while (
strcmp( (
char *)vTokens->pArray[0],
"portRef" ) == 0 )
149 if (
strcmp( pNetName, (
char *)vTokens->pArray[3] ) != 0 )
158 else if (
strcmp( (
char *)vTokens->pArray[0],
"library" ) == 0 )
165 while (
strcmp( (
char *)vTokens->pArray[0],
"port" ) == 0 )
167 pNetName = (
char *)vTokens->pArray[1];
168 if (
strcmp( pNetName,
"CK" ) == 0 ||
strcmp( pNetName,
"RESET" ) == 0 )
173 if (
strcmp( pNetName +
strlen(pNetName) - 3,
"_PO" ) == 0 )
174 pNetName[
strlen(pNetName) - 3] = 0;
175 if (
strcmp( (
char *)vTokens->pArray[3],
"INPUT" ) == 0 )
177 else if (
strcmp( (
char *)vTokens->pArray[3],
"OUTPUT" ) == 0 )
188 else if (
strcmp( (
char *)vTokens->pArray[0],
"design" ) == 0 )
202 else if (
strncmp( (
char *)pObj->
pData,
"Or", 2 ) == 0 )
204 else if (
strncmp( (
char *)pObj->
pData,
"Nand", 4 ) == 0 )
206 else if (
strncmp( (
char *)pObj->
pData,
"Nor", 3 ) == 0 )
208 else if (
strncmp( (
char *)pObj->
pData,
"Exor", 4 ) == 0 )
210 else if (
strncmp( (
char *)pObj->
pData,
"Exnor", 5 ) == 0 )
212 else if (
strncmp( (
char *)pObj->
pData,
"Inv", 3 ) == 0 )
214 else if (
strncmp( (
char *)pObj->
pData,
"Buf", 3 ) == 0 )
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static ABC_NAMESPACE_IMPL_START Abc_Ntk_t * Io_ReadEdifNetwork(Extra_FileReader_t *p)
DECLARATIONS ///.
ABC_DLL char * Abc_SopCreateAnd(Mem_Flex_t *pMan, int nVars, int *pfCompl)
ABC_DLL char * Abc_SopCreateInv(Mem_Flex_t *pMan)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
ABC_DLL void Abc_NtkFinalizeRead(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
ABC_DLL char * Abc_SopCreateNand(Mem_Flex_t *pMan, int nVars)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
static void Abc_ObjSetData(Abc_Obj_t *pObj, void *pData)
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
ABC_DLL char * Abc_SopCreateBuf(Mem_Flex_t *pMan)
Abc_Obj_t * Io_ReadCreatePi(Abc_Ntk_t *pNtk, char *pName)
ABC_DLL Abc_Ntk_t * Abc_NtkStartRead(char *pName)
ABC_DLL char * Abc_SopCreateNxor(Mem_Flex_t *pMan, int nVars)
ABC_DLL int Abc_NtkCheckRead(Abc_Ntk_t *pNtk)
#define ABC_NAMESPACE_IMPL_END
ABC_DLL Abc_Obj_t * Abc_NtkFindNet(Abc_Ntk_t *pNtk, char *pName)
ABC_DLL char * Abc_SopCreateXor(Mem_Flex_t *pMan, int nVars)
static Abc_Obj_t * Abc_NtkCreateLatch(Abc_Ntk_t *pNtk)
ABC_DLL Abc_Obj_t * Abc_NtkFindOrCreateNet(Abc_Ntk_t *pNtk, char *pName)
#define Abc_NtkForEachNode(pNtk, pNode, i)
#define ABC_NAMESPACE_IMPL_START
ABC_DLL char * Abc_SopCreateNor(Mem_Flex_t *pMan, int nVars)
static Abc_Obj_t * Abc_NtkCreateNode(Abc_Ntk_t *pNtk)
Abc_Obj_t * Io_ReadCreatePo(Abc_Ntk_t *pNtk, char *pName)
static void Abc_LatchSetInit0(Abc_Obj_t *pLatch)
ABC_DLL char * Abc_SopCreateOr(Mem_Flex_t *pMan, int nVars, int *pfCompl)
Abc_Ntk_t * Io_ReadEdif(char *pFileName, int fCheck)
FUNCTION DEFINITIONS ///.