From: Florent Kermarrec Date: Tue, 2 Jun 2015 17:26:42 +0000 (+0200) Subject: migen/genlib/fsm: fix delayed_enter when delay is negative (can happen when delay... X-Git-Tag: 24jan2021_ls180~2099^2~53 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=79624ce8490c0a367a57a001f780c62036e93920;p=litex.git migen/genlib/fsm: fix delayed_enter when delay is negative (can happen when delay is generated from others parameters) --- diff --git a/migen/genlib/fsm.py b/migen/genlib/fsm.py index 6ad3083c..7a2ee619 100644 --- a/migen/genlib/fsm.py +++ b/migen/genlib/fsm.py @@ -74,7 +74,7 @@ class FSM(Module): def delayed_enter(self, name, target, delay): if self.finalized: raise FinalizeError - if delay: + if delay > 0: state = name for i in range(delay): if i == delay - 1: