From 0923d543adc872232f5f2e54e237b5a0fd08bff3 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 16 Jun 2016 16:13:13 -0700 Subject: Adding a switch 'retime -o' to use old flop naming conventions. --- src/opt/ret/retIncrem.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/opt/ret/retIncrem.c') 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 { -- cgit v1.2.3