Adding paths for vivado.
authorTim 'mithro' Ansell <mithro@mithis.com>
Thu, 19 Jan 2017 23:08:16 +0000 (10:08 +1100)
committerTim 'mithro' Ansell <mithro@mithis.com>
Thu, 19 Jan 2017 23:30:34 +0000 (10:30 +1100)
litex/build/xilinx/common.py
litex/build/xilinx/vivado.py

index 3728a531f282e2dfb612866012385f494b7cc829..75412a137d67009c011a56bdc9b0e896bb99191e 100644 (file)
@@ -32,6 +32,7 @@ if _have_colorama:
 
 
 def settings(path, ver=None, sub=None):
+    assert path is not None
     if ver is None:
         vers = list(tools.versions(path))
         if not vers:
index fb0932bc73de804e8ee6c1917386855eaa9d79b7..ef6c617eed7f1a697bef66de5c0a1e3e524958aa 100644 (file)
@@ -141,6 +141,13 @@ class XilinxVivadoToolchain:
 
     def build(self, platform, fragment, build_dir="build", build_name="top",
             toolchain_path=None, source=True, run=True, **kwargs):
+        if toolchain_path is None:
+            if sys.platform == "win32":
+                toolchain_path = "C:\\Xilinx\\Vivado"
+            elif sys.platform == "cygwin":
+                toolchain_path = "/cygdrive/c/Xilinx/Vivado"
+            else:
+                toolchain_path = "/opt/Xilinx/Vivado"
         os.makedirs(build_dir, exist_ok=True)
         cwd = os.getcwd()
         os.chdir(build_dir)