From 2444c090ab594bc26008ae31a5b5f5d8a323161f Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Fri, 20 Jan 2017 10:08:16 +1100 Subject: [PATCH] Adding paths for vivado. --- litex/build/xilinx/common.py | 1 + litex/build/xilinx/vivado.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/litex/build/xilinx/common.py b/litex/build/xilinx/common.py index 3728a531f..75412a137 100644 --- a/litex/build/xilinx/common.py +++ b/litex/build/xilinx/common.py @@ -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: diff --git a/litex/build/xilinx/vivado.py b/litex/build/xilinx/vivado.py index fb0932bc7..ef6c617ee 100644 --- a/litex/build/xilinx/vivado.py +++ b/litex/build/xilinx/vivado.py @@ -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)