diff --git a/litex/build/xilinx/ise.py b/litex/build/xilinx/ise.py index 10714248e..5722f530b 100644 --- a/litex/build/xilinx/ise.py +++ b/litex/build/xilinx/ise.py @@ -97,7 +97,7 @@ def _run_ise(build_name, ise_path, source, mode, ngdbuild_opt, build_script_contents = "# Autogenerated by LiteX\nset -e\n" fail_stmt = "" if source: - settings = common.settings(ise_path, "ISE_DS", ver, first="version") + settings = common.settings(ise_path, ver, "ISE_DS") build_script_contents += source_cmd + settings + "\n" ext = "ngc" diff --git a/litex/build/xilinx/vivado.py b/litex/build/xilinx/vivado.py index 0b7fbdb1a..b8220e57c 100644 --- a/litex/build/xilinx/vivado.py +++ b/litex/build/xilinx/vivado.py @@ -63,7 +63,7 @@ def _run_vivado(build_name, vivado_path, source, ver=None): command = build_script_file else: build_script_contents = "# Autogenerated by LiteX\nset -e\n" - settings = common.settings(vivado_path, "Vivado", ver, first="name") + settings = common.settings(vivado_path, ver) build_script_contents += "source " + settings + "\n" build_script_contents += "vivado -mode batch -source " + build_name + ".tcl\n" build_script_file = "build_" + build_name + ".sh" @@ -179,7 +179,7 @@ class XilinxVivadoToolchain: ) def build(self, platform, fragment, build_dir="build", build_name="top", - toolchain_path="/opt/Xilinx/Vivado", source=True, run=True, **kwargs): + toolchain_path=None, source=True, run=True, **kwargs): os.makedirs(build_dir, exist_ok=True) cwd = os.getcwd() os.chdir(build_dir) @@ -198,6 +198,8 @@ 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)