summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-11-07 10:24:47 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2013-11-07 10:24:47 -0800
commit4774dc56fe5a7ef6a9ae154f57b3cb2a48c4ca97 (patch)
tree67dee47389a5117d1b0057a9065c27f980e230f4 /src/base
parentf29fe2d0c226b33505e544e4560f9357cfed66f0 (diff)
downloadabc-4774dc56fe5a7ef6a9ae154f57b3cb2a48c4ca97.tar.gz
abc-4774dc56fe5a7ef6a9ae154f57b3cb2a48c4ca97.tar.bz2
abc-4774dc56fe5a7ef6a9ae154f57b3cb2a48c4ca97.zip
Fixing the wire-load approximation problem.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abc/abc.h1
-rw-r--r--src/base/abc/abcUtil.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/src/base/abc/abc.h b/src/base/abc/abc.h
index 5bc3e0e4..0e9199f9 100644
--- a/src/base/abc/abc.h
+++ b/src/base/abc/abc.h
@@ -965,6 +965,7 @@ extern ABC_DLL int Abc_NtkGetMuxNum( Abc_Ntk_t * pNtk );
extern ABC_DLL int Abc_NtkGetBufNum( Abc_Ntk_t * pNtk );
extern ABC_DLL int Abc_NtkGetChoiceNum( Abc_Ntk_t * pNtk );
extern ABC_DLL int Abc_NtkGetFaninMax( Abc_Ntk_t * pNtk );
+extern ABC_DLL int Abc_NtkGetFanoutMax( Abc_Ntk_t * pNtk );
extern ABC_DLL int Abc_NtkGetTotalFanins( Abc_Ntk_t * pNtk );
extern ABC_DLL void Abc_NtkCleanCopy( Abc_Ntk_t * pNtk );
extern ABC_DLL void Abc_NtkCleanData( Abc_Ntk_t * pNtk );
diff --git a/src/base/abc/abcUtil.c b/src/base/abc/abcUtil.c
index 1fb6dbab..b3b37da0 100644
--- a/src/base/abc/abcUtil.c
+++ b/src/base/abc/abcUtil.c
@@ -459,6 +459,17 @@ int Abc_NtkGetFaninMax( Abc_Ntk_t * pNtk )
}
return nFaninsMax;
}
+int Abc_NtkGetFanoutMax( Abc_Ntk_t * pNtk )
+{
+ Abc_Obj_t * pNode;
+ int i, nFaninsMax = 0;
+ Abc_NtkForEachNode( pNtk, pNode, i )
+ {
+ if ( nFaninsMax < Abc_ObjFanoutNum(pNode) )
+ nFaninsMax = Abc_ObjFanoutNum(pNode);
+ }
+ return nFaninsMax;
+}
/**Function*************************************************************