diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2016-06-16 16:13:13 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2016-06-16 16:13:13 -0700 |
commit | 0923d543adc872232f5f2e54e237b5a0fd08bff3 (patch) | |
tree | 8ba89468c357e91c8f60990e72160afadd31c60d /src/opt/ret/retIncrem.c | |
parent | ada21a655f9a6f04b13a5f90758a7b64ab72f221 (diff) | |
download | abc-0923d543adc872232f5f2e54e237b5a0fd08bff3.tar.gz abc-0923d543adc872232f5f2e54e237b5a0fd08bff3.tar.bz2 abc-0923d543adc872232f5f2e54e237b5a0fd08bff3.zip |
Adding a switch 'retime -o' to use old flop naming conventions.
Diffstat (limited to 'src/opt/ret/retIncrem.c')
-rw-r--r-- | src/opt/ret/retIncrem.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/opt/ret/retIncrem.c b/src/opt/ret/retIncrem.c index c322f61b..edc6df5d 100644 --- a/src/opt/ret/retIncrem.c +++ b/src/opt/ret/retIncrem.c @@ -44,7 +44,7 @@ static int Abc_NtkRetimeOneWay( Abc_Ntk_t * pNtk, int fForward, int fVerbose ); SeeAlso [] ***********************************************************************/ -int Abc_NtkRetimeIncremental( Abc_Ntk_t * pNtk, int nDelayLim, int fForward, int fMinDelay, int fOneStep, int fVerbose ) +int Abc_NtkRetimeIncremental( Abc_Ntk_t * pNtk, int nDelayLim, int fForward, int fMinDelay, int fOneStep, int fUseOldNames, int fVerbose ) { Abc_Ntk_t * pNtkCopy = NULL; Vec_Ptr_t * vBoxes; @@ -82,7 +82,7 @@ int Abc_NtkRetimeIncremental( Abc_Ntk_t * pNtk, int nDelayLim, int fForward, int // restore boxes pNtk->vBoxes = vBoxes; // finalize the latches - RetValue = Abc_NtkRetimeFinalizeLatches( pNtk, tLatches, nIdMaxStart ); + RetValue = Abc_NtkRetimeFinalizeLatches( pNtk, tLatches, nIdMaxStart, fUseOldNames ); st__free_table( tLatches ); if ( RetValue == 0 ) return 0; @@ -143,7 +143,7 @@ int Abc_NtkRetimeIncremental( Abc_Ntk_t * pNtk, int nDelayLim, int fForward, int SeeAlso [] ***********************************************************************/ -int Abc_NtkRetimeFinalizeLatches( Abc_Ntk_t * pNtk, st__table * tLatches, int nIdMaxStart ) +int Abc_NtkRetimeFinalizeLatches( Abc_Ntk_t * pNtk, st__table * tLatches, int nIdMaxStart, int fUseOldNames ) { Vec_Ptr_t * vCisOld, * vCosOld, * vBoxesOld, * vCisNew, * vCosNew, * vBoxesNew; Abc_Obj_t * pObj, * pLatch, * pLatchIn, * pLatchOut; @@ -169,8 +169,17 @@ int Abc_NtkRetimeFinalizeLatches( Abc_Ntk_t * pNtk, st__table * tLatches, int nI // this is a new latch pLatchIn = Abc_NtkCreateBi(pNtk); pLatchOut = Abc_NtkCreateBo(pNtk); - Abc_ObjAssignName( pLatchOut, Abc_ObjName(Abc_ObjFanin0(pLatch)), "_o2" ); - Abc_ObjAssignName( pLatchIn, Abc_ObjName(Abc_ObjFanin0(pLatch)), "_i2" ); + + if ( fUseOldNames ) + { + Abc_ObjAssignName( pLatchOut, Abc_ObjName(pLatch), "_out" ); + Abc_ObjAssignName( pLatchIn, Abc_ObjName(pLatch), "_in" ); + } + else + { + Abc_ObjAssignName( pLatchOut, Abc_ObjName(Abc_ObjFanin0(pLatch)), "_o2" ); + Abc_ObjAssignName( pLatchIn, Abc_ObjName(Abc_ObjFanin0(pLatch)), "_i2" ); + } } else { |