33 #define IO_BLIFMV_MAXVALUES 256
122 static int Io_MvCharIsSpace(
char s ) {
return s ==
' ' || s ==
'\t' || s ==
'\r' || s ==
'\n'; }
123 static int Io_MvCharIsMvSymb(
char s ) {
return s ==
'(' || s ==
')' || s ==
'{' || s ==
'}' || s ==
'-' || s ==
',' || s ==
'!'; }
153 pFile = fopen( pFileName,
"rb" );
156 printf(
"Io_ReadBlifMv(): The file is unavailable (absent or open).\n" );
185 fprintf( stdout,
"%s\n", p->
sError );
187 if ( pDesign == NULL )
198 printf(
"Io_ReadBlifMv: The network check has failed for model %s.\n", pNtk->
pName );
228 printf(
"Warning: The design has %d root-level modules. The first one (%s) will be used.\n",
248 if ( pNtk->
pSpec == NULL )
393 for ( pCur = pLine; *pCur; pCur++ )
413 for ( pCur = pLine; *(pCur+1); pCur++ )
414 if ( *pCur ==
'-' && *(pCur+1) ==
'>' )
438 for ( pCur = pInput; pCur < pOutput; pCur++ )
462 for ( pCur = pLine; *pCur != Stop; pCur++ )
484 for ( pCur = pLine; *pCur !=
'.' || *(pCur+1) ==
'd'; pCur++ )
506 for ( pCur = pLine; *pCur != Stop; pCur++ )
529 if ( pToken < pLine )
557 int bzError, RetValue;
561 pFile = fopen( pFileName,
"rb" );
564 Abc_Print( -1,
"Io_MvLoadFileBz2(): The file is unavailable (absent or open).\n" );
568 if (bzError !=
BZ_OK) {
569 Abc_Print( -1,
"Io_MvLoadFileBz2(): BZ2_bzReadOpen() failed with error %d.\n",bzError );
577 nFileSize += buf->nBuf =
BZ2_bzRead(&bzError,b,buf->buf,1<<20);
579 }
while (bzError ==
BZ_OK);
585 p = pContents =
ABC_ALLOC(
char, nFileSize + 10 );
588 memcpy(p+nBytes,buf->buf,buf->nBuf);
593 }
while((buf = pNext));
598 nFileSize = ftell( pFile );
599 if ( nFileSize == 0 )
601 Abc_Print( -1,
"Io_MvLoadFileBz2(): The file is empty.\n" );
604 pContents =
ABC_ALLOC(
char, nFileSize + 10 );
606 RetValue = fread( pContents, nFileSize, 1, pFile );
609 Abc_Print( -1,
"Io_MvLoadFileBz2(): Unable to read the compressed BLIF.\n" );
615 strcpy( pContents + nFileSize,
"\n.end\n" );
616 *pnFileSize = nFileSize;
633 const int READ_BLOCK_SIZE = 100000;
636 int amtRead, readBlock, nFileSize = READ_BLOCK_SIZE;
637 pFile =
gzopen( pFileName,
"rb" );
638 pContents =
ABC_ALLOC(
char, nFileSize );
640 while ((amtRead =
gzread(pFile, pContents + readBlock * READ_BLOCK_SIZE, READ_BLOCK_SIZE)) == READ_BLOCK_SIZE) {
642 nFileSize += READ_BLOCK_SIZE;
643 pContents =
ABC_REALLOC(
char, pContents, nFileSize);
648 nFileSize -= (READ_BLOCK_SIZE - amtRead);
650 *pnFileSize = nFileSize;
675 pFile = fopen( pFileName,
"rb" );
678 printf(
"Io_MvLoadFile(): The file is unavailable (absent or open).\n" );
682 nFileSize = ftell( pFile );
683 if ( nFileSize == 0 )
686 printf(
"Io_MvLoadFile(): The file is empty.\n" );
689 pContents =
ABC_ALLOC(
char, nFileSize + 10 );
691 RetValue = fread( pContents, nFileSize, 1, pFile );
695 strcpy( pContents + nFileSize,
"\n.end\n" );
718 char * pCur, * pPrev;
722 for ( pCur = p->
pBuffer; *pCur; pCur++ )
732 else if ( *pCur ==
'#' )
745 for ( pPrev = pCur - 2; pPrev >= p->
pBuffer; pPrev-- )
749 if ( pPrev >= p->
pBuffer && *pPrev ==
'\\' )
751 for ( ; *pPrev; pPrev++ )
759 if ( *(pCur-1) !=
'.' )
765 else if ( !
strncmp( pCur,
"ltlformula", 10 ) )
767 else if ( !
strncmp(pCur,
"latch", 5) )
769 else if ( !
strncmp(pCur,
"flop", 4) )
771 else if ( !
strncmp(pCur,
"r ", 2) || !
strncmp(pCur,
"reset ", 6) )
773 else if ( !
strncmp(pCur,
"inputs", 6) )
775 else if ( !
strncmp(pCur,
"outputs", 7) )
777 else if ( !
strncmp(pCur,
"subckt", 6) )
779 else if ( !
strncmp(pCur,
"short", 5) )
781 else if ( !
strncmp(pCur,
"onehot", 6) )
785 else if ( !
strncmp(pCur,
"constraint", 10) )
787 else if ( !
strncmp(pCur,
"blackbox", 8) )
789 else if ( !
strncmp(pCur,
"model", 5) )
795 else if ( !
strncmp(pCur,
"end", 3) )
801 else if ( !
strncmp(pCur,
"exdc", 4) )
804 fprintf( stdout,
"Warning: The design contains EXDC network.\n" );
811 else if ( !
strncmp(pCur,
"attrib", 6) )
813 else if ( !
strncmp(pCur,
"delay", 5) )
815 else if ( !
strncmp(pCur,
"input_", 6) )
817 else if ( !
strncmp(pCur,
"output_", 7) )
819 else if ( !
strncmp(pCur,
"no_merge", 8) )
821 else if ( !
strncmp(pCur,
"wd", 2) )
828 if ( pCur[
strlen(pCur)-1] ==
'\r' )
830 fprintf( stdout,
"Line %d: Skipping line \"%s\".\n",
Io_MvGetLine(p, pCur), pCur );
881 #ifdef IO_VERBOSE_OUTPUT
883 printf(
"Parsed %-32s: PI =%6d PO =%6d ND =%8d FF =%6d B =%6d\n",
912 #ifdef IO_VERBOSE_OUTPUT
914 printf(
"Parsing model %s...\n", pMod->
pNtk->
pName );
929 sprintf( p->
sError,
"Line %d: Model %s has different number of latches (%d) and reset nodes (%d).",
1010 printf(
"The total number of 1-hot registers = %d. (%.2f %%)\n",
1017 printf(
"One-hotness condition is written into file \"%s\".\n", pFileName );
1022 printf(
"Warning: The parser converted %d .flop lines into .latch lines\n",
Vec_PtrSize(pMod->
vFlops) );
1023 printf(
"(information about set, reset, enable of the flops may be lost).\n" );
1029 printf(
"Warning: The parser added %d constant 0 nodes to replace non-deterministic nodes.\n", p->
nNDnodes );
1050 char * pToken, * pPivot;
1051 if ( pLine == NULL )
1165 int quoteBegin, quoteEnd;
1166 char keyWordLtlFormula[11];
1167 char *actualLtlFormula;
1171 for( i=0; i<10; i++ )
1172 keyWordLtlFormula[i] = pLine[i];
1174 keyWordLtlFormula[10] =
'\0';
1175 assert(
strcmp(
"ltlformula", keyWordLtlFormula ) == 0 );
1176 while( pLine[i] !=
'"' )
1180 while( pLine[i] !=
'"' )
1183 actualLtlFormula = (
char *)
malloc(
sizeof(
char) * (quoteEnd - quoteBegin) );
1185 for( i = quoteBegin + 1, j = 0; i<quoteEnd; i++, j++ )
1187 actualLtlFormula[j] = pLine[i];
1188 actualLtlFormula[j] =
'\0';
1229 printf(
"Warning: Line %d has .latch directive with unrecognized entries (the total of %d entries).\n",
1235 if ( Init < 0 || Init > 3 )
1242 else if ( Init == 1 )
1277 char * pToken, * pOutput, * pInput;
1285 if ( pToken[0] ==
'Q' && pToken[1] ==
'=' )
1295 if ( pToken[0] ==
'D' && pToken[1] ==
'=' )
1308 if ( !
strncmp( pToken,
"init=", 5 ) )
1311 if ( pToken[5] ==
'1' )
1313 else if ( pToken[5] ==
'2' )
1315 else if ( pToken[5] !=
'0' )
1323 if ( Init < 0 || Init > 2 )
1330 else if ( Init == 1 )
1353 char * pToken, * pName, * pName2, ** ppNames;
1354 int nEquals, Last, i, k;
1366 for ( pToken = pName; *pToken; pToken++ )
1367 if ( *pToken ==
'|' )
1374 if ( pModel == NULL )
1396 pBox->
pData = pModel;
1406 for ( k = 0; k < nEquals; k++ )
1407 if ( !
strcmp( ppNames[2*((k+Last)%nEquals)], pName ) )
1409 pName2 = ppNames[2*((k+Last)%nEquals)+1];
1421 if ( pName2 == NULL )
1432 assert( pName2 != NULL );
1447 for ( k = 0; k < nEquals; k++ )
1448 if ( !
strcmp( ppNames[2*((k+Last)%nEquals)], pName ) )
1450 pName2 = ppNames[2*((k+Last)%nEquals)+1];
1507 sprintf( p->
pMan->
sError,
"Line %d: Signal with name \"%s\" does not exist in the model \"%s\".",
1515 sprintf( p->
pMan->
sError,
"Line %d: Signal with name \"%s\" is not a register in the model \"%s\".",
1523 printf(
"%d", ((
int)(ABC_PTRINT_T)
Abc_ObjFanin0(pTerm)->pData)-1 );
1548 int nCommas, nValues, i, k;
1560 nValues = atoi( (
char *)
Vec_PtrEntry(vTokens,nCommas+2) );
1563 sprintf( p->
pMan->
sError,
"Line %d: The number of values (%d) is incorrect (should be >= 2 and <= %d).",
1568 if ( nValues == 2 &&
Vec_PtrSize(vTokens) == nCommas + 3 )
1572 sprintf( p->
pMan->
sError,
"Line %d: Wrong number (%d) of symbolic value names (should be %d).",
1578 for ( i = 0; i <= nCommas; i++ )
1603 for ( i = 0; i < nValues; i++ )
1604 for ( k = i+1; k < nValues; k++ )
1608 sprintf( p->
pMan->
sError,
"Line %d: Symbolic value name \"%s\" is repeated in .mv line.",
1662 char * pCur, * pNext;
1665 if ( pToken[0] ==
'=' )
1673 sprintf( p->
pMan->
sError,
"Line %d: Node name in the table \"%s\" cannot be found on .names line.",
1680 Vec_StrPush( vFunc, (
char)((iLit == -1)?
'\n' :
' ') );
1688 if ( pVar == NULL || pVar->
pNames == NULL )
1691 Vec_StrPush( vFunc, (
char)((iLit == -1)?
'\n' :
' ') );
1695 for ( pCur = pToken; *pCur; pCur++ )
1703 for ( pNext = pCur+1; *pNext; pNext++ )
1707 for ( i = 0; i < pVar->
nValues; i++ )
1713 sprintf( p->
pMan->
sError,
"Line %d: Cannot find value name \"%s\" among the value names of variable \"%s\".",
1723 Vec_StrPush( vFunc, (
char)((iLit == -1)?
'\n' :
' ') );
1741 char * pFirst, * pToken;
1749 if ( pFirst[0] ==
'.' )
1756 iStart = 1 + nOutputs;
1764 for ( i = 0; i < nInputs; i++ )
1771 pToken = (
char *)
Vec_PtrEntry( vTokens2, iStart + nInputs + iOut );
1775 iStart += nInputs + nOutputs;
1795 Abc_Obj_t * pNode, * pData0Net, * pData1Net, * pResetLONet, * pOutNet;
1823 sprintf( Buffer,
"1 - - =1\n0 - - =2\n" );
1886 if ( pNode->
pData == NULL )
1909 char * pName, * pFirst, * pArrow;
1910 int nInputs, nOutputs, nLiterals, nLines, i;
1928 if ( pArrow != NULL )
1941 if ( pFirst[0] ==
'.' )
1943 assert( pFirst[1] ==
'd' );
1949 if ( nLiterals % (nInputs + nOutputs) != 0 )
1951 sprintf( p->
pMan->
sError,
"Line %d: Wrong number of literals in the table of node \"%s\". (Spaces inside literals are not allowed.)",
Io_MvGetLine(p->
pMan, pFirst), pName );
1955 nLines = nLiterals / (nInputs + nOutputs);
1956 if ( nInputs == 0 && nLines > 1 )
1959 for ( i = 0; i < nOutputs; i++ )
1979 for ( i = 0; i < nOutputs; i++ )
2003 char * pProduct, * pOutput, c;
2004 int i, Polarity = -1;
2015 if ( (c!=
'0'&&c!=
'1'&&c!=
'x'&&c!=
'n') || pOutput[1] )
2034 if (
strlen(pProduct) != (unsigned)nFanins )
2040 if ( (c!=
'0'&&c!=
'1'&&c!=
'x'&&c!=
'n') || pOutput[1] )
2045 if ( Polarity == -1 )
2046 Polarity = (c==
'1' || c==
'x');
2047 else if ( Polarity != (c==
'1' || c==
'x') )
2049 sprintf( p->
pMan->
sError,
"Line %d: Output value \"%s\" differs from the value in the first line of the table (%d).",
Io_MvGetLine(p->
pMan, pProduct), pOutput, Polarity );
2096 if ( pNode->
pData == NULL )
2151 if ( pGenlib == NULL )
2158 if ( pGate == NULL )
2193 if ( pVar->
pNames == NULL )
2196 for ( i = 0; i < pVar->
nValues; i++ )
2219 for ( i = 0; i < Length; i++ )
2220 if ( pName[i] ==
'=' )
2221 return pName + i + 1;
2242 char ** ppNames, * pName;
2245 pName = (
char *)vTokens->pArray[0];
2249 if ( pGenlib == NULL )
2256 if ( vTokens->nSize < 2 )
2264 if ( pGate == NULL )
2287 for ( i = 2; i < vTokens->nSize; i++ )
2289 if ( vTokens->pArray[i] == NULL )
2292 if ( vTokens->pArray[i] == NULL )
2302 nNames = vTokens->nSize - 3;
2303 ppNames = (
char **)vTokens->pArray + 2;
2309 nNames = vTokens->nSize - 4;
2310 ppNames = (
char **)vTokens->pArray + 2;
2311 assert( ppNames[nNames] != NULL || ppNames[nNames+1] != NULL );
2312 if ( ppNames[nNames] )
2317 if ( ppNames[nNames+1] )
Mio_Gate_t * Mio_LibraryReadBuf(Mio_Library_t *pLib)
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Mio_Gate_t * Mio_LibraryReadGateByName(Mio_Library_t *pLib, char *pName, char *pOutName)
static int Io_MvParseLineNamesMv(Io_MvMod_t *p, char *pLine, int fReset)
static int Io_MvParseLineMv(Io_MvMod_t *p, char *pLine)
static void Io_MvSplitIntoTokensMv(Vec_Ptr_t *vTokens, char *pLine)
Vec_Ptr_t * vLtlProperties
static Abc_Des_t * Io_MvParse(Io_MvMan_t *p)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
ABC_DLL void * Abc_FrameReadLibGen()
static Vec_Int_t * Io_MvParseLineOnehot(Io_MvMod_t *p, char *pLine)
Abc_Obj_t * Io_ReadCreateResetLatch(Abc_Ntk_t *pNtk, int fBlifMv)
static int Io_MvCountChars(char *pLine, char Char)
static Abc_Obj_t * Abc_NtkCreateWhitebox(Abc_Ntk_t *pNtk)
#define Vec_PtrForEachEntryStart(Type, vVec, pEntry, i, Start)
Vec_Ptr_t * vLtlProperties
static Abc_Obj_t * Io_MvParseAddResetCircuit(Io_MvMod_t *p, char *pName)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
static Io_MvMan_t * Io_MvAlloc()
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static char * Vec_StrArray(Vec_Str_t *p)
#define BZ_DATA_ERROR_MAGIC
static int Abc_ObjIsLatch(Abc_Obj_t *pObj)
#define ABC_REALLOC(type, obj, num)
ABC_DLL Abc_Des_t * Abc_DesCreate(char *pName)
DECLARATIONS ///.
static int Abc_NtkBoxNum(Abc_Ntk_t *pNtk)
static void * Abc_NtkMvVar(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_DesAddModel(Abc_Des_t *p, Abc_Ntk_t *pNtk)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
static void Abc_ObjSetMvVar(Abc_Obj_t *pObj, void *pV)
static int Abc_NtkLatchNum(Abc_Ntk_t *pNtk)
void Abc_NtkStartMvVars(Abc_Ntk_t *pNtk)
DECLARATIONS ///.
static void Vec_StrClear(Vec_Str_t *p)
static int Io_MvParseLiteralMv(Io_MvMod_t *p, Abc_Obj_t *pNode, char *pToken, Vec_Str_t *vFunc, int iLit)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define ABC_ALLOC(type, num)
ABC_NAMESPACE_IMPL_START int ZEXPORT gzclose(gzFile file)
static void * Abc_NtkMvVarMan(Abc_Ntk_t *pNtk)
static int Io_MvReadInterfaces(Io_MvMan_t *p)
ABC_DLL char * Abc_ObjAssignName(Abc_Obj_t *pObj, char *pName, char *pSuffix)
static Vec_Str_t * Vec_StrAlloc(int nCap)
static int Io_MvCharIsMvSymb(char s)
static void Vec_StrPush(Vec_Str_t *p, char Entry)
ABC_DLL void Abc_NtkFinalizeRead(Abc_Ntk_t *pNtk)
static int Vec_PtrSize(Vec_Ptr_t *p)
static int Io_MvWriteValues(Abc_Obj_t *pNode, Vec_Str_t *vFunc)
static void Abc_LatchSetInitDc(Abc_Obj_t *pLatch)
static int Abc_MapBox2Next(Vec_Ptr_t *vDrivers, Vec_Int_t *vMapIn, Vec_Int_t *vMapOut, int Id)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
ABC_DLL int Abc_DesFindTopLevelModels(Abc_Des_t *p)
ABC_DLL char * Abc_SopCreateConst0(Mem_Flex_t *pMan)
static void Vec_PtrRemove(Vec_Ptr_t *p, void *Entry)
char * Mem_FlexEntryFetch(Mem_Flex_t *p, int nBytes)
static void Abc_ObjSetData(Abc_Obj_t *pObj, void *pData)
static int Io_MvParseLineConstrs(Io_MvMod_t *p, char *pLine)
static int Io_MvParseLineInputs(Io_MvMod_t *p, char *pLine)
void Hop_ManStop(Hop_Man_t *p)
ABC_DLL char * Abc_SopCreateConst1(Mem_Flex_t *pMan)
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
static int Io_MvParseLineSubckt(Io_MvMod_t *p, char *pLine)
ABC_DLL Abc_Ntk_t * Abc_NtkAlloc(Abc_NtkType_t Type, Abc_NtkFunc_t Func, int fUseMemMan)
DECLARATIONS ///.
void BZ_API() BZ2_bzReadClose(int *bzerror, BZFILE *b)
static Abc_Obj_t * Abc_NtkCreateBo(Abc_Ntk_t *pNtk)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Io_MvCharIsSpace(char s)
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_DesFree(Abc_Des_t *p, Abc_Ntk_t *pNtk)
ABC_DLL char * Abc_SopRegister(Mem_Flex_t *pMan, char *pName)
DECLARATIONS ///.
Abc_Obj_t * Io_ReadCreatePi(Abc_Ntk_t *pNtk, char *pName)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void * Vec_PtrEntryLast(Vec_Ptr_t *p)
static int Abc_NtkHasBlackbox(Abc_Ntk_t *pNtk)
Abc_Ntk_t * Io_ReadBlifMv(char *pFileName, int fBlifMv, int fCheck)
FUNCTION DEFINITIONS ///.
static void Vec_StrFree(Vec_Str_t *p)
static void Io_MvFree(Io_MvMan_t *p)
static void Io_MvCollectTokens(Vec_Ptr_t *vTokens, char *pInput, char *pOutput)
static char * Io_MvLoadFile(char *pFileName)
ABC_DLL int Abc_NtkCheckRead(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NtkIsAcyclicHierarchy(Abc_Ntk_t *pNtk)
static int Vec_IntEntry(Vec_Int_t *p, int i)
void Abc_GenOneHotIntervals(char *pFileName, int nPis, int nRegs, Vec_Ptr_t *vOnehots)
#define ABC_NAMESPACE_IMPL_END
ABC_DLL Abc_Obj_t * Abc_NtkFindNet(Abc_Ntk_t *pNtk, char *pName)
static char * Io_MvLoadFileGz(char *pFileName, int *pnFileSize)
static int Io_MvParseLineNamesMvOne(Io_MvMod_t *p, Vec_Ptr_t *vTokens, Vec_Ptr_t *vTokens2, int nInputs, int nOutputs, int iOut, int fReset)
BZFILE *BZ_API() BZ2_bzReadOpen(int *bzerror, FILE *f, int verbosity, int small, void *unused, int nUnused)
int BZ_API() BZ2_bzRead(int *bzerror, BZFILE *b, void *buf, int len)
STRUCTURE DEFINITIONS ///.
static void Vec_IntPush(Vec_Int_t *p, int Entry)
ABC_DLL char * Abc_SopCreateMux(Mem_Flex_t *pMan)
static void * Abc_ObjMvVar(Abc_Obj_t *pObj)
static Abc_Obj_t * Abc_NtkCreateBlackbox(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachLatch(pNtk, pObj, i)
static char * Io_MvParseTableMv(Io_MvMod_t *p, Abc_Obj_t *pNode, Vec_Ptr_t *vTokens2, int nInputs, int nOutputs, int iOut)
static void Abc_Print(int level, const char *format,...)
ABC_DLL Abc_Obj_t * Abc_NtkFindOrCreateNet(Abc_Ntk_t *pNtk, char *pName)
Abc_Obj_t * Io_ReadCreateLatch(Abc_Ntk_t *pNtk, char *pNetLI, char *pNetLO)
static int Io_MvGetLine(Io_MvMan_t *p, char *pToken)
static char * Io_ReadBlifCleanName(char *pName)
static void Io_MvModFree(Io_MvMod_t *p)
void Mem_FlexStop(Mem_Flex_t *p, int fVerbose)
#define ABC_NAMESPACE_IMPL_START
Vec_Ptr_t * vGlobalLtlArray
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static void Io_MvReadPreparse(Io_MvMan_t *p)
static void Abc_LatchSetInit1(Abc_Obj_t *pLatch)
Mio_Gate_t * Mio_GateReadTwin(Mio_Gate_t *pGate)
gzFile ZEXPORT gzopen(const char *path, const char *mode)
int Io_ReadBlifReorderFormalNames(Vec_Ptr_t *vTokens, Mio_Gate_t *pGate, Mio_Gate_t *pTwin)
ABC_DLL Abc_Ntk_t * Abc_DesFindModelByName(Abc_Des_t *p, char *pName)
static int Vec_IntSize(Vec_Int_t *p)
static void Abc_MapBoxSetPrevNext(Vec_Ptr_t *vDrivers, Vec_Int_t *vMapIn, Vec_Int_t *vMapOut, int Id)
static char * Abc_NtkName(Abc_Ntk_t *pNtk)
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define Abc_ObjForEachFanin(pObj, pFanin, i)
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeConst0(Abc_Ntk_t *pNtk)
static int Io_MvParseLineModel(Io_MvMod_t *p, char *pLine)
static int Abc_NtkPiNum(Abc_Ntk_t *pNtk)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
static int Vec_VecSizeSize(Vec_Vec_t *p)
static Abc_Obj_t * Abc_NtkCreateNode(Abc_Ntk_t *pNtk)
static int Io_MvParseLineFlop(Io_MvMod_t *p, char *pLine)
static int Io_MvParseLineShortBlif(Io_MvMod_t *p, char *pLine)
static int Io_MvParseLineLtlProperty(Io_MvMod_t *p, char *pLine)
static int Io_MvParseLineGateBlif(Io_MvMod_t *p, Vec_Ptr_t *vTokens)
static int Abc_MapBox2Prev(Vec_Ptr_t *vDrivers, Vec_Int_t *vMapIn, Vec_Int_t *vMapOut, int Id)
static void Vec_PtrFreeP(Vec_Ptr_t **p)
static int Abc_ObjMvVarNum(Abc_Obj_t *pObj)
#define IO_BLIFMV_MAXVALUES
DECLARATIONS ///.
static void Io_MvSplitIntoTokensAndClear(Vec_Ptr_t *vTokens, char *pLine, char Stop, char Char)
static char * Io_MvParseTableBlif(Io_MvMod_t *p, char *pTable, int nFanins)
static void Io_MvSplitIntoTokens(Vec_Ptr_t *vTokens, char *pLine, char Stop)
Abc_Obj_t * Io_ReadCreateNode(Abc_Ntk_t *pNtk, char *pNameOut, char *pNamesIn[], int nInputs)
static void Vec_PtrClear(Vec_Ptr_t *p)
static void Vec_StrPrintStr(Vec_Str_t *p, const char *pStr)
static int Io_MvParseLineLatch(Io_MvMod_t *p, char *pLine)
static char * Io_MvFindArrow(char *pLine)
#define Abc_NtkForEachPo(pNtk, pPo, i)
static Abc_Obj_t * Abc_NtkCreateBi(Abc_Ntk_t *pNtk)
char * Io_MvLoadFileBz2(char *pFileName, int *pnFileSize)
static Abc_Obj_t * Abc_ObjFanin(Abc_Obj_t *pObj, int i)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Abc_Obj_t * Io_ReadCreatePo(Abc_Ntk_t *pNtk, char *pName)
static int Io_MvParseLineNamesBlif(Io_MvMod_t *p, char *pLine)
int ZEXPORT gzread(gzFile file, voidp buf, unsigned len)
static void Abc_LatchSetInit0(Abc_Obj_t *pLatch)
static void ** Vec_PtrArray(Vec_Ptr_t *p)
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
static Io_MvVar_t * Abc_NtkMvVarDup(Abc_Ntk_t *pNtk, Io_MvVar_t *pVar)
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
static Io_MvMod_t * Io_MvModAlloc()
ABC_DLL char * Abc_ObjNameSuffix(Abc_Obj_t *pObj, char *pSuffix)
#define Abc_NtkForEachPi(pNtk, pPi, i)
static void Vec_PtrFree(Vec_Ptr_t *p)
static int Io_MvParseLineOutputs(Io_MvMod_t *p, char *pLine)