From ea0f4706f515218d66a6b19b2e3a3551f362c0b6 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Sat, 24 May 2014 13:35:02 +0200 Subject: [PATCH] fsm: set reset_state as default state --- migen/genlib/fsm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migen/genlib/fsm.py b/migen/genlib/fsm.py index 8818fe646..f6416504b 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)