if {[string first $scripts_vivado_version $current_vivado_version] == -1 }{
puts ""
if {[string compare $scripts_vivado_version $current_vivado_version] > 0 }{
catch {common::send_gid_msg -ssname BD::TCL -id 2042 -severity "ERROR"" This script was generated using Vivado <$scripts_vivado_version> and is being run in <$current_vivado_version> of Vivado. Sourcing the script failed since it was created with a future version of Vivado."}
} else {
catch {common::send_gid_msg -ssname BD::TCL -id 2041 -severity "ERROR""This script was generated using Vivado <$scripts_vivado_version> and is being run in <$current_vivado_version> of Vivado. Please run the script in Vivado <$scripts_vivado_version> then open the design in Vivado <$current_vivado_version>. Upgrade the design by running \"Tools => Report => Report IP Status...\", then run write_bd_tcl to create an updated script."}
common::send_gid_msg -ssname BD::TCL -id 2031 -severity "INFO""To create a non-remote BD, change the variable <run_remote_bd_flow> to <0>."
common::send_gid_msg -ssname BD::TCL -id 2032 -severity "INFO""Also make sure there is no design <$design_name> existing in your current project."
return 1
}
# Check if design exists in memory
set list_existing_designs [get_bd_designs -quiet $design_name]
if { $list_existing_designs ne ""}{
catch {common::send_gid_msg -ssname BD::TCL -id 2033 -severity "ERROR""The design <$design_name> already exists in this project! Will not create the remote BD <$design_name> at the folder <$str_bd_folder>."}
common::send_gid_msg -ssname BD::TCL -id 2034 -severity "INFO""To create a non-remote BD, change the variable <run_remote_bd_flow> to <0> or please set a different value to variable <design_name>."
return 1
}
# Check if design exists on disk within project
set list_existing_designs [get_files -quiet */${design_name}.bd]
if { $list_existing_designs ne ""}{
catch {common::send_gid_msg -ssname BD::TCL -id 2035 -severity "ERROR""The design <$design_name> already exists in this project at location:
$list_existing_designs"}
catch {common::send_gid_msg -ssname BD::TCL -id 2036 -severity "ERROR""Will not create the remote BD <$design_name> at the folder <$str_bd_folder>."}
common::send_gid_msg -ssname BD::TCL -id 2037 -severity "INFO""To create a non-remote BD, change the variable <run_remote_bd_flow> to <0> or please set a different value to variable <design_name>."
return 1
}
# Now can create the remote BD
# NOTE - usage of <-dir> will create <$str_bd_folder/$design_name/$design_name.bd>
create_bd_design -dir $str_bd_folder $design_name
} else {
# Create regular design
if {[catch {create_bd_design $design_name} errmsg]}{
common::send_gid_msg -ssname BD::TCL -id 2038 -severity "INFO""Please set a different value to variable <design_name>."
common::send_gid_msg -ssname BD::TCL -id 2011 -severity "INFO""Checking if the following IPs exist in the project's IP catalog: $list_check_ips ."
foreach ip_vlnv $list_check_ips {
set ip_obj [get_ipdefs -all $ip_vlnv]
if { $ip_obj eq ""}{
lappend list_ips_missing $ip_vlnv
}
}
if { $list_ips_missing ne ""}{
catch {common::send_gid_msg -ssname BD::TCL -id 2012 -severity "ERROR""The following IPs are not found in the IP Catalog:\n$list_ips_missing\n\nResolution: Please add the repository containing the IP(s) to the project."}
set bCheckIPsPassed 0
}
}
if { $bCheckIPsPassed != 1 }{
common::send_gid_msg -ssname BD::TCL -id 2023 -severity "WARNING""Will not continue with creation of design due to the error(s) above."