diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-03-18 14:20:03 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-03-18 14:20:03 -0700 |
commit | faf9c2015a94522bfbaaf6293316bdfb6862f046 (patch) | |
tree | 06708750a6b46f8a76e018ba14d9cd74380b2fa9 /src/base/abci/abcBalance.c | |
parent | f329105403d70bbd8a4430c39edf5457c4c3faa3 (diff) | |
download | abc-faf9c2015a94522bfbaaf6293316bdfb6862f046.tar.gz abc-faf9c2015a94522bfbaaf6293316bdfb6862f046.tar.bz2 abc-faf9c2015a94522bfbaaf6293316bdfb6862f046.zip |
Updating code to support barrier buffers.
Diffstat (limited to 'src/base/abci/abcBalance.c')
-rw-r--r-- | src/base/abci/abcBalance.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/base/abci/abcBalance.c b/src/base/abci/abcBalance.c index 9807997c..552cba7f 100644 --- a/src/base/abci/abcBalance.c +++ b/src/base/abci/abcBalance.c @@ -103,7 +103,7 @@ void Abc_NtkBalancePerform( Abc_Ntk_t * pNtk, Abc_Ntk_t * pNtkAig, int fDuplicat { ProgressBar * pProgress; Vec_Vec_t * vStorage; - Abc_Obj_t * pNode, * pDriver; + Abc_Obj_t * pNode; int i; // transfer level Abc_NtkForEachCi( pNtk, pNode, i ) @@ -114,12 +114,23 @@ void Abc_NtkBalancePerform( Abc_Ntk_t * pNtk, Abc_Ntk_t * pNtkAig, int fDuplicat vStorage = Vec_VecStart( 10 ); // perform balancing of POs pProgress = Extra_ProgressBarStart( stdout, Abc_NtkCoNum(pNtk) ); - Abc_NtkForEachCo( pNtk, pNode, i ) + if ( pNtk->nBarBufs == 0 ) { - Extra_ProgressBarUpdate( pProgress, i, NULL ); - // strash the driver node - pDriver = Abc_ObjFanin0(pNode); - Abc_NodeBalance_rec( pNtkAig, pDriver, vStorage, 0, fDuplicate, fSelective, fUpdateLevel ); + Abc_NtkForEachCo( pNtk, pNode, i ) + { + Extra_ProgressBarUpdate( pProgress, i, NULL ); + Abc_NodeBalance_rec( pNtkAig, Abc_ObjFanin0(pNode), vStorage, 0, fDuplicate, fSelective, fUpdateLevel ); + } + } + else + { + Abc_NtkForEachLiPo( pNtk, pNode, i ) + { + Extra_ProgressBarUpdate( pProgress, i, NULL ); + Abc_NodeBalance_rec( pNtkAig, Abc_ObjFanin0(pNode), vStorage, 0, fDuplicate, fSelective, fUpdateLevel ); + if ( i < pNtk->nBarBufs ) + Abc_ObjFanout0(Abc_ObjFanout0(pNode))->Level = Abc_ObjFanin0(pNode)->Level; + } } Extra_ProgressBarStop( pProgress ); Vec_VecFree( vStorage ); |