diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2005-11-26 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2005-11-26 08:01:00 -0800 |
commit | e3c40ed61ee3febefb002d3b929f157ccdffca81 (patch) | |
tree | db596ea13b4be6ae31617fad2cb3463190f99c90 /src/base/seq/seqUtil.c | |
parent | 08d2b31046bfccdfe1239344eb5114ea01301f06 (diff) | |
download | abc-e3c40ed61ee3febefb002d3b929f157ccdffca81.tar.gz abc-e3c40ed61ee3febefb002d3b929f157ccdffca81.tar.bz2 abc-e3c40ed61ee3febefb002d3b929f157ccdffca81.zip |
Version abc51126
Diffstat (limited to 'src/base/seq/seqUtil.c')
-rw-r--r-- | src/base/seq/seqUtil.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/base/seq/seqUtil.c b/src/base/seq/seqUtil.c index b126b043..a3b8bc84 100644 --- a/src/base/seq/seqUtil.c +++ b/src/base/seq/seqUtil.c @@ -39,6 +39,37 @@ SeeAlso [] ***********************************************************************/ +int Seq_NtkLevelMax( Abc_Ntk_t * pNtk ) +{ + Abc_Obj_t * pNode; + int i, Result; + assert( Abc_NtkIsSeq(pNtk) ); + Result = 0; + Abc_NtkForEachPo( pNtk, pNode, i ) + { + pNode = Abc_ObjFanin0(pNode); + if ( Result < (int)pNode->Level ) + Result = pNode->Level; + } + Abc_SeqForEachCutsetNode( pNtk, pNode, i ) + { + if ( Result < (int)pNode->Level ) + Result = pNode->Level; + } + return Result; +} + +/**Function************************************************************* + + Synopsis [Returns the maximum latch number on any of the fanouts.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ int Seq_ObjFanoutLMax( Abc_Obj_t * pObj ) { Abc_Obj_t * pFanout; @@ -363,6 +394,29 @@ int Seq_NtkLatchGetEqualFaninNum( Abc_Ntk_t * pNtk ) return Counter; } +/**Function************************************************************* + + Synopsis [Returns the maximum latch number on any of the fanouts.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Seq_NtkCountNodesAboveLimit( Abc_Ntk_t * pNtk, int Limit ) +{ + Abc_Obj_t * pNode; + int i, Counter; + assert( !Abc_NtkIsSeq(pNtk) ); + Counter = 0; + Abc_NtkForEachNode( pNtk, pNode, i ) + if ( Abc_ObjFaninNum(pNode) > Limit ) + Counter++; + return Counter; +} + //////////////////////////////////////////////////////////////////////// /// END OF FILE /// //////////////////////////////////////////////////////////////////////// |