Commit 73496629 by Alan Mishchenko

Several misc changes.

parent e87869b7
......@@ -241,8 +241,8 @@ void Gia_ManDumpPlaFiles( Gia_Man_t * p, int nCexesT, int nCexesV, int Seed, cha
char pFileNameOutT[100];
char pFileNameOutV[100];
sprintf( pFileNameOutT, "train_%s_%d.pla", pFileName ? pFileName : Gia_ManName(p), nSize[0], Gia_ManCiNum(p) );
sprintf( pFileNameOutV, "test_%s_%d.pla", pFileName ? pFileName : Gia_ManName(p), nSize[1], Gia_ManCiNum(p) );
sprintf( pFileNameOutT, "train_%s_%d.pla", pFileName ? pFileName : Gia_ManName(p), nSize[0] );
sprintf( pFileNameOutV, "test_%s_%d.pla", pFileName ? pFileName : Gia_ManName(p), nSize[1] );
Gia_ManRandomW( 1 );
for ( n = 0; n < Seed; n++ )
......@@ -409,6 +409,11 @@ void Gia_ManTestOneFile( Gia_Man_t * p, char * pFileName )
int nIns, nWords;
if ( !Gia_ManSimParamRead( pFileName, &nIns, &nWords ) )
return;
if ( nIns != Gia_ManCiNum(p) )
{
printf( "The number of inputs in the file \"%s\" (%d) does not match the AIG (%d).\n", pFileName, nIns, Gia_ManCiNum(p) );
return;
}
vSimsIn = Vec_WrdStart( nIns * nWords );
vValues = Vec_IntAlloc( nWords * 64 );
Gia_ManSimFileRead( pFileName, nIns, nWords, vSimsIn, vValues );
......
......@@ -857,7 +857,7 @@ Vec_Int_t * Gia_ManSimPatStart( int nItems )
}
void Gia_ManSimRelTest( Gia_Man_t * p )
{
int nWords = Vec_WrdSize(p->vSimsPi) / Gia_ManCiNum(p);
//int nWords = Vec_WrdSize(p->vSimsPi) / Gia_ManCiNum(p);
Vec_Int_t * vObjs = Gia_ManSimPatStart( 4 ); // can be CI/AND/CO
Vec_Wrd_t * vVals = Gia_ManSimPatValues( p );
Vec_Wrd_t * vRel = Gia_ManSimRel( p, vObjs, vVals );
......@@ -1075,7 +1075,7 @@ void Gia_SimAbsSolve( Gia_SimAbsMan_t * p )
Vec_IntForEachEntry( p->vResub, iPat, i )
printf( "%4d ", iPat );
for ( ; i < 16; i++ )
printf( " ", iPat );
printf( " " );
printf( " " );
Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
......
......@@ -680,7 +680,7 @@ int Acb_NtkExtract( char * pFileName0, char * pFileName1, int fVerbose,
***********************************************************************/
Vec_Int_t * Acb_NtkPlaces( char * pFileName, Vec_Ptr_t * vNames )
{
Vec_Int_t * vPlaces; int First = 1, Pos = -1;
Vec_Int_t * vPlaces; int First = 1, Pos = -1, fComment = 0;
char * pTemp, * pBuffer = Extra_FileReadContents( pFileName );
char * pLimit = pBuffer + strlen(pBuffer);
if ( pBuffer == NULL )
......@@ -689,6 +689,13 @@ Vec_Int_t * Acb_NtkPlaces( char * pFileName, Vec_Ptr_t * vNames )
for ( pTemp = pBuffer; *pTemp; pTemp++ )
{
if ( *pTemp == '\n' )
fComment = 0;
if ( *pTemp == '/' && *(pTemp + 1) == '/' )
fComment = 1;
if ( fComment )
continue;
if ( *pTemp == '\n' )
Pos = pTemp - pBuffer + 1;
else if ( *pTemp == '(' )
{
......
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