build/xilinx/vivado.py: Allow a tcl script to be added as ip. These tcl scripts tend to generate .xci's on the fly. The tcl script can be looked up in the vivado console as the ip is generated

This commit is contained in:
Vamsi Vytla 2021-02-15 09:29:00 -08:00
parent 460fada3ac
commit 1fde282291
1 changed files with 12 additions and 9 deletions

View File

@ -171,6 +171,9 @@ class XilinxVivadoToolchain:
# Add IPs
tcl.append("\n# Add IPs\n")
for filename, disable_constraints in platform.ips.items():
if filename.endswith("tcl"):
tcl += open(filename, "r").read().splitlines()
else:
filename_tcl = "{" + filename + "}"
ip = os.path.splitext(os.path.basename(filename))[0]
tcl.append("read_ip " + filename_tcl)