From 8a3cacae32fbffa007608101335a26a63006eecb Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 25 Mar 2021 14:09:23 +0100 Subject: [PATCH] boards: Add Vendor prefix to platforms/targets name when useful and when multiple boards from the same vendor. (With Retro-Compat on the imports). --- litex_boards/platforms/__init__.py | 38 +++++++++++++++++++ .../platforms/{arty.py => digilent_arty.py} | 0 .../{arty_s7.py => digilent_arty_s7.py} | 0 .../{genesys2.py => digilent_genesys2.py} | 0 .../{nexys4ddr.py => digilent_nexys4ddr.py} | 0 ...nexys_video.py => digilent_nexys_video.py} | 0 .../{zedboard.py => digilent_zedboard.py} | 0 .../{zybo_z7.py => digilent_zybo_z7.py} | 0 .../{kx2.py => enclustra_mercury_kx2.py} | 0 ...ercury_xu5.py => enclustra_mercury_xu5.py} | 0 .../{fomu_evt.py => kosagi_fomu_evt.py} | 0 .../{fomu_hacker.py => kosagi_fomu_hacker.py} | 0 .../{fomu_pvt.py => kosagi_fomu_pvt.py} | 0 .../platforms/{netv2.py => kosagi_netv2.py} | 0 ..._nx_evn.py => lattice_crosslink_nx_evn.py} | 0 ..._nx_vip.py => lattice_crosslink_nx_vip.py} | 0 .../{ecp5_evn.py => lattice_ecp5_evn.py} | 0 .../{machxo3.py => lattice_machxo3.py} | 0 .../{versa_ecp5.py => lattice_versa_ecp5.py} | 0 .../platforms/{aller.py => numato_aller.py} | 0 .../{mimas_a7.py => numato_mimas_a7.py} | 0 .../platforms/{nereid.py => numato_nereid.py} | 0 .../platforms/{tagus.py => numato_tagus.py} | 0 ...acorn_cle_215.py => sqrl_acorn_cle_215.py} | 0 .../platforms/{fk33.py => sqrl_fk33.py} | 0 .../platforms/{xcu1525.py => sqrl_xcu1525.py} | 0 .../{de0nano.py => terasic_de0nano.py} | 0 .../{de10lite.py => terasic_de10lite.py} | 0 .../{de10nano.py => terasic_de10nano.py} | 0 .../{de1soc.py => terasic_de1soc.py} | 0 .../{de2_115.py => terasic_de2_115.py} | 0 .../platforms/{deca.py => terasic_deca.py} | 0 .../{arrow_sockit.py => terasic_sockit.py} | 0 .../{c10lprefkit.py => trenz_c10lprefkit.py} | 0 .../{tec0117.py => trenz_tec0117.py} | 0 .../platforms/{ac701.py => xilinx_ac701.py} | 0 .../{alveo_u250.py => xilinx_alveo_u250.py} | 0 .../{alveo_u280.py => xilinx_alveo_u280.py} | 0 .../platforms/{kc705.py => xilinx_kc705.py} | 0 .../platforms/{kcu105.py => xilinx_kcu105.py} | 0 .../platforms/{sp605.py => xilinx_sp605.py} | 0 .../platforms/{vc707.py => xilinx_vc707.py} | 0 .../platforms/{vcu118.py => xilinx_vcu118.py} | 0 .../platforms/{zcu104.py => xilinx_zcu104.py} | 0 litex_boards/targets/__init__.py | 38 +++++++++++++++++++ .../targets/{arty.py => digilent_arty.py} | 0 .../{arty_s7.py => digilent_arty_s7.py} | 0 .../{genesys2.py => digilent_genesys2.py} | 0 .../{nexys4ddr.py => digilent_nexys4ddr.py} | 0 ...nexys_video.py => digilent_nexys_video.py} | 0 .../{kx2.py => enclustra_mercury_kx2.py} | 2 +- ...ercury_xu5.py => enclustra_mercury_xu5.py} | 0 .../targets/{fomu.py => kosagi_fomu.py} | 0 .../targets/{netv2.py => kosagi_netv2.py} | 0 ..._nx_evn.py => lattice_crosslink_nx_evn.py} | 0 ..._nx_vip.py => lattice_crosslink_nx_vip.py} | 0 .../{ecp5_evn.py => lattice_ecp5_evn.py} | 0 .../targets/{aller.py => numato_aller.py} | 0 .../{mimas_a7.py => numato_mimas_a7.py} | 0 .../targets/{nereid.py => numato_nereid.py} | 0 .../targets/{tagus.py => numato_tagus.py} | 0 ...acorn_cle_215.py => sqrl_acorn_cle_215.py} | 0 .../targets/{fk33.py => sqrl_fk33.py} | 0 .../targets/{xcu1525.py => sqrl_xcu1525.py} | 0 .../{de0nano.py => terasic_de0nano.py} | 0 .../{de10lite.py => terasic_de10lite.py} | 0 .../{de10nano.py => terasic_de10nano.py} | 0 .../targets/{de1soc.py => terasic_de1soc.py} | 0 .../{de2_115.py => terasic_de2_115.py} | 0 .../targets/{deca.py => terasic_deca.py} | 0 .../{arrow_sockit.py => terasic_sockit.py} | 2 +- .../{c10lprefkit.py => trenz_c10lprefkit.py} | 0 .../targets/{tec0117.py => trenz_tec0117.py} | 0 .../targets/{ac701.py => xilinx_ac701.py} | 0 .../{alveo_u250.py => xilinx_alveo_u250.py} | 0 .../{alveo_u280.py => xilinx_alveo_u280.py} | 0 .../targets/{kc705.py => xilinx_kc705.py} | 0 .../targets/{kcu105.py => xilinx_kcu105.py} | 0 .../targets/{vc707.py => xilinx_vc707.py} | 0 .../targets/{vcu118.py => xilinx_vcu118.py} | 0 .../targets/{zcu104.py => xilinx_zcu104.py} | 0 .../targets/{zybo_z7.py => xilinx_zybo_z7.py} | 0 82 files changed, 78 insertions(+), 2 deletions(-) rename litex_boards/platforms/{arty.py => digilent_arty.py} (100%) rename litex_boards/platforms/{arty_s7.py => digilent_arty_s7.py} (100%) rename litex_boards/platforms/{genesys2.py => digilent_genesys2.py} (100%) rename litex_boards/platforms/{nexys4ddr.py => digilent_nexys4ddr.py} (100%) rename litex_boards/platforms/{nexys_video.py => digilent_nexys_video.py} (100%) rename litex_boards/platforms/{zedboard.py => digilent_zedboard.py} (100%) rename litex_boards/platforms/{zybo_z7.py => digilent_zybo_z7.py} (100%) rename litex_boards/platforms/{kx2.py => enclustra_mercury_kx2.py} (100%) rename litex_boards/platforms/{mercury_xu5.py => enclustra_mercury_xu5.py} (100%) rename litex_boards/platforms/{fomu_evt.py => kosagi_fomu_evt.py} (100%) rename litex_boards/platforms/{fomu_hacker.py => kosagi_fomu_hacker.py} (100%) rename litex_boards/platforms/{fomu_pvt.py => kosagi_fomu_pvt.py} (100%) rename litex_boards/platforms/{netv2.py => kosagi_netv2.py} (100%) rename litex_boards/platforms/{crosslink_nx_evn.py => lattice_crosslink_nx_evn.py} (100%) rename litex_boards/platforms/{crosslink_nx_vip.py => lattice_crosslink_nx_vip.py} (100%) rename litex_boards/platforms/{ecp5_evn.py => lattice_ecp5_evn.py} (100%) rename litex_boards/platforms/{machxo3.py => lattice_machxo3.py} (100%) rename litex_boards/platforms/{versa_ecp5.py => lattice_versa_ecp5.py} (100%) rename litex_boards/platforms/{aller.py => numato_aller.py} (100%) rename litex_boards/platforms/{mimas_a7.py => numato_mimas_a7.py} (100%) rename litex_boards/platforms/{nereid.py => numato_nereid.py} (100%) rename litex_boards/platforms/{tagus.py => numato_tagus.py} (100%) rename litex_boards/platforms/{acorn_cle_215.py => sqrl_acorn_cle_215.py} (100%) rename litex_boards/platforms/{fk33.py => sqrl_fk33.py} (100%) rename litex_boards/platforms/{xcu1525.py => sqrl_xcu1525.py} (100%) rename litex_boards/platforms/{de0nano.py => terasic_de0nano.py} (100%) rename litex_boards/platforms/{de10lite.py => terasic_de10lite.py} (100%) rename litex_boards/platforms/{de10nano.py => terasic_de10nano.py} (100%) rename litex_boards/platforms/{de1soc.py => terasic_de1soc.py} (100%) rename litex_boards/platforms/{de2_115.py => terasic_de2_115.py} (100%) rename litex_boards/platforms/{deca.py => terasic_deca.py} (100%) rename litex_boards/platforms/{arrow_sockit.py => terasic_sockit.py} (100%) rename litex_boards/platforms/{c10lprefkit.py => trenz_c10lprefkit.py} (100%) rename litex_boards/platforms/{tec0117.py => trenz_tec0117.py} (100%) rename litex_boards/platforms/{ac701.py => xilinx_ac701.py} (100%) rename litex_boards/platforms/{alveo_u250.py => xilinx_alveo_u250.py} (100%) rename litex_boards/platforms/{alveo_u280.py => xilinx_alveo_u280.py} (100%) rename litex_boards/platforms/{kc705.py => xilinx_kc705.py} (100%) rename litex_boards/platforms/{kcu105.py => xilinx_kcu105.py} (100%) rename litex_boards/platforms/{sp605.py => xilinx_sp605.py} (100%) rename litex_boards/platforms/{vc707.py => xilinx_vc707.py} (100%) rename litex_boards/platforms/{vcu118.py => xilinx_vcu118.py} (100%) rename litex_boards/platforms/{zcu104.py => xilinx_zcu104.py} (100%) rename litex_boards/targets/{arty.py => digilent_arty.py} (100%) rename litex_boards/targets/{arty_s7.py => digilent_arty_s7.py} (100%) rename litex_boards/targets/{genesys2.py => digilent_genesys2.py} (100%) rename litex_boards/targets/{nexys4ddr.py => digilent_nexys4ddr.py} (100%) rename litex_boards/targets/{nexys_video.py => digilent_nexys_video.py} (100%) rename litex_boards/targets/{kx2.py => enclustra_mercury_kx2.py} (98%) rename litex_boards/targets/{mercury_xu5.py => enclustra_mercury_xu5.py} (100%) rename litex_boards/targets/{fomu.py => kosagi_fomu.py} (100%) rename litex_boards/targets/{netv2.py => kosagi_netv2.py} (100%) rename litex_boards/targets/{crosslink_nx_evn.py => lattice_crosslink_nx_evn.py} (100%) rename litex_boards/targets/{crosslink_nx_vip.py => lattice_crosslink_nx_vip.py} (100%) rename litex_boards/targets/{ecp5_evn.py => lattice_ecp5_evn.py} (100%) rename litex_boards/targets/{aller.py => numato_aller.py} (100%) rename litex_boards/targets/{mimas_a7.py => numato_mimas_a7.py} (100%) rename litex_boards/targets/{nereid.py => numato_nereid.py} (100%) rename litex_boards/targets/{tagus.py => numato_tagus.py} (100%) rename litex_boards/targets/{acorn_cle_215.py => sqrl_acorn_cle_215.py} (100%) rename litex_boards/targets/{fk33.py => sqrl_fk33.py} (100%) rename litex_boards/targets/{xcu1525.py => sqrl_xcu1525.py} (100%) rename litex_boards/targets/{de0nano.py => terasic_de0nano.py} (100%) rename litex_boards/targets/{de10lite.py => terasic_de10lite.py} (100%) rename litex_boards/targets/{de10nano.py => terasic_de10nano.py} (100%) rename litex_boards/targets/{de1soc.py => terasic_de1soc.py} (100%) rename litex_boards/targets/{de2_115.py => terasic_de2_115.py} (100%) rename litex_boards/targets/{deca.py => terasic_deca.py} (100%) rename litex_boards/targets/{arrow_sockit.py => terasic_sockit.py} (99%) rename litex_boards/targets/{c10lprefkit.py => trenz_c10lprefkit.py} (100%) rename litex_boards/targets/{tec0117.py => trenz_tec0117.py} (100%) rename litex_boards/targets/{ac701.py => xilinx_ac701.py} (100%) rename litex_boards/targets/{alveo_u250.py => xilinx_alveo_u250.py} (100%) rename litex_boards/targets/{alveo_u280.py => xilinx_alveo_u280.py} (100%) rename litex_boards/targets/{kc705.py => xilinx_kc705.py} (100%) rename litex_boards/targets/{kcu105.py => xilinx_kcu105.py} (100%) rename litex_boards/targets/{vc707.py => xilinx_vc707.py} (100%) rename litex_boards/targets/{vcu118.py => xilinx_vcu118.py} (100%) rename litex_boards/targets/{zcu104.py => xilinx_zcu104.py} (100%) rename litex_boards/targets/{zybo_z7.py => xilinx_zybo_z7.py} (100%) diff --git a/litex_boards/platforms/__init__.py b/litex_boards/platforms/__init__.py index e69de29..4c27d15 100644 --- a/litex_boards/platforms/__init__.py +++ b/litex_boards/platforms/__init__.py @@ -0,0 +1,38 @@ +import os +import sys +import glob +import importlib + +# Boards Vendors. + +vendors = [ + "colorlight", + "digilent", + "enclustra", + "kosagi", + "lattice", + "linsn", + "numato", + "qmtech", + "terasic", + "sqrl", + "xilinx", +] + +# Get all platforms. +platforms_dir = os.path.dirname(os.path.realpath(__file__)) +platforms = glob.glob(f"{platforms_dir}/*.py") + +# For each platform: +for platform in platforms: + platform = os.path.basename(platform) + platform = platform.replace(".py", "") + # Verify if a Vendor prefix is present in platform name, if so create the short import to + # allow the platform to be imported with the full name or short name ex: + # from litex_boards.platforms import digilent_arty or + # from litex_boards.platforms import arty + if platform.split("_")[0] in vendors: + short_platform = platform[len(platform.split("_")[0])+1:] + p = importlib.import_module(f"litex_boards.platforms.{platform}") + vars()[short_platform] = p + sys.modules[f"litex_boards.platforms.{short_platform}"] = p diff --git a/litex_boards/platforms/arty.py b/litex_boards/platforms/digilent_arty.py similarity index 100% rename from litex_boards/platforms/arty.py rename to litex_boards/platforms/digilent_arty.py diff --git a/litex_boards/platforms/arty_s7.py b/litex_boards/platforms/digilent_arty_s7.py similarity index 100% rename from litex_boards/platforms/arty_s7.py rename to litex_boards/platforms/digilent_arty_s7.py diff --git a/litex_boards/platforms/genesys2.py b/litex_boards/platforms/digilent_genesys2.py similarity index 100% rename from litex_boards/platforms/genesys2.py rename to litex_boards/platforms/digilent_genesys2.py diff --git a/litex_boards/platforms/nexys4ddr.py b/litex_boards/platforms/digilent_nexys4ddr.py similarity index 100% rename from litex_boards/platforms/nexys4ddr.py rename to litex_boards/platforms/digilent_nexys4ddr.py diff --git a/litex_boards/platforms/nexys_video.py b/litex_boards/platforms/digilent_nexys_video.py similarity index 100% rename from litex_boards/platforms/nexys_video.py rename to litex_boards/platforms/digilent_nexys_video.py diff --git a/litex_boards/platforms/zedboard.py b/litex_boards/platforms/digilent_zedboard.py similarity index 100% rename from litex_boards/platforms/zedboard.py rename to litex_boards/platforms/digilent_zedboard.py diff --git a/litex_boards/platforms/zybo_z7.py b/litex_boards/platforms/digilent_zybo_z7.py similarity index 100% rename from litex_boards/platforms/zybo_z7.py rename to litex_boards/platforms/digilent_zybo_z7.py diff --git a/litex_boards/platforms/kx2.py b/litex_boards/platforms/enclustra_mercury_kx2.py similarity index 100% rename from litex_boards/platforms/kx2.py rename to litex_boards/platforms/enclustra_mercury_kx2.py diff --git a/litex_boards/platforms/mercury_xu5.py b/litex_boards/platforms/enclustra_mercury_xu5.py similarity index 100% rename from litex_boards/platforms/mercury_xu5.py rename to litex_boards/platforms/enclustra_mercury_xu5.py diff --git a/litex_boards/platforms/fomu_evt.py b/litex_boards/platforms/kosagi_fomu_evt.py similarity index 100% rename from litex_boards/platforms/fomu_evt.py rename to litex_boards/platforms/kosagi_fomu_evt.py diff --git a/litex_boards/platforms/fomu_hacker.py b/litex_boards/platforms/kosagi_fomu_hacker.py similarity index 100% rename from litex_boards/platforms/fomu_hacker.py rename to litex_boards/platforms/kosagi_fomu_hacker.py diff --git a/litex_boards/platforms/fomu_pvt.py b/litex_boards/platforms/kosagi_fomu_pvt.py similarity index 100% rename from litex_boards/platforms/fomu_pvt.py rename to litex_boards/platforms/kosagi_fomu_pvt.py diff --git a/litex_boards/platforms/netv2.py b/litex_boards/platforms/kosagi_netv2.py similarity index 100% rename from litex_boards/platforms/netv2.py rename to litex_boards/platforms/kosagi_netv2.py diff --git a/litex_boards/platforms/crosslink_nx_evn.py b/litex_boards/platforms/lattice_crosslink_nx_evn.py similarity index 100% rename from litex_boards/platforms/crosslink_nx_evn.py rename to litex_boards/platforms/lattice_crosslink_nx_evn.py diff --git a/litex_boards/platforms/crosslink_nx_vip.py b/litex_boards/platforms/lattice_crosslink_nx_vip.py similarity index 100% rename from litex_boards/platforms/crosslink_nx_vip.py rename to litex_boards/platforms/lattice_crosslink_nx_vip.py diff --git a/litex_boards/platforms/ecp5_evn.py b/litex_boards/platforms/lattice_ecp5_evn.py similarity index 100% rename from litex_boards/platforms/ecp5_evn.py rename to litex_boards/platforms/lattice_ecp5_evn.py diff --git a/litex_boards/platforms/machxo3.py b/litex_boards/platforms/lattice_machxo3.py similarity index 100% rename from litex_boards/platforms/machxo3.py rename to litex_boards/platforms/lattice_machxo3.py diff --git a/litex_boards/platforms/versa_ecp5.py b/litex_boards/platforms/lattice_versa_ecp5.py similarity index 100% rename from litex_boards/platforms/versa_ecp5.py rename to litex_boards/platforms/lattice_versa_ecp5.py diff --git a/litex_boards/platforms/aller.py b/litex_boards/platforms/numato_aller.py similarity index 100% rename from litex_boards/platforms/aller.py rename to litex_boards/platforms/numato_aller.py diff --git a/litex_boards/platforms/mimas_a7.py b/litex_boards/platforms/numato_mimas_a7.py similarity index 100% rename from litex_boards/platforms/mimas_a7.py rename to litex_boards/platforms/numato_mimas_a7.py diff --git a/litex_boards/platforms/nereid.py b/litex_boards/platforms/numato_nereid.py similarity index 100% rename from litex_boards/platforms/nereid.py rename to litex_boards/platforms/numato_nereid.py diff --git a/litex_boards/platforms/tagus.py b/litex_boards/platforms/numato_tagus.py similarity index 100% rename from litex_boards/platforms/tagus.py rename to litex_boards/platforms/numato_tagus.py diff --git a/litex_boards/platforms/acorn_cle_215.py b/litex_boards/platforms/sqrl_acorn_cle_215.py similarity index 100% rename from litex_boards/platforms/acorn_cle_215.py rename to litex_boards/platforms/sqrl_acorn_cle_215.py diff --git a/litex_boards/platforms/fk33.py b/litex_boards/platforms/sqrl_fk33.py similarity index 100% rename from litex_boards/platforms/fk33.py rename to litex_boards/platforms/sqrl_fk33.py diff --git a/litex_boards/platforms/xcu1525.py b/litex_boards/platforms/sqrl_xcu1525.py similarity index 100% rename from litex_boards/platforms/xcu1525.py rename to litex_boards/platforms/sqrl_xcu1525.py diff --git a/litex_boards/platforms/de0nano.py b/litex_boards/platforms/terasic_de0nano.py similarity index 100% rename from litex_boards/platforms/de0nano.py rename to litex_boards/platforms/terasic_de0nano.py diff --git a/litex_boards/platforms/de10lite.py b/litex_boards/platforms/terasic_de10lite.py similarity index 100% rename from litex_boards/platforms/de10lite.py rename to litex_boards/platforms/terasic_de10lite.py diff --git a/litex_boards/platforms/de10nano.py b/litex_boards/platforms/terasic_de10nano.py similarity index 100% rename from litex_boards/platforms/de10nano.py rename to litex_boards/platforms/terasic_de10nano.py diff --git a/litex_boards/platforms/de1soc.py b/litex_boards/platforms/terasic_de1soc.py similarity index 100% rename from litex_boards/platforms/de1soc.py rename to litex_boards/platforms/terasic_de1soc.py diff --git a/litex_boards/platforms/de2_115.py b/litex_boards/platforms/terasic_de2_115.py similarity index 100% rename from litex_boards/platforms/de2_115.py rename to litex_boards/platforms/terasic_de2_115.py diff --git a/litex_boards/platforms/deca.py b/litex_boards/platforms/terasic_deca.py similarity index 100% rename from litex_boards/platforms/deca.py rename to litex_boards/platforms/terasic_deca.py diff --git a/litex_boards/platforms/arrow_sockit.py b/litex_boards/platforms/terasic_sockit.py similarity index 100% rename from litex_boards/platforms/arrow_sockit.py rename to litex_boards/platforms/terasic_sockit.py diff --git a/litex_boards/platforms/c10lprefkit.py b/litex_boards/platforms/trenz_c10lprefkit.py similarity index 100% rename from litex_boards/platforms/c10lprefkit.py rename to litex_boards/platforms/trenz_c10lprefkit.py diff --git a/litex_boards/platforms/tec0117.py b/litex_boards/platforms/trenz_tec0117.py similarity index 100% rename from litex_boards/platforms/tec0117.py rename to litex_boards/platforms/trenz_tec0117.py diff --git a/litex_boards/platforms/ac701.py b/litex_boards/platforms/xilinx_ac701.py similarity index 100% rename from litex_boards/platforms/ac701.py rename to litex_boards/platforms/xilinx_ac701.py diff --git a/litex_boards/platforms/alveo_u250.py b/litex_boards/platforms/xilinx_alveo_u250.py similarity index 100% rename from litex_boards/platforms/alveo_u250.py rename to litex_boards/platforms/xilinx_alveo_u250.py diff --git a/litex_boards/platforms/alveo_u280.py b/litex_boards/platforms/xilinx_alveo_u280.py similarity index 100% rename from litex_boards/platforms/alveo_u280.py rename to litex_boards/platforms/xilinx_alveo_u280.py diff --git a/litex_boards/platforms/kc705.py b/litex_boards/platforms/xilinx_kc705.py similarity index 100% rename from litex_boards/platforms/kc705.py rename to litex_boards/platforms/xilinx_kc705.py diff --git a/litex_boards/platforms/kcu105.py b/litex_boards/platforms/xilinx_kcu105.py similarity index 100% rename from litex_boards/platforms/kcu105.py rename to litex_boards/platforms/xilinx_kcu105.py diff --git a/litex_boards/platforms/sp605.py b/litex_boards/platforms/xilinx_sp605.py similarity index 100% rename from litex_boards/platforms/sp605.py rename to litex_boards/platforms/xilinx_sp605.py diff --git a/litex_boards/platforms/vc707.py b/litex_boards/platforms/xilinx_vc707.py similarity index 100% rename from litex_boards/platforms/vc707.py rename to litex_boards/platforms/xilinx_vc707.py diff --git a/litex_boards/platforms/vcu118.py b/litex_boards/platforms/xilinx_vcu118.py similarity index 100% rename from litex_boards/platforms/vcu118.py rename to litex_boards/platforms/xilinx_vcu118.py diff --git a/litex_boards/platforms/zcu104.py b/litex_boards/platforms/xilinx_zcu104.py similarity index 100% rename from litex_boards/platforms/zcu104.py rename to litex_boards/platforms/xilinx_zcu104.py diff --git a/litex_boards/targets/__init__.py b/litex_boards/targets/__init__.py index e69de29..92ceb3d 100644 --- a/litex_boards/targets/__init__.py +++ b/litex_boards/targets/__init__.py @@ -0,0 +1,38 @@ +import os +import sys +import glob +import importlib + +# Boards Vendors. + +vendors = [ + "colorlight", + "digilent", + "enclustra", + "kosagi", + "lattice", + "linsn", + "numato", + "qmtech", + "terasic", + "sqrl", + "xilinx", +] + +# Get all targets. +targets_dir = os.path.dirname(os.path.realpath(__file__)) +targets = glob.glob(f"{targets_dir}/*.py") + +# For each target: +for target in targets: + target = os.path.basename(target) + target = target.replace(".py", "") + # Verify if a Vendor prefix is present in target name, if so create the short import to + # allow the target to be imported with the full name or short name ex: + # from litex_boards.targets import digilent_arty or + # from litex_boards.targets import arty + if target.split("_")[0] in vendors: + short_target = target[len(target.split("_")[0])+1:] + t = importlib.import_module(f"litex_boards.targets.{target}") + vars()[short_target] = t + sys.modules[f"litex_boards.targets.{short_target}"] = t diff --git a/litex_boards/targets/arty.py b/litex_boards/targets/digilent_arty.py similarity index 100% rename from litex_boards/targets/arty.py rename to litex_boards/targets/digilent_arty.py diff --git a/litex_boards/targets/arty_s7.py b/litex_boards/targets/digilent_arty_s7.py similarity index 100% rename from litex_boards/targets/arty_s7.py rename to litex_boards/targets/digilent_arty_s7.py diff --git a/litex_boards/targets/genesys2.py b/litex_boards/targets/digilent_genesys2.py similarity index 100% rename from litex_boards/targets/genesys2.py rename to litex_boards/targets/digilent_genesys2.py diff --git a/litex_boards/targets/nexys4ddr.py b/litex_boards/targets/digilent_nexys4ddr.py similarity index 100% rename from litex_boards/targets/nexys4ddr.py rename to litex_boards/targets/digilent_nexys4ddr.py diff --git a/litex_boards/targets/nexys_video.py b/litex_boards/targets/digilent_nexys_video.py similarity index 100% rename from litex_boards/targets/nexys_video.py rename to litex_boards/targets/digilent_nexys_video.py diff --git a/litex_boards/targets/kx2.py b/litex_boards/targets/enclustra_mercury_kx2.py similarity index 98% rename from litex_boards/targets/kx2.py rename to litex_boards/targets/enclustra_mercury_kx2.py index 9e845e2..21b851a 100755 --- a/litex_boards/targets/kx2.py +++ b/litex_boards/targets/enclustra_mercury_kx2.py @@ -11,7 +11,7 @@ import argparse from migen import * -from litex_boards.platforms import kx2 +from litex_boards.platforms import mercury_kx2 from litex.soc.cores.clock import * from litex.soc.integration.soc_core import * diff --git a/litex_boards/targets/mercury_xu5.py b/litex_boards/targets/enclustra_mercury_xu5.py similarity index 100% rename from litex_boards/targets/mercury_xu5.py rename to litex_boards/targets/enclustra_mercury_xu5.py diff --git a/litex_boards/targets/fomu.py b/litex_boards/targets/kosagi_fomu.py similarity index 100% rename from litex_boards/targets/fomu.py rename to litex_boards/targets/kosagi_fomu.py diff --git a/litex_boards/targets/netv2.py b/litex_boards/targets/kosagi_netv2.py similarity index 100% rename from litex_boards/targets/netv2.py rename to litex_boards/targets/kosagi_netv2.py diff --git a/litex_boards/targets/crosslink_nx_evn.py b/litex_boards/targets/lattice_crosslink_nx_evn.py similarity index 100% rename from litex_boards/targets/crosslink_nx_evn.py rename to litex_boards/targets/lattice_crosslink_nx_evn.py diff --git a/litex_boards/targets/crosslink_nx_vip.py b/litex_boards/targets/lattice_crosslink_nx_vip.py similarity index 100% rename from litex_boards/targets/crosslink_nx_vip.py rename to litex_boards/targets/lattice_crosslink_nx_vip.py diff --git a/litex_boards/targets/ecp5_evn.py b/litex_boards/targets/lattice_ecp5_evn.py similarity index 100% rename from litex_boards/targets/ecp5_evn.py rename to litex_boards/targets/lattice_ecp5_evn.py diff --git a/litex_boards/targets/aller.py b/litex_boards/targets/numato_aller.py similarity index 100% rename from litex_boards/targets/aller.py rename to litex_boards/targets/numato_aller.py diff --git a/litex_boards/targets/mimas_a7.py b/litex_boards/targets/numato_mimas_a7.py similarity index 100% rename from litex_boards/targets/mimas_a7.py rename to litex_boards/targets/numato_mimas_a7.py diff --git a/litex_boards/targets/nereid.py b/litex_boards/targets/numato_nereid.py similarity index 100% rename from litex_boards/targets/nereid.py rename to litex_boards/targets/numato_nereid.py diff --git a/litex_boards/targets/tagus.py b/litex_boards/targets/numato_tagus.py similarity index 100% rename from litex_boards/targets/tagus.py rename to litex_boards/targets/numato_tagus.py diff --git a/litex_boards/targets/acorn_cle_215.py b/litex_boards/targets/sqrl_acorn_cle_215.py similarity index 100% rename from litex_boards/targets/acorn_cle_215.py rename to litex_boards/targets/sqrl_acorn_cle_215.py diff --git a/litex_boards/targets/fk33.py b/litex_boards/targets/sqrl_fk33.py similarity index 100% rename from litex_boards/targets/fk33.py rename to litex_boards/targets/sqrl_fk33.py diff --git a/litex_boards/targets/xcu1525.py b/litex_boards/targets/sqrl_xcu1525.py similarity index 100% rename from litex_boards/targets/xcu1525.py rename to litex_boards/targets/sqrl_xcu1525.py diff --git a/litex_boards/targets/de0nano.py b/litex_boards/targets/terasic_de0nano.py similarity index 100% rename from litex_boards/targets/de0nano.py rename to litex_boards/targets/terasic_de0nano.py diff --git a/litex_boards/targets/de10lite.py b/litex_boards/targets/terasic_de10lite.py similarity index 100% rename from litex_boards/targets/de10lite.py rename to litex_boards/targets/terasic_de10lite.py diff --git a/litex_boards/targets/de10nano.py b/litex_boards/targets/terasic_de10nano.py similarity index 100% rename from litex_boards/targets/de10nano.py rename to litex_boards/targets/terasic_de10nano.py diff --git a/litex_boards/targets/de1soc.py b/litex_boards/targets/terasic_de1soc.py similarity index 100% rename from litex_boards/targets/de1soc.py rename to litex_boards/targets/terasic_de1soc.py diff --git a/litex_boards/targets/de2_115.py b/litex_boards/targets/terasic_de2_115.py similarity index 100% rename from litex_boards/targets/de2_115.py rename to litex_boards/targets/terasic_de2_115.py diff --git a/litex_boards/targets/deca.py b/litex_boards/targets/terasic_deca.py similarity index 100% rename from litex_boards/targets/deca.py rename to litex_boards/targets/terasic_deca.py diff --git a/litex_boards/targets/arrow_sockit.py b/litex_boards/targets/terasic_sockit.py similarity index 99% rename from litex_boards/targets/arrow_sockit.py rename to litex_boards/targets/terasic_sockit.py index 2ec8af2..36f3457 100755 --- a/litex_boards/targets/arrow_sockit.py +++ b/litex_boards/targets/terasic_sockit.py @@ -28,7 +28,7 @@ from litex.soc.cores.video import VideoVGAPHY from litex.build.io import DDROutput -from litex_boards.platforms import arrow_sockit +from litex_boards.platforms import terasic_sockit from litedram.modules import _TechnologyTimings, _SpeedgradeTimings, SDRModule, AS4C32M16 from litedram.phy import HalfRateGENSDRPHY, GENSDRPHY diff --git a/litex_boards/targets/c10lprefkit.py b/litex_boards/targets/trenz_c10lprefkit.py similarity index 100% rename from litex_boards/targets/c10lprefkit.py rename to litex_boards/targets/trenz_c10lprefkit.py diff --git a/litex_boards/targets/tec0117.py b/litex_boards/targets/trenz_tec0117.py similarity index 100% rename from litex_boards/targets/tec0117.py rename to litex_boards/targets/trenz_tec0117.py diff --git a/litex_boards/targets/ac701.py b/litex_boards/targets/xilinx_ac701.py similarity index 100% rename from litex_boards/targets/ac701.py rename to litex_boards/targets/xilinx_ac701.py diff --git a/litex_boards/targets/alveo_u250.py b/litex_boards/targets/xilinx_alveo_u250.py similarity index 100% rename from litex_boards/targets/alveo_u250.py rename to litex_boards/targets/xilinx_alveo_u250.py diff --git a/litex_boards/targets/alveo_u280.py b/litex_boards/targets/xilinx_alveo_u280.py similarity index 100% rename from litex_boards/targets/alveo_u280.py rename to litex_boards/targets/xilinx_alveo_u280.py diff --git a/litex_boards/targets/kc705.py b/litex_boards/targets/xilinx_kc705.py similarity index 100% rename from litex_boards/targets/kc705.py rename to litex_boards/targets/xilinx_kc705.py diff --git a/litex_boards/targets/kcu105.py b/litex_boards/targets/xilinx_kcu105.py similarity index 100% rename from litex_boards/targets/kcu105.py rename to litex_boards/targets/xilinx_kcu105.py diff --git a/litex_boards/targets/vc707.py b/litex_boards/targets/xilinx_vc707.py similarity index 100% rename from litex_boards/targets/vc707.py rename to litex_boards/targets/xilinx_vc707.py diff --git a/litex_boards/targets/vcu118.py b/litex_boards/targets/xilinx_vcu118.py similarity index 100% rename from litex_boards/targets/vcu118.py rename to litex_boards/targets/xilinx_vcu118.py diff --git a/litex_boards/targets/zcu104.py b/litex_boards/targets/xilinx_zcu104.py similarity index 100% rename from litex_boards/targets/zcu104.py rename to litex_boards/targets/xilinx_zcu104.py diff --git a/litex_boards/targets/zybo_z7.py b/litex_boards/targets/xilinx_zybo_z7.py similarity index 100% rename from litex_boards/targets/zybo_z7.py rename to litex_boards/targets/xilinx_zybo_z7.py