From c2001fe9356174d12cab022f0bbc3261dbf47f5a Mon Sep 17 00:00:00 2001 From: Wanda Date: Sun, 3 Mar 2024 23:44:41 +0100 Subject: [PATCH] vendor: Rename `IntelPlatform` to `AlteraPlatform`. Fixes #1179. --- README.md | 2 +- amaranth/vendor/__init__.py | 7 ++++--- amaranth/vendor/{_intel.py => _altera.py} | 2 +- docs/changes.rst | 1 + docs/platform.rst | 2 +- docs/platform/altera.rst | 10 ++++++++++ docs/platform/intel.rst | 10 ---------- 7 files changed, 18 insertions(+), 16 deletions(-) rename amaranth/vendor/{_intel.py => _altera.py} (99%) create mode 100644 docs/platform/altera.rst delete mode 100644 docs/platform/intel.rst diff --git a/README.md b/README.md index f3b0f07..72a5226 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Amaranth can be used to target any FPGA or ASIC process that accepts behavioral * AMD Spartan 6 (toolchains: ISE); * AMD 7-series (toolchains: Vivado, ISE); * AMD UltraScale, UltraScale+ (toolchains: Vivado); - * Intel (toolchains: Quartus); + * Altera (toolchains: Quartus); * Quicklogic EOS S3 (toolchains: **Yosys+VPR**). FOSS toolchains are listed in **bold**. diff --git a/amaranth/vendor/__init__.py b/amaranth/vendor/__init__.py index 8e0c489..d5c18a1 100644 --- a/amaranth/vendor/__init__.py +++ b/amaranth/vendor/__init__.py @@ -4,6 +4,7 @@ # Keep this list sorted alphabetically. __all__ = [ + "AlteraPlatform", "GowinPlatform", "IntelPlatform", "LatticeECP5Platform", @@ -20,12 +21,12 @@ def __dir__(): def __getattr__(name): + if name in ("AlteraPlatform", "IntelPlatform"): + from ._altera import AlteraPlatform + return AlteraPlatform if name == "GowinPlatform": from ._gowin import GowinPlatform return GowinPlatform - if name == "IntelPlatform": - from ._intel import IntelPlatform - return IntelPlatform if name == "LatticeECP5Platform": from ._lattice_ecp5 import LatticeECP5Platform return LatticeECP5Platform diff --git a/amaranth/vendor/_intel.py b/amaranth/vendor/_altera.py similarity index 99% rename from amaranth/vendor/_intel.py rename to amaranth/vendor/_altera.py index d592904..568fe91 100644 --- a/amaranth/vendor/_intel.py +++ b/amaranth/vendor/_altera.py @@ -4,7 +4,7 @@ from ..hdl import * from ..build import * -class IntelPlatform(TemplatedPlatform): +class AlteraPlatform(TemplatedPlatform): """ .. rubric:: Quartus toolchain diff --git a/docs/changes.rst b/docs/changes.rst index 2b1e6da..c398cb5 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -102,6 +102,7 @@ Platform integration changes * Added: :meth:`BuildPlan.execute_local_docker`. * Added: :meth:`BuildPlan.extract`. * Added: ``build.sh`` begins with ``#!/bin/sh``. +* Changed: ``IntelPlatform`` renamed to ``AlteraPlatform``. * Deprecated: argument ``run_script=`` in :meth:`BuildPlan.execute_local`. * 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`_) diff --git a/docs/platform.rst b/docs/platform.rst index 8547cba..6ab4e52 100644 --- a/docs/platform.rst +++ b/docs/platform.rst @@ -10,8 +10,8 @@ Platform integration .. toctree:: :maxdepth: 2 + platform/altera platform/gowin - platform/intel platform/lattice-ecp5 platform/lattice-ice40 platform/lattice-machxo-2-3l diff --git a/docs/platform/altera.rst b/docs/platform/altera.rst new file mode 100644 index 0000000..343c05d --- /dev/null +++ b/docs/platform/altera.rst @@ -0,0 +1,10 @@ +Altera +###### + +.. currentmodule:: amaranth.vendor + +The :class:`AlteraPlatform` class provides a base platform to support Altera toolchains. + +The Quartus and Mistral toolchains are supported. + +.. autoclass:: AlteraPlatform diff --git a/docs/platform/intel.rst b/docs/platform/intel.rst deleted file mode 100644 index 940cfa1..0000000 --- a/docs/platform/intel.rst +++ /dev/null @@ -1,10 +0,0 @@ -Intel -##### - -.. currentmodule:: amaranth.vendor - -The :class:`IntelPlatform` class provides a base platform to support Intel toolchains. - -The Quartus and Mistral toolchains are supported. - -.. autoclass:: IntelPlatform