diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2019-04-18 19:01:24 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2019-04-18 19:01:24 -0700 |
commit | cd0102f61e89e3d12281d026e5a26820cec4aed5 (patch) | |
tree | 11ea4c29e68b0b580e9df5dccfe2484b7bc81a71 /src | |
parent | 6fdfefaa554ad04523dca260b875f55968ed514e (diff) | |
download | abc-cd0102f61e89e3d12281d026e5a26820cec4aed5.tar.gz abc-cd0102f61e89e3d12281d026e5a26820cec4aed5.tar.bz2 abc-cd0102f61e89e3d12281d026e5a26820cec4aed5.zip |
Improvements to the retiming algorithm.
Diffstat (limited to 'src')
-rw-r--r-- | src/base/wln/wlnRetime.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/base/wln/wlnRetime.c b/src/base/wln/wlnRetime.c index 9f04b534..e7678c5d 100644 --- a/src/base/wln/wlnRetime.c +++ b/src/base/wln/wlnRetime.c @@ -554,7 +554,7 @@ Vec_Int_t * Wln_NtkRetime( Wln_Ntk_t * pNtk, int fVerbose ) Vec_Int_t * vFront = &p->vFront; Vec_Int_t * vMoves = Vec_IntAlloc(0); int nMoves = 0, fPrevFwd = 0, fPrevBwd = 0, nCountIncrease = 0; - int DelayInit = 0, DelayBest = 0; + int DelayInit = 0, DelayBest = 0, nChange = 0; Wln_RetPrint( p, fVerbose ); Wln_RetMarkChanges( p, NULL ); p->DelayMax = DelayInit = DelayBest = Wln_RetPropDelay( p ); @@ -613,9 +613,15 @@ Vec_Int_t * Wln_NtkRetime( Wln_Ntk_t * pNtk, int fVerbose ) if ( p->DelayMax >= DelayMaxPrev ) nCountIncrease++; else + { + if ( nCountIncrease > 0 ) + nChange++; nCountIncrease = 0; + } if ( nCountIncrease > 3 ) break; + if ( nChange > 5 ) + break; Wln_RetFindSources( p ); if ( 2*Vec_IntSize(&p->vEdgeLinks) > Vec_IntCap(&p->vEdgeLinks) ) Vec_IntGrow( &p->vEdgeLinks, 4*Vec_IntSize(&p->vEdgeLinks) ); |