mirror of https://github.com/YosysHQ/abc.git
Improving truth table handling.
This commit is contained in:
parent
6345832dba
commit
ea5648db3f
|
|
@ -924,7 +924,7 @@ int Abc_SopCheckReadTruth( Vec_Ptr_t * vRes, char * pToken, int fHex )
|
|||
int Log2 = Abc_Base2Log( strlen(pToken) );
|
||||
if ( (1 << Log2) != (int)strlen(pToken) )
|
||||
{
|
||||
printf( "The truth table length (%d) is not power-of-2.\n", strlen(pToken) );
|
||||
printf( "The truth table length (%d) is not power-of-2.\n", (int)strlen(pToken) );
|
||||
Vec_PtrFreeData( vRes );
|
||||
Vec_PtrShrink( vRes, 0 );
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -37868,7 +37868,22 @@ int Abc_CommandAbc9Cec( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
}
|
||||
}
|
||||
// compute the miter
|
||||
pMiter = Gia_ManMiter( pGias[0], pGias[1], 0, !fUseNew, 0, 0, pPars->fVerbose );
|
||||
if ( Gia_ManCiNum(pGias[0]) < 6 )
|
||||
{
|
||||
Gia_Man_t * pGias0 = Gia_ManDup( pGias[0] );
|
||||
Gia_Man_t * pGias1 = Gia_ManDup( pGias[1] );
|
||||
for ( c = Gia_ManCiNum(pGias[0]); c < 6; c++ )
|
||||
{
|
||||
Gia_ManAppendCi(pGias0);
|
||||
Gia_ManAppendCi(pGias1);
|
||||
}
|
||||
pMiter = Gia_ManMiter( pGias0, pGias1, 0, !fUseNew, 0, 0, pPars->fVerbose );
|
||||
Gia_ManStop( pGias0 );
|
||||
Gia_ManStop( pGias1 );
|
||||
}
|
||||
else
|
||||
pMiter = Gia_ManMiter( pGias[0], pGias[1], 0, !fUseNew, 0, 0, pPars->fVerbose );
|
||||
|
||||
if ( pMiter )
|
||||
{
|
||||
if ( fDumpMiter )
|
||||
|
|
|
|||
|
|
@ -1142,7 +1142,17 @@ int IoCommandReadTruth( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
goto usage;
|
||||
|
||||
if ( fFile )
|
||||
{
|
||||
FILE * pFile = fopen( argv[globalUtilOptind], "rb" );
|
||||
if ( pFile == NULL )
|
||||
{
|
||||
printf( "The file \"%s\" cannot be found.\n", argv[globalUtilOptind] );
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
fclose( pFile );
|
||||
pStr = Extra_FileReadContents( argv[globalUtilOptind] );
|
||||
}
|
||||
else
|
||||
pStr = argv[globalUtilOptind];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue