abc/src/aig/gia/giaEquiv.c
/**Function*************************************************************

  Synopsis    [Creates initialized SRM with the given number of frames.]

  Description [Uses as many frames as needed to create the number of 
  output not less than the number of equivalence literals.]
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Creates initialized SRM with the given number of frames.]

Description [Uses as many frames as needed to create the number of
output not less than the number of equivalence literals.]




Function Synopsis [ Creates initialized SRM with the given number of frames . ] Description [ Uses as many frames as needed to create the number of output not less than the number of equivalence literals . ]
Gia_Man_t * Gia_ManSpecReduceInitFrames( Gia_Man_t * p, Abc_Cex_t * pInit, int nFramesMax, int * pnFrames, int fDualOut, int nMinOutputs )
{
    Gia_Man_t * pFrames;
    int f, nLits;
    nLits = Gia_ManEquivCountLits( p );
    for ( f = 1; ; f++ )
    {
        pFrames = Gia_ManSpecReduceInit( p, pInit, f, fDualOut );
        if ( (nMinOutputs == 0 && Gia_ManPoNum(pFrames) >= nLits/2+1) ||
             (nMinOutputs != 0 && Gia_ManPoNum(pFrames) >= nMinOutputs) )
            break;
        if ( f == nFramesMax )
            break;
        if ( Gia_ManAndNum(pFrames) > 500000 )
        {
            Gia_ManStop( pFrames );
            return NULL;
        }
        Gia_ManStop( pFrames );
        pFrames = NULL;
    }
    if ( f == nFramesMax )
        Abc_Print( 1, "Stopped unrolling after %d frames.\n", nFramesMax );
    if ( pnFrames )
        *pnFrames = f;
    return pFrames;
}
Gia_Man_t * Gia_ManSpecReduceInitFrames ( Gia_Man_t * p , Abc_Cex_t * pInit , int nFramesMax , int * pnFrames , int fDualOut , int nMinOutputs ) { Gia_Man_t * pFrames ; int f , nLits ; nLits = Gia_ManEquivCountLits ( p ) ; for ( f = 1 ; ; f ++ ) { pFrames = Gia_ManSpecReduceInit ( p , pInit , f , fDualOut ) ; if ( ( nMinOutputs == 0 && Gia_ManPoNum ( pFrames ) >= nLits / 2 + 1 ) || ( nMinOutputs != 0 && Gia_ManPoNum ( pFrames ) >= nMinOutputs ) ) break ; if ( f == nFramesMax ) break ; if ( Gia_ManAndNum ( pFrames ) > 500000 ) { Gia_ManStop ( pFrames ) ; return NULL ; } Gia_ManStop ( pFrames ) ; pFrames = NULL ; } if ( f == nFramesMax ) Abc_Print ( 1 , " \n " , nFramesMax ) ; if ( pnFrames ) * pnFrames = f ; return pFrames ; }
Function
Synopsis    [Creates initialized SRM with the given number of frames.]
Function Synopsis [ Creates initialized SRM with the given number of frames . ]