From: Florent Kermarrec Date: Sat, 24 May 2014 11:35:02 +0000 (+0200) Subject: fsm: set reset_state as default state X-Git-Tag: 24jan2021_ls180~2099^2~348^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ea0f4706f515218d66a6b19b2e3a3551f362c0b6;p=litex.git fsm: set reset_state as default state --- diff --git a/migen/genlib/fsm.py b/migen/genlib/fsm.py index 8818fe64..f6416504 100644 --- a/migen/genlib/fsm.py +++ b/migen/genlib/fsm.py @@ -108,7 +108,7 @@ class FSM(Module): cases = dict((self.encoding[k], lns.visit(v)) for k, v in self.actions.items() if v) self.comb += [ self.next_state.eq(self.state), - Case(self.state, cases) + Case(self.state, cases).makedefault(self.encoding[reset_state]) ] self.sync += self.state.eq(self.next_state)