Commit 701565eb by Alan Mishchenko

Set the default cube limit in 'satclp' to be 0.

parent 637da8ba
...@@ -3102,8 +3102,8 @@ usage: ...@@ -3102,8 +3102,8 @@ usage:
int Abc_CommandSatClp( Abc_Frame_t * pAbc, int argc, char ** argv ) int Abc_CommandSatClp( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc), * pNtkRes; Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc), * pNtkRes;
int nCubeLim = 1000; int nCubeLim = 0;
int nBTLimit = 1000000; int nBTLimit = 1000000;
int nCostMax = 20000000; int nCostMax = 20000000;
int fCanon = 0; int fCanon = 0;
int fReverse = 0; int fReverse = 0;
...@@ -431,16 +431,19 @@ Abc_Ntk_t * Abc_NtkFromSops( Abc_Ntk_t * pNtk, int nCubeLim, int nBTLimit, int n ...@@ -431,16 +431,19 @@ Abc_Ntk_t * Abc_NtkFromSops( Abc_Ntk_t * pNtk, int nCubeLim, int nBTLimit, int n
// order CO nodes by support size // order CO nodes by support size
vCoNodes = Abc_NtkCreateCoOrder( pNtk, vSupps ); vCoNodes = Abc_NtkCreateCoOrder( pNtk, vSupps );
// compute cost of the largest node // compute cost of the largest node
pNode = (Abc_Obj_t *)Vec_PtrEntry( vCoNodes, 0 ); if ( nCubeLim > 0 )
vDfsNodes = Abc_NtkDfsNodes( pNtk, &pNode, 1 );
vLevel = Vec_WecEntry( vSupps, Abc_ObjFaninId0(pNode) );
Cost = Vec_PtrSize(vDfsNodes) * Vec_IntSize(vLevel) * nCubeLim;
Vec_PtrFree( vDfsNodes );
if ( Cost > nCostMax )
{ {
Vec_PtrFree( vCoNodes ); pNode = (Abc_Obj_t *)Vec_PtrEntry( vCoNodes, 0 );
Vec_WecFree( vSupps ); vDfsNodes = Abc_NtkDfsNodes( pNtk, &pNode, 1 );
return NULL; vLevel = Vec_WecEntry( vSupps, Abc_ObjFaninId0(pNode) );
Cost = Vec_PtrSize(vDfsNodes) * Vec_IntSize(vLevel) * nCubeLim;
Vec_PtrFree( vDfsNodes );
if ( Cost > nCostMax )
{
Vec_PtrFree( vCoNodes );
Vec_WecFree( vSupps );
return NULL;
}
} }
// collect CO IDs in this order // collect CO IDs in this order
vNodeCoIds = Vec_IntAlloc( Abc_NtkCoNum(pNtk) ); vNodeCoIds = Vec_IntAlloc( Abc_NtkCoNum(pNtk) );
......
...@@ -450,7 +450,7 @@ Vec_Str_t * Bmc_CollapseOneInt( Gia_Man_t * p, int nCubeLim, int nBTLimit, int f ...@@ -450,7 +450,7 @@ Vec_Str_t * Bmc_CollapseOneInt( Gia_Man_t * p, int nCubeLim, int nBTLimit, int f
if ( status == l_False ) if ( status == l_False )
break; break;
// check number of cubes // check number of cubes
if ( Count == nCubeLim ) if ( nCubeLim > 0 && Count == nCubeLim )
{ {
//printf( "The number of cubes exceeded the limit (%d).\n", nCubeLim ); //printf( "The number of cubes exceeded the limit (%d).\n", nCubeLim );
Vec_StrFreeP( &vSop ); Vec_StrFreeP( &vSop );
...@@ -622,7 +622,7 @@ Vec_Str_t * Bmc_CollapseOne( Gia_Man_t * p, int nCubeLim, int nBTLimit, int fCan ...@@ -622,7 +622,7 @@ Vec_Str_t * Bmc_CollapseOne( Gia_Man_t * p, int nCubeLim, int nBTLimit, int fCan
} }
// compute cube pairs // compute cube pairs
for ( iCube = 0; iCube < nCubeLim; iCube++ ) for ( iCube = 0; nCubeLim == 0 || iCube < nCubeLim; iCube++ )
{ {
for ( n = 0; n < 2; n++ ) for ( n = 0; n < 2; n++ )
{ {
......
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