summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-04-11 16:29:08 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-04-11 16:29:08 -0700
commitb1a57b2ae93ae522dac2d823f8468ea33bc282ef (patch)
treedd7911e4ee6692124ebe72d812dd822f5db56a77 /src/base
parent0184dab4decc83078e5abd5581a4946d1b72bf01 (diff)
downloadabc-b1a57b2ae93ae522dac2d823f8468ea33bc282ef.tar.gz
abc-b1a57b2ae93ae522dac2d823f8468ea33bc282ef.tar.bz2
abc-b1a57b2ae93ae522dac2d823f8468ea33bc282ef.zip
Adding iterative refinement to 'addbuffs'.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abc/abcUtil.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/src/base/abc/abcUtil.c b/src/base/abc/abcUtil.c
index df5b3978..368bcaa0 100644
--- a/src/base/abc/abcUtil.c
+++ b/src/base/abc/abcUtil.c
@@ -2094,7 +2094,7 @@ Abc_Ntk_t * Abc_NtkAddBuffs( Abc_Ntk_t * pNtkInit, int fReverse, int nImprove, i
Abc_NtkForEachCi( pNtk, pObj, i )
pObj->Level = 0;
- // move the nodes
+ // move the nodes down one step at a time
for ( Iter = 0; Iter < nImprove; Iter++ )
{
int Counter = 0, TotalGain = 0;
@@ -2128,7 +2128,7 @@ Abc_Ntk_t * Abc_NtkAddBuffs( Abc_Ntk_t * pNtkInit, int fReverse, int nImprove, i
}
else
{
- // move the nodes
+ // move the nodes up one step at a time
Vec_Ptr_t * vNodes = Abc_NtkDfs( pNtk, 1 );
for ( Iter = 0; Iter < nImprove; Iter++ )
{
@@ -2159,38 +2159,6 @@ Abc_Ntk_t * Abc_NtkAddBuffs( Abc_Ntk_t * pNtkInit, int fReverse, int nImprove, i
if ( Counter == 0 )
break;
}
-/*
- // move the nodes
- for ( Iter = 0; Iter < nImprove; Iter++ )
- {
- int Counter = 0, TotalGain = 0;
- Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pObj, i )
- {
- int CountGain = -1;
- assert( pObj->Level > 0 );
- Abc_ObjForEachFanin( pObj, pFanin, k )
- {
- assert( pFanin->Level < pObj->Level );
- if ( pFanin->Level + 1 == pObj->Level )
- break;
- }
- if ( k < Abc_ObjFaninNum(pObj) ) // cannot move
- continue;
- Abc_ObjForEachFanin( pObj, pFanin, k )
- CountGain += Abc_NtkAddBuffsEval( pObj, pFanin );
- if ( CountGain >= 0 ) // can move
- {
- pObj->Level--;
- Counter++;
- TotalGain += CountGain;
- }
- }
- if ( fVerbose )
- printf( "Shifted %d nodes down with total gain %d.\n", Counter, TotalGain );
- if ( Counter == 0 )
- break;
- }
-*/
Vec_PtrFree( vNodes );
}
vBuffs = Vec_PtrStart( Abc_NtkObjNumMax(pNtk) * (nLevelMax + 1) );