Implement RFC 18: Reorganize vendor platforms

Closes #873.
This commit is contained in:
Catherine 2023-12-13 11:17:29 +00:00
parent 9d4ffab104
commit 3ed78d98ea
8 changed files with 8 additions and 112 deletions

View file

@ -1,16 +0,0 @@
# TODO(amaranth-0.5): remove module
import warnings
import importlib
from .. import vendor
__all__ = ["GowinPlatform"]
def __getattr__(name):
if name in __all__:
warnings.warn(f"instead of `{__name__}.{name}`, use `amaranth.vendor.{name}",
DeprecationWarning, stacklevel=2)
return getattr(vendor, name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

View file

@ -1,16 +0,0 @@
# TODO(amaranth-0.5): remove module
import warnings
import importlib
from .. import vendor
__all__ = ["IntelPlatform"]
def __getattr__(name):
if name in __all__:
warnings.warn(f"instead of `{__name__}.{name}`, use `amaranth.vendor.{name}",
DeprecationWarning, stacklevel=2)
return getattr(vendor, name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

View file

@ -1,16 +0,0 @@
# TODO(amaranth-0.5): remove module
import warnings
import importlib
from .. import vendor
__all__ = ["LatticeECP5Platform"]
def __getattr__(name):
if name in __all__:
warnings.warn(f"instead of `{__name__}.{name}`, use `amaranth.vendor.{name}",
DeprecationWarning, stacklevel=2)
return getattr(vendor, name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

View file

@ -1,16 +0,0 @@
# TODO(amaranth-0.5): remove module
import warnings
import importlib
from .. import vendor
__all__ = ["LatticeICE40Platform"]
def __getattr__(name):
if name in __all__:
warnings.warn(f"instead of `{__name__}.{name}`, use `amaranth.vendor.{name}",
DeprecationWarning, stacklevel=2)
return getattr(vendor, name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

View file

@ -1,16 +0,0 @@
# TODO(amaranth-0.5): remove module
import warnings
import importlib
from .. import vendor
__all__ = ["LatticeMachXO2Platform", "LatticeMachXO3LPlatform"]
def __getattr__(name):
if name in __all__:
warnings.warn(f"instead of `{__name__}.{name}`, use `amaranth.vendor.{name}",
DeprecationWarning, stacklevel=2)
return getattr(vendor, name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

View file

@ -1,16 +0,0 @@
# TODO(amaranth-0.5): remove module
import warnings
import importlib
from .. import vendor
__all__ = ["QuicklogicPlatform"]
def __getattr__(name):
if name in __all__:
warnings.warn(f"instead of `{__name__}.{name}`, use `amaranth.vendor.{name}",
DeprecationWarning, stacklevel=2)
return getattr(vendor, name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

View file

@ -1,16 +0,0 @@
# TODO(amaranth-0.5): remove module
import warnings
import importlib
from .. import vendor
__all__ = ["XilinxPlatform"]
def __getattr__(name):
if name in __all__:
warnings.warn(f"instead of `{__name__}.{name}`, use `amaranth.vendor.{name}",
DeprecationWarning, stacklevel=2)
return getattr(vendor, name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

View file

@ -27,6 +27,14 @@ Standard library changes
* Removed: (deprecated in 0.4) :mod:`amaranth.lib.scheduler`. (`RFC 19`_)
Platform integration changes
----------------------------
.. currentmodule:: amaranth.vendor
* Removed: (deprecated in 0.4) :mod:`vendor.intel`, :mod:`vendor.lattice_ecp5`, :mod:`vendor.lattice_ice40`, :mod:`vendor.lattice_machxo2_3l`, :mod:`vendor.quicklogic`, :mod:`vendor.xilinx`. (`RFC 18`_)
Version 0.4
===========