From d28d15761d0757ca7aaecc0c2b3b752c0afee0a2 Mon Sep 17 00:00:00 2001 From: Catherine Date: Tue, 9 Apr 2024 19:12:21 +0000 Subject: [PATCH] =?UTF-8?q?vendor:=20LatticeICE40Platform=E2=86=92SiliconB?= =?UTF-8?q?luePlatform.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Devices originally designed by SiliconBlue have one set of primitives, and devices originally designed by AT&T, Alcatel-Lucent, or Lattice have a different set of primitives. This is the first step in merging the non-SiliconBlue Lattice platforms into one. --- amaranth/vendor/__init__.py | 7 ++++--- amaranth/vendor/{_lattice_ice40.py => _siliconblue.py} | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) rename amaranth/vendor/{_lattice_ice40.py => _siliconblue.py} (99%) diff --git a/amaranth/vendor/__init__.py b/amaranth/vendor/__init__.py index d5c18a1..7373bb7 100644 --- a/amaranth/vendor/__init__.py +++ b/amaranth/vendor/__init__.py @@ -12,6 +12,7 @@ __all__ = [ "LatticeMachXO2Platform", "LatticeMachXO3LPlatform", "QuicklogicPlatform", + "SiliconBluePlatform", "XilinxPlatform", ] @@ -30,15 +31,15 @@ def __getattr__(name): if name == "LatticeECP5Platform": from ._lattice_ecp5 import LatticeECP5Platform return LatticeECP5Platform - if name == "LatticeICE40Platform": - from ._lattice_ice40 import LatticeICE40Platform - return LatticeICE40Platform if name in ("LatticeMachXO2Platform", "LatticeMachXO3LPlatform"): from ._lattice_machxo_2_3l import LatticeMachXO2Or3LPlatform return LatticeMachXO2Or3LPlatform if name == "QuicklogicPlatform": from ._quicklogic import QuicklogicPlatform return QuicklogicPlatform + if name in ("SiliconBluePlatform", "LatticeICE40Platform"): + from ._siliconblue import SiliconBluePlatform + return SiliconBluePlatform if name == "XilinxPlatform": from ._xilinx import XilinxPlatform return XilinxPlatform diff --git a/amaranth/vendor/_lattice_ice40.py b/amaranth/vendor/_siliconblue.py similarity index 99% rename from amaranth/vendor/_lattice_ice40.py rename to amaranth/vendor/_siliconblue.py index abd4793..36c1501 100644 --- a/amaranth/vendor/_lattice_ice40.py +++ b/amaranth/vendor/_siliconblue.py @@ -1,3 +1,6 @@ +# Currently owned by Lattice, originally designed and built by a startup called SiliconBlue, which +# was acquired by Lattice. The primitives are prefixed with `SB_` for that reason. + from abc import abstractmethod from ..hdl import * @@ -6,7 +9,7 @@ from ..lib import io from ..build import * -class LatticeICE40Platform(TemplatedPlatform): +class SiliconBluePlatform(TemplatedPlatform): """ .. rubric:: IceStorm toolchain