Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
import sys
# Migen/Python 3.14+ Compatibility -----------------------------------------------------------------
def _migen_python_compat():
try:
from migen.fhdl import tracer
except ImportError:
return
for opcode in ["LOAD_FAST_BORROW", "LOAD_FAST_CHECK"]:
tracer._load_build_opcodes.setdefault(opcode, tracer._bytecode_length_version_guard(3))
_migen_python_compat()
from litex.tools.litex_client import RemoteClient
# Python-Data Import Helper ------------------------------------------------------------------------
def get_data_mod(data_type, data_name):
"""Get the pythondata-{}-{} module or raise a useful error message."""
imp = "import pythondata_{}_{} as dm".format(data_type, data_name)
try:
l = {}
exec(imp, {}, l)
dm = l['dm']
return dm
except ImportError as e:
raise ImportError("""\
pythondata-{dt}-{dn} module not installed! Unable to use {dn} {dt}.
{e}
You can install this by running;
pip3 install git+https://github.com/litex-hub/pythondata-{dt}-{dn}.git
""".format(dt=data_type, dn=data_name, e=e)) from None
5c42d5cafThis file is pinned to the selected release. Download the original to open it in your design tool.