abc/src/map/mapper/mapperUtils.c
/**Function*************************************************************

  Synopsis    [Computes the number of logic levels not counting PIs/POs.]

  Description []
               
  SideEffects [Note that this procedure will reassign the levels assigned
  originally by NodeCreate() because it counts the number of levels with 
  choices differently!]

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Computes the number of logic levels not counting PIs/POs.]

Description []

SideEffects [Note that this procedure will reassign the levels assigned
originally by NodeCreate() because it counts the number of levels with
choices differently!]


Function Synopsis [ Computes the number of logic levels not counting PIs / POs . ] Description [] SideEffects [ Note that this procedure will reassign the levels assigned originally by NodeCreate () because it counts the number of levels with choices differently! ]
int Map_MappingCountLevels( Map_Man_t * pMan )
{
    int i, LevelsMax, LevelsCur;
    LevelsMax = -1;
    for ( i = 0; i < pMan->nOutputs; i++ )
    {
        LevelsCur = Map_MappingCountLevels_rec( Map_Regular(pMan->pOutputs[i]) );
        if ( LevelsMax < LevelsCur )
            LevelsMax = LevelsCur;
    }
    for ( i = 0; i < pMan->nOutputs; i++ )
        Map_MappingUnmark_rec( Map_Regular(pMan->pOutputs[i]) );
    return LevelsMax;
}
int Map_MappingCountLevels ( Map_Man_t * pMan ) { int i , LevelsMax , LevelsCur ; LevelsMax = -1 ; for ( i = 0 ; i < pMan -> nOutputs ; i ++ ) { LevelsCur = Map_MappingCountLevels_rec ( Map_Regular ( pMan -> pOutputs [ i ] ) ) ; if ( LevelsMax < LevelsCur ) LevelsMax = LevelsCur ; } for ( i = 0 ; i < pMan -> nOutputs ; i ++ ) Map_MappingUnmark_rec ( Map_Regular ( pMan -> pOutputs [ i ] ) ) ; return LevelsMax ; }
Function
Synopsis    [Computes the number of logic levels not counting PIs/POs.]
Function Synopsis [ Computes the number of logic levels not counting PIs / POs . ]
// perform the traversal