Commit 6bda7ca8 by Alan Mishchenko

Adding resource limit to 'fx'.

parent 44b31021
...@@ -138,17 +138,19 @@ int Abc_NtkGetCubeNum( Abc_Ntk_t * pNtk ) ...@@ -138,17 +138,19 @@ int Abc_NtkGetCubeNum( Abc_Ntk_t * pNtk )
int Abc_NtkGetCubePairNum( Abc_Ntk_t * pNtk ) int Abc_NtkGetCubePairNum( Abc_Ntk_t * pNtk )
{ {
Abc_Obj_t * pNode; Abc_Obj_t * pNode;
int i, nCubes, nCubePairs = 0; int i;
word nCubes, nCubePairs = 0;
assert( Abc_NtkHasSop(pNtk) ); assert( Abc_NtkHasSop(pNtk) );
Abc_NtkForEachNode( pNtk, pNode, i ) Abc_NtkForEachNode( pNtk, pNode, i )
{ {
if ( Abc_NodeIsConst(pNode) ) if ( Abc_NodeIsConst(pNode) )
continue; continue;
assert( pNode->pData ); assert( pNode->pData );
nCubes = Abc_SopGetCubeNum( (char *)pNode->pData ); nCubes = (word)Abc_SopGetCubeNum( (char *)pNode->pData );
nCubePairs += nCubes * (nCubes - 1) / 2; if ( nCubes > 1 )
nCubePairs += nCubes * (nCubes - 1) / 2;
} }
return nCubePairs; return (int)(nCubePairs > (1<<30) ? (1<<30) : nCubePairs);
} }
/**Function************************************************************* /**Function*************************************************************
......
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