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:
parent
460fada3ac
commit
1fde282291
|
@ -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)
|
||||
|
@ -179,7 +182,7 @@ class XilinxVivadoToolchain:
|
|||
tcl.append("synth_ip [get_ips {}] -force".format(ip))
|
||||
tcl.append("get_files -all -of_objects [get_files {}]".format(filename_tcl))
|
||||
if disable_constraints:
|
||||
tcl.append("set_property is_enabled false [get_files -of_objects [get_files {}] -filter {{FILE_TYPE == XDC}}]".format(filename_tcl))
|
||||
tcl.append("set_property is_enabled false [get_files -of_objects [get_files {}] -filter {{FILE_TYPE== XDC}}]".format(filename_tcl))
|
||||
|
||||
# Add constraints
|
||||
tcl.append("\n# Add constraints\n")
|
||||
|
|
Loading…
Reference in New Issue