litex-boards/litex_boards/__init__.py
Florent Kermarrec 3bb84b0071 Add initial Blackmagic Decklink Mini 4K support (with UART, DDR3, PCIe, Video Out).
Mini Monitor 4K and Mini Recorder 4K are almost the same hardware with just changes on
the Video In/Out. For now tests have been done on the Mini Monitor 4K, but the aim  is
support both boards in the same platform/target in the future, thus the mini_4k naming.

These boards could be used as affordable Artix7 dev boards for LiteX, to run Linux with
LiteX (512MB of RAM + a Video Framebuffer) or to create custom systems like a fast software
defined signal generator/recorder directly from a PC over PCIe, custom HDMI/SDI video
cards, etc... lots of possibilities :)
2021-05-06 09:47:01 +02:00

69 lines
2.1 KiB
Python

import os
import sys
import glob
import importlib
# Boards Vendors.
vendors = [
"1bitsquared",
"antmicro",
"colorlight",
"decklink",
"digilent",
"enclustra",
"gsd",
"hackaday",
"kosagi",
"lattice",
"lambdaconcept",
"linsn",
"numato",
"qmtech",
"radiona",
"rhsresearchllc",
"saanlima",
"scarabhardware",
"siglent",
"sqrl",
"terasic",
"trenz",
"xilinx",
]
# Get all platforms/targets.
litex_boards_dir = os.path.dirname(os.path.realpath(__file__))
platforms = glob.glob(f"{litex_boards_dir}/platforms/*.py")
targets = glob.glob(f"{litex_boards_dir}/targets/*.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
# 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:
try:
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
except ModuleNotFoundError:
# Not all dependencies for this target is satisfied. Skip.
pass