fsm: set reset_state as default state

This commit is contained in:
Florent Kermarrec 2014-05-24 13:35:02 +02:00 committed by Sebastien Bourdeauducq
parent 4c426b36f3
commit ea0f4706f5
1 changed files with 1 additions and 1 deletions

View File

@ -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)