109 p->pFileName = pFileName;
111 if ( p->pReader == NULL )
123 p->pDesign->pLibrary = pGateLib;
173 p->fUseMemMan = fUseMemMan;
177 p->pDesign->pManFunc = NULL;
182 pDesign = p->pDesign;
212 if ( pToken == NULL )
214 if (
strcmp( pToken,
"module" ) )
216 sprintf( pMan->sError,
"Cannot read \"module\" directive." );
225 pMan->pProgress = NULL;
240 sprintf( pMan->sError,
"The network check has failed for network %s.", pNtk->
pName );
282 fprintf( p->Output,
"%s: %s\n", p->pFileName, p->sError );
284 fprintf( p->Output,
"%s (line %d): %s\n",
311 pNtkNew->
pSpec = NULL;
333 if ( !
strcmp( pName,
"1\'b0" ) || !
strcmp( pName,
"1\'bx" ) )
335 if ( !
strcmp( pName,
"1\'b1" ) )
361 pNtk->
pManFunc = pMan->pDesign->pGenlib;
365 sprintf( pMan->sError,
"The network %s appears to have both gates and assign statements. Currently such network are not allowed. One way to fix this problem might be to replace assigns by buffers from the library.", pNtk->
pName );
378 pNtk->
pManFunc = pMan->pDesign->pManFunc;
382 sprintf( pMan->sError,
"The network %s appears to have both gates and assign statements. Currently such network are not allowed. One way to fix this problem might be to replace assigns by buffers from the library.", pNtk->
pName );
406 char * pWord, Symbol;
418 sprintf( pMan->sError,
"Cannot find \"(\" after \"module\" in network %s.", pNtk->
pName );
428 }
while ( Symbol ==
',' );
435 sprintf( pMan->sError,
"Expected closing paranthesis after \"module\"." );
447 if ( !
strcmp( pWord,
"input" ) )
449 else if ( !
strcmp( pWord,
"output" ) )
451 else if ( !
strcmp( pWord,
"reg" ) )
453 else if ( !
strcmp( pWord,
"wire" ) )
455 else if ( !
strcmp( pWord,
"inout" ) )
468 if ( !
strcmp( pWord,
"and" ) )
470 else if ( !
strcmp( pWord,
"or" ) )
472 else if ( !
strcmp( pWord,
"xor" ) )
474 else if ( !
strcmp( pWord,
"buf" ) )
476 else if ( !
strcmp( pWord,
"nand" ) )
478 else if ( !
strcmp( pWord,
"nor" ) )
480 else if ( !
strcmp( pWord,
"xnor" ) )
482 else if ( !
strcmp( pWord,
"not" ) )
485 else if ( !
strcmp( pWord,
"dff" ) )
488 else if ( !
strcmp( pWord,
"assign" ) )
490 else if ( !
strcmp( pWord,
"always" ) )
492 else if ( !
strcmp( pWord,
"initial" ) )
494 else if ( !
strcmp( pWord,
"endmodule" ) )
500 else if ( !
strcmp( pWord,
"wire" ) )
566 *pnMsb = *pnLsb = -1;
567 if ( pMan->tName2Suffix == NULL )
569 if ( !
st__lookup( pMan->tName2Suffix, (
char *)pWord, (
char **)&Value ) )
571 *pnMsb = (Value >> 8) & 0xff;
572 *pnLsb = Value & 0xff;
590 if ( pMan->tName2Suffix == NULL )
594 assert( nMsb >= 0 && nMsb < 128 );
595 assert( nLsb >= 0 && nLsb < 128 );
596 Value = (nMsb << 8) | nLsb;
615 char * pKey, * pValue;
616 if ( pMan->tName2Suffix == NULL )
618 st__foreach_item( pMan->tName2Suffix, gen, (
const char **)&pKey, (
char **)&pValue )
621 pMan->tName2Suffix = NULL;
637 char * pWord = *ppWord, * pTemp;
639 assert( pWord[0] ==
'[' );
641 nMsb = atoi( pWord + 1 );
643 while ( *pWord && *pWord !=
':' && *pWord !=
']' )
647 sprintf( pMan->sError,
"Cannot find closing bracket in this line." );
656 nLsb = atoi( pWord + 1 );
658 while ( *pWord && *pWord !=
']' )
662 sprintf( pMan->sError,
"Cannot find closing bracket in this line." );
670 if ( *pWord ==
'\\' )
674 while ( *pTemp && *pTemp !=
' ' )
680 assert( nMsb >= 0 && nLsb >= 0 );
704 assert( pWord[Length-1] ==
']' );
706 for ( pCur = pWord + Length - 2; pCur != pWord; pCur-- )
707 if ( *pCur ==
':' || *pCur ==
'[' )
711 sprintf( pMan->sError,
"Cannot find opening bracket in signal name %s.", pWord );
717 *pnMsb = *pnLsb = atoi(pCur+1);
723 *pnLsb = atoi(pCur+1);
725 for ( pCur = pWord + Length - 2; pCur != pWord; pCur-- )
730 sprintf( pMan->sError,
"Cannot find opening bracket in signal name %s.", pWord );
736 *pnMsb = atoi(pCur+1);
756 assert( pWord[0] >=
'1' && pWord[1] <=
'9' );
759 while ( *pWord && *pWord !=
'\'' )
763 sprintf( pMan->sError,
"Cannot find symbol \' in the constant." );
771 sprintf( pMan->sError,
"Currently can only handle binary constants." );
778 for ( i = 0; i < nBits; i++ )
780 if ( pWord[i] !=
'0' && pWord[i] !=
'1' && pWord[i] !=
'x' )
782 sprintf( pMan->sError,
"Having problem parsing the binary constant." );
786 if ( pWord[i] ==
'x' )
789 Vec_PtrPush( pMan->vNames, (
void *)(ABC_PTRUINT_T)(pWord[i]-
'0') );
808 char Buffer[1000], Symbol, * pWord;
809 int nMsb, nLsb, Bit, Limit, i;
818 if ( !
strcmp(pWord,
"wire") )
822 if ( pWord[0] ==
'[' && !pMan->fNameLast )
824 assert( nMsb == -1 && nLsb == -1 );
837 if ( nMsb == -1 && nLsb == -1 )
848 assert( nMsb >= 0 && nLsb >= 0 );
852 Limit = nMsb > nLsb? nMsb - nLsb + 1: nLsb - nMsb + 1;
853 for ( i = 0, Bit = nLsb; i < Limit; i++, Bit = nMsb > nLsb ? Bit + 1: Bit - 1 )
857 sprintf( Buffer,
"%s[%d]", pWord, Bit );
859 sprintf( Buffer,
"%s", pWord );
876 sprintf( pMan->sError,
"Cannot parse signal line (expected , or ;)." );
897 char * pWord, * pWord2;
903 if ( pWord[0] ==
'@' )
914 if (
strcmp( pWord,
"begin" ) )
919 if ( !fStopAfterOne )
926 if ( !
strcmp( pWord,
"end" ) )
933 sprintf( pMan->sError,
"Cannot read the always statement for %s (output wire is not defined).", pWord );
939 if ( Symbol !=
'<' && Symbol !=
'=' )
941 sprintf( pMan->sError,
"Cannot read the assign statement for %s (expected <= or =).", pWord );
952 if ( pWord2 == NULL )
955 if ( pWord2[0] ==
'~' )
964 sprintf( pMan->sError,
"Cannot read the always statement for %s (input wire is not defined).", pWord2 );
996 char * pWord, * pEquation;
1000 if ( pWord == NULL )
1004 if (
strcmp( pWord,
"begin" ) )
1009 if ( !fStopAfterOne )
1013 if ( pWord == NULL )
1016 if ( !
strcmp( pWord,
"end" ) )
1023 sprintf( pMan->sError,
"Cannot read the initial statement for %s (output wire is not defined).", pWord );
1029 if ( Symbol !=
'<' && Symbol !=
'=' )
1031 sprintf( pMan->sError,
"Cannot read the assign statement for %s (expected <= or =).", pWord );
1035 if ( Symbol ==
'<' )
1042 if ( pEquation == NULL )
1047 sprintf( pMan->sError,
"Cannot find the latch to assign the initial value." );
1054 if ( !
strcmp(pEquation,
"0") || !
strcmp(pEquation,
"1\'b0") )
1056 else if ( !
strcmp(pEquation,
"1") || !
strcmp(pEquation,
"1\'b1") )
1062 sprintf( pMan->sError,
"Incorrect initial value of the latch %s.",
Abc_ObjName(pNet) );
1070 if ( fStopAfterOne )
1089 char Buffer[1000], Buffer2[1000];
1092 char * pWord, * pName, * pEquation;
1095 int i, Bit, Limit, Length, fReduction;
1111 if ( pWord == NULL )
1113 if (
strcmp(pWord,
"#1") == 0 )
1119 Limit = nMsb > nLsb? nMsb - nLsb + 1: nLsb - nMsb + 1;
1120 if ( nMsb >= 0 && nLsb >= 0 && Limit > 1 )
1123 if ( !
strcmp(pWord,
"1\'h0") )
1124 strcpy( Buffer,
"1\'b0" );
1125 else if ( !
strcmp(pWord,
"1\'h1") )
1126 strcpy( Buffer,
"1\'b1" );
1132 sprintf( pMan->sError,
"Cannot read the assign statement for %s (expected equality sign).", pWord );
1138 if ( pWord == NULL )
1141 if ( !(pWord[0] >=
'0' && pWord[0] <=
'9') )
1143 sprintf( pMan->sError,
"Currently can only assign vector-signal \"%s\" to be a constant.", Buffer );
1152 Limit = nMsb > nLsb? nMsb - nLsb + 1: nLsb - nMsb + 1;
1155 sprintf( pMan->sError,
"The constant size (%d) is different from the signal\"%s\" size (%d).",
1161 for ( i = 0, Bit = nLsb; i < Limit; i++, Bit = nMsb > nLsb ? Bit + 1: Bit - 1 )
1174 sprintf( Buffer2,
"%s[%d]", Buffer, Bit );
1178 sprintf( pMan->sError,
"Cannot read the assign statement for %s (output wire is not defined).", pWord );
1191 if ( pWord[0] ==
'{' && !pMan->fNameLast )
1196 pWord[
strlen(pWord)-1] = 0;
1197 assert( pWord[0] !=
'\\' );
1203 sprintf( pMan->sError,
"Cannot read the assign statement for %s (output wire is not defined).", pWord );
1210 sprintf( pMan->sError,
"Cannot read the assign statement for %s (expected equality sign).", pWord );
1222 if ( pEquation == NULL )
1231 if ( pMan->fMapped )
1233 if ( !
strcmp( pEquation,
"1\'b0" ) )
1235 else if ( !
strcmp( pEquation,
"1\'b1" ) )
1240 if ( *pEquation ==
'\\' )
1243 pEquation[
strlen(pEquation) - 1] = 0;
1247 sprintf( pMan->sError,
"Cannot read Verilog with non-trivial assignments in the mapped netlist." );
1255 if ( pFunc == NULL )
1257 sprintf( pMan->sError,
"Reading assign statement for node %s has failed because the genlib library has no buffer.",
Abc_ObjName(pNet) );
1265 if ( !
strcmp(pEquation,
"0") || !
strcmp(pEquation,
"1\'b0") || !
strcmp(pEquation,
"1\'bx") )
1267 else if ( !
strcmp(pEquation,
"1") || !
strcmp(pEquation,
"1\'b1") )
1269 else if ( fReduction )
1273 if ( pFunc == NULL )
1282 pNode->
pData = pFunc;
1285 for ( i = 0; i <
Vec_PtrSize(pMan->vNames)/2; i++ )
1288 Length = (int)(ABC_PTRUINT_T)
Vec_PtrEntry( pMan->vNames, 2*i );
1293 if ( !
strcmp(pName,
"1\'h0") )
1295 else if ( !
strcmp(pName,
"1\'h1") )
1302 sprintf( pMan->sError,
"Cannot read the assign statement for %s (input wire %s is not defined).", pWord, pName );
1311 if ( Symbol ==
',' )
1313 if ( Symbol ==
';' )
1334 char * pWord, Symbol;
1343 sprintf( pMan->sError,
"Cannot parse a standard gate (expected opening paranthesis)." );
1357 if ( pWord == NULL )
1363 sprintf( pMan->sError,
"Net is missing in gate %s.", pWord );
1375 if ( Symbol ==
')' )
1378 if ( Symbol !=
',' )
1430 char * pWord, Symbol;
1439 sprintf( pMan->sError,
"Cannot parse a standard gate (expected opening paranthesis)." );
1447 if ( pWord == NULL )
1451 if ( pNetLo == NULL )
1453 sprintf( pMan->sError,
"Net is missing in gate %s.", pWord );
1461 if ( Symbol ==
')' )
1463 sprintf( pMan->sError,
"Cannot parse the flop." );
1468 if ( Symbol !=
',' )
1470 sprintf( pMan->sError,
"Cannot parse the flop." );
1478 if ( pWord == NULL )
1482 if ( pNetLi == NULL )
1484 sprintf( pMan->sError,
"Net is missing in gate %s.", pWord );
1492 if ( Symbol !=
')' )
1494 sprintf( pMan->sError,
"Cannot parse the flop." );
1503 sprintf( pMan->sError,
"Cannot parse the flop." );
1553 Abc_Obj_t * pNetActual, * pNode, * pNode2 = NULL;
1554 char * pWord, Symbol;
1558 if ( 1 != pMan->fMapped )
1560 sprintf( pMan->sError,
"The network appears to be mapped. Use \"r -m\" to read mapped Verilog." );
1571 if ( pWord == NULL )
1584 pNode->
pData = pGate;
1604 if ( pWord == NULL )
1619 sprintf( pMan->sError,
"Cannot formal parameter %s of gate %s (expected opening paranthesis).", pWord,
Mio_GateReadName(pGate) );
1626 if ( pWord == NULL )
1629 assert( pWord[0] !=
'~' );
1642 if ( pNetActual == NULL )
1644 sprintf( pMan->sError,
"Actual net %s is missing.", pWord );
1652 sprintf( pMan->sError,
"Cannot formal parameter %s of gate %s (expected closing paranthesis).", pWord,
Mio_GateReadName(pGate) );
1658 if ( Input < nFanins )
1665 else if ( Input == nFanins )
1667 else if ( Input == nFanins + 1 )
1675 if ( Symbol ==
')' )
1679 if ( Symbol !=
',' )
1681 sprintf( pMan->sError,
"Cannot formal parameter %s of gate %s (expected closing paranthesis).", pWord,
Mio_GateReadName(pGate) );
1712 for ( i = 0; i < nFanins; i++ )
1715 for ( i = 0; i < nFanins; i++ )
1740 char * pWord, Symbol;
1741 int fCompl, fFormalIsGiven;
1742 int i, k, Bit, Limit, nMsb, nLsb, fQuit, flag;
1746 if ( pWord == NULL )
1751 pNode->
pData = pNtkBox;
1757 sprintf( pMan->sError,
"Cannot parse box %s (expected opening paranthesis).",
Abc_ObjName(pNode) );
1788 if ( pWord == NULL )
1797 sprintf( pMan->sError,
"Cannot formal parameter %s of box %s (expected opening paranthesis).", pWord,
Abc_ObjName(pNode));
1808 if ( Symbol ==
'{' )
1821 if ( pWord == NULL )
1825 if ( pWord[
strlen(pWord)-1] ==
'}' )
1827 pWord[
strlen(pWord)-1] = 0;
1830 if ( pWord[0] == 0 )
1834 if ( pWord[0] >=
'1' && pWord[0] <=
'9' )
1839 for ( k = 0; k <
Vec_PtrSize(pMan->vNames); k++, i++ )
1844 if ( pNetActual == NULL )
1846 sprintf( pMan->sError,
"Actual net \"%s\" is missing in gate \"%s\".", Buffer,
Abc_ObjName(pNode) );
1856 if ( pWord[
strlen(pWord)-1] ==
']' && !pMan->fNameLast )
1862 if ( nMsb == -1 && nLsb == -1 )
1866 if ( pNetActual == NULL )
1868 if ( !
strncmp(pWord,
"Open_", 5) ||
1869 !
strncmp(pWord,
"dct_unconnected", 15) )
1873 sprintf( pMan->sError,
"Actual net \"%s\" is missing in box \"%s\".", pWord,
Abc_ObjName(pNode) );
1884 assert( nMsb >= 0 && nLsb >= 0 );
1885 Limit = (nMsb > nLsb) ? nMsb - nLsb + 1: nLsb - nMsb + 1;
1886 for ( Bit = nMsb, k = Limit - 1; k >= 0; Bit = (nMsb > nLsb ? Bit - 1: Bit + 1), k--, i++ )
1889 sprintf( Buffer,
"%s[%d]", pWord, Bit );
1891 if ( pNetActual == NULL )
1893 if ( !
strncmp(pWord,
"Open_", 5) ||
1894 !
strncmp(pWord,
"dct_unconnected", 15) )
1898 sprintf( pMan->sError,
"Actual net \"%s\" is missing in box \"%s\".", pWord,
Abc_ObjName(pNode) );
1914 if ( Symbol ==
'}' )
1916 if ( Symbol !=
',' )
1918 sprintf( pMan->sError,
"Cannot parse formal parameter %s of gate %s (expected comma).", pWord,
Abc_ObjName(pNode) );
1928 if ( pWord == NULL )
1932 if ( pWord[0] == 0 )
1942 if ( pNetActual == NULL )
1945 if ( nMsb == -1 && nLsb == -1 )
1948 if ( nMsb == -1 && nLsb == -1 )
1950 if ( !
strncmp(pWord,
"Open_", 5) ||
1951 !
strncmp(pWord,
"dct_unconnected", 15) )
1958 sprintf( pMan->sError,
"Actual net \"%s\" is missing in box \"%s\".", pWord,
Abc_ObjName(pNode) );
1974 Limit = (nMsb > nLsb) ? nMsb - nLsb + 1: nLsb - nMsb + 1;
1975 for ( Bit = nMsb, k = Limit - 1; k >= 0; Bit = (nMsb > nLsb ? Bit - 1: Bit + 1), k--)
1978 sprintf( Buffer,
"%s[%d]", pWord, Bit );
1980 if ( pNetActual == NULL )
1982 if ( !
strncmp(pWord,
"Open_", 5) ||
1983 !
strncmp(pWord,
"dct_unconnected", 15))
1987 sprintf( pMan->sError,
"Actual net \"%s\" is missing in box \"%s\".", pWord,
Abc_ObjName(pNode) );
2003 if ( fFormalIsGiven )
2009 sprintf( pMan->sError,
"Cannot parse formal parameter %s of box %s (expected closing paranthesis).", pWord,
Abc_ObjName(pNode) );
2018 if ( Symbol ==
')' )
2021 if ( Symbol !=
',' )
2023 sprintf( pMan->sError,
"Cannot parse formal parameter %s of box %s (expected comma).", pWord,
Abc_ObjName(pNode) );
2034 sprintf( pMan->sError,
"Cannot read box %s (expected closing semicolumn).",
Abc_ObjName(pNode) );
2076 Abc_Obj_t * pTerm, * pTermNew, * pNetAct;
2079 int i, k, j, iBundle, Length;
2096 sprintf( pMan->sError,
"The number of actual IOs (%d) is bigger than the number of formal IOs (%d) when instantiating network %s in box %s.",
2113 printf(
"Warning: The instance %s of network %s will be connected without using formal names.\n", pNtkBox->pName,
Abc_ObjName(pBox) );
2122 sprintf( pMan->sError,
"The number of actual IOs (%d) is different from the number of formal IOs (%d) when instantiating network %s in box %s.",
2181 assert( pBundle != NULL );
2186 Length =
strlen(pNameFormal);
2187 if ( pNameFormal[Length-1] ==
']' )
2190 for ( Length--; Length >= 0; Length-- )
2191 if ( pNameFormal[Length] ==
'[' )
2203 if ( pBundle == NULL )
2205 sprintf( pMan->sError,
"Cannot find an actual net for the formal net %s when instantiating network %s in box %s.",
2232 assert( pBundle != NULL );
2237 Length =
strlen(pNameFormal);
2238 if ( pNameFormal[Length-1] ==
']' )
2241 for ( Length--; Length >= 0; Length-- )
2242 if ( pNameFormal[Length] ==
'[' )
2254 if ( pBundle == NULL )
2272 sprintf( pMan->sError,
"It looks like formal output %s is driving a constant net (%s) when instantiating network %s in box %s.",
2314 int i, k, RetValue = 1;
2324 if ( pBox->
pData == NULL )
2372 if ( pNtkBox == NULL )
2376 if ( pNtkBox->
pData == NULL )
2419 printf(
"Warning: The design contains %d undefined object types interpreted as blackboxes:\n", nBoxes );
2521 if ( pBundle == NULL )
2547 Abc_Obj_t * pBox, * pTerm, * pTermNew, * pNetAct, * pNetFormal;
2585 sprintf( pMan->sError,
"Missing specification of the I/Os of undefined box \"%s\".",
Abc_NtkName(pNtk) );
2621 Abc_Obj_t * pBox, * pBox2, * pTerm, * pTermNew, * pNetFormal, * pNetAct;
2622 int i, k, j, m, CountCur, CountTotal = -1;
2632 CountCur += (pBundle != NULL);
2633 if ( CountTotal == -1 )
2634 CountTotal = CountCur;
2635 else if ( CountTotal != CountCur )
2637 sprintf( pMan->sError,
"The number of formal inputs (%d) is different from the expected one (%d) when instantiating network %s in box %s.",
2648 if ( pBundle == NULL )
2675 if ( pBundle == NULL )
2713 int i, k, nMaxSize = 0;
2740 char * pNameGeneric;
2742 int i, k, Count1 = 0;
2746 sprintf( Buffer,
"%s.log", pNameGeneric );
2748 pFile = fopen( Buffer,
"w" );
2759 if ( pNtkBox == NULL )
2764 fprintf( pFile,
"The hierarhical design %s contains %d modules:\n", pMan->pFileName,
Vec_PtrSize(pMan->pDesign->vModules) );
2769 fprintf( pFile,
"undefbox" );
2771 fprintf( pFile,
"blackbox" );
2773 fprintf( pFile,
"logicbox" );
2774 fprintf( pFile,
" instantiated %6d times ", pNtk->
fHieVisited );
2781 fprintf( pFile,
"\n" );
2786 fprintf( pFile,
"The number of modules with one output = %d (%.2f %%).\n", Count1, 100.0 * Count1/
Vec_PtrSize(pMan->pDesign->vModules) );
2803 if ( pNtkBox == NULL )
2817 fprintf( pFile,
"The outputs of all box instances are connected.\n" );
2820 fprintf( pFile,
"\n" );
2821 fprintf( pFile,
"The outputs of %d box instances are not connected:\n", Counter );
2831 if ( pNtkBox == NULL )
2841 fprintf( pFile,
"In module \"%s\" instance \"%s\" of box \"%s\" has different numbers of actual/formal nets (%d/%d).\n",
2848 printf(
"Hierarchy statistics can be found in log file \"%s\".\n", Buffer );
2876 int i, RetValue,
Counter, nMaxBoxSize;
2879 if ( fPrintLog && pMan->pDesign->vModules &&
Vec_PtrSize(pMan->pDesign->vModules) > 1 )
2904 if ( pBundle == NULL )
Mio_Gate_t * Mio_LibraryReadBuf(Mio_Library_t *pLib)
Ver_Bundle_t * Ver_ParseGetNondrivenBundle(Abc_Ntk_t *pNtk, int Counter)
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Mio_Gate_t * Mio_LibraryReadGateByName(Mio_Library_t *pLib, char *pName, char *pOutName)
static Abc_Obj_t * Ver_ParseCreateInv(Abc_Ntk_t *pNtk, Abc_Obj_t *pNet)
void st__free_table(st__table *table)
int Ver_ParseSignalPrefix(Ver_Man_t *pMan, char **ppWord, int *pnMsb, int *pnLsb)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static int Ver_ParseAssign(Ver_Man_t *p, Abc_Ntk_t *pNtk)
int Ver_StreamGetLineNumber(Ver_Stream_t *p)
void * Ver_FormulaParser(char *pFormula, void *pMan, Vec_Ptr_t *vNames, Vec_Ptr_t *vStackFn, Vec_Int_t *vStackOp, char *pErrorMessage)
FUNCTION DEFINITIONS ///.
ABC_DLL void * Abc_FrameReadLibGen()
int Ver_FindGateInput(Mio_Gate_t *pGate, char *pName)
int Ver_ParseDriveInputs(Ver_Man_t *pMan, Vec_Ptr_t *vUndefs)
static int Ver_ObjIsConnected(Abc_Obj_t *pObj)
static Hop_Obj_t * Hop_ManConst1(Hop_Man_t *p)
static int Ver_ParseInitial(Ver_Man_t *p, Abc_Ntk_t *pNtk)
int Ver_ParseSignalSuffix(Ver_Man_t *pMan, char *pWord, int *pnMsb, int *pnLsb)
#define Vec_PtrForEachEntryReverse(Type, vVec, pEntry, i)
int st__insert(st__table *table, const char *key, char *value)
Mio_Pin_t * Mio_GateReadPins(Mio_Gate_t *pGate)
static int Abc_ObjIsLatch(Abc_Obj_t *pObj)
ABC_DLL Abc_Des_t * Abc_DesCreate(char *pName)
DECLARATIONS ///.
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
static int Abc_NtkBoxNum(Abc_Ntk_t *pNtk)
static void Ver_ParseInternal(Ver_Man_t *p)
ABC_DLL int Abc_DesAddModel(Abc_Des_t *p, Abc_Ntk_t *pNtk)
Vec_Ptr_t * Ver_ParseCollectUndefBoxes(Ver_Man_t *pMan)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
static int Ver_ParseBox(Ver_Man_t *pMan, Abc_Ntk_t *pNtk, Abc_Ntk_t *pNtkBox)
char Ver_StreamPopChar(Ver_Stream_t *p)
char * Mio_GateReadOutName(Mio_Gate_t *pGate)
Abc_Des_t * Ver_ParseFile(char *pFileName, Abc_Des_t *pGateLib, int fCheck, int fUseMemMan)
MACRO DEFINITIONS ///.
static int Abc_NtkLatchNum(Abc_Ntk_t *pNtk)
char * Mio_PinReadName(Mio_Pin_t *pPin)
Hop_Obj_t * Hop_CreateExor(Hop_Man_t *p, int nVars)
static int Ver_ParseSignal(Ver_Man_t *p, Abc_Ntk_t *pNtk, Ver_SignalType_t SigType)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static void Ver_ParseFreeData(Ver_Man_t *p)
#define ABC_ALLOC(type, num)
int Ver_ParseConvertNetwork(Ver_Man_t *pMan, Abc_Ntk_t *pNtk, int fMapped)
static void Ver_ParseStop(Ver_Man_t *p)
int Ver_ParseDriveFormal(Ver_Man_t *pMan, Abc_Ntk_t *pNtk, Ver_Bundle_t *pBundle0)
ABC_DLL char * Abc_ObjAssignName(Abc_Obj_t *pObj, char *pName, char *pSuffix)
#define st__is_member(table, key)
ABC_DLL void Abc_NtkFinalizeRead(Abc_Ntk_t *pNtk)
Mio_Pin_t * Mio_PinReadNext(Mio_Pin_t *pPin)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Abc_LatchSetInitDc(Abc_Obj_t *pLatch)
static Abc_Obj_t * Ver_ParseCreatePi(Abc_Ntk_t *pNtk, char *pName)
static Hop_Obj_t * Hop_Not(Hop_Obj_t *p)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
int Ver_ParseSkipComments(Ver_Man_t *p)
DECLARATIONS ///.
static int Ver_ParseFlopStandard(Ver_Man_t *pMan, Abc_Ntk_t *pNtk)
void Hop_ManStop(Hop_Man_t *p)
char * Ver_StreamGetWord(Ver_Stream_t *p, char *pCharsToStop)
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 ///.
Mio_Gate_t * Mio_LibraryReadConst1(Mio_Library_t *pLib)
st__table * st__init_table(st__compare_func_type compare, st__hash_func_type hash)
int Ver_ParseFormalNetsAreDriven(Abc_Ntk_t *pNtk, char *pNameFormal)
static Abc_Obj_t * Abc_NtkCreateBo(Abc_Ntk_t *pNtk)
int Mio_GateReadPinNum(Mio_Gate_t *pGate)
static Abc_Obj_t * Ver_ParseCreateLatch(Abc_Ntk_t *pNtk, Abc_Obj_t *pNetLI, Abc_Obj_t *pNetLO)
char Ver_StreamScanChar(Ver_Stream_t *p)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
int st__strhash(const char *string, int modulus)
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
static int Ver_ParseAttachBoxes(Ver_Man_t *pMan)
int Ver_ParseLookupSuffix(Ver_Man_t *pMan, char *pWord, int *pnMsb, int *pnLsb)
ABC_DLL void Abc_DesFree(Abc_Des_t *p, Abc_Ntk_t *pNtk)
static int Ver_ParseConnectBox(Ver_Man_t *pMan, Abc_Obj_t *pBox)
void Ver_StreamSkipToChars(Ver_Stream_t *p, char *pCharsToStop)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Hop_Obj_t * Hop_CreateAnd(Hop_Man_t *p, int nVars)
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeInv(Abc_Ntk_t *pNtk, Abc_Obj_t *pFanin)
static int Abc_NtkHasBlackbox(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_HEADER_START struct Ver_Man_t_ Ver_Man_t
INCLUDES ///.
int Ver_ParseConstant(Ver_Man_t *pMan, char *pWord)
static int Ver_ParseGateStandard(Ver_Man_t *pMan, Abc_Ntk_t *pNtk, Ver_GateType_t GateType)
ABC_DLL int Abc_NtkCheckRead(Abc_Ntk_t *pNtk)
static void Ver_ParseRemoveSuffixTable(Ver_Man_t *pMan)
static int Vec_IntEntry(Vec_Int_t *p, int i)
#define Abc_NtkForEachBlackbox(pNtk, pObj, i)
#define ABC_NAMESPACE_IMPL_END
ABC_DLL Abc_Obj_t * Abc_NtkFindNet(Abc_Ntk_t *pNtk, char *pName)
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeBuf(Abc_Ntk_t *pNtk, Abc_Obj_t *pFanin)
char * Ver_ParseGetName(Ver_Man_t *p)
int Ver_ParseCheckNondrivenNets(Vec_Ptr_t *vUndefs)
void Ver_ParsePrintLog(Ver_Man_t *pMan)
static Abc_Obj_t * Ver_ParseCreatePo(Abc_Ntk_t *pNtk, char *pName)
static Abc_Obj_t * Abc_NtkCreateLatch(Abc_Ntk_t *pNtk)
STRUCTURE DEFINITIONS ///.
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static Abc_Obj_t * Abc_NtkCreateBlackbox(Abc_Ntk_t *pNtk)
static int Ver_ParseAlways(Ver_Man_t *p, Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_NtkCreatePi(Abc_Ntk_t *pNtk)
ABC_DLL Abc_Obj_t * Abc_NtkFindOrCreateNet(Abc_Ntk_t *pNtk, char *pName)
int Ver_ParseInsertsSuffix(Ver_Man_t *pMan, char *pWord, int nMsb, int nLsb)
static void Abc_ObjBlackboxToWhitebox(Abc_Obj_t *pObj)
#define Abc_NtkForEachBox(pNtk, pObj, i)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
static Abc_Obj_t * Abc_NtkBox(Abc_Ntk_t *pNtk, int i)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static void Abc_LatchSetInit1(Abc_Obj_t *pLatch)
Mio_Gate_t * Mio_GateReadTwin(Mio_Gate_t *pGate)
Hop_Obj_t * Hop_CreateOr(Hop_Man_t *p, int nVars)
int st__lookup(st__table *table, const char *key, char **value)
ABC_DLL Abc_Ntk_t * Abc_DesFindModelByName(Abc_Des_t *p, char *pName)
static int Vec_IntSize(Vec_Int_t *p)
static int Ver_ParseGate(Ver_Man_t *p, Abc_Ntk_t *pNtk, Mio_Gate_t *pGate)
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 ///.
void Ver_ParseReportUndefBoxes(Ver_Man_t *pMan)
int Ver_StreamGetCurPosition(Ver_Stream_t *p)
static int Abc_NtkPiNum(Abc_Ntk_t *pNtk)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
void Ver_StreamFree(Ver_Stream_t *p)
static Abc_Obj_t * Abc_NtkCreateNode(Abc_Ntk_t *pNtk)
void Ver_ParsePrintErrorMessage(Ver_Man_t *p)
Ver_Stream_t * Ver_StreamAlloc(char *pFileName)
FUNCTION DEFINITIONS ///.
void Ver_ParseFreeBundle(Ver_Bundle_t *pBundle)
#define st__foreach_item(table, gen, key, value)
static Abc_Obj_t * Abc_ObjNotCond(Abc_Obj_t *p, int c)
static void Vec_PtrClear(Vec_Ptr_t *p)
static int Abc_ObjIsBox(Abc_Obj_t *pObj)
static int Ver_ParseModule(Ver_Man_t *p)
void * Ver_FormulaReduction(char *pFormula, void *pMan, Vec_Ptr_t *vNames, char *pErrorMessage)
static Hop_Obj_t * Hop_ManConst0(Hop_Man_t *p)
static int Abc_ObjFaninId(Abc_Obj_t *pObj, int i)
static Ver_Man_t * Ver_ParseStart(char *pFileName, Abc_Des_t *pGateLib)
FUNCTION DEFINITIONS ///.
Abc_Ntk_t * Ver_ParseFindOrCreateNetwork(Ver_Man_t *pMan, char *pName)
#define Abc_NtkForEachPo(pNtk, pPo, i)
static Abc_Obj_t * Abc_NtkCreateBi(Abc_Ntk_t *pNtk)
int Ver_StreamGetFileSize(Ver_Stream_t *p)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static void Vec_IntClear(Vec_Int_t *p)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
char * Mio_GateReadName(Mio_Gate_t *pGate)
int Ver_ParseMaxBoxSize(Vec_Ptr_t *vUndefs)
Mio_Gate_t * Mio_LibraryReadConst0(Mio_Library_t *pLib)
static void Abc_LatchSetInit0(Abc_Obj_t *pLatch)
static Abc_Obj_t * Abc_NtkCreatePo(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
static int Ver_NtkIsDefined(Abc_Ntk_t *pNtkBox)
int Ver_ParseConnectDefBoxes(Ver_Man_t *pMan)
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
#define Abc_NtkForEachPi(pNtk, pPi, i)
static Abc_Obj_t * Abc_NtkCreateNet(Abc_Ntk_t *pNtk)
Ver_SignalType_t
DECLARATIONS ///.
static void Vec_PtrFree(Vec_Ptr_t *p)
Abc_Obj_t * Ver_ParseFindNet(Abc_Ntk_t *pNtk, char *pName)