soc/interconnect/axi: add Wishbone2AXI converter
[litex.git] / litex / __init__.py
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5f37b49da6fbecaf3117447682aed22e49fab764 100644 (file)
@@ -0,0 +1,20 @@
+import sys
+
+from litex.tools.litex_client import RemoteClient
+
+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;
+ pip install git+https://github.com/litex-hub/pythondata-{dt}-{dn}.git
+""".format(dt=data_type, dn=data_name, e=e))