summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2020-03-06 13:59:53 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2020-03-06 13:59:53 -0800
commit2855c94fc167ad5d27423b57642f9da54eb8728e (patch)
treed6824e11bdcdbc6e089e552143978e1fe5b46bc7 /src
parent1a41d496df1a63fd6347a36931d17f0f5b70bd74 (diff)
downloadabc-2855c94fc167ad5d27423b57642f9da54eb8728e.tar.gz
abc-2855c94fc167ad5d27423b57642f9da54eb8728e.tar.bz2
abc-2855c94fc167ad5d27423b57642f9da54eb8728e.zip
Corner-case bug-fix in retiming (corrected fix).
Diffstat (limited to 'src')
-rw-r--r--src/base/wln/wlnRetime.c4
1 files changed, 4 insertions, 0 deletions
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 );
}
}