cpu/microwatt: add pythondata and fix build with it.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 4 May 2020 06:46:25 +0000 (08:46 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 4 May 2020 06:46:25 +0000 (08:46 +0200)
litex/soc/cores/cpu/microwatt/core.py
litex_setup.py

index 76eb59dc7ab6910feb01cd6b769138006bf142a6..603a950d2b74a22cfcf0b5e610219474c0d83df8 100644 (file)
@@ -102,9 +102,7 @@ class Microwatt(CPU):
 
     @staticmethod
     def add_sources(platform):
-        sdir = os.path.join(
-            get_data_mod("cpu", "microwatt").data_location,
-            "sources")
+        sdir = get_data_mod("cpu", "microwatt").data_location
         platform.add_sources(sdir,
             # Common / Types / Helpers
             "decode_types.vhdl",
@@ -157,7 +155,7 @@ class Microwatt(CPU):
             "core_debug.vhdl",
             "core.vhdl",
         )
-        platform.add_source(os.path.join(sdir, "..", "microwatt_wrapper.vhdl"))
+        platform.add_source(os.path.join(os.path.dirname(__file__), "microwatt_wrapper.vhdl"))
 
     def do_finalize(self):
         self.specials += Instance("microwatt_wrapper", **self.cpu_params)
index f6d6b39371368a7f5c1632edbeb011a1cad1d573..287cc076af3cf3cc9268f3b2c80b86dc4e16de73 100755 (executable)
@@ -47,6 +47,7 @@ repos = [
     ("pythondata-cpu-vexriscv",    ("https://github.com/litex-hub/", False, True)),
     ("pythondata-cpu-rocket",      ("https://github.com/litex-hub/", False, True)),
     ("pythondata-cpu-minerva",     ("https://github.com/litex-hub/", False, True)),
+    ("pythondata-cpu-microwatt",   ("https://github.com/litex-hub/", False, True)),
 ]
 
 repos = OrderedDict(repos)