From 0332f73a7bf8f8674c823fc3962813f577b8465e Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 28 Feb 2018 23:45:26 +0100 Subject: [PATCH] build/xilinx/vivado: revert toolchain_path --- litex/build/xilinx/vivado.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/litex/build/xilinx/vivado.py b/litex/build/xilinx/vivado.py index b8220e57c..034dcc701 100644 --- a/litex/build/xilinx/vivado.py +++ b/litex/build/xilinx/vivado.py @@ -180,6 +180,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" + elif sys.platform == "cygwin": + toolchain_path = "/cygdrive/c/Xilinx" + else: + toolchain_path = "/opt/Xilinx/Vivado" os.makedirs(build_dir, exist_ok=True) cwd = os.getcwd() os.chdir(build_dir) @@ -198,8 +205,6 @@ class XilinxVivadoToolchain: self._build_batch(platform, sources, edifs, build_name) tools.write_to_file(build_name + ".xdc", _build_xdc(named_sc, named_pc)) if run: - if toolchain_path is None: - toolchain_path = "/opt/Xilinx/Vivado" _run_vivado(build_name, toolchain_path, source) os.chdir(cwd)