From: whitequark Date: Sat, 12 Oct 2019 22:44:12 +0000 (+0000) Subject: compat.fhdl.decorators: add migration warnings. X-Git-Tag: v0.1rc1~15 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dbddddff174f2984310ff816327c50a84a39ea0a;p=nmigen.git compat.fhdl.decorators: add migration warnings. --- diff --git a/nmigen/compat/fhdl/decorators.py b/nmigen/compat/fhdl/decorators.py index f4ab519..7d925f3 100644 --- a/nmigen/compat/fhdl/decorators.py +++ b/nmigen/compat/fhdl/decorators.py @@ -2,6 +2,7 @@ from ...hdl.ast import * from ...hdl.xfrm import ResetInserter as NativeResetInserter from ...hdl.xfrm import EnableInserter as NativeEnableInserter from ...hdl.xfrm import DomainRenamer as NativeDomainRenamer +from ..._tools import deprecated __all__ = ["ResetInserter", "CEInserter", "ClockDomainsRenamer"] @@ -26,11 +27,19 @@ class _CompatControlInserter: return self._native_inserter(dict(signals.values()))(module) +@deprecated("instead of `migen.fhdl.decorators.ResetInserter`, " + "use `nmigen.hdl.xfrm.ResetInserter`; note that nMigen ResetInserter accepts " + "a dict of reset signals (or a single reset signal) as an argument, not " + "a set of clock domain names (or a single clock domain name)") class CompatResetInserter(_CompatControlInserter): _control_name = "reset" _native_inserter = NativeResetInserter +@deprecated("instead of `migen.fhdl.decorators.CEInserter`, " + "use `nmigen.hdl.xfrm.EnableInserter`; note that nMigen EnableInserter accepts " + "a dict of enable signals (or a single enable signal) as an argument, not " + "a set of clock domain names (or a single clock domain name)") class CompatCEInserter(_CompatControlInserter): _control_name = "ce" _native_inserter = NativeEnableInserter