# Auto-generated project tcl file

create_project {{ name }}

{% if tool_options.part -%}
set_property part {{ tool_options.part }} [current_project]
{%- endif %}

{% if has_vhdl2008 -%}
#Default since Vivado 2016.1
set_param project.enableVHDL2008 1
{%- endif %}

{% if vlogparam -%}
set_property generic {
  {%- for k, v in vlogparam.items() %}{{ k }}={{ v|param_value_str }} {% endfor -%}
  } [get_filesets sources_1]
{%- endif %}

{% if vlogdefine -%}
set_property verilog_define {
  {%- for k, v in vlogdefine.items() %}{{ k }}={{ v|param_value_str }} {% endfor -%}
  } [get_filesets sources_1]
{%- endif %}

{% for src_file in src_files if src_file|src_file_filter%}
{{ src_file|src_file_filter }}
{% endfor %}

{% if incdirs -%}
set_property include_dirs [list {{ incdirs|join(' ') }}] [get_filesets sources_1]
{%- endif %}

{% if toplevel -%}
set_property top {{ toplevel }} [current_fileset]
set_property source_mgmt_mode None [current_project]

{%- endif %}

{% if has_xci -%}
upgrade_ip [get_ips]
generate_target all [get_ips]
{%- endif %}
