build/xilinx/programmer: fix vivado_cmd when settings are sourced manually.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 30 Dec 2019 09:07:08 +0000 (10:07 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 30 Dec 2019 09:07:08 +0000 (10:07 +0100)
litex/build/xilinx/programmer.py

index 64f718605220dae0c775d200fc3b0be0f8b2123a..0ad0abac4b625b5010086b655b79072ed7efbb0c 100644 (file)
@@ -139,8 +139,8 @@ def _run_vivado(path, ver, cmds):
                 break
             else:
                 raise OSError("Unable to locate Vivado directory or settings.")
-            vivado_cmd += "source " + settings
-        vivado_cmd += " && vivado -mode tcl"
+            vivado_cmd += "source " + settings + " && "
+        vivado_cmd += "vivado -mode tcl"
     with subprocess.Popen(vivado_cmd, stdin=subprocess.PIPE, shell=True) as process:
         process.stdin.write(cmds.encode("ASCII"))
         process.communicate()