Commit 645752f7 by Alan Mishchenko

Making sure read_bench can read nodes up to 15 inputs.

parent 9b759067
......@@ -88,7 +88,7 @@ Abc_Ntk_t * Io_ReadBenchNetwork( Extra_FileReader_t * p )
Abc_Ntk_t * pNtk;
Abc_Obj_t * pNode, * pNet;
Vec_Str_t * vString;
unsigned uTruth[8];
unsigned uTruth[2048];
char * pType, ** ppNames, * pString;
int iLine, nNames, nDigits, fLutsPresent = 0;
......@@ -161,7 +161,7 @@ Abc_Ntk_t * Io_ReadBenchNetwork( Extra_FileReader_t * p )
ppNames = (char **)vTokens->pArray + 3;
nNames = vTokens->nSize - 3;
// check the number of inputs
if ( nNames > 8 )
if ( nNames > 15 )
{
printf( "%s: Currently cannot read truth tables with more than 8 inputs (%d).\n", Extra_FileReaderGetFileName(p), nNames );
Vec_StrFree( vString );
......
......@@ -1351,7 +1351,8 @@ static int Io_MvParseLineSubckt( Io_MvMod_t * p, char * pLine )
Abc_Ntk_t * pModel;
Abc_Obj_t * pBox, * pNet, * pTerm;
char * pToken, * pName, * pName2, ** ppNames;
int nEquals, Last, i, k;
int nEquals, i, k;
word Last;
// split the line into tokens
nEquals = Io_MvCountChars( pLine, '=' );
......@@ -1404,9 +1405,9 @@ static int Io_MvParseLineSubckt( Io_MvMod_t * p, char * pLine )
pName2 = NULL;
pName = Abc_ObjName(Abc_ObjFanout0(pTerm));
for ( k = 0; k < nEquals; k++ )
if ( !strcmp( ppNames[2*((k+Last)%nEquals)], pName ) )
if ( !strcmp( ppNames[2*(int)((k+Last)%nEquals)], pName ) )
{
pName2 = ppNames[2*((k+Last)%nEquals)+1];
pName2 = ppNames[2*(int)((k+Last)%nEquals)+1];
Last = k+Last+1;
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment