From: whitequark Date: Sat, 12 Oct 2019 22:48:08 +0000 (+0000) Subject: compat.genlib.fsm: add migration warning. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e91feb0093ef01f5565068a081f2e16b14b8158a;p=nmigen.git compat.genlib.fsm: add migration warning. --- diff --git a/nmigen/compat/genlib/fsm.py b/nmigen/compat/genlib/fsm.py index 63f0872..68b1d0a 100644 --- a/nmigen/compat/genlib/fsm.py +++ b/nmigen/compat/genlib/fsm.py @@ -1,6 +1,6 @@ from collections import OrderedDict -from ..._tools import _ignore_deprecated +from ..._tools import deprecated, _ignore_deprecated from ...hdl.xfrm import ValueTransformer, StatementTransformer from ...hdl.ast import * from ..fhdl.module import CompatModule, CompatFinalizeError @@ -89,6 +89,8 @@ class _LowerNext(ValueTransformer, StatementTransformer): return node +@deprecated("instead of `migen.genlib.fsm.FSM()`, use `with m.FSM():`; note that there is no " + "replacement for `{before,after}_{entering,leaving}` and `delayed_enter` methods") class FSM(CompatModule): def __init__(self, reset_state=None): self.actions = OrderedDict()