diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2007-08-17 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2007-08-17 08:01:00 -0700 |
commit | 9e4213e202b516c6c920d7e0faaf603273d1795d (patch) | |
tree | f29fe0c95d664127730a4c8c21523884fd1f0cdf /src/opt | |
parent | 29c9b0c0c4c66cb09b7c00c5c7290141be2af6a0 (diff) | |
download | abc-9e4213e202b516c6c920d7e0faaf603273d1795d.tar.gz abc-9e4213e202b516c6c920d7e0faaf603273d1795d.tar.bz2 abc-9e4213e202b516c6c920d7e0faaf603273d1795d.zip |
Version abc70817
Diffstat (limited to 'src/opt')
-rw-r--r-- | src/opt/ret/retCore.c | 16 | ||||
-rw-r--r-- | src/opt/ret/retDelay.c | 4 | ||||
-rw-r--r-- | src/opt/ret/retIncrem.c | 4 | ||||
-rw-r--r-- | src/opt/ret/retInt.h | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/src/opt/ret/retCore.c b/src/opt/ret/retCore.c index 551ec594..47b2cbbc 100644 --- a/src/opt/ret/retCore.c +++ b/src/opt/ret/retCore.c @@ -41,7 +41,7 @@ int timeRetime = 0; SeeAlso [] ***********************************************************************/ -int Abc_NtkRetime( Abc_Ntk_t * pNtk, int Mode, int fForwardOnly, int fBackwardOnly, int fVerbose ) +int Abc_NtkRetime( Abc_Ntk_t * pNtk, int Mode, int fForwardOnly, int fBackwardOnly, int fOneStep, int fVerbose ) { int nLatches = Abc_NtkLatchNum(pNtk); int nLevels = Abc_NtkLevel(pNtk); @@ -62,26 +62,26 @@ int Abc_NtkRetime( Abc_Ntk_t * pNtk, int Mode, int fForwardOnly, int fBackwardOn switch ( Mode ) { case 1: // forward - RetValue = Abc_NtkRetimeIncremental( pNtk, 1, 0, fVerbose ); + RetValue = Abc_NtkRetimeIncremental( pNtk, 1, 0, 0, fVerbose ); break; case 2: // backward - RetValue = Abc_NtkRetimeIncremental( pNtk, 0, 0, fVerbose ); + RetValue = Abc_NtkRetimeIncremental( pNtk, 0, 0, 0, fVerbose ); break; case 3: // min-area RetValue = Abc_NtkRetimeMinArea( pNtk, fForwardOnly, fBackwardOnly, fVerbose ); break; case 4: // min-delay if ( !fBackwardOnly ) - RetValue += Abc_NtkRetimeIncremental( pNtk, 1, 1, fVerbose ); + RetValue += Abc_NtkRetimeIncremental( pNtk, 1, 1, fOneStep, fVerbose ); if ( !fForwardOnly ) - RetValue += Abc_NtkRetimeIncremental( pNtk, 0, 1, fVerbose ); + RetValue += Abc_NtkRetimeIncremental( pNtk, 0, 1, fOneStep, fVerbose ); break; case 5: // min-area + min-delay RetValue = Abc_NtkRetimeMinArea( pNtk, fForwardOnly, fBackwardOnly, fVerbose ); if ( !fBackwardOnly ) - RetValue += Abc_NtkRetimeIncremental( pNtk, 1, 1, fVerbose ); + RetValue += Abc_NtkRetimeIncremental( pNtk, 1, 1, 0, fVerbose ); if ( !fForwardOnly ) - RetValue += Abc_NtkRetimeIncremental( pNtk, 0, 1, fVerbose ); + RetValue += Abc_NtkRetimeIncremental( pNtk, 0, 1, 0, fVerbose ); break; case 6: // Pan's algorithm RetValue = Abc_NtkRetimeLValue( pNtk, 500, fVerbose ); @@ -121,7 +121,7 @@ int Abc_NtkRetimeDebug( Abc_Ntk_t * pNtk ) // fprintf( stdout, "Abc_NtkRetimeDebug(): Network check has failed.\n" ); // Io_WriteBlifLogic( pNtk, "debug_temp.blif", 1 ); pNtkRet = Abc_NtkDup( pNtk ); - Abc_NtkRetime( pNtkRet, 3, 0, 1, 0 ); // debugging backward flow + Abc_NtkRetime( pNtkRet, 3, 0, 1, 0, 0 ); // debugging backward flow return !Abc_NtkSecFraig( pNtk, pNtkRet, 10000, 3, 0 ); } diff --git a/src/opt/ret/retDelay.c b/src/opt/ret/retDelay.c index 468d6187..bcfe3a2e 100644 --- a/src/opt/ret/retDelay.c +++ b/src/opt/ret/retDelay.c @@ -63,7 +63,7 @@ int Abc_NtkRetimeMinDelay( Abc_Ntk_t * pNtk, Abc_Ntk_t * pNtkCopy, int nIterLimi Synopsis [Returns the best delay and the number of best iteration.] - Description [] + Description [] SideEffects [] @@ -145,7 +145,7 @@ if ( fVerbose && !fInitial ) if ( fVerbose && !fInitial ) printf( "%s : Starting delay = %3d. Final delay = %3d. IterBest = %2d (out of %2d).\n", fForward? "Forward " : "Backward", DelayStart, DelayBest, IterBest, nIterLimit ); - *pIterBest = IterBest; + *pIterBest = (nIterLimit == 1) ? 1 : IterBest; return DelayBest; } diff --git a/src/opt/ret/retIncrem.c b/src/opt/ret/retIncrem.c index 93305a8e..ba8104be 100644 --- a/src/opt/ret/retIncrem.c +++ b/src/opt/ret/retIncrem.c @@ -41,7 +41,7 @@ static int Abc_NtkRetimeOneWay( Abc_Ntk_t * pNtk, int fForward, int fVerbose ); SeeAlso [] ***********************************************************************/ -int Abc_NtkRetimeIncremental( Abc_Ntk_t * pNtk, int fForward, int fMinDelay, int fVerbose ) +int Abc_NtkRetimeIncremental( Abc_Ntk_t * pNtk, int fForward, int fMinDelay, int fOneStep, int fVerbose ) { Abc_Ntk_t * pNtkCopy = NULL; Vec_Ptr_t * vBoxes; @@ -55,7 +55,7 @@ int Abc_NtkRetimeIncremental( Abc_Ntk_t * pNtk, int fForward, int fMinDelay, int Abc_NtkOrderCisCos( pNtk ); if ( fMinDelay ) { - nIterLimit = 2 * Abc_NtkLevel(pNtk); + nIterLimit = fOneStep? 1 : 2 * Abc_NtkLevel(pNtk); pNtkCopy = Abc_NtkDup( pNtk ); tLatches = Abc_NtkRetimePrepareLatches( pNtkCopy ); st_free_table( tLatches ); diff --git a/src/opt/ret/retInt.h b/src/opt/ret/retInt.h index 28529cdc..51428bce 100644 --- a/src/opt/ret/retInt.h +++ b/src/opt/ret/retInt.h @@ -46,11 +46,11 @@ /*=== retArea.c ========================================================*/ extern int Abc_NtkRetimeMinArea( Abc_Ntk_t * pNtk, int fForwardOnly, int fBackwardOnly, int fVerbose ); /*=== retCore.c ========================================================*/ -extern int Abc_NtkRetime( Abc_Ntk_t * pNtk, int Mode, int fForwardOnly, int fBackwardOnly, int fVerbose ); +extern int Abc_NtkRetime( Abc_Ntk_t * pNtk, int Mode, int fForwardOnly, int fBackwardOnly, int fOneStep, int fVerbose ); /*=== retDelay.c ========================================================*/ extern int Abc_NtkRetimeMinDelay( Abc_Ntk_t * pNtk, Abc_Ntk_t * pNtkCopy, int nIterLimit, int fForward, int fVerbose ); /*=== retDirect.c ========================================================*/ -extern int Abc_NtkRetimeIncremental( Abc_Ntk_t * pNtk, int fForward, int fMinDelay, int fVerbose ); +extern int Abc_NtkRetimeIncremental( Abc_Ntk_t * pNtk, int fForward, int fMinDelay, int fOneStep, int fVerbose ); extern void Abc_NtkRetimeShareLatches( Abc_Ntk_t * pNtk, int fInitial ); extern int Abc_NtkRetimeNodeIsEnabled( Abc_Obj_t * pObj, int fForward ); extern void Abc_NtkRetimeNode( Abc_Obj_t * pObj, int fForward, int fInitial ); |