fsm: set reset_state as default state
This commit is contained in:
parent
4c426b36f3
commit
ea0f4706f5
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue