build/vivado: quote paths in Tcl (prevents problems with \ on Windows)
authorSebastien Bourdeauducq <sb@m-labs.hk>
Mon, 19 Oct 2015 01:40:44 +0000 (09:40 +0800)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Mon, 19 Oct 2015 01:40:44 +0000 (09:40 +0800)
migen/build/xilinx/vivado.py

index da2bd7105b65d6d7bc94a0cedf0e534ced14aaba..76e41d8672fead1a55543a22d65e25bc94e4f140 100644 (file)
@@ -80,8 +80,10 @@ class XilinxVivadoToolchain:
     def _build_batch(self, platform, sources, build_name):
         tcl = []
         for filename, language, library in sources:
-            tcl.append("add_files " + filename)
-            tcl.append("set_property library {} [get_files {}]".format(library, filename))
+            filename_tcl = "{" + filename + "}"
+            tcl.append("add_files " + filename_tcl)
+            tcl.append("set_property library {} [get_files {}]"
+                       .format(library, filename_tcl))
 
         tcl.append("read_xdc {}.xdc".format(build_name))
         tcl.extend(c.format(build_name=build_name) for c in self.pre_synthesis_commands)