diff options
Diffstat (limited to 'src/aig/gia')
-rw-r--r-- | src/aig/gia/giaGen.c | 9 | ||||
-rw-r--r-- | src/aig/gia/giaSimBase.c | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/aig/gia/giaGen.c b/src/aig/gia/giaGen.c index 09a859ad..0b1ad7b5 100644 --- a/src/aig/gia/giaGen.c +++ b/src/aig/gia/giaGen.c @@ -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 ); diff --git a/src/aig/gia/giaSimBase.c b/src/aig/gia/giaSimBase.c index db8008e7..ff658eff 100644 --- a/src/aig/gia/giaSimBase.c +++ b/src/aig/gia/giaSimBase.c @@ -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 ); } |