Fixing built-in resource limit when converting truth-tables to AIGs.

This commit is contained in:
Alan Mishchenko 2011-10-08 23:18:44 +07:00
parent 924ec940fe
commit 9daabedff5
2 changed files with 6 additions and 1 deletions

View File

@ -360,7 +360,7 @@ Kit_Graph_t * Kit_TruthToGraph( unsigned * pTruth, int nVars, Vec_Int_t * vMemor
RetValue = Kit_TruthIsop( pTruth, nVars, vMemory, 1 ); // tried 1 and found not useful in "renode"
if ( RetValue == -1 )
return NULL;
if ( Vec_IntSize(vMemory) > 1024 )
if ( Vec_IntSize(vMemory) > (1<<16) )
return NULL;
// printf( "Isop size = %d.\n", Vec_IntSize(vMemory) );
assert( RetValue == 0 || RetValue == 1 );

View File

@ -111,6 +111,11 @@ Hop_Obj_t * Kit_TruthToHop( Hop_Man_t * pMan, unsigned * pTruth, int nVars, Vec_
}
else
pGraph = Kit_TruthToGraph( pTruth, nVars, vMemory );
if ( pGraph == NULL )
{
printf( "Kit_TruthToHop(): Converting truth table to AIG has failed for function:\n" );
Kit_DsdPrintFromTruth( pTruth, nVars ); printf( "\n" );
}
// derive the AIG for the decomposition tree
pObj = Kit_GraphToHop( pMan, pGraph );
Kit_GraphFree( pGraph );