Implement RFC 18: Reorganize vendor platforms

This commit is contained in:
Catherine 2023-08-31 23:25:38 +00:00
parent 88cbf30128
commit 796068a192
23 changed files with 4447 additions and 4334 deletions

View file

@ -25,6 +25,7 @@ Apply the following changes to code written against Amaranth 0.3 to migrate it t
* Update shell environment to use ``AMARANTH_*`` environment variables instead of ``NMIGEN_*`` environment variables.
* Update shell environment to use ``AMARANTH_ENV_<TOOLCHAIN>`` (with all-uppercase ``<TOOLCHAIN>`` name) environment variable names instead of ``AMARANTH_ENV_<Toolchain>`` or ``NMIGEN_ENV_<Toolchain>`` (with mixed-case ``<Toolchain>`` name).
* Update imports of the form ``from amaranth.vendor.some_vendor import SomeVendorPlatform`` to ``from amaranth.vendor import SomeVendorPlatform``. This change will reduce future churn.
While code that uses the features listed as deprecated below will work in Amaranth 0.4, they will be removed in the next version.
@ -42,6 +43,7 @@ Implemented RFCs
.. _RFC 9: https://amaranth-lang.org/rfcs/0009-const-init-shape-castable.html
.. _RFC 10: https://amaranth-lang.org/rfcs/0010-move-repl-to-value.html
.. _RFC 15: https://amaranth-lang.org/rfcs/0015-lifting-shape-castables.html
.. _RFC 18: https://amaranth-lang.org/rfcs/0018-reorganize-vendor-platforms.html
.. _RFC 22: https://amaranth-lang.org/rfcs/0022-valuecastable-shape.html
* `RFC 1`_: Aggregate data structure library
@ -54,6 +56,7 @@ Implemented RFCs
* `RFC 8`_: Aggregate extensibility
* `RFC 9`_: Constant initialization for shape-castable objects
* `RFC 10`_: Move ``Repl`` to ``Value.replicate``
* `RFC 18`_: Reorganize vendor platforms
* `RFC 15`_: Lifting shape-castable objects
* `RFC 22`_: Define ``ValueCastable.shape()``
@ -110,9 +113,10 @@ Platform integration changes
.. currentmodule:: amaranth.vendor
* Added: ``OSCH`` as ``default_clk`` clock source in :class:`vendor.lattice_machxo_2_3l.LatticeMachXO2Or3LPlatform`.
* Added: Xray toolchain support in :class:`vendor.xilinx.XilinxPlatform`.
* Added: :class:`vendor.gowin.GowinPlatform`.
* Added: ``OSCH`` as ``default_clk`` clock source in :class:`vendor.LatticeMachXO2Platform`, :class:`vendor.LatticeMachXO3LPlatform`.
* Added: Xray toolchain support in :class:`vendor.XilinxPlatform`.
* Added: :class:`vendor.GowinPlatform`.
* Deprecated: :mod:`vendor.intel`, :mod:`vendor.lattice_ecp5`, :mod:`vendor.lattice_ice40`, :mod:`vendor.lattice_machxo2_3l`, :mod:`vendor.quicklogic`, :mod:`vendor.xilinx`; import platforms directly from :mod:`vendor` instead. (`RFC 18`_)
* Removed: (deprecated in 0.3) :mod:`lattice_machxo2`
* Removed: (deprecated in 0.3) :class:`lattice_machxo_2_3l.LatticeMachXO2Or3LPlatform` SVF programming vector ``{{name}}.svf``.
* Removed: (deprecated in 0.3) :class:`xilinx_spartan_3_6.XilinxSpartan3APlatform`, :class:`xilinx_spartan_3_6.XilinxSpartan6Platform`, :class:`xilinx_7series.Xilinx7SeriesPlatform`, :class:`xilinx_ultrascale.XilinxUltrascalePlatform`.

View file

@ -1,9 +1,9 @@
Gowin
#####
.. py:module:: amaranth.vendor.gowin
.. currentmodule:: amaranth.vendor
The :mod:`amaranth.vendor.gowin` module provides a base platform to support Gowin toolchains.
The :class:`GowinPlatform` class provides a base platform to support Gowin toolchains.
The Apicula and Gowin toolchains are supported.

View file

@ -1,9 +1,9 @@
Intel
#####
.. py:module:: amaranth.vendor.intel
.. currentmodule:: amaranth.vendor
The :mod:`amaranth.vendor.intel` module provides a base platform to support Intel toolchains.
The :class:`IntelPlatform` class provides a base platform to support Intel toolchains.
The Quartus and Mistral toolchains are supported.

View file

@ -1,9 +1,9 @@
Lattice ECP5
############
.. py:module:: amaranth.vendor.lattice_ecp5
.. currentmodule:: amaranth.vendor
The :mod:`amaranth.vendor.lattice_ecp5` module provides a base platform to support Lattice ECP5 devices.
The :class:`LatticeECP5Platform` class provides a base platform to support Lattice ECP5 devices.
The Trellis and Diamond toolchains are supported.

View file

@ -1,9 +1,9 @@
Lattice iCE40
#############
.. py:module:: amaranth.vendor.lattice_ice40
.. currentmodule:: amaranth.vendor
The :mod:`amaranth.vendor.lattice_ice40` module provides a base platform to support Lattice iCE40 devices.
The :class:`LatticeICE40Platform` class provides a base platform to support Lattice iCE40 devices.
The IceStorm and iCECube2 toolchains are supported.

View file

@ -1,19 +1,12 @@
Lattice MachXO2 and MachXO3L
############################
.. py:module:: amaranth.vendor.lattice_machxo_2_3l
.. currentmodule:: amaranth.vendor
The :mod:`amaranth.vendor.lattice_machxo_2_3l` module provides a base platform to support Lattice
MachXO2 and MachXO3L devices.
The :class:`LatticeMachXO2Platform` and :class:`LatticeMachXO3LPlatform` classes provide base platforms to support Lattice MachXO2 and MachXO3L devices.
The Diamond toolchain is supported.
.. autoclass:: amaranth.vendor._lattice_machxo_2_3l.LatticeMachXO2Or3LPlatform
.. autoclass:: LatticeMachXO2Platform
.. autoclass:: LatticeMachXO3LPlatform
.. note:: Both of the above are aliases for the actual platform below, however only the aliased
definitions are actually exported from the module for use.
.. autoclass:: LatticeMachXO2Or3LPlatform

View file

@ -1,9 +1,9 @@
Quicklogic
##########
.. py:module:: amaranth.vendor.quicklogic
.. currentmodule:: amaranth.vendor
The :mod:`amaranth.vendor.quicklogic` module provides a base platform to support Quicklogic toolchains.
The :class:`QuicklogicPlatform` class provides a base platform to support Quicklogic toolchains.
The Symbiflow toolchain is supported.

View file

@ -1,9 +1,9 @@
Xilinx
######
.. py:module:: amaranth.vendor.xilinx
.. currentmodule:: amaranth.vendor
The :mod:`amaranth.vendor.xilinx` module provides a base platform to support Xilinx toolchains.
The :class:`XilinxPlatform` class provides a base platform to support Xilinx toolchains.
The ISE, Vivado, and Symbiflow toolchains are supported.