From 706eb03e6b6ca1f5e6286d9142a0371df4a625bf Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 21 Jun 2020 17:28:01 +0000 Subject: [PATCH] vendor.lattice_machxo2: add back as a compatibility shim. --- nmigen/vendor/lattice_machxo2.py | 11 +++++++++++ nmigen/vendor/lattice_machxo_2_3l.py | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 nmigen/vendor/lattice_machxo2.py diff --git a/nmigen/vendor/lattice_machxo2.py b/nmigen/vendor/lattice_machxo2.py new file mode 100644 index 0000000..1d01506 --- /dev/null +++ b/nmigen/vendor/lattice_machxo2.py @@ -0,0 +1,11 @@ +import warnings + +from .lattice_machxo_2_3l import LatticeMachXO2Platform + + +__all__ = ["LatticeMachXO2Platform"] + + +# TODO(nmigen-0.4): remove +warnings.warn("instead of vendor.lattice_machxo2, use vendor.lattice_machxo_2_3l", + DeprecationWarning, stacklevel=2) diff --git a/nmigen/vendor/lattice_machxo_2_3l.py b/nmigen/vendor/lattice_machxo_2_3l.py index bc7343b..0eb348e 100644 --- a/nmigen/vendor/lattice_machxo_2_3l.py +++ b/nmigen/vendor/lattice_machxo_2_3l.py @@ -6,6 +6,7 @@ from ..build import * __all__ = ["LatticeMachXO2Platform", "LatticeMachXO3LPlatform"] + # MachXO2 and MachXO3L primitives are the same. Handle both using # one class and expose user-aliases for convenience. class LatticeMachXO2Or3LPlatform(TemplatedPlatform): @@ -396,5 +397,6 @@ class LatticeMachXO2Or3LPlatform(TemplatedPlatform): # CDC primitives are not currently specialized for MachXO2/MachXO3L. + LatticeMachXO2Platform = LatticeMachXO2Or3LPlatform LatticeMachXO3LPlatform = LatticeMachXO2Or3LPlatform -- 2.30.2