From 2855c94fc167ad5d27423b57642f9da54eb8728e Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 6 Mar 2020 13:59:53 -0800 Subject: Corner-case bug-fix in retiming (corrected fix). --- src/base/wln/wlnRetime.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/base/wln/wlnRetime.c b/src/base/wln/wlnRetime.c index 2d7c814b..734ac194 100644 --- a/src/base/wln/wlnRetime.c +++ b/src/base/wln/wlnRetime.c @@ -487,6 +487,8 @@ void Wln_RetRetimeForward( Wln_Ret_t * p, Vec_Int_t * vSet ) Vec_IntForEachEntry( vSet, iObj, i ) { iFlop = Wln_RetRemoveOneFanin( p, iObj ); + if ( iFlop == -1 ) + continue; Wln_RetInsertOneFanout( p, iObj, iFlop ); } } @@ -496,6 +498,8 @@ void Wln_RetRetimeBackward( Wln_Ret_t * p, Vec_Int_t * vSet ) Vec_IntForEachEntry( vSet, iObj, i ) { iFlop = Wln_RetRemoveOneFanout( p, iObj ); + if ( iFlop == -1 ) + continue; Wln_RetInsertOneFanin( p, iObj, iFlop ); } } -- cgit v1.2.3