From e91feb0093ef01f5565068a081f2e16b14b8158a Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 12 Oct 2019 22:48:08 +0000 Subject: [PATCH] compat.genlib.fsm: add migration warning. --- nmigen/compat/genlib/fsm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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() -- 2.30.2