Merge branch 'master' into xilinx+yosys
authorenjoy-digital <florent@enjoy-digital.fr>
Sun, 28 Oct 2018 13:59:03 +0000 (14:59 +0100)
committerGitHub <noreply@github.com>
Sun, 28 Oct 2018 13:59:03 +0000 (14:59 +0100)
1  2 
litex/build/xilinx/common.py
litex/build/xilinx/vivado.py

Simple merge
index f0c2aecf0d5c2d7850ff9229c5736c681222f883,10a795bd7665533e1f88f5a63179b51621ddf803..974958c9c56ac24fba70f971f075db78bd2ba614
@@@ -106,17 -106,15 +106,17 @@@ class XilinxVivadoToolchain
          self.clocks = dict()
          self.false_paths = set()
  
 -    def _build_batch(self, platform, sources, edifs, ips, build_name):
 +    def _build_batch(self, platform, sources, edifs, ips, build_name, synth_mode="vivado"):
          tcl = []
          tcl.append("create_project -force -name {} -part {}".format(build_name, platform.device))
 -        for filename, language, library in sources:
 -            filename_tcl = "{" + filename + "}"
 -            tcl.append("add_files " + filename_tcl)
 -            tcl.append("set_property library {} [get_files {}]"
 -                       .format(library, filename_tcl))
+         tcl.append("set_property XPM_LIBRARIES {XPM_CDC XPM_MEMORY} [current_project]")
 +        if synth_mode == "vivado":
 +            # "-include_dirs {}" crashes Vivado 2016.4
 +            for filename, language, library in sources:
 +                filename_tcl = "{" + filename + "}"
 +                tcl.append("add_files " + filename_tcl)
 +                tcl.append("set_property library {} [get_files {}]"
 +                           .format(library, filename_tcl))
          for filename in edifs:
              filename_tcl = "{" + filename + "}"
              tcl.append("read_edif " + filename_tcl)