build: fix merge
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 28 Feb 2018 22:10:24 +0000 (23:10 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 28 Feb 2018 22:10:24 +0000 (23:10 +0100)
litex/build/xilinx/ise.py
litex/build/xilinx/vivado.py

index 10714248e4ea932b373aa8ff25eb64be86fa670a..5722f530bc25522163324325196877b70c0f969f 100644 (file)
@@ -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"
index 0b7fbdb1a4bd47caf227aa1b40198c7a5fa50809..b8220e57cb52163110f3938454e0a2a93cb55d52 100644 (file)
@@ -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)