#*****************************************************************************************
# Vivado (TM) v2023.1.1 (64-bit)
#
# recreate-version-20230921-spmc-only-for-7z010.tcl: Tcl script for re-creating project 'project_RP-SPMC-RedPACPLL-202309821-7z01-spmc-only'
#
# Generated by Vivado on Thu Sep 21 13:42:24 EDT 2023
# IP Build 3900379 on Sat Jun 17 05:28:05 MDT 2023
#
# This file contains the Vivado Tcl commands for re-creating the project to the state*
# when this script was generated. In order to re-create the project, please source this
# file in the Vivado Tcl Shell.
#
# * Note that the runs in the created project will be configured the same way as the
#   original project, however they will not be launched automatically. To regenerate the
#   run results please launch the synthesis/implementation runs as needed.
#
#*****************************************************************************************
# NOTE: In order to use this script for source control purposes, please make sure that the
#       following files are added to the source control system:-
#
# 1. This project restoration tcl script (recreate-version-20230921-spmc-only-for-7z010.tcl) that was generated.
#
# 2. The following source(s) files that were local or imported into the original project.
#    (Please see the '$orig_proj_dir' and '$origin_dir' variable setting below at the start of the script)
#
#    <none>
#
# 3. The following remote source files that were added to the original project:-
#
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/QControl.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_select.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/amplitude_good.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/phase_unwrap.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_dc_filter.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_decimator.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_splitter.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/PulseForm.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/controller_pi.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_4s_combine.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/McBSP_io_connect.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/McBSP_controller.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_bram_push.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_FIR.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_ctrlsrc_select.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/AD5791_io_connect.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_AD5791.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/gvp.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_bram_stream_srcs.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_spm_control.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/VolumeAdjuster16_14.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/Volume_QControl_Mixer.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/LED_connect.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_sc28_to_14.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/system_wrapper.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/lms_phase_amplitude_detector.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/cores/axi_cfg_register_v1_0/axi_cfg_register.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/cores/axis_averager_v1_0/axis_averager.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/cores/axis_constant_v1_0/axis_constant.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/cores/axis_red_pitaya_dac_v1_0/axis_red_pitaya_dac.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/cores/axis_red_pitaya_adc_v1_0/axis_red_pitaya_adc.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/ScaleAndAdjust.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/comparator.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/logic_or.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_axis_select.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_ram_writer.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/signal_combine.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/split_signal.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/SineSDB64.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/Signed16toQ22.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/SignedQ31toQ22.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/ArrithmeticShift.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/port_slicer.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/cfg/ports.xdc"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/cfg/clocks.xdc"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/sim/tb_spm_ad.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/sim/lms_phase_amplitude_detector_tb.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/sim/McBSP_tb.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/sim/axis_4s_combine_tb.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/sim/controller_pi_tb.v"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/sim/tb_spm_ad_behav.wcfg"
#    "/home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/sim/ad5791_tb.v"
#
#*****************************************************************************************

# Check file required for this script exists
proc checkRequiredFiles { origin_dir} {
  set status true
  set files [list \
 "[file normalize "$origin_dir/rtl/QControl.v"]"\
 "[file normalize "$origin_dir/rtl/cfg_select.v"]"\
 "[file normalize "$origin_dir/rtl/cfg_to_axis.v"]"\
 "[file normalize "$origin_dir/rtl/amplitude_good.v"]"\
 "[file normalize "$origin_dir/rtl/phase_unwrap.v"]"\
 "[file normalize "$origin_dir/rtl/axis_dc_filter.v"]"\
 "[file normalize "$origin_dir/rtl/axis_decimator.v"]"\
 "[file normalize "$origin_dir/rtl/axis_splitter.v"]"\
 "[file normalize "$origin_dir/rtl/PulseForm.v"]"\
 "[file normalize "$origin_dir/rtl/controller_pi.v"]"\
 "[file normalize "$origin_dir/rtl/axis_4s_combine.v"]"\
 "[file normalize "$origin_dir/rtl/McBSP_io_connect.v"]"\
 "[file normalize "$origin_dir/rtl/McBSP_controller.v"]"\
 "[file normalize "$origin_dir/rtl/axis_bram_push.v"]"\
 "[file normalize "$origin_dir/rtl/axis_FIR.v"]"\
 "[file normalize "$origin_dir/rtl/axis_ctrlsrc_select.v"]"\
 "[file normalize "$origin_dir/rtl/AD5791_io_connect.v"]"\
 "[file normalize "$origin_dir/rtl/axis_AD5791.v"]"\
 "[file normalize "$origin_dir/rtl/gvp.v"]"\
 "[file normalize "$origin_dir/rtl/axis_bram_stream_srcs.v"]"\
 "[file normalize "$origin_dir/rtl/axis_spm_control.v"]"\
 "[file normalize "$origin_dir/rtl/VolumeAdjuster16_14.v"]"\
 "[file normalize "$origin_dir/rtl/Volume_QControl_Mixer.v"]"\
 "[file normalize "$origin_dir/rtl/LED_connect.v"]"\
 "[file normalize "$origin_dir/rtl/axis_sc28_to_14.v"]"\
 "[file normalize "$origin_dir/rtl/system_wrapper.v"]"\
 "[file normalize "$origin_dir/rtl/lms_phase_amplitude_detector.v"]"\
 "[file normalize "$origin_dir/cores/axi_cfg_register_v1_0/axi_cfg_register.v"]"\
 "[file normalize "$origin_dir/cores/axis_averager_v1_0/axis_averager.v"]"\
 "[file normalize "$origin_dir/cores/axis_constant_v1_0/axis_constant.v"]"\
 "[file normalize "$origin_dir/cores/axis_red_pitaya_dac_v1_0/axis_red_pitaya_dac.v"]"\
 "[file normalize "$origin_dir/cores/axis_red_pitaya_adc_v1_0/axis_red_pitaya_adc.v"]"\
 "[file normalize "$origin_dir/rtl/ScaleAndAdjust.v"]"\
 "[file normalize "$origin_dir/rtl/comparator.v"]"\
 "[file normalize "$origin_dir/rtl/logic_or.v"]"\
 "[file normalize "$origin_dir/rtl/cfg_axis_select.v"]"\
 "[file normalize "$origin_dir/rtl/axis_ram_writer.v"]"\
 "[file normalize "$origin_dir/rtl/signal_combine.v"]"\
 "[file normalize "$origin_dir/rtl/split_signal.v"]"\
 "[file normalize "$origin_dir/rtl/SineSDB64.v"]"\
 "[file normalize "$origin_dir/rtl/Signed16toQ22.v"]"\
 "[file normalize "$origin_dir/rtl/SignedQ31toQ22.v"]"\
 "[file normalize "$origin_dir/rtl/ArrithmeticShift.v"]"\
 "[file normalize "$origin_dir/rtl/port_slicer.v"]"\
 "[file normalize "$origin_dir/cfg/ports.xdc"]"\
 "[file normalize "$origin_dir/cfg/clocks.xdc"]"\
 "[file normalize "$origin_dir/sim/tb_spm_ad.v"]"\
 "[file normalize "$origin_dir/sim/lms_phase_amplitude_detector_tb.v"]"\
 "[file normalize "$origin_dir/sim/McBSP_tb.v"]"\
 "[file normalize "$origin_dir/sim/axis_4s_combine_tb.v"]"\
 "[file normalize "$origin_dir/sim/controller_pi_tb.v"]"\
 "[file normalize "$origin_dir/sim/tb_spm_ad_behav.wcfg"]"\
 "[file normalize "$origin_dir/sim/ad5791_tb.v"]"\
  ]
  foreach ifile $files {
    if { ![file isfile $ifile] } {
      puts " Could not find remote file $ifile "
      set status false
    }
  }

  set paths [list \
 "[file normalize "$origin_dir/[file normalize "$origin_dir/tmp/cores"]"]"\
  ]
  foreach ipath $paths {
    if { ![file isdirectory $ipath] } {
      puts " Could not access $ipath "
      set status false
    }
  }

  return $status
}
# Set the reference directory for source file relative paths (by default the value is script directory path)
set origin_dir "."

# Use origin directory path location variable, if specified in the tcl shell
if { [info exists ::origin_dir_loc] } {
  set origin_dir $::origin_dir_loc
}

# Set the project name
set _xil_proj_name_ "project_RP-SPMC-RedPACPLL-202309821-7z01-spmc-only"

# Use project name variable, if specified in the tcl shell
if { [info exists ::user_project_name] } {
  set _xil_proj_name_ $::user_project_name
}

variable script_file
set script_file "recreate-version-20230921-spmc-only-for-7z010.tcl"

# Help information for this script
proc print_help {} {
  variable script_file
  puts "\nDescription:"
  puts "Recreate a Vivado project from this script. The created project will be"
  puts "functionally equivalent to the original project for which this script was"
  puts "generated. The script contains commands for creating a project, filesets,"
  puts "runs, adding/importing sources and setting properties on various objects.\n"
  puts "Syntax:"
  puts "$script_file"
  puts "$script_file -tclargs \[--origin_dir <path>\]"
  puts "$script_file -tclargs \[--project_name <name>\]"
  puts "$script_file -tclargs \[--help\]\n"
  puts "Usage:"
  puts "Name                   Description"
  puts "-------------------------------------------------------------------------"
  puts "\[--origin_dir <path>\]  Determine source file paths wrt this path. Default"
  puts "                       origin_dir path value is \".\", otherwise, the value"
  puts "                       that was set with the \"-paths_relative_to\" switch"
  puts "                       when this script was generated.\n"
  puts "\[--project_name <name>\] Create project with the specified name. Default"
  puts "                       name is the name of the project from where this"
  puts "                       script was generated.\n"
  puts "\[--help\]               Print help information for this script"
  puts "-------------------------------------------------------------------------\n"
  exit 0
}

if { $::argc > 0 } {
  for {set i 0} {$i < $::argc} {incr i} {
    set option [string trim [lindex $::argv $i]]
    switch -regexp -- $option {
      "--origin_dir"   { incr i; set origin_dir [lindex $::argv $i] }
      "--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
      "--help"         { print_help }
      default {
        if { [regexp {^-} $option] } {
          puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
          return 1
        }
      }
    }
  }
}

# Set the directory path for the original project from where this script was exported
set orig_proj_dir "[file normalize "$origin_dir/project_RP-SPMC-RedPACPLL-202309821-7z01-spmc-only"]"

# Check for paths and files needed for project creation
set validate_required 0
if { $validate_required } {
  if { [checkRequiredFiles $origin_dir] } {
    puts "Tcl file $script_file is valid. All files required for project creation is accesable. "
  } else {
    puts "Tcl file $script_file is not valid. Not all files required for project creation is accesable. "
    return
  }
}

# Create project
create_project ${_xil_proj_name_} ./${_xil_proj_name_} -part xc7z020clg400-1

# Set the directory path for the new project
set proj_dir [get_property directory [current_project]]

# Reconstruct message rules
# None

# Set project properties
set obj [current_project]
set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
set_property -name "enable_resource_estimation" -value "0" -objects $obj
set_property -name "enable_vhdl_2008" -value "1" -objects $obj
set_property -name "ip_cache_permissions" -value "read write" -objects $obj
set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
set_property -name "part" -value "xc7z020clg400-1" -objects $obj
set_property -name "platform.num_compute_units" -value "16" -objects $obj
set_property -name "revised_directory_structure" -value "1" -objects $obj
set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
set_property -name "simulator_language" -value "Mixed" -objects $obj
set_property -name "sim_compile_state" -value "1" -objects $obj
set_property -name "webtalk.activehdl_export_sim" -value "19" -objects $obj
set_property -name "webtalk.ies_export_sim" -value "10" -objects $obj
set_property -name "webtalk.modelsim_export_sim" -value "19" -objects $obj
set_property -name "webtalk.questa_export_sim" -value "19" -objects $obj
set_property -name "webtalk.riviera_export_sim" -value "19" -objects $obj
set_property -name "webtalk.vcs_export_sim" -value "19" -objects $obj
set_property -name "webtalk.xsim_export_sim" -value "19" -objects $obj
set_property -name "webtalk.xsim_launch_sim" -value "711" -objects $obj
set_property -name "xpm_libraries" -value "XPM_CDC XPM_FIFO XPM_MEMORY" -objects $obj

# Create 'sources_1' fileset (if not found)
if {[string equal [get_filesets -quiet sources_1] ""]} {
  create_fileset -srcset sources_1
}

# Set IP repository paths
set obj [get_filesets sources_1]
if { $obj != {} } {
   set_property "ip_repo_paths" "[file normalize "$origin_dir/tmp/cores"]" $obj

   # Rebuild user ip_repo's index before adding any source files
   update_ip_catalog -rebuild
}

# Set 'sources_1' fileset object
set obj [get_filesets sources_1]
set files [list \
 [file normalize "${origin_dir}/rtl/QControl.v"] \
 [file normalize "${origin_dir}/rtl/cfg_select.v"] \
 [file normalize "${origin_dir}/rtl/cfg_to_axis.v"] \
 [file normalize "${origin_dir}/rtl/amplitude_good.v"] \
 [file normalize "${origin_dir}/rtl/phase_unwrap.v"] \
 [file normalize "${origin_dir}/rtl/axis_dc_filter.v"] \
 [file normalize "${origin_dir}/rtl/axis_decimator.v"] \
 [file normalize "${origin_dir}/rtl/axis_splitter.v"] \
 [file normalize "${origin_dir}/rtl/PulseForm.v"] \
 [file normalize "${origin_dir}/rtl/controller_pi.v"] \
 [file normalize "${origin_dir}/rtl/axis_4s_combine.v"] \
 [file normalize "${origin_dir}/rtl/McBSP_io_connect.v"] \
 [file normalize "${origin_dir}/rtl/McBSP_controller.v"] \
 [file normalize "${origin_dir}/rtl/axis_bram_push.v"] \
 [file normalize "${origin_dir}/rtl/axis_FIR.v"] \
 [file normalize "${origin_dir}/rtl/axis_ctrlsrc_select.v"] \
 [file normalize "${origin_dir}/rtl/AD5791_io_connect.v"] \
 [file normalize "${origin_dir}/rtl/axis_AD5791.v"] \
 [file normalize "${origin_dir}/rtl/gvp.v"] \
 [file normalize "${origin_dir}/rtl/axis_bram_stream_srcs.v"] \
 [file normalize "${origin_dir}/rtl/axis_spm_control.v"] \
 [file normalize "${origin_dir}/rtl/VolumeAdjuster16_14.v"] \
 [file normalize "${origin_dir}/rtl/Volume_QControl_Mixer.v"] \
 [file normalize "${origin_dir}/rtl/LED_connect.v"] \
 [file normalize "${origin_dir}/rtl/axis_sc28_to_14.v"] \
 [file normalize "${origin_dir}/rtl/system_wrapper.v"] \
 [file normalize "${origin_dir}/rtl/lms_phase_amplitude_detector.v"] \
 [file normalize "${origin_dir}/cores/axi_cfg_register_v1_0/axi_cfg_register.v"] \
 [file normalize "${origin_dir}/cores/axis_averager_v1_0/axis_averager.v"] \
 [file normalize "${origin_dir}/cores/axis_constant_v1_0/axis_constant.v"] \
 [file normalize "${origin_dir}/cores/axis_red_pitaya_dac_v1_0/axis_red_pitaya_dac.v"] \
 [file normalize "${origin_dir}/cores/axis_red_pitaya_adc_v1_0/axis_red_pitaya_adc.v"] \
 [file normalize "${origin_dir}/rtl/ScaleAndAdjust.v"] \
 [file normalize "${origin_dir}/rtl/comparator.v"] \
 [file normalize "${origin_dir}/rtl/logic_or.v"] \
 [file normalize "${origin_dir}/rtl/cfg_axis_select.v"] \
 [file normalize "${origin_dir}/rtl/axis_ram_writer.v"] \
 [file normalize "${origin_dir}/rtl/signal_combine.v"] \
 [file normalize "${origin_dir}/rtl/split_signal.v"] \
 [file normalize "${origin_dir}/rtl/SineSDB64.v"] \
 [file normalize "${origin_dir}/rtl/Signed16toQ22.v"] \
 [file normalize "${origin_dir}/rtl/SignedQ31toQ22.v"] \
 [file normalize "${origin_dir}/rtl/ArrithmeticShift.v"] \
 [file normalize "${origin_dir}/rtl/port_slicer.v"] \
]
add_files -norecurse -fileset $obj $files

# Set 'sources_1' fileset file properties for remote files
# None

# Set 'sources_1' fileset file properties for local files
# None

# Set 'sources_1' fileset properties
set obj [get_filesets sources_1]
set_property -name "dataflow_viewer_settings" -value "min_width=16" -objects $obj
set_property -name "top" -value "system_wrapper" -objects $obj
set_property -name "top_auto_set" -value "0" -objects $obj
set_property -name "verilog_define" -value "TOOL_VIVADO" -objects $obj

# Create 'constrs_1' fileset (if not found)
if {[string equal [get_filesets -quiet constrs_1] ""]} {
  create_fileset -constrset constrs_1
}

# Set 'constrs_1' fileset object
set obj [get_filesets constrs_1]

# Add/Import constrs file and set constrs file properties
set file "[file normalize "$origin_dir/cfg/ports.xdc"]"
set file_added [add_files -norecurse -fileset $obj [list $file]]
set file "$origin_dir/cfg/ports.xdc"
set file [file normalize $file]
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
set_property -name "file_type" -value "XDC" -objects $file_obj

# Add/Import constrs file and set constrs file properties
set file "[file normalize "$origin_dir/cfg/clocks.xdc"]"
set file_added [add_files -norecurse -fileset $obj [list $file]]
set file "$origin_dir/cfg/clocks.xdc"
set file [file normalize $file]
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
set_property -name "file_type" -value "XDC" -objects $file_obj

# Set 'constrs_1' fileset properties
set obj [get_filesets constrs_1]
set_property -name "target_constrs_file" -value "[file normalize "$origin_dir/cfg/clocks.xdc"]" -objects $obj
set_property -name "target_part" -value "xc7z020clg400-1" -objects $obj
set_property -name "target_ucf" -value "[file normalize "$origin_dir/cfg/clocks.xdc"]" -objects $obj

# Create 'sim_1' fileset (if not found)
if {[string equal [get_filesets -quiet sim_1] ""]} {
  create_fileset -simset sim_1
}

# Set 'sim_1' fileset object
set obj [get_filesets sim_1]
set files [list \
 [file normalize "${origin_dir}/sim/tb_spm_ad.v"] \
 [file normalize "${origin_dir}/sim/lms_phase_amplitude_detector_tb.v"] \
 [file normalize "${origin_dir}/sim/McBSP_tb.v"] \
 [file normalize "${origin_dir}/sim/axis_4s_combine_tb.v"] \
 [file normalize "${origin_dir}/sim/controller_pi_tb.v"] \
 [file normalize "${origin_dir}/sim/tb_spm_ad_behav.wcfg"] \
]
add_files -norecurse -fileset $obj $files

# Set 'sim_1' fileset file properties for remote files
# None

# Set 'sim_1' fileset file properties for local files
# None

# Set 'sim_1' fileset properties
set obj [get_filesets sim_1]
set_property -name "top" -value "tb_spm_ad" -objects $obj
set_property -name "top_auto_set" -value "0" -objects $obj
set_property -name "top_lib" -value "xil_defaultlib" -objects $obj

# Create 'sim_ad5791' fileset (if not found)
if {[string equal [get_filesets -quiet sim_ad5791] ""]} {
  create_fileset -simset sim_ad5791
}

# Set 'sim_ad5791' fileset object
set obj [get_filesets sim_ad5791]
set files [list \
 [file normalize "${origin_dir}/sim/ad5791_tb.v"] \
]
add_files -norecurse -fileset $obj $files

# Set 'sim_ad5791' fileset file properties for remote files
# None

# Set 'sim_ad5791' fileset file properties for local files
# None

# Set 'sim_ad5791' fileset properties
set obj [get_filesets sim_ad5791]
set_property -name "top" -value "ad5791_tb" -objects $obj
set_property -name "top_auto_set" -value "0" -objects $obj
set_property -name "top_lib" -value "xil_defaultlib" -objects $obj

# Set 'utils_1' fileset object
set obj [get_filesets utils_1]
# Empty (no sources present)

# Set 'utils_1' fileset properties
set obj [get_filesets utils_1]


# Adding sources referenced in BDs, if not already added
if { [get_files QControl.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/QControl.v
}
if { [get_files cfg_select.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_select.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files amplitude_good.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/amplitude_good.v
}
if { [get_files cfg_select.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_select.v
}
if { [get_files phase_unwrap.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/phase_unwrap.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files axis_dc_filter.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_dc_filter.v
}
if { [get_files axis_decimator.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_decimator.v
}
if { [get_files cfg_select.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_select.v
}
if { [get_files cfg_select.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_select.v
}
if { [get_files cfg_select.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_select.v
}
if { [get_files cfg_select.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_select.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files axis_splitter.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_splitter.v
}
if { [get_files PulseForm.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/PulseForm.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_select.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_select.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files controller_pi.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/controller_pi.v
}
if { [get_files axis_4s_combine.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_4s_combine.v
}
if { [get_files McBSP_io_connect.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/McBSP_io_connect.v
}
if { [get_files McBSP_controller.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/McBSP_controller.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files axis_bram_push.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_bram_push.v
}
if { [get_files axis_FIR.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_FIR.v
}
if { [get_files axis_FIR.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_FIR.v
}
if { [get_files axis_FIR.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_FIR.v
}
if { [get_files axis_FIR.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_FIR.v
}
if { [get_files axis_splitter.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_splitter.v
}
if { [get_files cfg_select.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_select.v
}
if { [get_files axis_ctrlsrc_select.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_ctrlsrc_select.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files controller_pi.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/controller_pi.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files cfg_to_axis.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/cfg_to_axis.v
}
if { [get_files AD5791_io_connect.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/AD5791_io_connect.v
}
if { [get_files axis_AD5791.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_AD5791.v
}
if { [get_files gvp.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/gvp.v
}
if { [get_files axis_bram_stream_srcs.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_bram_stream_srcs.v
}
if { [get_files axis_spm_control.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_spm_control.v
}
if { [get_files axis_splitter.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_splitter.v
}
if { [get_files axis_splitter.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_splitter.v
}
if { [get_files axis_splitter.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_splitter.v
}
if { [get_files axis_splitter.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_splitter.v
}
if { [get_files axis_splitter.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_splitter.v
}
if { [get_files axis_splitter.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_splitter.v
}
if { [get_files VolumeAdjuster16_14.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/VolumeAdjuster16_14.v
}
if { [get_files Volume_QControl_Mixer.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/Volume_QControl_Mixer.v
}
if { [get_files LED_connect.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/LED_connect.v
}
if { [get_files axis_sc28_to_14.v] == "" } {
  import_files -quiet -fileset sources_1 /home/percy/SVN/Gxsm4/plug-ins/hard/RPSPMC/rtl/axis_sc28_to_14.v
}


# Proc to create BD system
proc cr_bd_system { parentCell } {
# The design that will be created by this Tcl proc contains the following 
# module references:
# VolumeAdjuster16_14, Volume_QControl_Mixer, led_connect, axis_sc28_to_14, QControl, cfg_select, cfg_to_axis, cfg_to_axis, axis_dc_filter, axis_decimator, cfg_select, cfg_select, cfg_select, cfg_select, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, axis_splitter, axis_4s_combine, McBSP_io_connect, McBSP_controller, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, axis_bram_push, axis_FIR, axis_FIR, axis_FIR, axis_FIR, axis_splitter, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, AD5791_io_connect, axis_AD5791, gvp, axis_bram_stream_srcs, axis_spm_control, axis_splitter, axis_splitter, axis_splitter, axis_splitter, axis_splitter, axis_splitter, amplitude_good, cfg_select, phase_unwrap, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, PulseForm, cfg_to_axis, cfg_to_axis, cfg_select, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, controller_pi, cfg_select, axis_ctrlsrc_select, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, cfg_to_axis, controller_pi



  # CHANGE DESIGN NAME HERE
  set design_name system

  common::send_gid_msg -ssname BD::TCL -id 2010 -severity "INFO" "Currently there is no design <$design_name> in project, so creating one..."

  create_bd_design $design_name

  set bCheckIPsPassed 1
  ##################################################################
  # CHECK IPs
  ##################################################################
  set bCheckIPs 1
  if { $bCheckIPs == 1 } {
     set list_check_ips "\ 
  pavel-demin:user:axis_red_pitaya_adc:1.0\
  pavel-demin:user:axis_red_pitaya_dac:1.0\
  xilinx.com:ip:clk_wiz:6.0\
  xilinx.com:ip:util_ds_buf:2.2\
  xilinx.com:ip:xlconcat:2.1\
  xilinx.com:ip:xlslice:1.0\
  xilinx.com:ip:dds_compiler:6.0\
  anton-potocnik:user:axi_bram_reader:1.0\
  pavel-demin:user:axi_cfg_register:1.0\
  xilinx.com:ip:processing_system7:5.5\
  xilinx.com:ip:proc_sys_reset:5.0\
  xilinx.com:ip:axi_gpio:2.0\
  xilinx.com:ip:blk_mem_gen:8.4\
  xilinx.com:ip:xlconstant:1.1\
  xilinx.com:ip:floating_point:7.1\
  "

   set list_ips_missing ""
   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
   }

  }

  ##################################################################
  # CHECK Modules
  ##################################################################
  set bCheckModules 1
  if { $bCheckModules == 1 } {
     set list_check_mods "\ 
  VolumeAdjuster16_14\
  Volume_QControl_Mixer\
  led_connect\
  axis_sc28_to_14\
  QControl\
  cfg_select\
  cfg_to_axis\
  cfg_to_axis\
  axis_dc_filter\
  axis_decimator\
  cfg_select\
  cfg_select\
  cfg_select\
  cfg_select\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  axis_splitter\
  axis_4s_combine\
  McBSP_io_connect\
  McBSP_controller\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  axis_bram_push\
  axis_FIR\
  axis_FIR\
  axis_FIR\
  axis_FIR\
  axis_splitter\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  AD5791_io_connect\
  axis_AD5791\
  gvp\
  axis_bram_stream_srcs\
  axis_spm_control\
  axis_splitter\
  axis_splitter\
  axis_splitter\
  axis_splitter\
  axis_splitter\
  axis_splitter\
  amplitude_good\
  cfg_select\
  phase_unwrap\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  PulseForm\
  cfg_to_axis\
  cfg_to_axis\
  cfg_select\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  controller_pi\
  cfg_select\
  axis_ctrlsrc_select\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  cfg_to_axis\
  controller_pi\
  "

   set list_mods_missing ""
   common::send_gid_msg -ssname BD::TCL -id 2020 -severity "INFO" "Checking if the following modules exist in the project's sources: $list_check_mods ."

   foreach mod_vlnv $list_check_mods {
      if { [can_resolve_reference $mod_vlnv] == 0 } {
         lappend list_mods_missing $mod_vlnv
      }
   }

   if { $list_mods_missing ne "" } {
      catch {common::send_gid_msg -ssname BD::TCL -id 2021 -severity "ERROR" "The following module(s) are not found in the project: $list_mods_missing" }
      common::send_gid_msg -ssname BD::TCL -id 2022 -severity "INFO" "Please add source files for the missing module(s) above."
      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."
    return 3
  }

  
# Hierarchical cell: controller_zservo
proc create_hier_cell_controller_zservo { parentCell nameHier } {

  variable script_folder

  if { $parentCell eq "" || $nameHier eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2092 -severity "ERROR" "create_hier_cell_controller_zservo() - Empty argument(s)!"}
     return
  }

  # Get object for parentCell
  set parentObj [get_bd_cells $parentCell]
  if { $parentObj == "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2090 -severity "ERROR" "Unable to find parent cell <$parentCell>!"}
     return
  }

  # Make sure parentObj is hier blk
  set parentType [get_property TYPE $parentObj]
  if { $parentType ne "hier" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2091 -severity "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be <hier>."}
     return
  }

  # Save current instance; Restore later
  set oldCurInst [current_bd_instance .]

  # Set parent object as current
  current_bd_instance $parentObj

  # Create cell and set as current instance
  set hier_obj [create_bd_cell -type hier $nameHier]
  current_bd_instance $hier_obj

  # Create interface pins
  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_CONTROL

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_CONTROL2

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_PASS


  # Create pins
  create_bd_pin -dir I -type clk a_clk
  create_bd_pin -dir I -from 1023 -to 0 cfg1
  create_bd_pin -dir O enable
  create_bd_pin -dir O -from 31 -to 0 mon_control
  create_bd_pin -dir I -from 31 -to 0 Din
  create_bd_pin -dir O -from 31 -to 0 M_AXIS_PASS_tdata1

  # Create instance: cfg_select_zservo_control, and set properties
  set block_name cfg_select
  set block_cell_name cfg_select_zservo_control
  if { [catch {set cfg_select_zservo_control [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_select_zservo_control eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_SWBIT {0} \
    CONFIG.SRC_ADDR {19} \
  ] $cfg_select_zservo_control


  # Create instance: const_zero_32b, and set properties
  set const_zero_32b [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 const_zero_32b ]
  set_property -dict [list \
    CONFIG.CONST_VAL {0} \
    CONFIG.CONST_WIDTH {32} \
  ] $const_zero_32b


  # Create instance: floating_point_log, and set properties
  set floating_point_log [ create_bd_cell -type ip -vlnv xilinx.com:ip:floating_point:7.1 floating_point_log ]
  set_property -dict [list \
    CONFIG.C_Latency {23} \
    CONFIG.C_Mult_Usage {Medium_Usage} \
    CONFIG.C_Rate {1} \
    CONFIG.C_Result_Exponent_Width {8} \
    CONFIG.C_Result_Fraction_Width {24} \
    CONFIG.Operation_Type {Logarithm} \
    CONFIG.Result_Precision_Type {Single} \
  ] $floating_point_log


  # Create instance: xlslice_servo_hold, and set properties
  set xlslice_servo_hold [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_servo_hold ]

  # Create instance: xlconstant_0, and set properties
  set xlconstant_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 xlconstant_0 ]

  # Create instance: xlconstant_select0, and set properties
  set xlconstant_select0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 xlconstant_select0 ]
  set_property -dict [list \
    CONFIG.CONST_VAL {0} \
    CONFIG.CONST_WIDTH {2} \
  ] $xlconstant_select0


  # Create instance: axis_ctrlsrc_select_0, and set properties
  set block_name axis_ctrlsrc_select
  set block_cell_name axis_ctrlsrc_select_0
  if { [catch {set axis_ctrlsrc_select_0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_ctrlsrc_select_0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: cfg_to_transport_zservo_ci, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_zservo_ci
  if { [catch {set cfg_to_transport_zservo_ci [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_zservo_ci eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_WIDTH {1024} \
    CONFIG.SRC_ADDR {12} \
  ] $cfg_to_transport_zservo_ci


  # Create instance: cfg_to_transport_zservo_cp, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_zservo_cp
  if { [catch {set cfg_to_transport_zservo_cp [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_zservo_cp eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_WIDTH {1024} \
    CONFIG.SRC_ADDR {11} \
  ] $cfg_to_transport_zservo_cp


  # Create instance: cfg_to_transport_zservo_lower, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_zservo_lower
  if { [catch {set cfg_to_transport_zservo_lower [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_zservo_lower eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_WIDTH {1024} \
    CONFIG.SRC_ADDR {15} \
  ] $cfg_to_transport_zservo_lower


  # Create instance: cfg_to_transport_zservo_set, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_zservo_set
  if { [catch {set cfg_to_transport_zservo_set [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_zservo_set eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_WIDTH {1024} \
    CONFIG.SRC_ADDR {10} \
  ] $cfg_to_transport_zservo_set


  # Create instance: cfg_to_transport_zservo_upper, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_zservo_upper
  if { [catch {set cfg_to_transport_zservo_upper [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_zservo_upper eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_WIDTH {1024} \
    CONFIG.SRC_ADDR {13} \
  ] $cfg_to_transport_zservo_upper


  # Create instance: controller_z_servo, and set properties
  set block_name controller_pi
  set block_cell_name controller_z_servo
  if { [catch {set controller_z_servo [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $controller_z_servo eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.AXIS_TDATA_WIDTH {32} \
    CONFIG.CONTROL_W {32} \
    CONFIG.IN_Q {24} \
    CONFIG.IN_W {25} \
    CONFIG.M_AXIS_CONTROL2_TDATA_WIDTH {32} \
    CONFIG.M_AXIS_CONTROL_TDATA_WIDTH {32} \
    CONFIG.USE_RESET_DATA_INPUT {0} \
  ] $controller_z_servo


  # Create interface connections
  connect_bd_intf_net -intf_net Conn1 [get_bd_intf_pins axis_ctrlsrc_select_0/S_AXIS] [get_bd_intf_pins S_AXIS]
  connect_bd_intf_net -intf_net Conn2 [get_bd_intf_pins controller_z_servo/M_AXIS_PASS] [get_bd_intf_pins M_AXIS_PASS]
  connect_bd_intf_net -intf_net axis_ctrlsrc_select_0_M_AXIS [get_bd_intf_pins controller_z_servo/S_AXIS] [get_bd_intf_pins axis_ctrlsrc_select_0/M_AXIS]
  connect_bd_intf_net -intf_net axis_ctrlsrc_select_0_M_AXIS_FLOAT [get_bd_intf_pins axis_ctrlsrc_select_0/M_AXIS_FLOAT] [get_bd_intf_pins floating_point_log/S_AXIS_A]
  connect_bd_intf_net -intf_net controller_pi_dfreq_M_AXIS_CONTROL [get_bd_intf_pins M_AXIS_CONTROL] [get_bd_intf_pins controller_z_servo/M_AXIS_CONTROL]
  connect_bd_intf_net -intf_net controller_pi_dfreq_M_AXIS_CONTROL2 [get_bd_intf_pins M_AXIS_CONTROL2] [get_bd_intf_pins controller_z_servo/M_AXIS_CONTROL2]
  connect_bd_intf_net -intf_net floating_point_log_M_AXIS_RESULT [get_bd_intf_pins floating_point_log/M_AXIS_RESULT] [get_bd_intf_pins axis_ctrlsrc_select_0/S_AXIS_LG]

  # Create port connections
  connect_bd_net -net Din_1 [get_bd_pins Din] [get_bd_pins xlslice_servo_hold/Din]
  connect_bd_net -net PS_cfg_data [get_bd_pins cfg1] [get_bd_pins cfg_select_zservo_control/cfg] [get_bd_pins cfg_to_transport_zservo_ci/cfg] [get_bd_pins cfg_to_transport_zservo_cp/cfg] [get_bd_pins cfg_to_transport_zservo_lower/cfg] [get_bd_pins cfg_to_transport_zservo_set/cfg] [get_bd_pins cfg_to_transport_zservo_upper/cfg]
  connect_bd_net -net PS_data_transport_status [get_bd_pins cfg_select_zservo_control/status] [get_bd_pins enable] [get_bd_pins controller_z_servo/enable]
  connect_bd_net -net axis_red_pitaya_adc_0_adc_clk1 [get_bd_pins a_clk] [get_bd_pins floating_point_log/aclk] [get_bd_pins axis_ctrlsrc_select_0/a_clk] [get_bd_pins cfg_to_transport_zservo_ci/a_clk] [get_bd_pins cfg_to_transport_zservo_cp/a_clk] [get_bd_pins cfg_to_transport_zservo_lower/a_clk] [get_bd_pins cfg_to_transport_zservo_set/a_clk] [get_bd_pins cfg_to_transport_zservo_upper/a_clk] [get_bd_pins controller_z_servo/aclk]
  connect_bd_net -net cfg_to_transport_dfreq_ci_data [get_bd_pins cfg_to_transport_zservo_ci/data] [get_bd_pins controller_z_servo/ci]
  connect_bd_net -net cfg_to_transport_dfreq_cp_data [get_bd_pins cfg_to_transport_zservo_cp/data] [get_bd_pins controller_z_servo/cp]
  connect_bd_net -net cfg_to_transport_dfreq_lower_data [get_bd_pins cfg_to_transport_zservo_lower/data] [get_bd_pins controller_z_servo/limit_lower]
  connect_bd_net -net cfg_to_transport_dfreq_upper_data [get_bd_pins cfg_to_transport_zservo_upper/data] [get_bd_pins controller_z_servo/limit_upper]
  connect_bd_net -net cfg_to_transport_tau_dfreq_data [get_bd_pins cfg_to_transport_zservo_set/data] [get_bd_pins controller_z_servo/setpoint]
  connect_bd_net -net const_zero_32b_dout [get_bd_pins const_zero_32b/dout] [get_bd_pins controller_z_servo/S_AXIS_reset_tdata]
  connect_bd_net -net gpio_io_6_x13_1 [get_bd_pins controller_z_servo/mon_control] [get_bd_pins mon_control]
  connect_bd_net -net xlconstant_0_dout [get_bd_pins xlconstant_0/dout] [get_bd_pins controller_z_servo/S_AXIS_reset_tvalid]
  connect_bd_net -net xlconstant_1_dout [get_bd_pins xlconstant_select0/dout] [get_bd_pins axis_ctrlsrc_select_0/selection]
  connect_bd_net -net xlslice_0_Dout [get_bd_pins xlslice_servo_hold/Dout] [get_bd_pins controller_z_servo/control_hold]

  # Restore current instance
  current_bd_instance $oldCurInst
}
  
# Hierarchical cell: controller_dfreq
proc create_hier_cell_controller_dfreq { parentCell nameHier } {

  variable script_folder

  if { $parentCell eq "" || $nameHier eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2092 -severity "ERROR" "create_hier_cell_controller_dfreq() - Empty argument(s)!"}
     return
  }

  # Get object for parentCell
  set parentObj [get_bd_cells $parentCell]
  if { $parentObj == "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2090 -severity "ERROR" "Unable to find parent cell <$parentCell>!"}
     return
  }

  # Make sure parentObj is hier blk
  set parentType [get_property TYPE $parentObj]
  if { $parentType ne "hier" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2091 -severity "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be <hier>."}
     return
  }

  # Save current instance; Restore later
  set oldCurInst [current_bd_instance .]

  # Set parent object as current
  current_bd_instance $parentObj

  # Create cell and set as current instance
  set hier_obj [create_bd_cell -type hier $nameHier]
  current_bd_instance $hier_obj

  # Create interface pins
  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_CONTROL

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_CONTROL2

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS


  # Create pins
  create_bd_pin -dir I -from 31 -to 0 S_AXIS_reset_tdata
  create_bd_pin -dir I -type clk a_clk
  create_bd_pin -dir I -from 1023 -to 0 cfg
  create_bd_pin -dir I -from 1023 -to 0 cfg1
  create_bd_pin -dir I control_hold
  create_bd_pin -dir O enable
  create_bd_pin -dir O -from 31 -to 0 mon_control

  # Create instance: cfg_select_dfreq_control, and set properties
  set block_name cfg_select
  set block_cell_name cfg_select_dfreq_control
  if { [catch {set cfg_select_dfreq_control [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_select_dfreq_control eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_SWBIT {8} \
    CONFIG.SRC_ADDR {3} \
  ] $cfg_select_dfreq_control


  # Create instance: xlconstant_0, and set properties
  set xlconstant_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 xlconstant_0 ]

  # Create instance: cfg_to_transport_dfreq_ci, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_dfreq_ci
  if { [catch {set cfg_to_transport_dfreq_ci [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_dfreq_ci eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_WIDTH {1024} \
    CONFIG.SRC_ADDR {2} \
  ] $cfg_to_transport_dfreq_ci


  # Create instance: cfg_to_transport_dfreq_cp, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_dfreq_cp
  if { [catch {set cfg_to_transport_dfreq_cp [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_dfreq_cp eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_WIDTH {1024} \
    CONFIG.SRC_ADDR {1} \
  ] $cfg_to_transport_dfreq_cp


  # Create instance: cfg_to_transport_dfreq_lower, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_dfreq_lower
  if { [catch {set cfg_to_transport_dfreq_lower [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_dfreq_lower eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_WIDTH {1024} \
    CONFIG.SRC_ADDR {5} \
  ] $cfg_to_transport_dfreq_lower


  # Create instance: cfg_to_transport_dfreq_set, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_dfreq_set
  if { [catch {set cfg_to_transport_dfreq_set [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_dfreq_set eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_WIDTH {1024} \
    CONFIG.SRC_ADDR {0} \
  ] $cfg_to_transport_dfreq_set


  # Create instance: cfg_to_transport_dfreq_upper, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_dfreq_upper
  if { [catch {set cfg_to_transport_dfreq_upper [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_dfreq_upper eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_WIDTH {1024} \
    CONFIG.SRC_ADDR {3} \
  ] $cfg_to_transport_dfreq_upper


  # Create instance: controller_pi_dfreq, and set properties
  set block_name controller_pi
  set block_cell_name controller_pi_dfreq
  if { [catch {set controller_pi_dfreq [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $controller_pi_dfreq eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CONTROL_W {32} \
    CONFIG.IN_Q {24} \
    CONFIG.IN_W {25} \
    CONFIG.M_AXIS_CONTROL2_TDATA_WIDTH {32} \
    CONFIG.M_AXIS_CONTROL_TDATA_WIDTH {32} \
    CONFIG.USE_RESET_DATA_INPUT {0} \
  ] $controller_pi_dfreq


  # Create interface connections
  connect_bd_intf_net -intf_net PS_data_transport_M_AXIS_DFREQ_DEC2 [get_bd_intf_pins S_AXIS] [get_bd_intf_pins controller_pi_dfreq/S_AXIS]
  connect_bd_intf_net -intf_net controller_pi_dfreq_M_AXIS_CONTROL [get_bd_intf_pins M_AXIS_CONTROL] [get_bd_intf_pins controller_pi_dfreq/M_AXIS_CONTROL]
  connect_bd_intf_net -intf_net controller_pi_dfreq_M_AXIS_CONTROL2 [get_bd_intf_pins M_AXIS_CONTROL2] [get_bd_intf_pins controller_pi_dfreq/M_AXIS_CONTROL2]

  # Create port connections
  connect_bd_net -net PS_Dout [get_bd_pins cfg] [get_bd_pins cfg_to_transport_dfreq_ci/cfg] [get_bd_pins cfg_to_transport_dfreq_cp/cfg] [get_bd_pins cfg_to_transport_dfreq_lower/cfg] [get_bd_pins cfg_to_transport_dfreq_set/cfg] [get_bd_pins cfg_to_transport_dfreq_upper/cfg]
  connect_bd_net -net PS_cfg_data [get_bd_pins cfg1] [get_bd_pins cfg_select_dfreq_control/cfg]
  connect_bd_net -net PS_data_transport_dout [get_bd_pins S_AXIS_reset_tdata] [get_bd_pins controller_pi_dfreq/S_AXIS_reset_tdata]
  connect_bd_net -net PS_data_transport_dout1 [get_bd_pins control_hold] [get_bd_pins controller_pi_dfreq/control_hold]
  connect_bd_net -net PS_data_transport_status [get_bd_pins cfg_select_dfreq_control/status] [get_bd_pins enable] [get_bd_pins controller_pi_dfreq/enable]
  connect_bd_net -net axis_red_pitaya_adc_0_adc_clk1 [get_bd_pins a_clk] [get_bd_pins cfg_to_transport_dfreq_ci/a_clk] [get_bd_pins cfg_to_transport_dfreq_cp/a_clk] [get_bd_pins cfg_to_transport_dfreq_lower/a_clk] [get_bd_pins cfg_to_transport_dfreq_set/a_clk] [get_bd_pins cfg_to_transport_dfreq_upper/a_clk] [get_bd_pins controller_pi_dfreq/aclk]
  connect_bd_net -net cfg_to_transport_dfreq_ci_data [get_bd_pins cfg_to_transport_dfreq_ci/data] [get_bd_pins controller_pi_dfreq/ci]
  connect_bd_net -net cfg_to_transport_dfreq_cp_data [get_bd_pins cfg_to_transport_dfreq_cp/data] [get_bd_pins controller_pi_dfreq/cp]
  connect_bd_net -net cfg_to_transport_dfreq_lower_data [get_bd_pins cfg_to_transport_dfreq_lower/data] [get_bd_pins controller_pi_dfreq/limit_lower]
  connect_bd_net -net cfg_to_transport_dfreq_upper_data [get_bd_pins cfg_to_transport_dfreq_upper/data] [get_bd_pins controller_pi_dfreq/limit_upper]
  connect_bd_net -net cfg_to_transport_tau_dfreq_data [get_bd_pins cfg_to_transport_dfreq_set/data] [get_bd_pins controller_pi_dfreq/setpoint]
  connect_bd_net -net gpio_io_6_x13_1 [get_bd_pins controller_pi_dfreq/mon_control] [get_bd_pins mon_control]
  connect_bd_net -net xlconstant_0_dout [get_bd_pins xlconstant_0/dout] [get_bd_pins controller_pi_dfreq/S_AXIS_reset_tvalid]

  # Restore current instance
  current_bd_instance $oldCurInst
}
  
# Hierarchical cell: PulseFormer
proc create_hier_cell_PulseFormer { parentCell nameHier } {

  variable script_folder

  if { $parentCell eq "" || $nameHier eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2092 -severity "ERROR" "create_hier_cell_PulseFormer() - Empty argument(s)!"}
     return
  }

  # Get object for parentCell
  set parentObj [get_bd_cells $parentCell]
  if { $parentObj == "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2090 -severity "ERROR" "Unable to find parent cell <$parentCell>!"}
     return
  }

  # Make sure parentObj is hier blk
  set parentType [get_property TYPE $parentObj]
  if { $parentType ne "hier" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2091 -severity "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be <hier>."}
     return
  }

  # Save current instance; Restore later
  set oldCurInst [current_bd_instance .]

  # Set parent object as current
  current_bd_instance $parentObj

  # Create cell and set as current instance
  set hier_obj [create_bd_cell -type hier $nameHier]
  current_bd_instance $hier_obj

  # Create interface pins
  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS


  # Create pins
  create_bd_pin -dir I -type clk a_clk
  create_bd_pin -dir I -from 1023 -to 0 cfg2
  create_bd_pin -dir I -from 2 -to 0 zero_spcp

  # Create instance: PulseForm_0, and set properties
  set block_name PulseForm
  set block_cell_name PulseForm_0
  if { [catch {set PulseForm_0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $PulseForm_0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: cfg2_to_pulse_12_delay, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg2_to_pulse_12_delay
  if { [catch {set cfg2_to_pulse_12_delay [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg2_to_pulse_12_delay eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {0} \
    CONFIG.SRC_BITS {32} \
  ] $cfg2_to_pulse_12_delay


  # Create instance: cfg2_to_pulse_12_width_height_array, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg2_to_pulse_12_width_height_array
  if { [catch {set cfg2_to_pulse_12_width_height_array [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg2_to_pulse_12_width_height_array eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {448} \
    CONFIG.MAXIS_TDATA_WIDTH {448} \
    CONFIG.SRC_ADDR {1} \
    CONFIG.SRC_BITS {448} \
  ] $cfg2_to_pulse_12_width_height_array


  # Create interface connections
  connect_bd_intf_net -intf_net PulseForm_0_M_AXIS [get_bd_intf_pins M_AXIS] [get_bd_intf_pins PulseForm_0/M_AXIS]

  # Create port connections
  connect_bd_net -net axis_red_pitaya_adc_0_adc_clk [get_bd_pins a_clk] [get_bd_pins PulseForm_0/a_clk] [get_bd_pins cfg2_to_pulse_12_delay/a_clk] [get_bd_pins cfg2_to_pulse_12_width_height_array/a_clk]
  connect_bd_net -net cfg2_1 [get_bd_pins cfg2] [get_bd_pins cfg2_to_pulse_12_delay/cfg] [get_bd_pins cfg2_to_pulse_12_width_height_array/cfg]
  connect_bd_net -net cfg2_to_pulse_12_width_height_array_data [get_bd_pins cfg2_to_pulse_12_width_height_array/data] [get_bd_pins PulseForm_0/pulse_12_width_height_array]
  connect_bd_net -net cfg2_to_pulse_delay1_data [get_bd_pins cfg2_to_pulse_12_delay/data] [get_bd_pins PulseForm_0/pulse_12_delay]
  connect_bd_net -net zero_spcp_1 [get_bd_pins zero_spcp] [get_bd_pins PulseForm_0/zero_spcp]

  # Restore current instance
  current_bd_instance $oldCurInst
}
  
# Hierarchical cell: PS_Phase_Controller
proc create_hier_cell_PS_Phase_Controller { parentCell nameHier } {

  variable script_folder

  if { $parentCell eq "" || $nameHier eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2092 -severity "ERROR" "create_hier_cell_PS_Phase_Controller() - Empty argument(s)!"}
     return
  }

  # Get object for parentCell
  set parentObj [get_bd_cells $parentCell]
  if { $parentObj == "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2090 -severity "ERROR" "Unable to find parent cell <$parentCell>!"}
     return
  }

  # Make sure parentObj is hier blk
  set parentType [get_property TYPE $parentObj]
  if { $parentType ne "hier" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2091 -severity "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be <hier>."}
     return
  }

  # Save current instance; Restore later
  set oldCurInst [current_bd_instance .]

  # Set parent object as current
  current_bd_instance $parentObj

  # Create cell and set as current instance
  set hier_obj [create_bd_cell -type hier $nameHier]
  current_bd_instance $hier_obj

  # Create interface pins
  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_CONTROL

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_CONTROL2

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_CONTROL3

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_PASS

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_PASS2

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS_AMPL


  # Create pins
  create_bd_pin -dir I -type clk aclk
  create_bd_pin -dir I -from 1023 -to 0 cfg
  create_bd_pin -dir I -from 1023 -to 0 cfg1
  create_bd_pin -dir O -from 47 -to 0 data_lower
  create_bd_pin -dir I enable
  create_bd_pin -dir O -from 31 -to 0 mon_control
  create_bd_pin -dir O -from 31 -to 0 mon_control_B
  create_bd_pin -dir O -from 31 -to 0 mon_control_lower32
  create_bd_pin -dir O -from 31 -to 0 mon_error
  create_bd_pin -dir O -from 31 -to 0 mon_signal
  create_bd_pin -dir O status_max
  create_bd_pin -dir O status_min

  # Create instance: amplitude_good_check, and set properties
  set block_name amplitude_good
  set block_cell_name amplitude_good_check
  if { [catch {set amplitude_good_check [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $amplitude_good_check eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property CONFIG.AXIS_TDATA_WIDTH {24} $amplitude_good_check


  # Create instance: cfg_select_phase_unwrapping, and set properties
  set block_name cfg_select
  set block_cell_name cfg_select_phase_unwrapping
  if { [catch {set cfg_select_phase_unwrapping [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_select_phase_unwrapping eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_SWBIT {2} \
    CONFIG.SRC_ADDR {3} \
  ] $cfg_select_phase_unwrapping


  # Create instance: phase_unwrap, and set properties
  set block_name phase_unwrap
  set block_cell_name phase_unwrap
  if { [catch {set phase_unwrap [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $phase_unwrap eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property CONFIG.PHU_DISABLE {1} $phase_unwrap


  # Create instance: cfg_to_am_threashold, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_am_threashold
  if { [catch {set cfg_to_am_threashold [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_am_threashold eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_WIDTH {1024} \
    CONFIG.DST_WIDTH {24} \
    CONFIG.MAXIS_TDATA_WIDTH {24} \
    CONFIG.SRC_ADDR {8} \
  ] $cfg_to_am_threashold


  # Create instance: cfg_to_axis_PhaseInc, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_axis_PhaseInc
  if { [catch {set cfg_to_axis_PhaseInc [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_axis_PhaseInc eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {48} \
    CONFIG.MAXIS_TDATA_WIDTH {48} \
    CONFIG.SRC_BITS {64} \
  ] $cfg_to_axis_PhaseInc


  # Create instance: cfg_to_ph_ci, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_ph_ci
  if { [catch {set cfg_to_ph_ci [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_ph_ci eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {12} \
    CONFIG.SRC_BITS {32} \
  ] $cfg_to_ph_ci


  # Create instance: cfg_to_ph_cp, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_ph_cp
  if { [catch {set cfg_to_ph_cp [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_ph_cp eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {11} \
    CONFIG.SRC_BITS {32} \
  ] $cfg_to_ph_cp


  # Create instance: cfg_to_ph_lower, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_ph_lower
  if { [catch {set cfg_to_ph_lower [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_ph_lower eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {48} \
    CONFIG.MAXIS_TDATA_WIDTH {48} \
    CONFIG.SRC_ADDR {15} \
    CONFIG.SRC_BITS {64} \
  ] $cfg_to_ph_lower


  # Create instance: cfg_to_ph_setpoint, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_ph_setpoint
  if { [catch {set cfg_to_ph_setpoint [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_ph_setpoint eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {10} \
  ] $cfg_to_ph_setpoint


  # Create instance: cfg_to_ph_upper, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_ph_upper
  if { [catch {set cfg_to_ph_upper [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_ph_upper eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {48} \
    CONFIG.MAXIS_TDATA_WIDTH {48} \
    CONFIG.SRC_ADDR {13} \
    CONFIG.SRC_BITS {64} \
  ] $cfg_to_ph_upper


  # Create interface connections
  connect_bd_intf_net -intf_net Conn4 [get_bd_intf_pins S_AXIS_AMPL] [get_bd_intf_pins amplitude_good_check/S_AXIS_AM]
  connect_bd_intf_net -intf_net S_AXIS_1 [get_bd_intf_pins S_AXIS] [get_bd_intf_pins phase_unwrap/S_AXIS]
  connect_bd_intf_net -intf_net cfg_to_axis_PhaseInc_M_AXIS [get_bd_intf_pins M_AXIS_CONTROL] [get_bd_intf_pins cfg_to_axis_PhaseInc/M_AXIS]
  connect_bd_intf_net -intf_net cfg_to_transport_dfreq_ci_M_AXIS [get_bd_intf_pins amplitude_good_check/S_AXIS_AMTHR] [get_bd_intf_pins cfg_to_am_threashold/M_AXIS]

  # Create port connections
  connect_bd_net -net Net [get_bd_pins cfg] [get_bd_pins cfg_select_phase_unwrapping/cfg] [get_bd_pins cfg_to_axis_PhaseInc/cfg] [get_bd_pins cfg_to_ph_ci/cfg] [get_bd_pins cfg_to_ph_cp/cfg] [get_bd_pins cfg_to_ph_lower/cfg] [get_bd_pins cfg_to_ph_setpoint/cfg] [get_bd_pins cfg_to_ph_upper/cfg]
  connect_bd_net -net axis_red_pitaya_adc_0_adc_clk [get_bd_pins aclk] [get_bd_pins amplitude_good_check/aclk] [get_bd_pins phase_unwrap/aclk] [get_bd_pins cfg_to_am_threashold/a_clk] [get_bd_pins cfg_to_axis_PhaseInc/a_clk] [get_bd_pins cfg_to_ph_ci/a_clk] [get_bd_pins cfg_to_ph_cp/a_clk] [get_bd_pins cfg_to_ph_lower/a_clk] [get_bd_pins cfg_to_ph_setpoint/a_clk] [get_bd_pins cfg_to_ph_upper/a_clk]
  connect_bd_net -net cfg1_1 [get_bd_pins cfg1] [get_bd_pins cfg_to_am_threashold/cfg]
  connect_bd_net -net cfg_select_phase_unwrapping_status [get_bd_pins cfg_select_phase_unwrapping/status] [get_bd_pins phase_unwrap/enable]
  connect_bd_net -net cfg_to_ph_upper_data [get_bd_pins cfg_to_ph_lower/data] [get_bd_pins data_lower]

  # Perform GUI Layout
  regenerate_bd_layout -hierarchy [get_bd_cells /PAC_PLL/PS_Phase_Controller] -layout_string {
   "ActiveEmotionalView":"Default View",
   "Default View_ScaleFactor":"1.12329",
   "Default View_TopLeft":"-1318,-7",
   "ExpandedHierarchyInLayout":"",
   "guistr":"# # String gsaved with Nlview 7.5.8 2022-09-21 7111 VDI=41 GEI=38 GUI=JA:10.0 TLS
#  -string -flagsOSRD
preplace port M_AXIS_CONTROL -pg 1 -lvl 4 -x 1120 -y 40 -defaultsOSRD
preplace port M_AXIS_CONTROL2 -pg 1 -lvl 4 -x 1120 -y 70 -defaultsOSRD
preplace port M_AXIS_CONTROL3 -pg 1 -lvl 4 -x 1120 -y 100 -defaultsOSRD
preplace port M_AXIS_PASS -pg 1 -lvl 4 -x 1120 -y 130 -defaultsOSRD
preplace port M_AXIS_PASS2 -pg 1 -lvl 4 -x 1120 -y 160 -defaultsOSRD
preplace port S_AXIS -pg 1 -lvl 0 -x -10 -y 50 -defaultsOSRD
preplace port S_AXIS_AMPL -pg 1 -lvl 0 -x -10 -y 940 -defaultsOSRD
preplace port port-id_aclk -pg 1 -lvl 0 -x -10 -y 970 -defaultsOSRD
preplace port port-id_enable -pg 1 -lvl 0 -x -10 -y 770 -defaultsOSRD
preplace port port-id_status_max -pg 1 -lvl 4 -x 1120 -y 340 -defaultsOSRD
preplace port port-id_status_min -pg 1 -lvl 4 -x 1120 -y 370 -defaultsOSRD
preplace portBus cfg -pg 1 -lvl 0 -x -10 -y 110 -defaultsOSRD
preplace portBus cfg1 -pg 1 -lvl 0 -x -10 -y 1030 -defaultsOSRD
preplace portBus data_lower -pg 1 -lvl 4 -x 1120 -y 430 -defaultsOSRD
preplace portBus mon_control -pg 1 -lvl 4 -x 1120 -y 250 -defaultsOSRD
preplace portBus mon_control_B -pg 1 -lvl 4 -x 1120 -y 310 -defaultsOSRD
preplace portBus mon_control_lower32 -pg 1 -lvl 4 -x 1120 -y 280 -defaultsOSRD
preplace portBus mon_error -pg 1 -lvl 4 -x 1120 -y 220 -defaultsOSRD
preplace portBus mon_signal -pg 1 -lvl 4 -x 1120 -y 190 -defaultsOSRD
preplace inst amplitude_good_check -pg 1 -lvl 2 -x 430 -y 970 -defaultsOSRD
preplace inst cfg_select_phase_unwrapping -pg 1 -lvl 1 -x 150 -y 110 -defaultsOSRD
preplace inst phase_unwrap -pg 1 -lvl 2 -x 430 -y 70 -defaultsOSRD
preplace inst cfg_to_am_threashold -pg 1 -lvl 1 -x 150 -y 1020 -defaultsOSRD
preplace inst cfg_to_axis_PhaseInc -pg 1 -lvl 2 -x 430 -y 200 -defaultsOSRD
preplace inst cfg_to_ph_ci -pg 1 -lvl 2 -x 430 -y 320 -defaultsOSRD
preplace inst cfg_to_ph_cp -pg 1 -lvl 2 -x 430 -y 440 -defaultsOSRD
preplace inst cfg_to_ph_lower -pg 1 -lvl 2 -x 430 -y 840 -defaultsOSRD
preplace inst cfg_to_ph_setpoint -pg 1 -lvl 2 -x 430 -y 580 -defaultsOSRD
preplace inst cfg_to_ph_upper -pg 1 -lvl 2 -x 430 -y 700 -defaultsOSRD
preplace netloc Net 1 0 2 20 40 300
preplace netloc axis_red_pitaya_adc_0_adc_clk 1 0 2 20 950 290
preplace netloc cfg1_1 1 0 1 NJ 1030
preplace netloc cfg_select_phase_unwrapping_status 1 1 1 280J 90n
preplace netloc cfg_to_ph_upper_data 1 2 2 560 430 NJ
preplace netloc Conn4 1 0 2 NJ 940 300J
preplace netloc S_AXIS_1 1 0 2 NJ 50 NJ
preplace netloc cfg_to_transport_dfreq_ci_M_AXIS 1 1 1 300 970n
preplace netloc cfg_to_axis_PhaseInc_M_AXIS 1 2 2 NJ 190 840
levelinfo -pg 1 -10 150 430 820 1120
pagesize -pg 1 -db -bbox -sgen -150 -10 1360 1090
"
}

  # Restore current instance
  current_bd_instance $oldCurInst
}
  
# Hierarchical cell: SPM_control_logic
proc create_hier_cell_SPM_control_logic { parentCell nameHier } {

  variable script_folder

  if { $parentCell eq "" || $nameHier eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2092 -severity "ERROR" "create_hier_cell_SPM_control_logic() - Empty argument(s)!"}
     return
  }

  # Get object for parentCell
  set parentObj [get_bd_cells $parentCell]
  if { $parentObj == "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2090 -severity "ERROR" "Unable to find parent cell <$parentCell>!"}
     return
  }

  # Make sure parentObj is hier blk
  set parentType [get_property TYPE $parentObj]
  if { $parentType ne "hier" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2091 -severity "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be <hier>."}
     return
  }

  # Save current instance; Restore later
  set oldCurInst [current_bd_instance .]

  # Set parent object as current
  current_bd_instance $parentObj

  # Create cell and set as current instance
  set hier_obj [create_bd_cell -type hier $nameHier]
  current_bd_instance $hier_obj

  # Create interface pins
  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:bram_rtl:1.0 BRAM_PORTB

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS_ch9s

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS_chAs

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS_chBs

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS_chCs

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS_chEs

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS_ch5s


  # Create pins
  create_bd_pin -dir I -type clk a_clk
  create_bd_pin -dir I -from 1023 -to 0 cfg3
  create_bd_pin -dir IO -from 7 -to 0 exp_p_io
  create_bd_pin -dir I -from 1023 -to 0 cfg1
  create_bd_pin -dir O -from 31 -to 0 M_AXIS_PASS_tdata
  create_bd_pin -dir O gvp_finished
  create_bd_pin -dir O enable
  create_bd_pin -dir O -from 31 -to 0 data
  create_bd_pin -dir O gvp_hold
  create_bd_pin -dir O -from 31 -to 0 dbg_i
  create_bd_pin -dir O -from 31 -to 0 section
  create_bd_pin -dir O -from 31 -to 0 dbg_status
  create_bd_pin -dir O -from 31 -to 0 M_AXIS_ZSMON_tdata
  create_bd_pin -dir O -from 31 -to 0 M_AXIS_X0MON_tdata
  create_bd_pin -dir O -from 31 -to 0 M_AXIS_XSMON_tdata
  create_bd_pin -dir O -from 31 -to 0 M_AXIS_YSMON_tdata
  create_bd_pin -dir O -from 31 -to 0 M_AXIS_Z0MON_tdata
  create_bd_pin -dir IO -from 7 -to 0 exp_n_io
  create_bd_pin -dir O -from 31 -to 0 mon3
  create_bd_pin -dir O -from 31 -to 0 mon0
  create_bd_pin -dir O -from 31 -to 0 mon1
  create_bd_pin -dir O -from 31 -to 0 mon2
  create_bd_pin -dir O -from 15 -to 0 last_write_addr
  create_bd_pin -dir O -from 31 -to 0 M_AXIS_Z_tdata

  # Create instance: xlslice_cfg_dac_mode, and set properties
  set xlslice_cfg_dac_mode [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_cfg_dac_mode ]
  set_property -dict [list \
    CONFIG.DIN_FROM {3} \
    CONFIG.DIN_TO {3} \
  ] $xlslice_cfg_dac_mode


  # Create instance: xlslice_cfg_dac_send, and set properties
  set xlslice_cfg_dac_send [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_cfg_dac_send ]
  set_property -dict [list \
    CONFIG.DIN_FROM {4} \
    CONFIG.DIN_TO {4} \
    CONFIG.DOUT_WIDTH {1} \
  ] $xlslice_cfg_dac_send


  # Create instance: xlslice_gvp_reset, and set properties
  set xlslice_gvp_reset [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_gvp_reset ]
  set_property -dict [list \
    CONFIG.DIN_FROM {0} \
    CONFIG.DIN_TO {0} \
    CONFIG.DOUT_WIDTH {1} \
  ] $xlslice_gvp_reset


  # Create instance: xlslice_gvp_setvec, and set properties
  set xlslice_gvp_setvec [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_gvp_setvec ]
  set_property -dict [list \
    CONFIG.DIN_FROM {1} \
    CONFIG.DIN_TO {1} \
    CONFIG.DOUT_WIDTH {1} \
  ] $xlslice_gvp_setvec


  # Create instance: xlslice_cfg_dac_axis, and set properties
  set xlslice_cfg_dac_axis [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_cfg_dac_axis ]
  set_property CONFIG.DIN_FROM {2} $xlslice_cfg_dac_axis


  # Create instance: controller_zservo
  create_hier_cell_controller_zservo $hier_obj controller_zservo

  # Create instance: cfg3_to_cfg_dac_axis, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_cfg_dac_axis
  if { [catch {set cfg3_to_cfg_dac_axis [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_cfg_dac_axis eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {17} \
    CONFIG.SRC_BITS {32} \
  ] $cfg3_to_cfg_dac_axis


  # Create instance: cfg3_to_cfg_dac_control, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_cfg_dac_control
  if { [catch {set cfg3_to_cfg_dac_control [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_cfg_dac_control eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {18} \
    CONFIG.SRC_BITS {32} \
  ] $cfg3_to_cfg_dac_control


  # Create instance: cfg3_to_gvp_program_vector, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_gvp_program_vector
  if { [catch {set cfg3_to_gvp_program_vector [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_gvp_program_vector eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {512} \
    CONFIG.MAXIS_TDATA_WIDTH {512} \
    CONFIG.SRC_ADDR {1} \
    CONFIG.SRC_BITS {512} \
  ] $cfg3_to_gvp_program_vector


  # Create instance: cfg3_to_gvp_setvector, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_gvp_setvector
  if { [catch {set cfg3_to_gvp_setvector [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_gvp_setvector eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {0} \
    CONFIG.SRC_BITS {32} \
  ] $cfg3_to_gvp_setvector


  # Create instance: cfg3_to_rotmxx, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_rotmxx
  if { [catch {set cfg3_to_rotmxx [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_rotmxx eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {20} \
    CONFIG.SRC_BITS {32} \
  ] $cfg3_to_rotmxx


  # Create instance: cfg3_to_rotmxy, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_rotmxy
  if { [catch {set cfg3_to_rotmxy [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_rotmxy eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {21} \
    CONFIG.SRC_BITS {32} \
  ] $cfg3_to_rotmxy


  # Create instance: cfg3_to_slope_x, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_slope_x
  if { [catch {set cfg3_to_slope_x [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_slope_x eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {22} \
    CONFIG.SRC_BITS {32} \
  ] $cfg3_to_slope_x


  # Create instance: cfg3_to_slope_y, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_slope_y
  if { [catch {set cfg3_to_slope_y [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_slope_y eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {23} \
    CONFIG.SRC_BITS {32} \
  ] $cfg3_to_slope_y


  # Create instance: cfg3_to_x0, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_x0
  if { [catch {set cfg3_to_x0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_x0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {24} \
    CONFIG.SRC_BITS {32} \
  ] $cfg3_to_x0


  # Create instance: cfg3_to_y0, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_y0
  if { [catch {set cfg3_to_y0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_y0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {25} \
    CONFIG.SRC_BITS {32} \
  ] $cfg3_to_y0


  # Create instance: cfg3_to_z0, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_z0
  if { [catch {set cfg3_to_z0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_z0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {26} \
    CONFIG.SRC_BITS {32} \
  ] $cfg3_to_z0


  # Create instance: xlslice_gvp_pause, and set properties
  set xlslice_gvp_pause [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_gvp_pause ]
  set_property -dict [list \
    CONFIG.DIN_FROM {2} \
    CONFIG.DIN_TO {2} \
    CONFIG.DOUT_WIDTH {1} \
  ] $xlslice_gvp_pause


  # Create instance: cfg3_to_bias, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_bias
  if { [catch {set cfg3_to_bias [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_bias eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {27} \
    CONFIG.SRC_BITS {32} \
  ] $cfg3_to_bias


  # Create instance: cfg3_to_xy_move_step, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_xy_move_step
  if { [catch {set cfg3_to_xy_move_step [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_xy_move_step eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {28} \
    CONFIG.SRC_BITS {32} \
  ] $cfg3_to_xy_move_step


  # Create instance: cfg3_to_z_move_step, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg3_to_z_move_step
  if { [catch {set cfg3_to_z_move_step [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg3_to_z_move_step eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {29} \
    CONFIG.SRC_BITS {32} \
  ] $cfg3_to_z_move_step


  # Create instance: xlslice_gvp_reset_options, and set properties
  set xlslice_gvp_reset_options [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_gvp_reset_options ]
  set_property -dict [list \
    CONFIG.DIN_FROM {31} \
    CONFIG.DIN_TO {16} \
    CONFIG.DOUT_WIDTH {16} \
  ] $xlslice_gvp_reset_options


  # Create instance: AD5791_io_connect_0, and set properties
  set block_name AD5791_io_connect
  set block_cell_name AD5791_io_connect_0
  if { [catch {set AD5791_io_connect_0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $AD5791_io_connect_0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: axis_AD5791_0, and set properties
  set block_name axis_AD5791
  set block_cell_name axis_AD5791_0
  if { [catch {set axis_AD5791_0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_AD5791_0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: blk_mem_gen_spmc, and set properties
  set blk_mem_gen_spmc [ create_bd_cell -type ip -vlnv xilinx.com:ip:blk_mem_gen:8.4 blk_mem_gen_spmc ]
  set_property -dict [list \
    CONFIG.Algorithm {Minimum_Area} \
    CONFIG.Enable_32bit_Address {false} \
    CONFIG.Enable_A {Always_Enabled} \
    CONFIG.Enable_B {Use_ENB_Pin} \
    CONFIG.Fill_Remaining_Memory_Locations {true} \
    CONFIG.Load_Init_File {false} \
    CONFIG.Memory_Type {Simple_Dual_Port_RAM} \
    CONFIG.Operating_Mode_A {WRITE_FIRST} \
    CONFIG.Port_B_Clock {100} \
    CONFIG.Port_B_Enable_Rate {100} \
    CONFIG.Read_Width_B {32} \
    CONFIG.Register_PortB_Output_of_Memory_Primitives {true} \
    CONFIG.Remaining_Memory_Locations {cccccccc} \
    CONFIG.Use_Byte_Write_Enable {false} \
    CONFIG.Use_RSTB_Pin {false} \
    CONFIG.Write_Depth_A {16384} \
    CONFIG.Write_Width_A {32} \
    CONFIG.Write_Width_B {32} \
    CONFIG.use_bram_block {Stand_Alone} \
  ] $blk_mem_gen_spmc


  # Create instance: gvp_main, and set properties
  set block_name gvp
  set block_cell_name gvp_main
  if { [catch {set gvp_main [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $gvp_main eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: axis_bram_stream_srcs, and set properties
  set block_name axis_bram_stream_srcs
  set block_cell_name axis_bram_stream_srcs
  if { [catch {set axis_bram_stream_srcs [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_bram_stream_srcs eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property CONFIG.BRAM_ADDR_WIDTH {14} $axis_bram_stream_srcs


  # Create instance: axis_spm_control, and set properties
  set block_name axis_spm_control
  set block_cell_name axis_spm_control
  if { [catch {set axis_spm_control [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_spm_control eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: axis_splitter_U, and set properties
  set block_name axis_splitter
  set block_cell_name axis_splitter_U
  if { [catch {set axis_splitter_U [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_splitter_U eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: axis_splitter_Z, and set properties
  set block_name axis_splitter
  set block_cell_name axis_splitter_Z
  if { [catch {set axis_splitter_Z [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_splitter_Z eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: axis_splitter_Y, and set properties
  set block_name axis_splitter
  set block_cell_name axis_splitter_Y
  if { [catch {set axis_splitter_Y [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_splitter_Y eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: axis_splitter_X, and set properties
  set block_name axis_splitter
  set block_cell_name axis_splitter_X
  if { [catch {set axis_splitter_X [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_splitter_X eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: axis_splitter_CH0_S16_to_S32, and set properties
  set block_name axis_splitter
  set block_cell_name axis_splitter_CH0_S16_to_S32
  if { [catch {set axis_splitter_CH0_S16_to_S32 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_splitter_CH0_S16_to_S32 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property CONFIG.SAXIS_TDATA_WIDTH {16} $axis_splitter_CH0_S16_to_S32


  # Create instance: axis_splitter_ZControlSignalPass, and set properties
  set block_name axis_splitter
  set block_cell_name axis_splitter_ZControlSignalPass
  if { [catch {set axis_splitter_ZControlSignalPass [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_splitter_ZControlSignalPass eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create interface connections
  connect_bd_intf_net -intf_net BRAM_PORTB_1 [get_bd_intf_pins BRAM_PORTB] [get_bd_intf_pins blk_mem_gen_spmc/BRAM_PORTB]
  connect_bd_intf_net -intf_net S_AXIS_1 [get_bd_intf_pins S_AXIS] [get_bd_intf_pins controller_zservo/S_AXIS]
  connect_bd_intf_net -intf_net S_AXIS_ch5s_1 [get_bd_intf_pins S_AXIS_ch5s] [get_bd_intf_pins axis_splitter_CH0_S16_to_S32/S_AXIS]
  connect_bd_intf_net -intf_net S_AXIS_ch9s_1 [get_bd_intf_pins S_AXIS_ch9s] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_ch9s]
  connect_bd_intf_net -intf_net S_AXIS_chAs_1 [get_bd_intf_pins S_AXIS_chAs] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_chAs]
  connect_bd_intf_net -intf_net S_AXIS_chBs_1 [get_bd_intf_pins S_AXIS_chBs] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_chBs]
  connect_bd_intf_net -intf_net S_AXIS_chCs_1 [get_bd_intf_pins S_AXIS_chCs] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_chCs]
  connect_bd_intf_net -intf_net S_AXIS_chEs_1 [get_bd_intf_pins S_AXIS_chEs] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_chEs]
  connect_bd_intf_net -intf_net axis_splitter_0_M_AXIS [get_bd_intf_pins axis_splitter_CH0_S16_to_S32/M_AXIS] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_ch5s]
  connect_bd_intf_net -intf_net axis_splitter_U_M_AXIS [get_bd_intf_pins axis_splitter_U/M_AXIS] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_ch4s]
  connect_bd_intf_net -intf_net axis_splitter_U_M_AXIS2 [get_bd_intf_pins axis_splitter_U/M_AXIS2] [get_bd_intf_pins axis_AD5791_0/S_AXIS4]
  connect_bd_intf_net -intf_net axis_splitter_X_M_AXIS [get_bd_intf_pins axis_splitter_X/M_AXIS] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_ch1s]
  connect_bd_intf_net -intf_net axis_splitter_X_M_AXIS2 [get_bd_intf_pins axis_splitter_X/M_AXIS2] [get_bd_intf_pins axis_spm_control/S_AXIS_Xs]
  connect_bd_intf_net -intf_net axis_splitter_Y_M_AXIS [get_bd_intf_pins axis_splitter_Y/M_AXIS] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_ch2s]
  connect_bd_intf_net -intf_net axis_splitter_Y_M_AXIS2 [get_bd_intf_pins axis_splitter_Y/M_AXIS2] [get_bd_intf_pins axis_spm_control/S_AXIS_Ys]
  connect_bd_intf_net -intf_net axis_splitter_ZControlSignalPass_M_AXIS [get_bd_intf_pins axis_splitter_ZControlSignalPass/M_AXIS] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_ch6s]
  connect_bd_intf_net -intf_net axis_splitter_Z_M_AXIS [get_bd_intf_pins axis_splitter_Z/M_AXIS] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_ch3s]
  connect_bd_intf_net -intf_net axis_splitter_Z_M_AXIS2 [get_bd_intf_pins axis_splitter_Z/M_AXIS2] [get_bd_intf_pins axis_AD5791_0/S_AXIS3]
  connect_bd_intf_net -intf_net axis_spm_control_0_M_AXIS1 [get_bd_intf_pins axis_spm_control/M_AXIS1] [get_bd_intf_pins axis_AD5791_0/S_AXIS1]
  connect_bd_intf_net -intf_net axis_spm_control_0_M_AXIS2 [get_bd_intf_pins axis_spm_control/M_AXIS2] [get_bd_intf_pins axis_AD5791_0/S_AXIS2]
  connect_bd_intf_net -intf_net axis_spm_control_M_AXIS3 [get_bd_intf_pins axis_spm_control/M_AXIS3] [get_bd_intf_pins axis_splitter_Z/S_AXIS]
  connect_bd_intf_net -intf_net axis_spm_control_M_AXIS4 [get_bd_intf_pins axis_spm_control/M_AXIS4] [get_bd_intf_pins axis_splitter_U/S_AXIS]
  connect_bd_intf_net -intf_net cfg3_to_cfg_dac_axis_M_AXIS [get_bd_intf_pins cfg3_to_cfg_dac_axis/M_AXIS] [get_bd_intf_pins axis_AD5791_0/S_AXISCFG]
  connect_bd_intf_net -intf_net controller_zservo_M_AXIS_CONTROL [get_bd_intf_pins controller_zservo/M_AXIS_CONTROL] [get_bd_intf_pins axis_spm_control/S_AXIS_Z]
  connect_bd_intf_net -intf_net controller_zservo_M_AXIS_PASS [get_bd_intf_pins controller_zservo/M_AXIS_PASS] [get_bd_intf_pins axis_splitter_ZControlSignalPass/S_AXIS]
  connect_bd_intf_net -intf_net gvp_main_M_AXIS_SRCS [get_bd_intf_pins gvp_main/M_AXIS_SRCS] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_srcs]
  connect_bd_intf_net -intf_net gvp_main_M_AXIS_U [get_bd_intf_pins gvp_main/M_AXIS_U] [get_bd_intf_pins axis_spm_control/S_AXIS_U]
  connect_bd_intf_net -intf_net gvp_main_M_AXIS_X [get_bd_intf_pins gvp_main/M_AXIS_X] [get_bd_intf_pins axis_splitter_X/S_AXIS]
  connect_bd_intf_net -intf_net gvp_main_M_AXIS_Y [get_bd_intf_pins gvp_main/M_AXIS_Y] [get_bd_intf_pins axis_splitter_Y/S_AXIS]
  connect_bd_intf_net -intf_net gvp_main_M_AXIS_Z [get_bd_intf_pins gvp_main/M_AXIS_Z] [get_bd_intf_pins axis_spm_control/S_AXIS_Zs]
  connect_bd_intf_net -intf_net gvp_main_M_AXIS_gvp_time [get_bd_intf_pins gvp_main/M_AXIS_gvp_time] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_gvp_time]
  connect_bd_intf_net -intf_net gvp_main_M_AXIS_index [get_bd_intf_pins gvp_main/M_AXIS_index] [get_bd_intf_pins axis_bram_stream_srcs/S_AXIS_index]

  # Create port connections
  connect_bd_net -net Net [get_bd_pins exp_n_io] [get_bd_pins AD5791_io_connect_0/exp_n_io]
  connect_bd_net -net Net1 -boundary_type lower [get_bd_pins exp_p_io]
  connect_bd_net -net PS_cfg_data_reg_3 [get_bd_pins cfg3] [get_bd_pins cfg3_to_cfg_dac_axis/cfg] [get_bd_pins cfg3_to_cfg_dac_control/cfg] [get_bd_pins cfg3_to_gvp_program_vector/cfg] [get_bd_pins cfg3_to_gvp_setvector/cfg] [get_bd_pins cfg3_to_rotmxx/cfg] [get_bd_pins cfg3_to_rotmxy/cfg] [get_bd_pins cfg3_to_slope_x/cfg] [get_bd_pins cfg3_to_slope_y/cfg] [get_bd_pins cfg3_to_x0/cfg] [get_bd_pins cfg3_to_y0/cfg] [get_bd_pins cfg3_to_z0/cfg] [get_bd_pins cfg3_to_bias/cfg] [get_bd_pins cfg3_to_xy_move_step/cfg] [get_bd_pins cfg3_to_z_move_step/cfg]
  connect_bd_net -net a_clk [get_bd_pins a_clk] [get_bd_pins controller_zservo/a_clk] [get_bd_pins cfg3_to_cfg_dac_axis/a_clk] [get_bd_pins cfg3_to_cfg_dac_control/a_clk] [get_bd_pins cfg3_to_gvp_program_vector/a_clk] [get_bd_pins cfg3_to_gvp_setvector/a_clk] [get_bd_pins cfg3_to_rotmxx/a_clk] [get_bd_pins cfg3_to_rotmxy/a_clk] [get_bd_pins cfg3_to_slope_x/a_clk] [get_bd_pins cfg3_to_slope_y/a_clk] [get_bd_pins cfg3_to_x0/a_clk] [get_bd_pins cfg3_to_y0/a_clk] [get_bd_pins cfg3_to_z0/a_clk] [get_bd_pins cfg3_to_bias/a_clk] [get_bd_pins cfg3_to_z_move_step/a_clk] [get_bd_pins cfg3_to_xy_move_step/a_clk] [get_bd_pins axis_AD5791_0/a_clk] [get_bd_pins gvp_main/a_clk] [get_bd_pins axis_bram_stream_srcs/a2_clk] [get_bd_pins axis_spm_control/a_clk] [get_bd_pins axis_splitter_U/a_clk] [get_bd_pins axis_splitter_Z/a_clk] [get_bd_pins axis_splitter_Y/a_clk] [get_bd_pins axis_splitter_X/a_clk] [get_bd_pins axis_splitter_CH0_S16_to_S32/a_clk] [get_bd_pins axis_splitter_ZControlSignalPass/a_clk]
  connect_bd_net -net axis_AD5791_0_mon0 [get_bd_pins axis_AD5791_0/mon0] [get_bd_pins mon0]
  connect_bd_net -net axis_AD5791_0_mon1 [get_bd_pins axis_AD5791_0/mon1] [get_bd_pins mon1]
  connect_bd_net -net axis_AD5791_0_mon2 [get_bd_pins axis_AD5791_0/mon2] [get_bd_pins mon2]
  connect_bd_net -net axis_AD5791_0_mon3 [get_bd_pins axis_AD5791_0/mon3] [get_bd_pins mon3]
  connect_bd_net -net axis_AD5791_0_wire_PMD_clk [get_bd_pins axis_AD5791_0/wire_PMD_clk] [get_bd_pins AD5791_io_connect_0/PMD_clk]
  connect_bd_net -net axis_AD5791_0_wire_PMD_dac [get_bd_pins axis_AD5791_0/wire_PMD_dac] [get_bd_pins AD5791_io_connect_0/PMD_dac]
  connect_bd_net -net axis_AD5791_0_wire_PMD_sync [get_bd_pins axis_AD5791_0/wire_PMD_sync] [get_bd_pins AD5791_io_connect_0/PMD_sync]
  connect_bd_net -net axis_bram_stream_srcs_0_BRAM_PORTA_addr [get_bd_pins axis_bram_stream_srcs/BRAM_PORTA_addr] [get_bd_pins blk_mem_gen_spmc/addra]
  connect_bd_net -net axis_bram_stream_srcs_0_BRAM_PORTA_clk [get_bd_pins axis_bram_stream_srcs/BRAM_PORTA_clk] [get_bd_pins blk_mem_gen_spmc/clka]
  connect_bd_net -net axis_bram_stream_srcs_0_BRAM_PORTA_din [get_bd_pins axis_bram_stream_srcs/BRAM_PORTA_din] [get_bd_pins blk_mem_gen_spmc/dina]
  connect_bd_net -net axis_bram_stream_srcs_0_BRAM_PORTA_we [get_bd_pins axis_bram_stream_srcs/BRAM_PORTA_we] [get_bd_pins blk_mem_gen_spmc/wea]
  connect_bd_net -net axis_bram_stream_srcs_last_write_addr [get_bd_pins axis_bram_stream_srcs/last_write_addr] [get_bd_pins last_write_addr]
  connect_bd_net -net axis_splitter_ZControlSignalPass_monitor [get_bd_pins axis_splitter_ZControlSignalPass/monitor] [get_bd_pins M_AXIS_PASS_tdata]
  connect_bd_net -net axis_splitter_Z_monitor [get_bd_pins axis_splitter_Z/monitor] [get_bd_pins M_AXIS_Z_tdata]
  connect_bd_net -net axis_spm_control_0_M_AXIS_X0MON_tdata [get_bd_pins axis_spm_control/M_AXIS_X0MON_tdata] [get_bd_pins M_AXIS_X0MON_tdata]
  connect_bd_net -net axis_spm_control_0_M_AXIS_XSMON_tdata [get_bd_pins axis_spm_control/M_AXIS_XSMON_tdata] [get_bd_pins M_AXIS_XSMON_tdata]
  connect_bd_net -net axis_spm_control_0_M_AXIS_YSMON_tdata [get_bd_pins axis_spm_control/M_AXIS_YSMON_tdata] [get_bd_pins M_AXIS_YSMON_tdata]
  connect_bd_net -net axis_spm_control_0_M_AXIS_Z0MON_tdata [get_bd_pins axis_spm_control/M_AXIS_Z0MON_tdata] [get_bd_pins M_AXIS_Z0MON_tdata]
  connect_bd_net -net axis_spm_control_0_M_AXIS_ZSMON_tdata [get_bd_pins axis_spm_control/M_AXIS_ZSMON_tdata] [get_bd_pins M_AXIS_ZSMON_tdata]
  connect_bd_net -net cfg1_1 [get_bd_pins cfg1] [get_bd_pins controller_zservo/cfg1]
  connect_bd_net -net cfg3_to_bias1_data [get_bd_pins cfg3_to_xy_move_step/data] [get_bd_pins axis_spm_control/xy_offset_step]
  connect_bd_net -net cfg3_to_bias2_data [get_bd_pins cfg3_to_z_move_step/data] [get_bd_pins axis_spm_control/z_offset_step]
  connect_bd_net -net cfg3_to_bias_data [get_bd_pins cfg3_to_bias/data] [get_bd_pins axis_spm_control/u0]
  connect_bd_net -net cfg3_to_cfg_dac_axis_data [get_bd_pins cfg3_to_cfg_dac_axis/data] [get_bd_pins data]
  connect_bd_net -net cfg3_to_cfg_dac_control_data [get_bd_pins cfg3_to_cfg_dac_control/data] [get_bd_pins xlslice_cfg_dac_mode/Din] [get_bd_pins xlslice_cfg_dac_send/Din] [get_bd_pins xlslice_cfg_dac_axis/Din]
  connect_bd_net -net cfg3_to_gvp_program_vector_data [get_bd_pins cfg3_to_gvp_program_vector/data] [get_bd_pins gvp_main/vp_set]
  connect_bd_net -net cfg3_to_gvp_setvector_data [get_bd_pins cfg3_to_gvp_setvector/data] [get_bd_pins xlslice_gvp_reset/Din] [get_bd_pins xlslice_gvp_setvec/Din] [get_bd_pins xlslice_gvp_pause/Din] [get_bd_pins xlslice_gvp_reset_options/Din]
  connect_bd_net -net cfg3_to_rotmxx_data [get_bd_pins cfg3_to_rotmxx/data] [get_bd_pins axis_spm_control/rotmxx]
  connect_bd_net -net cfg3_to_rotmxy_data [get_bd_pins cfg3_to_rotmxy/data] [get_bd_pins axis_spm_control/rotmxy]
  connect_bd_net -net cfg3_to_slope_x_data [get_bd_pins cfg3_to_slope_x/data] [get_bd_pins axis_spm_control/slope_x]
  connect_bd_net -net cfg3_to_slope_y_data [get_bd_pins cfg3_to_slope_y/data] [get_bd_pins axis_spm_control/slope_y]
  connect_bd_net -net cfg3_to_x0_data [get_bd_pins cfg3_to_x0/data] [get_bd_pins axis_spm_control/x0]
  connect_bd_net -net cfg3_to_y0_data [get_bd_pins cfg3_to_y0/data] [get_bd_pins axis_spm_control/y0]
  connect_bd_net -net cfg3_to_z0_data [get_bd_pins cfg3_to_z0/data] [get_bd_pins axis_spm_control/z0]
  connect_bd_net -net controller_zservo_enable [get_bd_pins controller_zservo/enable] [get_bd_pins enable]
  connect_bd_net -net gvp_0_options [get_bd_pins gvp_main/options] [get_bd_pins controller_zservo/Din]
  connect_bd_net -net gvp_main_dbg_i -boundary_type lower [get_bd_pins dbg_i]
  connect_bd_net -net gvp_main_dbg_status [get_bd_pins gvp_main/dbg_status] [get_bd_pins dbg_status]
  connect_bd_net -net gvp_main_gvp_finished [get_bd_pins gvp_main/gvp_finished] [get_bd_pins gvp_finished]
  connect_bd_net -net gvp_main_gvp_hold [get_bd_pins gvp_main/gvp_hold] [get_bd_pins gvp_hold]
  connect_bd_net -net gvp_main_section -boundary_type lower [get_bd_pins section]
  connect_bd_net -net gvp_main_store_data [get_bd_pins gvp_main/store_data] [get_bd_pins axis_bram_stream_srcs/push_next]
  connect_bd_net -net xlslice_cfg_dac_axis_Dout [get_bd_pins xlslice_cfg_dac_axis/Dout] [get_bd_pins axis_AD5791_0/configuration_axis]
  connect_bd_net -net xlslice_cfg_dac_mode_Dout [get_bd_pins xlslice_cfg_dac_mode/Dout] [get_bd_pins axis_AD5791_0/configuration_mode]
  connect_bd_net -net xlslice_cfg_dac_send_Dout [get_bd_pins xlslice_cfg_dac_send/Dout] [get_bd_pins axis_AD5791_0/configuration_send]
  connect_bd_net -net xlslice_gvp_reset1_Dout [get_bd_pins xlslice_gvp_reset_options/Dout] [get_bd_pins gvp_main/reset_options]
  connect_bd_net -net xlslice_gvp_reset_Dout [get_bd_pins xlslice_gvp_reset/Dout] [get_bd_pins gvp_main/reset] [get_bd_pins axis_bram_stream_srcs/reset]
  connect_bd_net -net xlslice_gvp_setvec_1_Dout [get_bd_pins xlslice_gvp_pause/Dout] [get_bd_pins gvp_main/pause]
  connect_bd_net -net xlslice_gvp_setvec_Dout [get_bd_pins xlslice_gvp_setvec/Dout] [get_bd_pins gvp_main/setvec]

  # Restore current instance
  current_bd_instance $oldCurInst
}
  
# Hierarchical cell: PS_data_transport
proc create_hier_cell_PS_data_transport { parentCell nameHier } {

  variable script_folder

  if { $parentCell eq "" || $nameHier eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2092 -severity "ERROR" "create_hier_cell_PS_data_transport() - Empty argument(s)!"}
     return
  }

  # Get object for parentCell
  set parentObj [get_bd_cells $parentCell]
  if { $parentObj == "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2090 -severity "ERROR" "Unable to find parent cell <$parentCell>!"}
     return
  }

  # Make sure parentObj is hier blk
  set parentType [get_property TYPE $parentObj]
  if { $parentType ne "hier" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2091 -severity "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be <hier>."}
     return
  }

  # Save current instance; Restore later
  set oldCurInst [current_bd_instance .]

  # Set parent object as current
  current_bd_instance $parentObj

  # Create cell and set as current instance
  set hier_obj [create_bd_cell -type hier $nameHier]
  current_bd_instance $hier_obj

  # Create interface pins
  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:bram_rtl:1.0 BRAM_PORTB

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_aux

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS1

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS2

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS3

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS4

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS5

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS6

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS7

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS8

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS2

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS3

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS4

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS5

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS6


  # Create pins
  create_bd_pin -dir O McBSP_Frame
  create_bd_pin -dir I -type clk a_clk
  create_bd_pin -dir I -from 1023 -to 0 cfg1
  create_bd_pin -dir I -from 1023 -to 0 cfg0
  create_bd_pin -dir I -from 1023 -to 0 cfg2
  create_bd_pin -dir O -from 31 -to 0 delta_frequency_monitor
  create_bd_pin -dir O enable
  create_bd_pin -dir IO -from 7 -to 0 exp_n_io
  create_bd_pin -dir IO -from 7 -to 0 exp_p_io
  create_bd_pin -dir O -from 31 -to 0 mon_control
  create_bd_pin -dir O -from 31 -to 0 writeposition
  create_bd_pin -dir I -from 2 -to 0 zero_spcp

  # Create instance: PulseFormer
  create_hier_cell_PulseFormer $hier_obj PulseFormer

  # Create instance: controller_dfreq
  create_hier_cell_controller_dfreq $hier_obj controller_dfreq

  # Create instance: blk_mem_gen_pacpll, and set properties
  set blk_mem_gen_pacpll [ create_bd_cell -type ip -vlnv xilinx.com:ip:blk_mem_gen:8.4 blk_mem_gen_pacpll ]
  set_property -dict [list \
    CONFIG.Algorithm {Minimum_Area} \
    CONFIG.Enable_32bit_Address {false} \
    CONFIG.Enable_B {Use_ENB_Pin} \
    CONFIG.Memory_Type {Simple_Dual_Port_RAM} \
    CONFIG.Operating_Mode_A {NO_CHANGE} \
    CONFIG.Port_B_Clock {100} \
    CONFIG.Port_B_Enable_Rate {100} \
    CONFIG.Read_Width_B {32} \
    CONFIG.Register_PortB_Output_of_Memory_Primitives {true} \
    CONFIG.Use_Byte_Write_Enable {false} \
    CONFIG.Use_RSTB_Pin {false} \
    CONFIG.Write_Depth_A {16384} \
    CONFIG.Write_Width_A {32} \
    CONFIG.Write_Width_B {32} \
    CONFIG.use_bram_block {Stand_Alone} \
  ] $blk_mem_gen_pacpll


  # Create instance: const_zero1, and set properties
  set const_zero1 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 const_zero1 ]
  set_property -dict [list \
    CONFIG.CONST_VAL {0} \
    CONFIG.CONST_WIDTH {32} \
  ] $const_zero1


  # Create instance: const_zero, and set properties
  set const_zero [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 const_zero ]
  set_property CONFIG.CONST_VAL {0} $const_zero


  # Create instance: axis_4s_combine_decimate, and set properties
  set block_name axis_4s_combine
  set block_cell_name axis_4s_combine_decimate
  if { [catch {set axis_4s_combine_decimate [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_4s_combine_decimate eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.BRAM_ADDR_WIDTH {15} \
    CONFIG.BRAM_DATA_WIDTH {64} \
    CONFIG.LCK_ENABLE {1} \
  ] $axis_4s_combine_decimate


  # Create instance: McBSP_io_connect_0, and set properties
  set block_name McBSP_io_connect
  set block_cell_name McBSP_io_connect_0
  if { [catch {set McBSP_io_connect_0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $McBSP_io_connect_0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: McBSP_controller_0, and set properties
  set block_name McBSP_controller
  set block_cell_name McBSP_controller_0
  if { [catch {set McBSP_controller_0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $McBSP_controller_0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: cfg18_19_to_transport_auxcenter, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg18_19_to_transport_auxcenter
  if { [catch {set cfg18_19_to_transport_auxcenter [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg18_19_to_transport_auxcenter eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {48} \
    CONFIG.MAXIS_TDATA_WIDTH {48} \
    CONFIG.SRC_ADDR {18} \
    CONFIG.SRC_BITS {64} \
  ] $cfg18_19_to_transport_auxcenter


  # Create instance: cfg_to_transport_channel_select, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_channel_select
  if { [catch {set cfg_to_transport_channel_select [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_channel_select eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {9} \
  ] $cfg_to_transport_channel_select


  # Create instance: cfg_to_transport_control, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_control
  if { [catch {set cfg_to_transport_control [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_control eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {6} \
  ] $cfg_to_transport_control


  # Create instance: cfg_to_transport_decimation, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_decimation
  if { [catch {set cfg_to_transport_decimation [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_decimation eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {8} \
  ] $cfg_to_transport_decimation


  # Create instance: cfg_to_transport_nsamples, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_transport_nsamples
  if { [catch {set cfg_to_transport_nsamples [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_transport_nsamples eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {7} \
  ] $cfg_to_transport_nsamples


  # Create instance: axis_bram_push2ch64, and set properties
  set block_name axis_bram_push
  set block_cell_name axis_bram_push2ch64
  if { [catch {set axis_bram_push2ch64 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_bram_push2ch64 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.BRAM_ADDR_WIDTH {14} \
    CONFIG.BRAM_DATA_WIDTH {32} \
  ] $axis_bram_push2ch64


  # Create instance: axis_FIR_CH1, and set properties
  set block_name axis_FIR
  set block_cell_name axis_FIR_CH1
  if { [catch {set axis_FIR_CH1 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_FIR_CH1 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.FIR_DECI {64} \
    CONFIG.FIR_DECI_L {6} \
  ] $axis_FIR_CH1


  # Create instance: axis_FIR_CH2, and set properties
  set block_name axis_FIR
  set block_cell_name axis_FIR_CH2
  if { [catch {set axis_FIR_CH2 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_FIR_CH2 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.FIR_DECI {64} \
    CONFIG.FIR_DECI_L {6} \
  ] $axis_FIR_CH2


  # Create instance: axis_FIR_CH3, and set properties
  set block_name axis_FIR
  set block_cell_name axis_FIR_CH3
  if { [catch {set axis_FIR_CH3 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_FIR_CH3 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.FIR_DECI {64} \
    CONFIG.FIR_DECI_L {6} \
  ] $axis_FIR_CH3


  # Create instance: axis_FIR_CH4, and set properties
  set block_name axis_FIR
  set block_cell_name axis_FIR_CH4
  if { [catch {set axis_FIR_CH4 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_FIR_CH4 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.FIR_DECI {64} \
    CONFIG.FIR_DECI_L {6} \
  ] $axis_FIR_CH4


  # Create instance: axis_splitter_dFreqCrtl, and set properties
  set block_name axis_splitter
  set block_cell_name axis_splitter_dFreqCrtl
  if { [catch {set axis_splitter_dFreqCrtl [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_splitter_dFreqCrtl eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create interface connections
  connect_bd_intf_net -intf_net Conn1 [get_bd_intf_pins S_AXIS7] [get_bd_intf_pins axis_4s_combine_decimate/S_AXIS7]
  connect_bd_intf_net -intf_net Conn2 [get_bd_intf_pins S_AXIS8] [get_bd_intf_pins axis_4s_combine_decimate/S_AXIS8]
  connect_bd_intf_net -intf_net Conn3 [get_bd_intf_pins S_AXIS6] [get_bd_intf_pins axis_4s_combine_decimate/S_AXIS6]
  connect_bd_intf_net -intf_net PS_Amplitude_Controller_M_AXIS_CONTROL2 [get_bd_intf_pins S_AXIS2] [get_bd_intf_pins axis_4s_combine_decimate/S_AXIS2]
  connect_bd_intf_net -intf_net PS_Amplitude_Controller_M_AXIS_PASS2 [get_bd_intf_pins S_AXIS5] [get_bd_intf_pins axis_4s_combine_decimate/S_AXIS5]
  connect_bd_intf_net -intf_net PS_BRAM_PORTA [get_bd_intf_pins BRAM_PORTB] [get_bd_intf_pins blk_mem_gen_pacpll/BRAM_PORTB]
  connect_bd_intf_net -intf_net PS_Phase_Controller_M_AXIS_CONTROL2 [get_bd_intf_pins S_AXIS3] [get_bd_intf_pins axis_4s_combine_decimate/S_AXIS3]
  connect_bd_intf_net -intf_net PS_Phase_Controller_M_AXIS_PASS2 [get_bd_intf_pins S_AXIS4] [get_bd_intf_pins axis_4s_combine_decimate/S_AXIS4]
  connect_bd_intf_net -intf_net PulseForm_0_M_AXIS [get_bd_intf_pins M_AXIS_aux] [get_bd_intf_pins PulseFormer/M_AXIS]
  connect_bd_intf_net -intf_net axis_4s_combine_decimate_M_AXIS_CH1 [get_bd_intf_pins axis_4s_combine_decimate/M_AXIS_CH1] [get_bd_intf_pins axis_FIR_CH1/S_AXIS]
  connect_bd_intf_net -intf_net axis_4s_combine_decimate_M_AXIS_CH2 [get_bd_intf_pins axis_4s_combine_decimate/M_AXIS_CH2] [get_bd_intf_pins axis_FIR_CH2/S_AXIS]
  connect_bd_intf_net -intf_net axis_4s_combine_decimate_M_AXIS_CH3 [get_bd_intf_pins axis_4s_combine_decimate/M_AXIS_CH3] [get_bd_intf_pins axis_FIR_CH3/S_AXIS]
  connect_bd_intf_net -intf_net axis_4s_combine_decimate_M_AXIS_CH4 [get_bd_intf_pins axis_4s_combine_decimate/M_AXIS_CH4] [get_bd_intf_pins axis_FIR_CH4/S_AXIS]
  connect_bd_intf_net -intf_net axis_4s_combine_decimate_M_AXIS_DFREQ_DEC [get_bd_intf_pins axis_4s_combine_decimate/M_AXIS_DFREQ_DEC] [get_bd_intf_pins McBSP_controller_0/S_AXIS5]
  connect_bd_intf_net -intf_net axis_4s_combine_decimate_M_AXIS_DFREQ_DEC2 [get_bd_intf_pins axis_4s_combine_decimate/M_AXIS_DFREQ_DEC2] [get_bd_intf_pins controller_dfreq/S_AXIS]
  connect_bd_intf_net -intf_net axis_FIR_CH1_M_AXIS [get_bd_intf_pins axis_FIR_CH1/M_AXIS] [get_bd_intf_pins McBSP_controller_0/S_AXIS1]
  connect_bd_intf_net -intf_net axis_FIR_CH1_M_AXIS2 [get_bd_intf_pins M_AXIS2] [get_bd_intf_pins axis_FIR_CH1/M_AXIS2]
  connect_bd_intf_net -intf_net axis_FIR_CH2_M_AXIS [get_bd_intf_pins axis_FIR_CH2/M_AXIS] [get_bd_intf_pins McBSP_controller_0/S_AXIS2]
  connect_bd_intf_net -intf_net axis_FIR_CH2_M_AXIS2 [get_bd_intf_pins M_AXIS3] [get_bd_intf_pins axis_FIR_CH2/M_AXIS2]
  connect_bd_intf_net -intf_net axis_FIR_CH3_M_AXIS [get_bd_intf_pins axis_FIR_CH3/M_AXIS] [get_bd_intf_pins McBSP_controller_0/S_AXIS3]
  connect_bd_intf_net -intf_net axis_FIR_CH3_M_AXIS2 [get_bd_intf_pins M_AXIS4] [get_bd_intf_pins axis_FIR_CH3/M_AXIS2]
  connect_bd_intf_net -intf_net axis_FIR_CH4_M_AXIS [get_bd_intf_pins axis_FIR_CH4/M_AXIS] [get_bd_intf_pins McBSP_controller_0/S_AXIS4]
  connect_bd_intf_net -intf_net axis_FIR_CH4_M_AXIS2 [get_bd_intf_pins M_AXIS5] [get_bd_intf_pins axis_FIR_CH4/M_AXIS2]
  connect_bd_intf_net -intf_net axis_splitter_0_M_AXIS [get_bd_intf_pins axis_splitter_dFreqCrtl/M_AXIS] [get_bd_intf_pins McBSP_controller_0/S_AXIS8]
  connect_bd_intf_net -intf_net axis_splitter_0_M_AXIS2 [get_bd_intf_pins M_AXIS6] [get_bd_intf_pins axis_splitter_dFreqCrtl/M_AXIS2]
  connect_bd_intf_net -intf_net controller_dfreq_M_AXIS_CONTROL [get_bd_intf_pins controller_dfreq/M_AXIS_CONTROL] [get_bd_intf_pins axis_splitter_dFreqCrtl/S_AXIS]
  connect_bd_intf_net -intf_net controller_dfreq_M_AXIS_CONTROL2 [get_bd_intf_pins axis_4s_combine_decimate/S_AXIS1S] [get_bd_intf_pins controller_dfreq/M_AXIS_CONTROL2]
  connect_bd_intf_net -intf_net lms_phase_amplitude_detector_0_M_AXIS_SIGNAL [get_bd_intf_pins S_AXIS1] [get_bd_intf_pins axis_4s_combine_decimate/S_AXIS1]

  # Create port connections
  connect_bd_net -net McBSP_controller_0_mcbsp_data_clkr [get_bd_pins McBSP_controller_0/mcbsp_data_clkr] [get_bd_pins McBSP_io_connect_0/McBSP_clkr]
  connect_bd_net -net McBSP_controller_0_mcbsp_data_frm [get_bd_pins McBSP_controller_0/mcbsp_data_frm] [get_bd_pins McBSP_io_connect_0/McBSP_frm] [get_bd_pins McBSP_Frame]
  connect_bd_net -net McBSP_controller_0_mcbsp_data_fsx [get_bd_pins McBSP_controller_0/mcbsp_data_fsx] [get_bd_pins McBSP_io_connect_0/McBSP_fsx]
  connect_bd_net -net McBSP_controller_0_mcbsp_data_tx [get_bd_pins McBSP_controller_0/mcbsp_data_tx] [get_bd_pins McBSP_io_connect_0/McBSP_tx]
  connect_bd_net -net McBSP_controller_0_trigger [get_bd_pins McBSP_controller_0/trigger] [get_bd_pins axis_4s_combine_decimate/ext_trigger]
  connect_bd_net -net McBSP_io_connect_0_McBSP_clk [get_bd_pins McBSP_io_connect_0/McBSP_clk] [get_bd_pins McBSP_controller_0/mcbsp_clk]
  connect_bd_net -net McBSP_io_connect_0_McBSP_fs [get_bd_pins McBSP_io_connect_0/McBSP_fs] [get_bd_pins McBSP_controller_0/mcbsp_frame_start]
  connect_bd_net -net McBSP_io_connect_0_McBSP_nrx [get_bd_pins McBSP_io_connect_0/McBSP_nrx] [get_bd_pins McBSP_controller_0/mcbsp_data_nrx]
  connect_bd_net -net McBSP_io_connect_0_McBSP_rx [get_bd_pins McBSP_io_connect_0/McBSP_rx] [get_bd_pins McBSP_controller_0/mcbsp_data_rx]
  connect_bd_net -net Net [get_bd_pins exp_p_io] [get_bd_pins McBSP_io_connect_0/exp_p_io]
  connect_bd_net -net Net1 [get_bd_pins exp_n_io] [get_bd_pins McBSP_io_connect_0/exp_n_io]
  connect_bd_net -net axis_4s_combine_0_BR_ch1s [get_bd_pins axis_4s_combine_decimate/BR_ch1s] [get_bd_pins axis_bram_push2ch64/ch1s]
  connect_bd_net -net axis_4s_combine_0_BR_ch2s [get_bd_pins axis_4s_combine_decimate/BR_ch2s] [get_bd_pins axis_bram_push2ch64/ch2s]
  connect_bd_net -net axis_4s_combine_0_BR_reset [get_bd_pins axis_4s_combine_decimate/BR_reset] [get_bd_pins axis_bram_push2ch64/reset]
  connect_bd_net -net axis_4s_combine_0_bram_porta_addr [get_bd_pins axis_bram_push2ch64/BRAM_PORTA_addr] [get_bd_pins blk_mem_gen_pacpll/addra]
  connect_bd_net -net axis_4s_combine_0_bram_porta_clk [get_bd_pins axis_bram_push2ch64/BRAM_PORTA_clk] [get_bd_pins blk_mem_gen_pacpll/clka]
  connect_bd_net -net axis_4s_combine_0_bram_porta_en [get_bd_pins axis_bram_push2ch64/BRAM_PORTA_en] [get_bd_pins blk_mem_gen_pacpll/ena]
  connect_bd_net -net axis_4s_combine_0_bram_porta_we [get_bd_pins axis_bram_push2ch64/BRAM_PORTA_we] [get_bd_pins blk_mem_gen_pacpll/wea]
  connect_bd_net -net axis_4s_combine_0_bram_porta_wrdata [get_bd_pins axis_bram_push2ch64/BRAM_PORTA_din] [get_bd_pins blk_mem_gen_pacpll/dina]
  connect_bd_net -net axis_4s_combine_0_writeposition [get_bd_pins axis_4s_combine_decimate/writeposition] [get_bd_pins writeposition]
  connect_bd_net -net axis_4s_combine_decimate_BR_next [get_bd_pins axis_4s_combine_decimate/BR_next] [get_bd_pins axis_bram_push2ch64/push_next]
  connect_bd_net -net axis_4s_combine_decimate_FIR_next [get_bd_pins axis_4s_combine_decimate/FIR_next] [get_bd_pins axis_FIR_CH1/next_dv] [get_bd_pins axis_FIR_CH2/next_dv] [get_bd_pins axis_FIR_CH3/next_dv] [get_bd_pins axis_FIR_CH4/next_dv]
  connect_bd_net -net axis_4s_combine_decimate_delta_frequency_monitor [get_bd_pins axis_4s_combine_decimate/delta_frequency_monitor] [get_bd_pins delta_frequency_monitor]
  connect_bd_net -net axis_bram_push2ch64_last_write_addr [get_bd_pins axis_bram_push2ch64/last_write_addr] [get_bd_pins axis_4s_combine_decimate/BR_wpos]
  connect_bd_net -net axis_bram_push_0_ready [get_bd_pins axis_bram_push2ch64/ready] [get_bd_pins axis_4s_combine_decimate/BR_ready]
  connect_bd_net -net axis_red_pitaya_adc_0_adc_clk [get_bd_pins a_clk] [get_bd_pins PulseFormer/a_clk] [get_bd_pins controller_dfreq/a_clk] [get_bd_pins axis_4s_combine_decimate/a_clk] [get_bd_pins McBSP_controller_0/a_clk] [get_bd_pins cfg18_19_to_transport_auxcenter/a_clk] [get_bd_pins cfg_to_transport_channel_select/a_clk] [get_bd_pins cfg_to_transport_control/a_clk] [get_bd_pins cfg_to_transport_decimation/a_clk] [get_bd_pins cfg_to_transport_nsamples/a_clk] [get_bd_pins axis_bram_push2ch64/a2_clk] [get_bd_pins axis_FIR_CH1/a_clk] [get_bd_pins axis_FIR_CH2/a_clk] [get_bd_pins axis_FIR_CH3/a_clk] [get_bd_pins axis_FIR_CH4/a_clk] [get_bd_pins axis_splitter_dFreqCrtl/a_clk]
  connect_bd_net -net cfg18_19_to_transport_auxcenter_data [get_bd_pins cfg18_19_to_transport_auxcenter/data] [get_bd_pins axis_4s_combine_decimate/axis3_center]
  connect_bd_net -net cfg2_1 [get_bd_pins cfg2] [get_bd_pins PulseFormer/cfg2]
  connect_bd_net -net cfg_1 [get_bd_pins cfg0] [get_bd_pins controller_dfreq/cfg1] [get_bd_pins cfg18_19_to_transport_auxcenter/cfg] [get_bd_pins cfg_to_transport_channel_select/cfg] [get_bd_pins cfg_to_transport_control/cfg] [get_bd_pins cfg_to_transport_decimation/cfg] [get_bd_pins cfg_to_transport_nsamples/cfg]
  connect_bd_net -net cfg_2 [get_bd_pins cfg1] [get_bd_pins controller_dfreq/cfg]
  connect_bd_net -net cfg_to_channel_select_data [get_bd_pins cfg_to_transport_channel_select/data] [get_bd_pins axis_4s_combine_decimate/channel_selector]
  connect_bd_net -net cfg_to_transport_channel_select1_data [get_bd_pins cfg_to_transport_nsamples/data] [get_bd_pins axis_4s_combine_decimate/nsamples]
  connect_bd_net -net cfg_to_transport_control_data [get_bd_pins cfg_to_transport_control/data] [get_bd_pins axis_4s_combine_decimate/operation]
  connect_bd_net -net cfg_to_transport_data [get_bd_pins cfg_to_transport_decimation/data] [get_bd_pins axis_4s_combine_decimate/ndecimate]
  connect_bd_net -net const_zero1_dout [get_bd_pins const_zero1/dout] [get_bd_pins controller_dfreq/S_AXIS_reset_tdata]
  connect_bd_net -net const_zero_dout [get_bd_pins const_zero/dout] [get_bd_pins controller_dfreq/control_hold]
  connect_bd_net -net controller_dfreq_enable [get_bd_pins controller_dfreq/enable] [get_bd_pins enable]
  connect_bd_net -net controller_dfreq_mon_control [get_bd_pins controller_dfreq/mon_control] [get_bd_pins mon_control]
  connect_bd_net -net zero_spcp_1 [get_bd_pins zero_spcp] [get_bd_pins PulseFormer/zero_spcp]

  # Restore current instance
  current_bd_instance $oldCurInst
}
  
# Hierarchical cell: PS
proc create_hier_cell_PS { parentCell nameHier } {

  variable script_folder

  if { $parentCell eq "" || $nameHier eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2092 -severity "ERROR" "create_hier_cell_PS() - Empty argument(s)!"}
     return
  }

  # Get object for parentCell
  set parentObj [get_bd_cells $parentCell]
  if { $parentObj == "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2090 -severity "ERROR" "Unable to find parent cell <$parentCell>!"}
     return
  }

  # Make sure parentObj is hier blk
  set parentType [get_property TYPE $parentObj]
  if { $parentType ne "hier" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2091 -severity "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be <hier>."}
     return
  }

  # Save current instance; Restore later
  set oldCurInst [current_bd_instance .]

  # Set parent object as current
  current_bd_instance $parentObj

  # Create cell and set as current instance
  set hier_obj [create_bd_cell -type hier $nameHier]
  current_bd_instance $hier_obj

  # Create interface pins
  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:bram_rtl:1.0 BRAM_PORTA_PACPLL

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:ddrx_rtl:1.0 DDR

  create_bd_intf_pin -mode Master -vlnv xilinx.com:display_processing_system7:fixedio_rtl:1.0 FIXED_IO

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:bram_rtl:1.0 BRAM_PORTA_SPMC


  # Create pins
  create_bd_pin -dir O -from 1023 -to 0 cfg_data_reg_0
  create_bd_pin -dir O -from 1023 -to 0 cfg_data_reg_1
  create_bd_pin -dir O -from 1023 -to 0 cfg_data_reg_2
  create_bd_pin -dir O -from 1023 -to 0 cfg_data_reg_3
  create_bd_pin -dir I -from 31 -to 0 gpio_io_0_x1
  create_bd_pin -dir I -from 31 -to 0 gpio_io_0_x2
  create_bd_pin -dir I -from 31 -to 0 gpio_io_1_x3
  create_bd_pin -dir I -from 31 -to 0 gpio_io_1_x4
  create_bd_pin -dir I -from 31 -to 0 gpio_io_2_x5
  create_bd_pin -dir I -from 31 -to 0 gpio_io_2_x6
  create_bd_pin -dir I -from 31 -to 0 gpio_io_3_x7
  create_bd_pin -dir I -from 31 -to 0 gpio_io_3_x8
  create_bd_pin -dir I -from 31 -to 0 gpio_io_4_x9
  create_bd_pin -dir I -from 31 -to 0 gpio_io_4_x10
  create_bd_pin -dir I -from 31 -to 0 gpio_io_5_x11
  create_bd_pin -dir I -from 31 -to 0 gpio_io_5_x12
  create_bd_pin -dir I -from 31 -to 0 gpio_io_7_x15
  create_bd_pin -dir I -from 31 -to 0 gpio_io_7_x16
  create_bd_pin -dir I -from 31 -to 0 gpio_io_8_x17
  create_bd_pin -dir I -from 31 -to 0 gpio_io_8_x18
  create_bd_pin -dir I -from 31 -to 0 gpio_io_6_x13
  create_bd_pin -dir I -from 31 -to 0 gpio_io_6_x14
  create_bd_pin -dir I -from 31 -to 0 gpio_io_9_x19
  create_bd_pin -dir I -from 31 -to 0 gpio2_io_9_x20
  create_bd_pin -dir I -from 15 -to 0 gpio_io_10_x21
  create_bd_pin -dir I -from 31 -to 0 gpio_io_10_x22

  # Create instance: axi_bram_reader_0, and set properties
  set axi_bram_reader_0 [ create_bd_cell -type ip -vlnv anton-potocnik:user:axi_bram_reader:1.0 axi_bram_reader_0 ]
  set_property -dict [list \
    CONFIG.BRAM_ADDR_WIDTH {14} \
    CONFIG.C_S00_AXI_ADDR_WIDTH {16} \
  ] $axi_bram_reader_0


  # Create instance: axi_cfg_register_0, and set properties
  set axi_cfg_register_0 [ create_bd_cell -type ip -vlnv pavel-demin:user:axi_cfg_register:1.0 axi_cfg_register_0 ]
  set_property -dict [list \
    CONFIG.AXI_ADDR_WIDTH {16} \
    CONFIG.AXI_DATA_WIDTH {32} \
    CONFIG.CFG_DATA_WIDTH {3072} \
  ] $axi_cfg_register_0


  # Create instance: processing_system7_Zynq, and set properties
  set processing_system7_Zynq [ create_bd_cell -type ip -vlnv xilinx.com:ip:processing_system7:5.5 processing_system7_Zynq ]
  set_property -dict [list \
    CONFIG.PCW_ACT_APU_PERIPHERAL_FREQMHZ {666.666687} \
    CONFIG.PCW_ACT_CAN0_PERIPHERAL_FREQMHZ {23.8095} \
    CONFIG.PCW_ACT_CAN1_PERIPHERAL_FREQMHZ {23.8095} \
    CONFIG.PCW_ACT_CAN_PERIPHERAL_FREQMHZ {10.000000} \
    CONFIG.PCW_ACT_DCI_PERIPHERAL_FREQMHZ {10.158730} \
    CONFIG.PCW_ACT_ENET0_PERIPHERAL_FREQMHZ {125.000000} \
    CONFIG.PCW_ACT_ENET1_PERIPHERAL_FREQMHZ {10.000000} \
    CONFIG.PCW_ACT_FPGA0_PERIPHERAL_FREQMHZ {100.000000} \
    CONFIG.PCW_ACT_FPGA1_PERIPHERAL_FREQMHZ {20.000000} \
    CONFIG.PCW_ACT_FPGA2_PERIPHERAL_FREQMHZ {10.000000} \
    CONFIG.PCW_ACT_FPGA3_PERIPHERAL_FREQMHZ {10.000000} \
    CONFIG.PCW_ACT_I2C_PERIPHERAL_FREQMHZ {50} \
    CONFIG.PCW_ACT_PCAP_PERIPHERAL_FREQMHZ {200.000000} \
    CONFIG.PCW_ACT_QSPI_PERIPHERAL_FREQMHZ {125.000000} \
    CONFIG.PCW_ACT_SDIO_PERIPHERAL_FREQMHZ {100.000000} \
    CONFIG.PCW_ACT_SMC_PERIPHERAL_FREQMHZ {10.000000} \
    CONFIG.PCW_ACT_SPI_PERIPHERAL_FREQMHZ {166.666672} \
    CONFIG.PCW_ACT_TPIU_PERIPHERAL_FREQMHZ {200.000000} \
    CONFIG.PCW_ACT_TTC0_CLK0_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_ACT_TTC0_CLK1_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_ACT_TTC0_CLK2_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_ACT_TTC1_CLK0_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_ACT_TTC1_CLK1_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_ACT_TTC1_CLK2_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_ACT_TTC_PERIPHERAL_FREQMHZ {50} \
    CONFIG.PCW_ACT_UART_PERIPHERAL_FREQMHZ {100.000000} \
    CONFIG.PCW_ACT_USB0_PERIPHERAL_FREQMHZ {60} \
    CONFIG.PCW_ACT_USB1_PERIPHERAL_FREQMHZ {60} \
    CONFIG.PCW_ACT_WDT_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_APU_CLK_RATIO_ENABLE {6:2:1} \
    CONFIG.PCW_APU_PERIPHERAL_FREQMHZ {666.666666} \
    CONFIG.PCW_CAN0_PERIPHERAL_CLKSRC {External} \
    CONFIG.PCW_CAN0_PERIPHERAL_ENABLE {0} \
    CONFIG.PCW_CAN1_PERIPHERAL_CLKSRC {External} \
    CONFIG.PCW_CAN1_PERIPHERAL_ENABLE {0} \
    CONFIG.PCW_CAN_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_CAN_PERIPHERAL_VALID {0} \
    CONFIG.PCW_CLK0_FREQ {100000000} \
    CONFIG.PCW_CLK1_FREQ {20000000} \
    CONFIG.PCW_CLK2_FREQ {10000000} \
    CONFIG.PCW_CLK3_FREQ {10000000} \
    CONFIG.PCW_CPU_CPU_6X4X_MAX_RANGE {667} \
    CONFIG.PCW_CPU_PERIPHERAL_CLKSRC {ARM PLL} \
    CONFIG.PCW_CRYSTAL_PERIPHERAL_FREQMHZ {33.333333} \
    CONFIG.PCW_DCI_PERIPHERAL_CLKSRC {DDR PLL} \
    CONFIG.PCW_DCI_PERIPHERAL_FREQMHZ {10.159} \
    CONFIG.PCW_DDR_PERIPHERAL_CLKSRC {DDR PLL} \
    CONFIG.PCW_DDR_RAM_BASEADDR {0x00100000} \
    CONFIG.PCW_DDR_RAM_HIGHADDR {0x1FFFFFFF} \
    CONFIG.PCW_DM_WIDTH {4} \
    CONFIG.PCW_DQS_WIDTH {4} \
    CONFIG.PCW_DQ_WIDTH {32} \
    CONFIG.PCW_ENET0_BASEADDR {0xE000B000} \
    CONFIG.PCW_ENET0_ENET0_IO {MIO 16 .. 27} \
    CONFIG.PCW_ENET0_GRP_MDIO_ENABLE {1} \
    CONFIG.PCW_ENET0_GRP_MDIO_IO {EMIO} \
    CONFIG.PCW_ENET0_HIGHADDR {0xE000BFFF} \
    CONFIG.PCW_ENET0_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_ENET0_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_ENET0_PERIPHERAL_FREQMHZ {1000 Mbps} \
    CONFIG.PCW_ENET0_RESET_ENABLE {0} \
    CONFIG.PCW_ENET1_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_ENET1_PERIPHERAL_ENABLE {0} \
    CONFIG.PCW_ENET_RESET_ENABLE {1} \
    CONFIG.PCW_ENET_RESET_POLARITY {Active Low} \
    CONFIG.PCW_ENET_RESET_SELECT {Share reset pin} \
    CONFIG.PCW_EN_4K_TIMER {0} \
    CONFIG.PCW_EN_CAN0 {0} \
    CONFIG.PCW_EN_CAN1 {0} \
    CONFIG.PCW_EN_CLK0_PORT {1} \
    CONFIG.PCW_EN_CLK1_PORT {1} \
    CONFIG.PCW_EN_CLK2_PORT {0} \
    CONFIG.PCW_EN_CLK3_PORT {0} \
    CONFIG.PCW_EN_CLKTRIG0_PORT {0} \
    CONFIG.PCW_EN_CLKTRIG1_PORT {0} \
    CONFIG.PCW_EN_CLKTRIG2_PORT {0} \
    CONFIG.PCW_EN_CLKTRIG3_PORT {0} \
    CONFIG.PCW_EN_DDR {1} \
    CONFIG.PCW_EN_EMIO_CAN0 {0} \
    CONFIG.PCW_EN_EMIO_CAN1 {0} \
    CONFIG.PCW_EN_EMIO_CD_SDIO0 {0} \
    CONFIG.PCW_EN_EMIO_CD_SDIO1 {0} \
    CONFIG.PCW_EN_EMIO_ENET0 {0} \
    CONFIG.PCW_EN_EMIO_ENET1 {0} \
    CONFIG.PCW_EN_EMIO_GPIO {0} \
    CONFIG.PCW_EN_EMIO_I2C0 {0} \
    CONFIG.PCW_EN_EMIO_I2C1 {0} \
    CONFIG.PCW_EN_EMIO_MODEM_UART0 {0} \
    CONFIG.PCW_EN_EMIO_MODEM_UART1 {0} \
    CONFIG.PCW_EN_EMIO_PJTAG {0} \
    CONFIG.PCW_EN_EMIO_SDIO0 {0} \
    CONFIG.PCW_EN_EMIO_SDIO1 {0} \
    CONFIG.PCW_EN_EMIO_SPI0 {1} \
    CONFIG.PCW_EN_EMIO_SPI1 {0} \
    CONFIG.PCW_EN_EMIO_SRAM_INT {0} \
    CONFIG.PCW_EN_EMIO_TRACE {0} \
    CONFIG.PCW_EN_EMIO_TTC0 {1} \
    CONFIG.PCW_EN_EMIO_TTC1 {0} \
    CONFIG.PCW_EN_EMIO_UART0 {0} \
    CONFIG.PCW_EN_EMIO_UART1 {0} \
    CONFIG.PCW_EN_EMIO_WDT {0} \
    CONFIG.PCW_EN_EMIO_WP_SDIO0 {0} \
    CONFIG.PCW_EN_EMIO_WP_SDIO1 {0} \
    CONFIG.PCW_EN_ENET0 {1} \
    CONFIG.PCW_EN_ENET1 {0} \
    CONFIG.PCW_EN_GPIO {1} \
    CONFIG.PCW_EN_I2C0 {1} \
    CONFIG.PCW_EN_I2C1 {0} \
    CONFIG.PCW_EN_MODEM_UART0 {0} \
    CONFIG.PCW_EN_MODEM_UART1 {0} \
    CONFIG.PCW_EN_PJTAG {0} \
    CONFIG.PCW_EN_PTP_ENET0 {0} \
    CONFIG.PCW_EN_PTP_ENET1 {0} \
    CONFIG.PCW_EN_QSPI {1} \
    CONFIG.PCW_EN_RST0_PORT {1} \
    CONFIG.PCW_EN_RST1_PORT {0} \
    CONFIG.PCW_EN_RST2_PORT {0} \
    CONFIG.PCW_EN_RST3_PORT {0} \
    CONFIG.PCW_EN_SDIO0 {1} \
    CONFIG.PCW_EN_SDIO1 {0} \
    CONFIG.PCW_EN_SMC {0} \
    CONFIG.PCW_EN_SPI0 {1} \
    CONFIG.PCW_EN_SPI1 {1} \
    CONFIG.PCW_EN_TRACE {0} \
    CONFIG.PCW_EN_TTC0 {1} \
    CONFIG.PCW_EN_TTC1 {0} \
    CONFIG.PCW_EN_UART0 {1} \
    CONFIG.PCW_EN_UART1 {1} \
    CONFIG.PCW_EN_USB0 {1} \
    CONFIG.PCW_EN_USB1 {0} \
    CONFIG.PCW_EN_WDT {0} \
    CONFIG.PCW_FCLK0_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_FCLK1_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_FCLK2_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_FCLK3_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_FCLK_CLK0_BUF {TRUE} \
    CONFIG.PCW_FCLK_CLK1_BUF {TRUE} \
    CONFIG.PCW_FPGA0_PERIPHERAL_FREQMHZ {100} \
    CONFIG.PCW_FPGA1_PERIPHERAL_FREQMHZ {20} \
    CONFIG.PCW_FPGA2_PERIPHERAL_FREQMHZ {50} \
    CONFIG.PCW_FPGA3_PERIPHERAL_FREQMHZ {200} \
    CONFIG.PCW_FPGA_FCLK0_ENABLE {1} \
    CONFIG.PCW_FPGA_FCLK1_ENABLE {1} \
    CONFIG.PCW_GP0_EN_MODIFIABLE_TXN {1} \
    CONFIG.PCW_GP0_NUM_READ_THREADS {4} \
    CONFIG.PCW_GP0_NUM_WRITE_THREADS {4} \
    CONFIG.PCW_GP1_EN_MODIFIABLE_TXN {1} \
    CONFIG.PCW_GP1_NUM_READ_THREADS {4} \
    CONFIG.PCW_GP1_NUM_WRITE_THREADS {4} \
    CONFIG.PCW_GPIO_BASEADDR {0xE000A000} \
    CONFIG.PCW_GPIO_EMIO_GPIO_ENABLE {0} \
    CONFIG.PCW_GPIO_HIGHADDR {0xE000AFFF} \
    CONFIG.PCW_GPIO_MIO_GPIO_ENABLE {1} \
    CONFIG.PCW_GPIO_MIO_GPIO_IO {MIO} \
    CONFIG.PCW_GPIO_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_I2C0_BASEADDR {0xE0004000} \
    CONFIG.PCW_I2C0_GRP_INT_ENABLE {0} \
    CONFIG.PCW_I2C0_HIGHADDR {0xE0004FFF} \
    CONFIG.PCW_I2C0_I2C0_IO {MIO 50 .. 51} \
    CONFIG.PCW_I2C0_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_I2C0_RESET_ENABLE {0} \
    CONFIG.PCW_I2C1_PERIPHERAL_ENABLE {0} \
    CONFIG.PCW_I2C_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_I2C_RESET_ENABLE {1} \
    CONFIG.PCW_I2C_RESET_POLARITY {Active Low} \
    CONFIG.PCW_I2C_RESET_SELECT {Share reset pin} \
    CONFIG.PCW_IMPORT_BOARD_PRESET {cfg/red_pitaya.xml} \
    CONFIG.PCW_INCLUDE_ACP_TRANS_CHECK {0} \
    CONFIG.PCW_IRQ_F2P_MODE {DIRECT} \
    CONFIG.PCW_MIO_0_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_0_PULLUP {disabled} \
    CONFIG.PCW_MIO_0_SLEW {slow} \
    CONFIG.PCW_MIO_10_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_10_PULLUP {enabled} \
    CONFIG.PCW_MIO_10_SLEW {slow} \
    CONFIG.PCW_MIO_11_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_11_PULLUP {enabled} \
    CONFIG.PCW_MIO_11_SLEW {slow} \
    CONFIG.PCW_MIO_12_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_12_PULLUP {enabled} \
    CONFIG.PCW_MIO_12_SLEW {slow} \
    CONFIG.PCW_MIO_13_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_13_PULLUP {enabled} \
    CONFIG.PCW_MIO_13_SLEW {slow} \
    CONFIG.PCW_MIO_14_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_14_PULLUP {enabled} \
    CONFIG.PCW_MIO_14_SLEW {slow} \
    CONFIG.PCW_MIO_15_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_15_PULLUP {enabled} \
    CONFIG.PCW_MIO_15_SLEW {slow} \
    CONFIG.PCW_MIO_16_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_16_PULLUP {disabled} \
    CONFIG.PCW_MIO_16_SLEW {fast} \
    CONFIG.PCW_MIO_17_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_17_PULLUP {disabled} \
    CONFIG.PCW_MIO_17_SLEW {fast} \
    CONFIG.PCW_MIO_18_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_18_PULLUP {disabled} \
    CONFIG.PCW_MIO_18_SLEW {fast} \
    CONFIG.PCW_MIO_19_IOTYPE {out} \
    CONFIG.PCW_MIO_19_PULLUP {disabled} \
    CONFIG.PCW_MIO_19_SLEW {fast} \
    CONFIG.PCW_MIO_1_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_1_PULLUP {enabled} \
    CONFIG.PCW_MIO_1_SLEW {slow} \
    CONFIG.PCW_MIO_20_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_20_PULLUP {disabled} \
    CONFIG.PCW_MIO_20_SLEW {fast} \
    CONFIG.PCW_MIO_21_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_21_PULLUP {disabled} \
    CONFIG.PCW_MIO_21_SLEW {fast} \
    CONFIG.PCW_MIO_22_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_22_PULLUP {disabled} \
    CONFIG.PCW_MIO_22_SLEW {fast} \
    CONFIG.PCW_MIO_23_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_23_PULLUP {disabled} \
    CONFIG.PCW_MIO_23_SLEW {fast} \
    CONFIG.PCW_MIO_24_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_24_PULLUP {disabled} \
    CONFIG.PCW_MIO_24_SLEW {fast} \
    CONFIG.PCW_MIO_25_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_25_PULLUP {disabled} \
    CONFIG.PCW_MIO_25_SLEW {fast} \
    CONFIG.PCW_MIO_26_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_26_PULLUP {disabled} \
    CONFIG.PCW_MIO_26_SLEW {fast} \
    CONFIG.PCW_MIO_27_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_27_PULLUP {disabled} \
    CONFIG.PCW_MIO_27_SLEW {fast} \
    CONFIG.PCW_MIO_28_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_28_PULLUP {enabled} \
    CONFIG.PCW_MIO_28_SLEW {fast} \
    CONFIG.PCW_MIO_29_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_29_PULLUP {enabled} \
    CONFIG.PCW_MIO_29_SLEW {fast} \
    CONFIG.PCW_MIO_2_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_2_SLEW {slow} \
    CONFIG.PCW_MIO_30_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_30_PULLUP {enabled} \
    CONFIG.PCW_MIO_30_SLEW {fast} \
    CONFIG.PCW_MIO_31_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_31_PULLUP {enabled} \
    CONFIG.PCW_MIO_31_SLEW {fast} \
    CONFIG.PCW_MIO_32_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_32_PULLUP {enabled} \
    CONFIG.PCW_MIO_32_SLEW {fast} \
    CONFIG.PCW_MIO_33_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_33_PULLUP {enabled} \
    CONFIG.PCW_MIO_33_SLEW {fast} \
    CONFIG.PCW_MIO_34_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_34_PULLUP {enabled} \
    CONFIG.PCW_MIO_34_SLEW {fast} \
    CONFIG.PCW_MIO_35_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_35_PULLUP {enabled} \
    CONFIG.PCW_MIO_35_SLEW {fast} \
    CONFIG.PCW_MIO_36_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_36_PULLUP {enabled} \
    CONFIG.PCW_MIO_36_SLEW {fast} \
    CONFIG.PCW_MIO_37_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_37_PULLUP {enabled} \
    CONFIG.PCW_MIO_37_SLEW {fast} \
    CONFIG.PCW_MIO_38_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_38_PULLUP {enabled} \
    CONFIG.PCW_MIO_38_SLEW {fast} \
    CONFIG.PCW_MIO_39_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_39_PULLUP {enabled} \
    CONFIG.PCW_MIO_39_SLEW {fast} \
    CONFIG.PCW_MIO_3_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_3_SLEW {slow} \
    CONFIG.PCW_MIO_40_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_40_PULLUP {enabled} \
    CONFIG.PCW_MIO_40_SLEW {slow} \
    CONFIG.PCW_MIO_41_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_41_PULLUP {enabled} \
    CONFIG.PCW_MIO_41_SLEW {slow} \
    CONFIG.PCW_MIO_42_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_42_PULLUP {enabled} \
    CONFIG.PCW_MIO_42_SLEW {slow} \
    CONFIG.PCW_MIO_43_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_43_PULLUP {enabled} \
    CONFIG.PCW_MIO_43_SLEW {slow} \
    CONFIG.PCW_MIO_44_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_44_PULLUP {enabled} \
    CONFIG.PCW_MIO_44_SLEW {slow} \
    CONFIG.PCW_MIO_45_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_45_PULLUP {enabled} \
    CONFIG.PCW_MIO_45_SLEW {slow} \
    CONFIG.PCW_MIO_46_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_46_PULLUP {enabled} \
    CONFIG.PCW_MIO_46_SLEW {slow} \
    CONFIG.PCW_MIO_47_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_47_PULLUP {enabled} \
    CONFIG.PCW_MIO_47_SLEW {slow} \
    CONFIG.PCW_MIO_48_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_48_PULLUP {enabled} \
    CONFIG.PCW_MIO_48_SLEW {slow} \
    CONFIG.PCW_MIO_49_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_49_PULLUP {enabled} \
    CONFIG.PCW_MIO_49_SLEW {slow} \
    CONFIG.PCW_MIO_4_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_4_SLEW {slow} \
    CONFIG.PCW_MIO_50_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_50_PULLUP {enabled} \
    CONFIG.PCW_MIO_50_SLEW {slow} \
    CONFIG.PCW_MIO_51_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_51_PULLUP {enabled} \
    CONFIG.PCW_MIO_51_SLEW {slow} \
    CONFIG.PCW_MIO_52_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_52_PULLUP {enabled} \
    CONFIG.PCW_MIO_52_SLEW {slow} \
    CONFIG.PCW_MIO_53_IOTYPE {LVCMOS 2.5V} \
    CONFIG.PCW_MIO_53_PULLUP {enabled} \
    CONFIG.PCW_MIO_53_SLEW {slow} \
    CONFIG.PCW_MIO_5_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_5_SLEW {slow} \
    CONFIG.PCW_MIO_6_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_6_SLEW {slow} \
    CONFIG.PCW_MIO_7_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_7_SLEW {slow} \
    CONFIG.PCW_MIO_8_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_8_SLEW {slow} \
    CONFIG.PCW_MIO_9_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_9_PULLUP {enabled} \
    CONFIG.PCW_MIO_9_SLEW {slow} \
    CONFIG.PCW_MIO_PRIMITIVE {54} \
    CONFIG.PCW_MIO_TREE_PERIPHERALS {GPIO#Quad SPI Flash#Quad SPI Flash#Quad SPI Flash#Quad SPI Flash#Quad SPI Flash#Quad SPI Flash#GPIO#UART 1#UART 1#SPI 1#SPI 1#SPI 1#SPI 1#UART 0#UART 0#Enet 0#Enet\
0#Enet 0#Enet 0#Enet 0#Enet 0#Enet 0#Enet 0#Enet 0#Enet 0#Enet 0#Enet 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#SD 0#SD 0#SD 0#SD 0#SD 0#SD 0#SD 0#SD 0#USB Reset#GPIO#I2C\
0#I2C 0#GPIO#GPIO} \
    CONFIG.PCW_MIO_TREE_SIGNALS {gpio[0]#qspi0_ss_b#qspi0_io[0]#qspi0_io[1]#qspi0_io[2]#qspi0_io[3]/HOLD_B#qspi0_sclk#gpio[7]#tx#rx#mosi#miso#sclk#ss[0]#rx#tx#tx_clk#txd[0]#txd[1]#txd[2]#txd[3]#tx_ctl#rx_clk#rxd[0]#rxd[1]#rxd[2]#rxd[3]#rx_ctl#data[4]#dir#stp#nxt#data[0]#data[1]#data[2]#data[3]#clk#data[5]#data[6]#data[7]#clk#cmd#data[0]#data[1]#data[2]#data[3]#cd#wp#reset#gpio[49]#scl#sda#gpio[52]#gpio[53]}\
\
    CONFIG.PCW_M_AXI_GP0_ENABLE_STATIC_REMAP {0} \
    CONFIG.PCW_M_AXI_GP0_ID_WIDTH {12} \
    CONFIG.PCW_M_AXI_GP0_SUPPORT_NARROW_BURST {0} \
    CONFIG.PCW_M_AXI_GP0_THREAD_ID_WIDTH {12} \
    CONFIG.PCW_NAND_CYCLES_T_AR {1} \
    CONFIG.PCW_NAND_CYCLES_T_CLR {1} \
    CONFIG.PCW_NAND_CYCLES_T_RC {11} \
    CONFIG.PCW_NAND_CYCLES_T_REA {1} \
    CONFIG.PCW_NAND_CYCLES_T_RR {1} \
    CONFIG.PCW_NAND_CYCLES_T_WC {11} \
    CONFIG.PCW_NAND_CYCLES_T_WP {1} \
    CONFIG.PCW_NOR_CS0_T_CEOE {1} \
    CONFIG.PCW_NOR_CS0_T_PC {1} \
    CONFIG.PCW_NOR_CS0_T_RC {11} \
    CONFIG.PCW_NOR_CS0_T_TR {1} \
    CONFIG.PCW_NOR_CS0_T_WC {11} \
    CONFIG.PCW_NOR_CS0_T_WP {1} \
    CONFIG.PCW_NOR_CS0_WE_TIME {0} \
    CONFIG.PCW_NOR_CS1_T_CEOE {1} \
    CONFIG.PCW_NOR_CS1_T_PC {1} \
    CONFIG.PCW_NOR_CS1_T_RC {11} \
    CONFIG.PCW_NOR_CS1_T_TR {1} \
    CONFIG.PCW_NOR_CS1_T_WC {11} \
    CONFIG.PCW_NOR_CS1_T_WP {1} \
    CONFIG.PCW_NOR_CS1_WE_TIME {0} \
    CONFIG.PCW_NOR_SRAM_CS0_T_CEOE {1} \
    CONFIG.PCW_NOR_SRAM_CS0_T_PC {1} \
    CONFIG.PCW_NOR_SRAM_CS0_T_RC {11} \
    CONFIG.PCW_NOR_SRAM_CS0_T_TR {1} \
    CONFIG.PCW_NOR_SRAM_CS0_T_WC {11} \
    CONFIG.PCW_NOR_SRAM_CS0_T_WP {1} \
    CONFIG.PCW_NOR_SRAM_CS0_WE_TIME {0} \
    CONFIG.PCW_NOR_SRAM_CS1_T_CEOE {1} \
    CONFIG.PCW_NOR_SRAM_CS1_T_PC {1} \
    CONFIG.PCW_NOR_SRAM_CS1_T_RC {11} \
    CONFIG.PCW_NOR_SRAM_CS1_T_TR {1} \
    CONFIG.PCW_NOR_SRAM_CS1_T_WC {11} \
    CONFIG.PCW_NOR_SRAM_CS1_T_WP {1} \
    CONFIG.PCW_NOR_SRAM_CS1_WE_TIME {0} \
    CONFIG.PCW_OVERRIDE_BASIC_CLOCK {0} \
    CONFIG.PCW_PACKAGE_DDR_BOARD_DELAY0 {0.080} \
    CONFIG.PCW_PACKAGE_DDR_BOARD_DELAY1 {0.063} \
    CONFIG.PCW_PACKAGE_DDR_BOARD_DELAY2 {0.057} \
    CONFIG.PCW_PACKAGE_DDR_BOARD_DELAY3 {0.068} \
    CONFIG.PCW_PACKAGE_DDR_DQS_TO_CLK_DELAY_0 {-0.047} \
    CONFIG.PCW_PACKAGE_DDR_DQS_TO_CLK_DELAY_1 {-0.025} \
    CONFIG.PCW_PACKAGE_DDR_DQS_TO_CLK_DELAY_2 {-0.006} \
    CONFIG.PCW_PACKAGE_DDR_DQS_TO_CLK_DELAY_3 {-0.017} \
    CONFIG.PCW_PACKAGE_NAME {clg400} \
    CONFIG.PCW_PCAP_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_PCAP_PERIPHERAL_FREQMHZ {200} \
    CONFIG.PCW_PERIPHERAL_BOARD_PRESET {None} \
    CONFIG.PCW_PJTAG_PERIPHERAL_ENABLE {0} \
    CONFIG.PCW_PLL_BYPASSMODE_ENABLE {0} \
    CONFIG.PCW_PRESET_BANK0_VOLTAGE {LVCMOS 3.3V} \
    CONFIG.PCW_PRESET_BANK1_VOLTAGE {LVCMOS 2.5V} \
    CONFIG.PCW_PS7_SI_REV {PRODUCTION} \
    CONFIG.PCW_QSPI_GRP_FBCLK_ENABLE {0} \
    CONFIG.PCW_QSPI_GRP_IO1_ENABLE {0} \
    CONFIG.PCW_QSPI_GRP_SINGLE_SS_ENABLE {1} \
    CONFIG.PCW_QSPI_GRP_SINGLE_SS_IO {MIO 1 .. 6} \
    CONFIG.PCW_QSPI_GRP_SS1_ENABLE {0} \
    CONFIG.PCW_QSPI_INTERNAL_HIGHADDRESS {0xFCFFFFFF} \
    CONFIG.PCW_QSPI_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_QSPI_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_QSPI_PERIPHERAL_FREQMHZ {125} \
    CONFIG.PCW_QSPI_QSPI_IO {MIO 1 .. 6} \
    CONFIG.PCW_SD0_GRP_CD_ENABLE {1} \
    CONFIG.PCW_SD0_GRP_CD_IO {MIO 46} \
    CONFIG.PCW_SD0_GRP_POW_ENABLE {0} \
    CONFIG.PCW_SD0_GRP_WP_ENABLE {1} \
    CONFIG.PCW_SD0_GRP_WP_IO {MIO 47} \
    CONFIG.PCW_SD0_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_SD0_SD0_IO {MIO 40 .. 45} \
    CONFIG.PCW_SD1_PERIPHERAL_ENABLE {0} \
    CONFIG.PCW_SDIO0_BASEADDR {0xE0100000} \
    CONFIG.PCW_SDIO0_HIGHADDR {0xE0100FFF} \
    CONFIG.PCW_SDIO_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_SDIO_PERIPHERAL_FREQMHZ {100} \
    CONFIG.PCW_SDIO_PERIPHERAL_VALID {1} \
    CONFIG.PCW_SINGLE_QSPI_DATA_MODE {x4} \
    CONFIG.PCW_SMC_CYCLE_T0 {NA} \
    CONFIG.PCW_SMC_CYCLE_T1 {NA} \
    CONFIG.PCW_SMC_CYCLE_T2 {NA} \
    CONFIG.PCW_SMC_CYCLE_T3 {NA} \
    CONFIG.PCW_SMC_CYCLE_T4 {NA} \
    CONFIG.PCW_SMC_CYCLE_T5 {NA} \
    CONFIG.PCW_SMC_CYCLE_T6 {NA} \
    CONFIG.PCW_SMC_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_SMC_PERIPHERAL_VALID {0} \
    CONFIG.PCW_SPI0_BASEADDR {0xE0006000} \
    CONFIG.PCW_SPI0_HIGHADDR {0xE0006FFF} \
    CONFIG.PCW_SPI0_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_SPI0_SPI0_IO {EMIO} \
    CONFIG.PCW_SPI1_BASEADDR {0xE0007000} \
    CONFIG.PCW_SPI1_GRP_SS1_ENABLE {0} \
    CONFIG.PCW_SPI1_GRP_SS2_ENABLE {0} \
    CONFIG.PCW_SPI1_HIGHADDR {0xE0007FFF} \
    CONFIG.PCW_SPI1_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_SPI1_SPI1_IO {MIO 10 .. 15} \
    CONFIG.PCW_SPI_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_SPI_PERIPHERAL_FREQMHZ {166.666666} \
    CONFIG.PCW_SPI_PERIPHERAL_VALID {1} \
    CONFIG.PCW_S_AXI_ACP_ID_WIDTH {3} \
    CONFIG.PCW_TPIU_PERIPHERAL_CLKSRC {External} \
    CONFIG.PCW_TRACE_INTERNAL_WIDTH {2} \
    CONFIG.PCW_TRACE_PERIPHERAL_ENABLE {0} \
    CONFIG.PCW_TTC0_BASEADDR {0xE0104000} \
    CONFIG.PCW_TTC0_CLK0_PERIPHERAL_CLKSRC {CPU_1X} \
    CONFIG.PCW_TTC0_CLK0_PERIPHERAL_DIVISOR0 {1} \
    CONFIG.PCW_TTC0_CLK1_PERIPHERAL_CLKSRC {CPU_1X} \
    CONFIG.PCW_TTC0_CLK1_PERIPHERAL_DIVISOR0 {1} \
    CONFIG.PCW_TTC0_CLK2_PERIPHERAL_CLKSRC {CPU_1X} \
    CONFIG.PCW_TTC0_CLK2_PERIPHERAL_DIVISOR0 {1} \
    CONFIG.PCW_TTC0_HIGHADDR {0xE0104fff} \
    CONFIG.PCW_TTC0_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_TTC0_TTC0_IO {EMIO} \
    CONFIG.PCW_TTC1_CLK0_PERIPHERAL_CLKSRC {CPU_1X} \
    CONFIG.PCW_TTC1_CLK0_PERIPHERAL_DIVISOR0 {1} \
    CONFIG.PCW_TTC1_CLK1_PERIPHERAL_CLKSRC {CPU_1X} \
    CONFIG.PCW_TTC1_CLK1_PERIPHERAL_DIVISOR0 {1} \
    CONFIG.PCW_TTC1_CLK2_PERIPHERAL_CLKSRC {CPU_1X} \
    CONFIG.PCW_TTC1_CLK2_PERIPHERAL_DIVISOR0 {1} \
    CONFIG.PCW_TTC1_PERIPHERAL_ENABLE {0} \
    CONFIG.PCW_TTC_PERIPHERAL_FREQMHZ {50} \
    CONFIG.PCW_UART0_BASEADDR {0xE0000000} \
    CONFIG.PCW_UART0_BAUD_RATE {115200} \
    CONFIG.PCW_UART0_GRP_FULL_ENABLE {0} \
    CONFIG.PCW_UART0_HIGHADDR {0xE0000FFF} \
    CONFIG.PCW_UART0_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_UART0_UART0_IO {MIO 14 .. 15} \
    CONFIG.PCW_UART1_BASEADDR {0xE0001000} \
    CONFIG.PCW_UART1_BAUD_RATE {115200} \
    CONFIG.PCW_UART1_GRP_FULL_ENABLE {0} \
    CONFIG.PCW_UART1_HIGHADDR {0xE0001FFF} \
    CONFIG.PCW_UART1_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_UART1_UART1_IO {MIO 8 .. 9} \
    CONFIG.PCW_UART_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_UART_PERIPHERAL_FREQMHZ {100} \
    CONFIG.PCW_UART_PERIPHERAL_VALID {1} \
    CONFIG.PCW_UIPARAM_ACT_DDR_FREQ_MHZ {533.333374} \
    CONFIG.PCW_UIPARAM_DDR_ADV_ENABLE {0} \
    CONFIG.PCW_UIPARAM_DDR_AL {0} \
    CONFIG.PCW_UIPARAM_DDR_BL {8} \
    CONFIG.PCW_UIPARAM_DDR_BOARD_DELAY0 {0.25} \
    CONFIG.PCW_UIPARAM_DDR_BOARD_DELAY1 {0.25} \
    CONFIG.PCW_UIPARAM_DDR_BOARD_DELAY2 {0.25} \
    CONFIG.PCW_UIPARAM_DDR_BOARD_DELAY3 {0.25} \
    CONFIG.PCW_UIPARAM_DDR_BUS_WIDTH {16 Bit} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_0_LENGTH_MM {0} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_0_PACKAGE_LENGTH {54.563} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_0_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_1_LENGTH_MM {0} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_1_PACKAGE_LENGTH {54.563} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_1_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_2_LENGTH_MM {0} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_2_PACKAGE_LENGTH {54.563} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_2_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_3_LENGTH_MM {0} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_3_PACKAGE_LENGTH {54.563} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_3_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_STOP_EN {0} \
    CONFIG.PCW_UIPARAM_DDR_DQS_0_LENGTH_MM {0} \
    CONFIG.PCW_UIPARAM_DDR_DQS_0_PACKAGE_LENGTH {101.239} \
    CONFIG.PCW_UIPARAM_DDR_DQS_0_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQS_1_LENGTH_MM {0} \
    CONFIG.PCW_UIPARAM_DDR_DQS_1_PACKAGE_LENGTH {79.5025} \
    CONFIG.PCW_UIPARAM_DDR_DQS_1_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQS_2_LENGTH_MM {0} \
    CONFIG.PCW_UIPARAM_DDR_DQS_2_PACKAGE_LENGTH {60.536} \
    CONFIG.PCW_UIPARAM_DDR_DQS_2_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQS_3_LENGTH_MM {0} \
    CONFIG.PCW_UIPARAM_DDR_DQS_3_PACKAGE_LENGTH {71.7715} \
    CONFIG.PCW_UIPARAM_DDR_DQS_3_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_0 {0.0} \
    CONFIG.PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_1 {0.0} \
    CONFIG.PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_2 {0.0} \
    CONFIG.PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_3 {0.0} \
    CONFIG.PCW_UIPARAM_DDR_DQ_0_LENGTH_MM {0} \
    CONFIG.PCW_UIPARAM_DDR_DQ_0_PACKAGE_LENGTH {104.5365} \
    CONFIG.PCW_UIPARAM_DDR_DQ_0_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQ_1_LENGTH_MM {0} \
    CONFIG.PCW_UIPARAM_DDR_DQ_1_PACKAGE_LENGTH {70.676} \
    CONFIG.PCW_UIPARAM_DDR_DQ_1_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQ_2_LENGTH_MM {0} \
    CONFIG.PCW_UIPARAM_DDR_DQ_2_PACKAGE_LENGTH {59.1615} \
    CONFIG.PCW_UIPARAM_DDR_DQ_2_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQ_3_LENGTH_MM {0} \
    CONFIG.PCW_UIPARAM_DDR_DQ_3_PACKAGE_LENGTH {81.319} \
    CONFIG.PCW_UIPARAM_DDR_DQ_3_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_ECC {Disabled} \
    CONFIG.PCW_UIPARAM_DDR_ENABLE {1} \
    CONFIG.PCW_UIPARAM_DDR_FREQ_MHZ {533.333333} \
    CONFIG.PCW_UIPARAM_DDR_HIGH_TEMP {Normal (0-85)} \
    CONFIG.PCW_UIPARAM_DDR_MEMORY_TYPE {DDR 3} \
    CONFIG.PCW_UIPARAM_DDR_PARTNO {MT41J256M16 RE-125} \
    CONFIG.PCW_UIPARAM_DDR_TRAIN_DATA_EYE {1} \
    CONFIG.PCW_UIPARAM_DDR_TRAIN_READ_GATE {1} \
    CONFIG.PCW_UIPARAM_DDR_TRAIN_WRITE_LEVEL {1} \
    CONFIG.PCW_UIPARAM_DDR_USE_INTERNAL_VREF {0} \
    CONFIG.PCW_UIPARAM_GENERATE_SUMMARY {NA} \
    CONFIG.PCW_USB0_BASEADDR {0xE0102000} \
    CONFIG.PCW_USB0_HIGHADDR {0xE0102fff} \
    CONFIG.PCW_USB0_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_USB0_RESET_ENABLE {1} \
    CONFIG.PCW_USB0_RESET_IO {MIO 48} \
    CONFIG.PCW_USB0_USB0_IO {MIO 28 .. 39} \
    CONFIG.PCW_USB1_PERIPHERAL_ENABLE {0} \
    CONFIG.PCW_USB_RESET_ENABLE {1} \
    CONFIG.PCW_USB_RESET_POLARITY {Active Low} \
    CONFIG.PCW_USB_RESET_SELECT {Share reset pin} \
    CONFIG.PCW_USE_AXI_FABRIC_IDLE {0} \
    CONFIG.PCW_USE_AXI_NONSECURE {0} \
    CONFIG.PCW_USE_CORESIGHT {0} \
    CONFIG.PCW_USE_CROSS_TRIGGER {0} \
    CONFIG.PCW_USE_CR_FABRIC {1} \
    CONFIG.PCW_USE_DDR_BYPASS {0} \
    CONFIG.PCW_USE_DEBUG {0} \
    CONFIG.PCW_USE_DEFAULT_ACP_USER_VAL {0} \
    CONFIG.PCW_USE_DMA0 {0} \
    CONFIG.PCW_USE_DMA1 {0} \
    CONFIG.PCW_USE_DMA2 {0} \
    CONFIG.PCW_USE_DMA3 {0} \
    CONFIG.PCW_USE_EXPANDED_IOP {0} \
    CONFIG.PCW_USE_FABRIC_INTERRUPT {0} \
    CONFIG.PCW_USE_HIGH_OCM {0} \
    CONFIG.PCW_USE_M_AXI_GP0 {1} \
    CONFIG.PCW_USE_M_AXI_GP1 {1} \
    CONFIG.PCW_USE_PROC_EVENT_BUS {0} \
    CONFIG.PCW_USE_PS_SLCR_REGISTERS {0} \
    CONFIG.PCW_USE_S_AXI_ACP {1} \
    CONFIG.PCW_USE_S_AXI_GP0 {0} \
    CONFIG.PCW_USE_S_AXI_GP1 {0} \
    CONFIG.PCW_USE_S_AXI_HP0 {0} \
    CONFIG.PCW_USE_S_AXI_HP1 {0} \
    CONFIG.PCW_USE_S_AXI_HP2 {0} \
    CONFIG.PCW_USE_S_AXI_HP3 {0} \
    CONFIG.PCW_USE_TRACE {0} \
    CONFIG.PCW_VALUE_SILVERSION {3} \
    CONFIG.PCW_WDT_PERIPHERAL_CLKSRC {CPU_1X} \
    CONFIG.PCW_WDT_PERIPHERAL_DIVISOR0 {1} \
    CONFIG.PCW_WDT_PERIPHERAL_ENABLE {0} \
  ] $processing_system7_Zynq


  # Create instance: rst_ps7_0_125M, and set properties
  set rst_ps7_0_125M [ create_bd_cell -type ip -vlnv xilinx.com:ip:proc_sys_reset:5.0 rst_ps7_0_125M ]

  # Create instance: xlslice_cfg_reg0, and set properties
  set xlslice_cfg_reg0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_cfg_reg0 ]
  set_property -dict [list \
    CONFIG.DIN_FROM {1023} \
    CONFIG.DIN_WIDTH {3072} \
    CONFIG.DOUT_WIDTH {1024} \
  ] $xlslice_cfg_reg0


  # Create instance: xlslice_cfg_reg1, and set properties
  set xlslice_cfg_reg1 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_cfg_reg1 ]
  set_property -dict [list \
    CONFIG.DIN_FROM {2047} \
    CONFIG.DIN_TO {1024} \
    CONFIG.DIN_WIDTH {3072} \
    CONFIG.DOUT_WIDTH {1024} \
  ] $xlslice_cfg_reg1


  # Create instance: xlslice_cfg_reg2, and set properties
  set xlslice_cfg_reg2 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_cfg_reg2 ]
  set_property -dict [list \
    CONFIG.DIN_FROM {3071} \
    CONFIG.DIN_TO {2048} \
    CONFIG.DIN_WIDTH {3072} \
    CONFIG.DOUT_WIDTH {1024} \
  ] $xlslice_cfg_reg2


  # Create instance: xlslice_cfg_reg3, and set properties
  set xlslice_cfg_reg3 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_cfg_reg3 ]
  set_property -dict [list \
    CONFIG.DIN_FROM {1023} \
    CONFIG.DIN_TO {0} \
    CONFIG.DIN_WIDTH {3072} \
    CONFIG.DOUT_WIDTH {1024} \
  ] $xlslice_cfg_reg3


  # Create instance: axi_gpio_0, and set properties
  set axi_gpio_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_gpio:2.0 axi_gpio_0 ]
  set_property -dict [list \
    CONFIG.C_ALL_INPUTS {1} \
    CONFIG.C_ALL_INPUTS_2 {1} \
    CONFIG.C_IS_DUAL {1} \
  ] $axi_gpio_0


  # Create instance: axi_gpio_1, and set properties
  set axi_gpio_1 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_gpio:2.0 axi_gpio_1 ]
  set_property -dict [list \
    CONFIG.C_ALL_INPUTS {1} \
    CONFIG.C_ALL_INPUTS_2 {1} \
    CONFIG.C_IS_DUAL {1} \
  ] $axi_gpio_1


  # Create instance: axi_gpio_2, and set properties
  set axi_gpio_2 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_gpio:2.0 axi_gpio_2 ]
  set_property -dict [list \
    CONFIG.C_ALL_INPUTS {1} \
    CONFIG.C_ALL_INPUTS_2 {1} \
    CONFIG.C_IS_DUAL {1} \
  ] $axi_gpio_2


  # Create instance: axi_gpio_3, and set properties
  set axi_gpio_3 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_gpio:2.0 axi_gpio_3 ]
  set_property -dict [list \
    CONFIG.C_ALL_INPUTS {1} \
    CONFIG.C_ALL_INPUTS_2 {1} \
    CONFIG.C_IS_DUAL {1} \
  ] $axi_gpio_3


  # Create instance: axi_gpio_4, and set properties
  set axi_gpio_4 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_gpio:2.0 axi_gpio_4 ]
  set_property -dict [list \
    CONFIG.C_ALL_INPUTS {1} \
    CONFIG.C_ALL_INPUTS_2 {1} \
    CONFIG.C_IS_DUAL {1} \
  ] $axi_gpio_4


  # Create instance: axi_gpio_5, and set properties
  set axi_gpio_5 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_gpio:2.0 axi_gpio_5 ]
  set_property -dict [list \
    CONFIG.C_ALL_INPUTS {1} \
    CONFIG.C_ALL_INPUTS_2 {1} \
    CONFIG.C_IS_DUAL {1} \
  ] $axi_gpio_5


  # Create instance: axi_interconnect_0, and set properties
  set axi_interconnect_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_interconnect:2.1 axi_interconnect_0 ]
  set_property -dict [list \
    CONFIG.ENABLE_ADVANCED_OPTIONS {0} \
    CONFIG.M06_HAS_DATA_FIFO {1} \
    CONFIG.M13_HAS_DATA_FIFO {1} \
    CONFIG.NUM_MI {15} \
    CONFIG.NUM_SI {2} \
  ] $axi_interconnect_0


  # Create instance: axi_gpio_7, and set properties
  set axi_gpio_7 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_gpio:2.0 axi_gpio_7 ]
  set_property -dict [list \
    CONFIG.C_ALL_INPUTS {1} \
    CONFIG.C_ALL_INPUTS_2 {1} \
    CONFIG.C_IS_DUAL {1} \
  ] $axi_gpio_7


  # Create instance: axi_gpio_8, and set properties
  set axi_gpio_8 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_gpio:2.0 axi_gpio_8 ]
  set_property -dict [list \
    CONFIG.C_ALL_INPUTS {1} \
    CONFIG.C_ALL_INPUTS_2 {1} \
    CONFIG.C_IS_DUAL {1} \
  ] $axi_gpio_8


  # Create instance: axi_gpio_6, and set properties
  set axi_gpio_6 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_gpio:2.0 axi_gpio_6 ]
  set_property -dict [list \
    CONFIG.C_ALL_INPUTS {1} \
    CONFIG.C_ALL_INPUTS_2 {1} \
    CONFIG.C_IS_DUAL {1} \
  ] $axi_gpio_6


  # Create instance: axi_cfg_register_1, and set properties
  set axi_cfg_register_1 [ create_bd_cell -type ip -vlnv pavel-demin:user:axi_cfg_register:1.0 axi_cfg_register_1 ]
  set_property -dict [list \
    CONFIG.AXI_ADDR_WIDTH {16} \
    CONFIG.AXI_DATA_WIDTH {32} \
    CONFIG.CFG_DATA_WIDTH {3072} \
  ] $axi_cfg_register_1


  # Create instance: axi_gpio_9, and set properties
  set axi_gpio_9 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_gpio:2.0 axi_gpio_9 ]
  set_property -dict [list \
    CONFIG.C_ALL_INPUTS {1} \
    CONFIG.C_ALL_INPUTS_2 {1} \
    CONFIG.C_IS_DUAL {1} \
  ] $axi_gpio_9


  # Create instance: axi_bram_reader_1, and set properties
  set axi_bram_reader_1 [ create_bd_cell -type ip -vlnv anton-potocnik:user:axi_bram_reader:1.0 axi_bram_reader_1 ]
  set_property -dict [list \
    CONFIG.BRAM_ADDR_WIDTH {14} \
    CONFIG.C_S00_AXI_ADDR_WIDTH {16} \
  ] $axi_bram_reader_1


  # Create instance: axi_gpio_10, and set properties
  set axi_gpio_10 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_gpio:2.0 axi_gpio_10 ]
  set_property -dict [list \
    CONFIG.C_ALL_INPUTS {1} \
    CONFIG.C_ALL_INPUTS_2 {1} \
    CONFIG.C_IS_DUAL {1} \
  ] $axi_gpio_10


  # Create interface connections
  connect_bd_intf_net -intf_net axi_bram_reader_0_BRAM_PORTA [get_bd_intf_pins BRAM_PORTA_PACPLL] [get_bd_intf_pins axi_bram_reader_0/BRAM_PORTA]
  connect_bd_intf_net -intf_net axi_bram_reader_1_BRAM_PORTA [get_bd_intf_pins BRAM_PORTA_SPMC] [get_bd_intf_pins axi_bram_reader_1/BRAM_PORTA]
  connect_bd_intf_net -intf_net axi_interconnect_0_M00_AXI [get_bd_intf_pins axi_cfg_register_0/S_AXI] [get_bd_intf_pins axi_interconnect_0/M00_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M01_AXI [get_bd_intf_pins axi_gpio_0/S_AXI] [get_bd_intf_pins axi_interconnect_0/M01_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M02_AXI [get_bd_intf_pins axi_gpio_1/S_AXI] [get_bd_intf_pins axi_interconnect_0/M02_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M03_AXI [get_bd_intf_pins axi_gpio_2/S_AXI] [get_bd_intf_pins axi_interconnect_0/M03_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M04_AXI [get_bd_intf_pins axi_gpio_3/S_AXI] [get_bd_intf_pins axi_interconnect_0/M04_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M05_AXI [get_bd_intf_pins axi_gpio_4/S_AXI] [get_bd_intf_pins axi_interconnect_0/M05_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M06_AXI [get_bd_intf_pins axi_bram_reader_0/S_AXI] [get_bd_intf_pins axi_interconnect_0/M06_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M07_AXI [get_bd_intf_pins axi_gpio_5/S_AXI] [get_bd_intf_pins axi_interconnect_0/M07_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M08_AXI [get_bd_intf_pins axi_interconnect_0/M08_AXI] [get_bd_intf_pins axi_gpio_6/S_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M09_AXI [get_bd_intf_pins axi_interconnect_0/M09_AXI] [get_bd_intf_pins axi_gpio_7/S_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M10_AXI [get_bd_intf_pins axi_interconnect_0/M10_AXI] [get_bd_intf_pins axi_gpio_8/S_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M11_AXI [get_bd_intf_pins axi_interconnect_0/M11_AXI] [get_bd_intf_pins axi_gpio_9/S_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M12_AXI [get_bd_intf_pins axi_cfg_register_1/S_AXI] [get_bd_intf_pins axi_interconnect_0/M12_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M13_AXI [get_bd_intf_pins axi_bram_reader_1/S_AXI] [get_bd_intf_pins axi_interconnect_0/M13_AXI]
  connect_bd_intf_net -intf_net axi_interconnect_0_M14_AXI [get_bd_intf_pins axi_interconnect_0/M14_AXI] [get_bd_intf_pins axi_gpio_10/S_AXI]
  connect_bd_intf_net -intf_net processing_system7_0_DDR [get_bd_intf_pins DDR] [get_bd_intf_pins processing_system7_Zynq/DDR]
  connect_bd_intf_net -intf_net processing_system7_0_FIXED_IO [get_bd_intf_pins FIXED_IO] [get_bd_intf_pins processing_system7_Zynq/FIXED_IO]
  connect_bd_intf_net -intf_net processing_system7_0_M_AXI_GP0 [get_bd_intf_pins axi_interconnect_0/S00_AXI] [get_bd_intf_pins processing_system7_Zynq/M_AXI_GP0]
  connect_bd_intf_net -intf_net processing_system7_Zynq_M_AXI_GP1 [get_bd_intf_pins processing_system7_Zynq/M_AXI_GP1] [get_bd_intf_pins axi_interconnect_0/S01_AXI]

  # Create port connections
  connect_bd_net -net Net [get_bd_pins processing_system7_Zynq/FCLK_CLK0] [get_bd_pins axi_bram_reader_0/s00_axi_aclk] [get_bd_pins axi_cfg_register_0/aclk] [get_bd_pins processing_system7_Zynq/M_AXI_GP0_ACLK] [get_bd_pins processing_system7_Zynq/S_AXI_ACP_ACLK] [get_bd_pins rst_ps7_0_125M/slowest_sync_clk] [get_bd_pins axi_gpio_0/s_axi_aclk] [get_bd_pins axi_gpio_1/s_axi_aclk] [get_bd_pins axi_gpio_2/s_axi_aclk] [get_bd_pins axi_gpio_3/s_axi_aclk] [get_bd_pins axi_gpio_4/s_axi_aclk] [get_bd_pins axi_gpio_5/s_axi_aclk] [get_bd_pins axi_interconnect_0/ACLK] [get_bd_pins axi_interconnect_0/S00_ACLK] [get_bd_pins axi_interconnect_0/M00_ACLK] [get_bd_pins axi_interconnect_0/M01_ACLK] [get_bd_pins axi_interconnect_0/M02_ACLK] [get_bd_pins axi_interconnect_0/M03_ACLK] [get_bd_pins axi_interconnect_0/M04_ACLK] [get_bd_pins axi_interconnect_0/M05_ACLK] [get_bd_pins axi_interconnect_0/M06_ACLK] [get_bd_pins axi_interconnect_0/M07_ACLK] [get_bd_pins axi_interconnect_0/M08_ACLK] [get_bd_pins axi_interconnect_0/M09_ACLK] [get_bd_pins axi_gpio_7/s_axi_aclk] [get_bd_pins axi_gpio_8/s_axi_aclk] [get_bd_pins axi_interconnect_0/M10_ACLK] [get_bd_pins axi_interconnect_0/M11_ACLK] [get_bd_pins axi_gpio_6/s_axi_aclk] [get_bd_pins axi_cfg_register_1/aclk] [get_bd_pins axi_interconnect_0/M12_ACLK] [get_bd_pins axi_gpio_9/s_axi_aclk] [get_bd_pins axi_interconnect_0/M13_ACLK] [get_bd_pins axi_bram_reader_1/s00_axi_aclk] [get_bd_pins axi_interconnect_0/M14_ACLK] [get_bd_pins axi_gpio_10/s_axi_aclk] [get_bd_pins processing_system7_Zynq/M_AXI_GP1_ACLK] [get_bd_pins axi_interconnect_0/S01_ACLK]
  connect_bd_net -net axi_cfg_register_0_cfg_data [get_bd_pins axi_cfg_register_0/cfg_data] [get_bd_pins xlslice_cfg_reg2/Din] [get_bd_pins xlslice_cfg_reg1/Din] [get_bd_pins xlslice_cfg_reg0/Din]
  connect_bd_net -net axi_cfg_register_1_cfg_data [get_bd_pins axi_cfg_register_1/cfg_data] [get_bd_pins xlslice_cfg_reg3/Din]
  connect_bd_net -net gpio2_io_i1_1 [get_bd_pins gpio_io_1_x4] [get_bd_pins axi_gpio_1/gpio2_io_i]
  connect_bd_net -net gpio2_io_i1_2 [get_bd_pins gpio_io_6_x14] [get_bd_pins axi_gpio_6/gpio2_io_i]
  connect_bd_net -net gpio2_io_i3_1 [get_bd_pins gpio_io_3_x8] [get_bd_pins axi_gpio_3/gpio2_io_i]
  connect_bd_net -net gpio2_io_i4_1 [get_bd_pins gpio_io_2_x6] [get_bd_pins axi_gpio_2/gpio2_io_i]
  connect_bd_net -net gpio2_io_i_1 [get_bd_pins gpio_io_0_x2] [get_bd_pins axi_gpio_0/gpio2_io_i]
  connect_bd_net -net gpio2_io_i_2 [get_bd_pins gpio_io_4_x10] [get_bd_pins axi_gpio_4/gpio2_io_i]
  connect_bd_net -net gpio2_io_i_3 [get_bd_pins gpio_io_5_x12] [get_bd_pins axi_gpio_5/gpio2_io_i]
  connect_bd_net -net gpio2_io_i_4 [get_bd_pins gpio2_io_9_x20] [get_bd_pins axi_gpio_9/gpio2_io_i]
  connect_bd_net -net gpio2_io_i_5 [get_bd_pins gpio_io_7_x16] [get_bd_pins axi_gpio_7/gpio2_io_i]
  connect_bd_net -net gpio2_io_i_6 [get_bd_pins gpio_io_8_x18] [get_bd_pins axi_gpio_8/gpio2_io_i]
  connect_bd_net -net gpio2_io_i_7 [get_bd_pins gpio_io_10_x22] [get_bd_pins axi_gpio_10/gpio2_io_i]
  connect_bd_net -net gpio_io_i1_1 [get_bd_pins gpio_io_1_x3] [get_bd_pins axi_gpio_1/gpio_io_i]
  connect_bd_net -net gpio_io_i1_2 [get_bd_pins gpio_io_7_x15] [get_bd_pins axi_gpio_7/gpio_io_i]
  connect_bd_net -net gpio_io_i1_3 [get_bd_pins gpio_io_8_x17] [get_bd_pins axi_gpio_8/gpio_io_i]
  connect_bd_net -net gpio_io_i3_1 [get_bd_pins gpio_io_3_x7] [get_bd_pins axi_gpio_3/gpio_io_i]
  connect_bd_net -net gpio_io_i4_1 [get_bd_pins gpio_io_2_x5] [get_bd_pins axi_gpio_2/gpio_io_i]
  connect_bd_net -net gpio_io_i_1 [get_bd_pins gpio_io_0_x1] [get_bd_pins axi_gpio_0/gpio_io_i]
  connect_bd_net -net gpio_io_i_2 [get_bd_pins gpio_io_4_x9] [get_bd_pins axi_gpio_4/gpio_io_i]
  connect_bd_net -net gpio_io_i_3 [get_bd_pins gpio_io_5_x11] [get_bd_pins axi_gpio_5/gpio_io_i]
  connect_bd_net -net gpio_io_i_4 [get_bd_pins gpio_io_6_x13] [get_bd_pins axi_gpio_6/gpio_io_i]
  connect_bd_net -net gpio_io_i_5 [get_bd_pins gpio_io_9_x19] [get_bd_pins axi_gpio_9/gpio_io_i]
  connect_bd_net -net gpio_io_i_6 [get_bd_pins gpio_io_10_x21] [get_bd_pins axi_gpio_10/gpio_io_i]
  connect_bd_net -net processing_system7_0_FCLK_RESET0_N [get_bd_pins processing_system7_Zynq/FCLK_RESET0_N] [get_bd_pins rst_ps7_0_125M/ext_reset_in]
  connect_bd_net -net rst_ps7_0_125M_interconnect_aresetn [get_bd_pins rst_ps7_0_125M/interconnect_aresetn] [get_bd_pins axi_interconnect_0/ARESETN]
  connect_bd_net -net rst_ps7_0_125M_peripheral_aresetn [get_bd_pins rst_ps7_0_125M/peripheral_aresetn] [get_bd_pins axi_bram_reader_0/s00_axi_aresetn] [get_bd_pins axi_cfg_register_0/aresetn] [get_bd_pins axi_gpio_0/s_axi_aresetn] [get_bd_pins axi_gpio_1/s_axi_aresetn] [get_bd_pins axi_gpio_2/s_axi_aresetn] [get_bd_pins axi_gpio_3/s_axi_aresetn] [get_bd_pins axi_gpio_4/s_axi_aresetn] [get_bd_pins axi_gpio_5/s_axi_aresetn] [get_bd_pins axi_interconnect_0/S00_ARESETN] [get_bd_pins axi_interconnect_0/M00_ARESETN] [get_bd_pins axi_interconnect_0/M01_ARESETN] [get_bd_pins axi_interconnect_0/M02_ARESETN] [get_bd_pins axi_interconnect_0/M03_ARESETN] [get_bd_pins axi_interconnect_0/M04_ARESETN] [get_bd_pins axi_interconnect_0/M05_ARESETN] [get_bd_pins axi_interconnect_0/M06_ARESETN] [get_bd_pins axi_interconnect_0/M07_ARESETN] [get_bd_pins axi_interconnect_0/M08_ARESETN] [get_bd_pins axi_interconnect_0/M09_ARESETN] [get_bd_pins axi_gpio_7/s_axi_aresetn] [get_bd_pins axi_gpio_8/s_axi_aresetn] [get_bd_pins axi_interconnect_0/M10_ARESETN] [get_bd_pins axi_interconnect_0/M11_ARESETN] [get_bd_pins axi_gpio_6/s_axi_aresetn] [get_bd_pins axi_cfg_register_1/aresetn] [get_bd_pins axi_interconnect_0/M12_ARESETN] [get_bd_pins axi_gpio_9/s_axi_aresetn] [get_bd_pins axi_interconnect_0/M13_ARESETN] [get_bd_pins axi_bram_reader_1/s00_axi_aresetn] [get_bd_pins axi_interconnect_0/M14_ARESETN] [get_bd_pins axi_gpio_10/s_axi_aresetn] [get_bd_pins axi_interconnect_0/S01_ARESETN]
  connect_bd_net -net xlslice_cfg_reg0_Dout [get_bd_pins xlslice_cfg_reg0/Dout] [get_bd_pins cfg_data_reg_0]
  connect_bd_net -net xlslice_cfg_reg1_Dout [get_bd_pins xlslice_cfg_reg1/Dout] [get_bd_pins cfg_data_reg_1]
  connect_bd_net -net xlslice_cfg_reg2_Dout [get_bd_pins xlslice_cfg_reg2/Dout] [get_bd_pins cfg_data_reg_2]
  connect_bd_net -net xlslice_cfg_reg3_Dout [get_bd_pins xlslice_cfg_reg3/Dout] [get_bd_pins cfg_data_reg_3]

  # Restore current instance
  current_bd_instance $oldCurInst
}
  
# Hierarchical cell: PAC_PLL
proc create_hier_cell_PAC_PLL { parentCell nameHier } {

  variable script_folder

  if { $parentCell eq "" || $nameHier eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2092 -severity "ERROR" "create_hier_cell_PAC_PLL() - Empty argument(s)!"}
     return
  }

  # Get object for parentCell
  set parentObj [get_bd_cells $parentCell]
  if { $parentObj == "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2090 -severity "ERROR" "Unable to find parent cell <$parentCell>!"}
     return
  }

  # Make sure parentObj is hier blk
  set parentType [get_property TYPE $parentObj]
  if { $parentType ne "hier" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2091 -severity "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be <hier>."}
     return
  }

  # Save current instance; Restore later
  set oldCurInst [current_bd_instance .]

  # Set parent object as current
  current_bd_instance $parentObj

  # Create cell and set as current instance
  set hier_obj [create_bd_cell -type hier $nameHier]
  current_bd_instance $hier_obj

  # Create interface pins
  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_AC16

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_ACDC

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_CONTROL

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_CONTROL2

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_CONTROL3

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_LockInX

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_LockInY

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_PASS2

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_PASS3

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_S01

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_SC

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS_SIGNAL

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS_S1

  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS2


  # Create pins
  create_bd_pin -dir O -from 31 -to 0 M_AXIS_Aout_tdata
  create_bd_pin -dir O -from 31 -to 0 M_AXIS_Bout_tdata
  create_bd_pin -dir I -type clk aclk
  create_bd_pin -dir I -from 1023 -to 0 cfg
  create_bd_pin -dir I -from 1023 -to 0 cfg1
  create_bd_pin -dir O -from 31 -to 0 dbg_m
  create_bd_pin -dir O -from 31 -to 0 dbg_mdc
  create_bd_pin -dir O enable
  create_bd_pin -dir O enable1
  create_bd_pin -dir O -from 31 -to 0 mon_control
  create_bd_pin -dir O -from 31 -to 0 mon_control1
  create_bd_pin -dir O -from 31 -to 0 mon_control_B
  create_bd_pin -dir O -from 31 -to 0 mon_control_lower32
  create_bd_pin -dir O -from 31 -to 0 mon_control_lower33
  create_bd_pin -dir O -from 31 -to 0 mon_signal
  create_bd_pin -dir O -from 31 -to 0 mon_signal1
  create_bd_pin -dir O status_max
  create_bd_pin -dir O status_max1
  create_bd_pin -dir O status_min
  create_bd_pin -dir O status_min1
  create_bd_pin -dir O -from 2 -to 0 zero_spcp

  # Create instance: PS_Phase_Controller
  create_hier_cell_PS_Phase_Controller $hier_obj PS_Phase_Controller

  # Create instance: axis_dc_filter_0, and set properties
  set block_name axis_dc_filter
  set block_cell_name axis_dc_filter_0
  if { [catch {set axis_dc_filter_0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_dc_filter_0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: axis_decimator_0, and set properties
  set block_name axis_decimator
  set block_cell_name axis_decimator_0
  if { [catch {set axis_decimator_0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_decimator_0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: cfg_select_amplitude_control, and set properties
  set block_name cfg_select
  set block_cell_name cfg_select_amplitude_control
  if { [catch {set cfg_select_amplitude_control [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_select_amplitude_control eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_SWBIT {1} \
    CONFIG.SRC_ADDR {3} \
  ] $cfg_select_amplitude_control


  # Create instance: cfg_select_lck_ampl_control, and set properties
  set block_name cfg_select
  set block_cell_name cfg_select_lck_ampl_control
  if { [catch {set cfg_select_lck_ampl_control [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_select_lck_ampl_control eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_SWBIT {4} \
    CONFIG.SRC_ADDR {3} \
  ] $cfg_select_lck_ampl_control


  # Create instance: cfg_select_lck_phase_control1, and set properties
  set block_name cfg_select
  set block_cell_name cfg_select_lck_phase_control1
  if { [catch {set cfg_select_lck_phase_control1 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_select_lck_phase_control1 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_SWBIT {5} \
    CONFIG.SRC_ADDR {3} \
  ] $cfg_select_lck_phase_control1


  # Create instance: cfg_select_phase_control, and set properties
  set block_name cfg_select
  set block_cell_name cfg_select_phase_control
  if { [catch {set cfg_select_phase_control [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_select_phase_control eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property CONFIG.SRC_ADDR {3} $cfg_select_phase_control


  # Create instance: dds_compiler_0, and set properties
  set dds_compiler_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:dds_compiler:6.0 dds_compiler_0 ]
  set_property -dict [list \
    CONFIG.DATA_Has_TLAST {Not_Required} \
    CONFIG.DDS_Clock_Rate {125} \
    CONFIG.Frequency_Resolution {0.00001} \
    CONFIG.Has_Phase_Out {false} \
    CONFIG.Latency {10} \
    CONFIG.M_DATA_Has_TUSER {Not_Required} \
    CONFIG.Noise_Shaping {Auto} \
    CONFIG.Output_Frequency1 {0} \
    CONFIG.Output_Width {25} \
    CONFIG.PINC1 {0} \
    CONFIG.Phase_Increment {Streaming} \
    CONFIG.Phase_Width {44} \
    CONFIG.Phase_offset {None} \
    CONFIG.S_PHASE_Has_TUSER {Not_Required} \
    CONFIG.Spurious_Free_Dynamic_Range {140} \
  ] $dds_compiler_0


  # Create instance: cfg_to_axis_Atau, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_axis_Atau
  if { [catch {set cfg_to_axis_Atau [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_axis_Atau eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property CONFIG.SRC_ADDR {27} $cfg_to_axis_Atau


  # Create instance: cfg_to_axis_dc, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_axis_dc
  if { [catch {set cfg_to_axis_dc [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_axis_dc eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {5} \
  ] $cfg_to_axis_dc


  # Create instance: cfg_to_axis_dc_tau, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_axis_dc_tau
  if { [catch {set cfg_to_axis_dc_tau [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_axis_dc_tau eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property CONFIG.SRC_ADDR {28} $cfg_to_axis_dc_tau


  # Create instance: cfg_to_axis_tau, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_axis_tau
  if { [catch {set cfg_to_axis_tau [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_axis_tau eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {32} \
    CONFIG.MAXIS_TDATA_WIDTH {32} \
    CONFIG.SRC_ADDR {4} \
  ] $cfg_to_axis_tau


  # Create instance: axis_splitter_CH0, and set properties
  set block_name axis_splitter
  set block_cell_name axis_splitter_CH0
  if { [catch {set axis_splitter_CH0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_splitter_CH0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.MAXIS_TDATA_WIDTH {16} \
    CONFIG.SAXIS_TDATA_WIDTH {16} \
  ] $axis_splitter_CH0


  # Create interface connections
  connect_bd_intf_net -intf_net Conn1 [get_bd_intf_pins axis_decimator_0/M_AXIS_S1] [get_bd_intf_pins M_AXIS_S1]
  connect_bd_intf_net -intf_net PS_Phase_Controller_M_AXIS_CONTROL [get_bd_intf_pins PS_Phase_Controller/M_AXIS_CONTROL] [get_bd_intf_pins dds_compiler_0/S_AXIS_PHASE]
  connect_bd_intf_net -intf_net PS_Phase_Controller_M_AXIS_CONTROL2 [get_bd_intf_pins M_AXIS_CONTROL3] [get_bd_intf_pins PS_Phase_Controller/M_AXIS_CONTROL2]
  connect_bd_intf_net -intf_net PS_Phase_Controller_M_AXIS_PASS2 [get_bd_intf_pins M_AXIS_PASS3] [get_bd_intf_pins PS_Phase_Controller/M_AXIS_PASS2]
  connect_bd_intf_net -intf_net S_AXIS1_1 [get_bd_intf_pins M_AXIS_S01] [get_bd_intf_pins axis_decimator_0/M_AXIS_S01]
  connect_bd_intf_net -intf_net axis_dc_filter_0_M_AXIS_AC16 [get_bd_intf_pins M_AXIS_AC16] [get_bd_intf_pins axis_dc_filter_0/M_AXIS_AC16]
  connect_bd_intf_net -intf_net axis_dc_filter_0_M_AXIS_ACDC [get_bd_intf_pins M_AXIS_ACDC] [get_bd_intf_pins axis_dc_filter_0/M_AXIS_ACDC]
  connect_bd_intf_net -intf_net axis_decimator_0_M_AXIS_S0 [get_bd_intf_pins axis_decimator_0/M_AXIS_S0] [get_bd_intf_pins axis_splitter_CH0/S_AXIS]
  connect_bd_intf_net -intf_net axis_red_pitaya_adc_0_M_AXIS [get_bd_intf_pins S_AXIS_SIGNAL] [get_bd_intf_pins axis_decimator_0/S_AXIS_SIGNAL]
  connect_bd_intf_net -intf_net axis_splitter_0_M_AXIS [get_bd_intf_pins axis_splitter_CH0/M_AXIS] [get_bd_intf_pins axis_dc_filter_0/S_AXIS]
  connect_bd_intf_net -intf_net axis_splitter_0_M_AXIS2 [get_bd_intf_pins M_AXIS2] [get_bd_intf_pins axis_splitter_CH0/M_AXIS2]
  connect_bd_intf_net -intf_net dds_compiler_0_M_AXIS_DATA [get_bd_intf_pins M_AXIS_SC] [get_bd_intf_pins dds_compiler_0/M_AXIS_DATA]

  # Create port connections
  connect_bd_net -net PS_Dout [get_bd_pins cfg1] [get_bd_pins PS_Phase_Controller/cfg1]
  connect_bd_net -net PS_Phase_Controller_mon_control_B [get_bd_pins PS_Phase_Controller/mon_control_B] [get_bd_pins mon_control_B]
  connect_bd_net -net PS_Phase_Controller_status_max [get_bd_pins PS_Phase_Controller/status_max] [get_bd_pins status_max1]
  connect_bd_net -net PS_Phase_Controller_status_min [get_bd_pins PS_Phase_Controller/status_min] [get_bd_pins status_min1]
  connect_bd_net -net PS_cfg_data [get_bd_pins cfg] [get_bd_pins PS_Phase_Controller/cfg] [get_bd_pins cfg_select_amplitude_control/cfg] [get_bd_pins cfg_select_lck_ampl_control/cfg] [get_bd_pins cfg_select_lck_phase_control1/cfg] [get_bd_pins cfg_select_phase_control/cfg] [get_bd_pins cfg_to_axis_Atau/cfg] [get_bd_pins cfg_to_axis_dc/cfg] [get_bd_pins cfg_to_axis_dc_tau/cfg] [get_bd_pins cfg_to_axis_tau/cfg]
  connect_bd_net -net axis_dc_filter_0_dbg_m [get_bd_pins axis_dc_filter_0/dbg_m] [get_bd_pins dbg_m]
  connect_bd_net -net axis_dc_filter_0_dbg_mdc [get_bd_pins axis_dc_filter_0/dbg_mdc] [get_bd_pins dbg_mdc]
  connect_bd_net -net axis_red_pitaya_adc_0_adc_clk1 [get_bd_pins aclk] [get_bd_pins PS_Phase_Controller/aclk] [get_bd_pins axis_dc_filter_0/aclk] [get_bd_pins axis_decimator_0/aclk] [get_bd_pins axis_decimator_0/adc_clk] [get_bd_pins dds_compiler_0/aclk] [get_bd_pins cfg_to_axis_Atau/a_clk] [get_bd_pins cfg_to_axis_dc/a_clk] [get_bd_pins cfg_to_axis_dc_tau/a_clk] [get_bd_pins cfg_to_axis_tau/a_clk] [get_bd_pins axis_splitter_CH0/a_clk]
  connect_bd_net -net cfg_axis_phaseinc_status [get_bd_pins cfg_select_phase_control/status] [get_bd_pins enable] [get_bd_pins PS_Phase_Controller/enable]
  connect_bd_net -net cfg_axis_volume_status [get_bd_pins cfg_select_amplitude_control/status] [get_bd_pins enable1]
  connect_bd_net -net cfg_to_axis_dc_M_AXIS_tdata [get_bd_pins cfg_to_axis_dc/M_AXIS_tdata] [get_bd_pins axis_dc_filter_0/dc]
  connect_bd_net -net cfg_to_axis_dc_tau_M_AXIS_tdata [get_bd_pins cfg_to_axis_dc_tau/M_AXIS_tdata] [get_bd_pins axis_dc_filter_0/dc_tau]
  connect_bd_net -net gpio2_io_i_1 [get_bd_pins PS_Phase_Controller/mon_signal] [get_bd_pins mon_signal1]
  connect_bd_net -net gpio_io_3_x8_1 [get_bd_pins PS_Phase_Controller/mon_control] [get_bd_pins mon_control1]
  connect_bd_net -net gpio_io_4_x9_1 [get_bd_pins PS_Phase_Controller/mon_control_lower32] [get_bd_pins mon_control_lower33]

  # Perform GUI Layout
  regenerate_bd_layout -hierarchy [get_bd_cells /PAC_PLL] -layout_string {
   "ActiveEmotionalView":"Default View",
   "Default View_ScaleFactor":"0.615572",
   "Default View_TopLeft":"-1046,-117",
   "ExpandedHierarchyInLayout":"",
   "guistr":"# # String gsaved with Nlview 7.5.8 2022-09-21 7111 VDI=41 GEI=38 GUI=JA:10.0 TLS
#  -string -flagsOSRD
preplace port M_AXIS_AC16 -pg 1 -lvl 5 -x 2590 -y 200 -defaultsOSRD
preplace port M_AXIS_ACDC -pg 1 -lvl 5 -x 2590 -y 230 -defaultsOSRD
preplace port M_AXIS_CONTROL -pg 1 -lvl 5 -x 2590 -y 890 -defaultsOSRD
preplace port M_AXIS_CONTROL2 -pg 1 -lvl 5 -x 2590 -y 920 -defaultsOSRD
preplace port M_AXIS_CONTROL3 -pg 1 -lvl 5 -x 2590 -y 1220 -defaultsOSRD
preplace port M_AXIS_LockInX -pg 1 -lvl 5 -x 2590 -y 550 -defaultsOSRD
preplace port M_AXIS_LockInY -pg 1 -lvl 5 -x 2590 -y 580 -defaultsOSRD
preplace port M_AXIS_PASS2 -pg 1 -lvl 5 -x 2590 -y 950 -defaultsOSRD
preplace port M_AXIS_PASS3 -pg 1 -lvl 5 -x 2590 -y 1250 -defaultsOSRD
preplace port M_AXIS_S01 -pg 1 -lvl 5 -x 2590 -y 60 -defaultsOSRD
preplace port M_AXIS_SC -pg 1 -lvl 5 -x 2590 -y 610 -defaultsOSRD
preplace port S_AXIS_SIGNAL -pg 1 -lvl 0 -x 0 -y 50 -defaultsOSRD
preplace port M_AXIS_S1 -pg 1 -lvl 5 -x 2590 -y 90 -defaultsOSRD
preplace port M_AXIS2 -pg 1 -lvl 5 -x 2590 -y -40 -defaultsOSRD
preplace port port-id_aclk -pg 1 -lvl 0 -x 0 -y 270 -defaultsOSRD
preplace port port-id_enable -pg 1 -lvl 5 -x 2590 -y 1460 -defaultsOSRD
preplace port port-id_enable1 -pg 1 -lvl 5 -x 2590 -y 1190 -defaultsOSRD
preplace port port-id_status_max -pg 1 -lvl 5 -x 2590 -y 1070 -defaultsOSRD
preplace port port-id_status_max1 -pg 1 -lvl 5 -x 2590 -y 1400 -defaultsOSRD
preplace port port-id_status_min -pg 1 -lvl 5 -x 2590 -y 1100 -defaultsOSRD
preplace port port-id_status_min1 -pg 1 -lvl 5 -x 2590 -y 1430 -defaultsOSRD
preplace portBus M_AXIS_Aout_tdata -pg 1 -lvl 5 -x 2590 -y 490 -defaultsOSRD
preplace portBus M_AXIS_Bout_tdata -pg 1 -lvl 5 -x 2590 -y 520 -defaultsOSRD
preplace portBus cfg -pg 1 -lvl 0 -x 0 -y 300 -defaultsOSRD
preplace portBus cfg1 -pg 1 -lvl 0 -x 0 -y 1350 -defaultsOSRD
preplace portBus dbg_m -pg 1 -lvl 5 -x 2590 -y 260 -defaultsOSRD
preplace portBus dbg_mdc -pg 1 -lvl 5 -x 2590 -y 290 -defaultsOSRD
preplace portBus mon_control -pg 1 -lvl 5 -x 2590 -y 980 -defaultsOSRD
preplace portBus mon_control1 -pg 1 -lvl 5 -x 2590 -y 1280 -defaultsOSRD
preplace portBus mon_control_B -pg 1 -lvl 5 -x 2590 -y 1310 -defaultsOSRD
preplace portBus mon_control_lower32 -pg 1 -lvl 5 -x 2590 -y 1010 -defaultsOSRD
preplace portBus mon_control_lower33 -pg 1 -lvl 5 -x 2590 -y 1340 -defaultsOSRD
preplace portBus mon_signal -pg 1 -lvl 5 -x 2590 -y 1040 -defaultsOSRD
preplace portBus mon_signal1 -pg 1 -lvl 5 -x 2590 -y 1370 -defaultsOSRD
preplace portBus zero_spcp -pg 1 -lvl 5 -x 2590 -y 730 -defaultsOSRD
preplace inst PS_Phase_Controller -pg 1 -lvl 2 -regml 4 -x 650 -y 1322 -defaultsOSRD
preplace inst axis_dc_filter_0 -pg 1 -lvl 2 -x 650 -y 250 -defaultsOSRD
preplace inst axis_decimator_0 -pg 1 -lvl 2 -x 650 -y 70 -defaultsOSRD
preplace inst cfg_select_amplitude_control -pg 1 -lvl 2 -x 650 -y 2314 -defaultsOSRD
preplace inst cfg_select_lck_ampl_control -pg 1 -lvl 2 -x 650 -y 660 -defaultsOSRD
preplace inst cfg_select_lck_phase_control1 -pg 1 -lvl 2 -x 650 -y 760 -defaultsOSRD
preplace inst cfg_select_phase_control -pg 1 -lvl 4 -x 2443 -y 1880 -defaultsOSRD
preplace inst dds_compiler_0 -pg 1 -lvl 2 -x 650 -y 550 -defaultsOSRD
preplace inst cfg_to_axis_Atau -pg 1 -lvl 2 -x 650 -y 880 -defaultsOSRD
preplace inst cfg_to_axis_dc -pg 1 -lvl 1 -x 200 -y 290 -defaultsOSRD
preplace inst cfg_to_axis_dc_tau -pg 1 -lvl 1 -x 200 -y 450 -defaultsOSRD
preplace inst cfg_to_axis_tau -pg 1 -lvl 2 -x 650 -y 1050 -defaultsOSRD
preplace inst axis_splitter_CH0 -pg 1 -lvl 3 -x 1993 -y -40 -defaultsOSRD
preplace inst PS_Phase_Controller|amplitude_good_check -pg 1 -lvl 2 -x 960 -y 1392 -defaultsOSRD
preplace inst PS_Phase_Controller|cfg_select_phase_unwrapping -pg 1 -lvl 1 -x 680 -y 1442 -defaultsOSRD
preplace inst PS_Phase_Controller|phase_unwrap -pg 1 -lvl 2 -x 960 -y 1252 -defaultsOSRD
preplace inst PS_Phase_Controller|cfg_to_am_threashold -pg 1 -lvl 1 -x 680 -y 1572 -defaultsOSRD
preplace inst PS_Phase_Controller|cfg_to_axis_PhaseInc -pg 1 -lvl 2 -x 960 -y 1522 -defaultsOSRD
preplace inst PS_Phase_Controller|cfg_to_ph_ci -pg 1 -lvl 2 -x 960 -y 2022 -defaultsOSRD
preplace inst PS_Phase_Controller|cfg_to_ph_cp -pg 1 -lvl 2 -x 960 -y 1642 -defaultsOSRD
preplace inst PS_Phase_Controller|cfg_to_ph_lower -pg 1 -lvl 2 -x 960 -y 1902 -defaultsOSRD
preplace inst PS_Phase_Controller|cfg_to_ph_setpoint -pg 1 -lvl 2 -x 960 -y 2162 -defaultsOSRD
preplace inst PS_Phase_Controller|cfg_to_ph_upper -pg 1 -lvl 2 -x 960 -y 1782 -defaultsOSRD
preplace netloc PS_Dout 1 0 2 NJ 1350 360J
preplace netloc PS_Phase_Controller_mon_control_B 1 2 3 NJ 1792 2180 1310 NJ
preplace netloc PS_Phase_Controller_status_max 1 2 3 NJ 1872 2140 1400 NJ
preplace netloc PS_Phase_Controller_status_min 1 2 3 NJ 1892 2210 1430 NJ
preplace netloc PS_cfg_data 1 0 4 30 370 370 1132 N 1132 2160
preplace netloc axis_dc_filter_0_dbg_m 1 2 3 NJ 270 2210 260 NJ
preplace netloc axis_dc_filter_0_dbg_mdc 1 2 3 NJ 290 N 290 NJ
preplace netloc axis_red_pitaya_adc_0_adc_clk1 1 0 3 40 210 390 -30 N
preplace netloc cfg_axis_phaseinc_status 1 1 4 400 1142 NJ 1142 N 1142 2570
preplace netloc cfg_axis_volume_status 1 2 3 1560 1190 N 1190 NJ
preplace netloc cfg_to_axis_dc_M_AXIS_tdata 1 1 1 N 290
preplace netloc cfg_to_axis_dc_tau_M_AXIS_tdata 1 1 1 380 270n
preplace netloc gpio2_io_i_1 1 2 3 NJ 1852 2200 1370 NJ
preplace netloc gpio_io_3_x8_1 1 2 3 NJ 1772 2170 1280 NJ
preplace netloc gpio_io_4_x9_1 1 2 3 NJ 1812 2190 1340 NJ
preplace netloc Conn1 1 2 3 NJ 90 N 90 NJ
preplace netloc PS_Phase_Controller_M_AXIS_CONTROL 1 1 2 400 950 1550
preplace netloc PS_Phase_Controller_M_AXIS_CONTROL2 1 2 3 NJ 1532 2130 1220 NJ
preplace netloc PS_Phase_Controller_M_AXIS_PASS2 1 2 3 NJ 1592 2150 1250 NJ
preplace netloc S_AXIS1_1 1 2 3 NJ 70 2210 60 NJ
preplace netloc axis_dc_filter_0_M_AXIS_AC16 1 2 3 NJ 210 2210 200 NJ
preplace netloc axis_dc_filter_0_M_AXIS_ACDC 1 2 3 NJ 230 N 230 NJ
preplace netloc axis_decimator_0_M_AXIS_S0 1 2 1 1550 -50n
preplace netloc axis_red_pitaya_adc_0_M_AXIS 1 0 2 NJ 50 NJ
preplace netloc axis_splitter_0_M_AXIS 1 1 3 400 350 NJ 350 2130
preplace netloc axis_splitter_0_M_AXIS2 1 3 2 NJ -40 NJ
preplace netloc dds_compiler_0_M_AXIS_DATA 1 2 3 NJ 550 NJ 550 2570
preplace netloc PS_Phase_Controller|Net 1 0 2 540 1502 810
preplace netloc PS_Phase_Controller|axis_red_pitaya_adc_0_adc_clk 1 0 2 550 1382 820
preplace netloc PS_Phase_Controller|cfg1_1 1 0 1 N 1582
preplace netloc PS_Phase_Controller|cfg_select_phase_unwrapping_status 1 1 1 810 1272n
preplace netloc PS_Phase_Controller|cfg_to_ph_upper_data 1 2 2 1090 1752 NJ
preplace netloc PS_Phase_Controller|Conn4 1 0 2 NJ 1372 N
preplace netloc PS_Phase_Controller|S_AXIS_1 1 0 2 NJ 1232 N
preplace netloc PS_Phase_Controller|cfg_to_transport_dfreq_ci_M_AXIS 1 1 1 830 1392n
preplace netloc PS_Phase_Controller|cfg_to_axis_PhaseInc_M_AXIS 1 2 2 NJ 1512 NJ
levelinfo -pg 1 0 200 650 1993 2443 2590
levelinfo -hier PS_Phase_Controller * 680 960 1350 *
pagesize -pg 1 -db -bbox -sgen -160 -120 2830 2380
pagesize -hier PS_Phase_Controller -db -bbox -sgen 510 1172 1400 2232
"
}

  # Restore current instance
  current_bd_instance $oldCurInst
}
  
# Hierarchical cell: Block_QControl
proc create_hier_cell_Block_QControl { parentCell nameHier } {

  variable script_folder

  if { $parentCell eq "" || $nameHier eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2092 -severity "ERROR" "create_hier_cell_Block_QControl() - Empty argument(s)!"}
     return
  }

  # Get object for parentCell
  set parentObj [get_bd_cells $parentCell]
  if { $parentObj == "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2090 -severity "ERROR" "Unable to find parent cell <$parentCell>!"}
     return
  }

  # Make sure parentObj is hier blk
  set parentType [get_property TYPE $parentObj]
  if { $parentType ne "hier" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2091 -severity "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be <hier>."}
     return
  }

  # Save current instance; Restore later
  set oldCurInst [current_bd_instance .]

  # Set parent object as current
  current_bd_instance $parentObj

  # Create cell and set as current instance
  set hier_obj [create_bd_cell -type hier $nameHier]
  current_bd_instance $hier_obj

  # Create interface pins
  create_bd_intf_pin -mode Master -vlnv xilinx.com:interface:axis_rtl:1.0 M_AXIS

  create_bd_intf_pin -mode Slave -vlnv xilinx.com:interface:axis_rtl:1.0 S_AXIS_SIGNAL_M


  # Create pins
  create_bd_pin -dir I -type clk a_clk
  create_bd_pin -dir I -from 1023 -to 0 cfg

  # Create instance: QControl, and set properties
  set block_name QControl
  set block_cell_name QControl
  if { [catch {set QControl [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $QControl eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: cfg_select_qcontrol, and set properties
  set block_name cfg_select
  set block_cell_name cfg_select_qcontrol
  if { [catch {set cfg_select_qcontrol [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_select_qcontrol eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.CFG_SWBIT {3} \
    CONFIG.SRC_ADDR {3} \
  ] $cfg_select_qcontrol


  # Create instance: cfg_to_axis_qc_delay, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_axis_qc_delay
  if { [catch {set cfg_to_axis_qc_delay [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_axis_qc_delay eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {16} \
    CONFIG.SRC_ADDR {29} \
    CONFIG.SRC_BITS {16} \
  ] $cfg_to_axis_qc_delay


  # Create instance: cfg_to_axis_qc_gain, and set properties
  set block_name cfg_to_axis
  set block_cell_name cfg_to_axis_qc_gain
  if { [catch {set cfg_to_axis_qc_gain [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $cfg_to_axis_qc_gain eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property -dict [list \
    CONFIG.DST_WIDTH {16} \
    CONFIG.SRC_ADDR {29} \
    CONFIG.SRC_BITS {32} \
  ] $cfg_to_axis_qc_gain


  # Create interface connections
  connect_bd_intf_net -intf_net QControl_M_AXIS [get_bd_intf_pins M_AXIS] [get_bd_intf_pins QControl/M_AXIS]
  connect_bd_intf_net -intf_net axis_dc_filter_0_M_AXIS_AC16 [get_bd_intf_pins S_AXIS_SIGNAL_M] [get_bd_intf_pins QControl/S_AXIS_SIGNAL_M]

  # Create port connections
  connect_bd_net -net PS_cfg_data [get_bd_pins cfg] [get_bd_pins cfg_select_qcontrol/cfg] [get_bd_pins cfg_to_axis_qc_delay/cfg] [get_bd_pins cfg_to_axis_qc_gain/cfg]
  connect_bd_net -net axis_red_pitaya_adc_0_adc_clk1 [get_bd_pins a_clk] [get_bd_pins QControl/a_clk] [get_bd_pins QControl/adc_clk] [get_bd_pins cfg_to_axis_qc_delay/a_clk] [get_bd_pins cfg_to_axis_qc_gain/a_clk]
  connect_bd_net -net cfg_select_qcontrol_status [get_bd_pins cfg_select_qcontrol/status] [get_bd_pins QControl/QC_enable]
  connect_bd_net -net cfg_to_axis_qc_delay_data [get_bd_pins cfg_to_axis_qc_delay/data] [get_bd_pins QControl/QC_delay]
  connect_bd_net -net cfg_to_axis_qc_gain_data [get_bd_pins cfg_to_axis_qc_gain/data] [get_bd_pins QControl/QC_gain]

  # Restore current instance
  current_bd_instance $oldCurInst
}
  variable script_folder

  if { $parentCell eq "" } {
     set parentCell [get_bd_cells /]
  }

  # Get object for parentCell
  set parentObj [get_bd_cells $parentCell]
  if { $parentObj == "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2090 -severity "ERROR" "Unable to find parent cell <$parentCell>!"}
     return
  }

  # Make sure parentObj is hier blk
  set parentType [get_property TYPE $parentObj]
  if { $parentType ne "hier" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2091 -severity "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be <hier>."}
     return
  }

  # Save current instance; Restore later
  set oldCurInst [current_bd_instance .]

  # Set parent object as current
  current_bd_instance $parentObj


  # Create interface ports
  set DDR [ create_bd_intf_port -mode Master -vlnv xilinx.com:interface:ddrx_rtl:1.0 DDR ]

  set FIXED_IO [ create_bd_intf_port -mode Master -vlnv xilinx.com:display_processing_system7:fixedio_rtl:1.0 FIXED_IO ]

  set Vaux0 [ create_bd_intf_port -mode Slave -vlnv xilinx.com:interface:diff_analog_io_rtl:1.0 Vaux0 ]

  set Vaux1 [ create_bd_intf_port -mode Slave -vlnv xilinx.com:interface:diff_analog_io_rtl:1.0 Vaux1 ]

  set Vaux8 [ create_bd_intf_port -mode Slave -vlnv xilinx.com:interface:diff_analog_io_rtl:1.0 Vaux8 ]

  set Vaux9 [ create_bd_intf_port -mode Slave -vlnv xilinx.com:interface:diff_analog_io_rtl:1.0 Vaux9 ]

  set Vp_Vn [ create_bd_intf_port -mode Slave -vlnv xilinx.com:interface:diff_analog_io_rtl:1.0 Vp_Vn ]

  set gpio_rtl_0 [ create_bd_intf_port -mode Master -vlnv xilinx.com:interface:gpio_rtl:1.0 gpio_rtl_0 ]

  set spi_rtl_0 [ create_bd_intf_port -mode Master -vlnv xilinx.com:interface:spi_rtl:1.0 spi_rtl_0 ]

  set gpio_rtl_1 [ create_bd_intf_port -mode Master -vlnv xilinx.com:interface:gpio_rtl:1.0 gpio_rtl_1 ]

  set gpio_rtl_2 [ create_bd_intf_port -mode Master -vlnv xilinx.com:interface:gpio_rtl:1.0 gpio_rtl_2 ]


  # Create ports
  set adc_clk_n_i [ create_bd_port -dir I adc_clk_n_i ]
  set adc_clk_p_i [ create_bd_port -dir I adc_clk_p_i ]
  set adc_csn_o [ create_bd_port -dir O adc_csn_o ]
  set adc_dat_a_i [ create_bd_port -dir I -from 13 -to 0 adc_dat_a_i ]
  set adc_dat_b_i [ create_bd_port -dir I -from 13 -to 0 adc_dat_b_i ]
  set adc_enc_n_o [ create_bd_port -dir O adc_enc_n_o ]
  set adc_enc_p_o [ create_bd_port -dir O adc_enc_p_o ]
  set dac_clk_o [ create_bd_port -dir O dac_clk_o ]
  set dac_dat_o [ create_bd_port -dir O -from 13 -to 0 dac_dat_o ]
  set dac_pwm_o [ create_bd_port -dir O -from 3 -to 0 dac_pwm_o ]
  set dac_rst_o [ create_bd_port -dir O dac_rst_o ]
  set dac_sel_o [ create_bd_port -dir O dac_sel_o ]
  set dac_wrt_o [ create_bd_port -dir O dac_wrt_o ]
  set daisy_n_i [ create_bd_port -dir I -from 1 -to 0 daisy_n_i ]
  set daisy_n_o [ create_bd_port -dir O -from 1 -to 0 daisy_n_o ]
  set daisy_p_i [ create_bd_port -dir I -from 1 -to 0 daisy_p_i ]
  set daisy_p_o [ create_bd_port -dir O -from 1 -to 0 daisy_p_o ]
  set exp_n_io [ create_bd_port -dir IO -from 7 -to 0 exp_n_io ]
  set exp_p_io [ create_bd_port -dir IO -from 7 -to 0 exp_p_io ]
  set led_o [ create_bd_port -dir O -from 7 -to 0 led_o ]
  set reset_rtl_0 [ create_bd_port -dir I -type rst reset_rtl_0 ]
  set_property -dict [ list \
   CONFIG.POLARITY {ACTIVE_HIGH} \
 ] $reset_rtl_0

  # Create instance: Block_QControl
  create_hier_cell_Block_QControl [current_bd_instance .] Block_QControl

  # Create instance: PAC_PLL
  create_hier_cell_PAC_PLL [current_bd_instance .] PAC_PLL

  # Create instance: PS
  create_hier_cell_PS [current_bd_instance .] PS

  # Create instance: PS_data_transport
  create_hier_cell_PS_data_transport [current_bd_instance .] PS_data_transport

  # Create instance: SPM_control_logic
  create_hier_cell_SPM_control_logic [current_bd_instance .] SPM_control_logic

  # Create instance: VolumeAdjuster16_14, and set properties
  set block_name VolumeAdjuster16_14
  set block_cell_name VolumeAdjuster16_14
  if { [catch {set VolumeAdjuster16_14 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $VolumeAdjuster16_14 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: Volume_QControl_Mixer, and set properties
  set block_name Volume_QControl_Mixer
  set block_cell_name Volume_QControl_Mixer
  if { [catch {set Volume_QControl_Mixer [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $Volume_QControl_Mixer eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: axis_red_pitaya_adc_0, and set properties
  set axis_red_pitaya_adc_0 [ create_bd_cell -type ip -vlnv pavel-demin:user:axis_red_pitaya_adc:1.0 axis_red_pitaya_adc_0 ]

  # Create instance: axis_red_pitaya_dac_0, and set properties
  set axis_red_pitaya_dac_0 [ create_bd_cell -type ip -vlnv pavel-demin:user:axis_red_pitaya_dac:1.0 axis_red_pitaya_dac_0 ]

  # Create instance: led_connect_0, and set properties
  set block_name led_connect
  set block_cell_name led_connect_0
  if { [catch {set led_connect_0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $led_connect_0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
  
  # Create instance: clk_wiz_0, and set properties
  set clk_wiz_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:clk_wiz:6.0 clk_wiz_0 ]
  set_property -dict [list \
    CONFIG.CLKIN1_JITTER_PS {80.0} \
    CONFIG.CLKIN2_JITTER_PS {166.66} \
    CONFIG.CLKOUT1_JITTER {104.759} \
    CONFIG.CLKOUT1_PHASE_ERROR {96.948} \
    CONFIG.CLKOUT1_REQUESTED_OUT_FREQ {250} \
    CONFIG.CLKOUT2_JITTER {137.150} \
    CONFIG.CLKOUT2_PHASE_ERROR {96.948} \
    CONFIG.CLKOUT2_REQUESTED_OUT_FREQ {62.5} \
    CONFIG.CLKOUT2_USED {true} \
    CONFIG.MMCM_CLKFBOUT_MULT_F {8.000} \
    CONFIG.MMCM_CLKIN1_PERIOD {8.000} \
    CONFIG.MMCM_CLKIN2_PERIOD {10.000} \
    CONFIG.MMCM_CLKOUT0_DIVIDE_F {4.000} \
    CONFIG.MMCM_CLKOUT1_DIVIDE {16} \
    CONFIG.MMCM_DIVCLK_DIVIDE {1} \
    CONFIG.NUM_OUT_CLKS {2} \
    CONFIG.PRIM_IN_FREQ {125} \
    CONFIG.SECONDARY_SOURCE {Single_ended_clock_capable_pin} \
    CONFIG.USE_INCLK_SWITCHOVER {false} \
    CONFIG.USE_RESET {false} \
  ] $clk_wiz_0


  # Create instance: util_ds_buf_1, and set properties
  set util_ds_buf_1 [ create_bd_cell -type ip -vlnv xilinx.com:ip:util_ds_buf:2.2 util_ds_buf_1 ]
  set_property CONFIG.C_SIZE {2} $util_ds_buf_1


  # Create instance: util_ds_buf_2, and set properties
  set util_ds_buf_2 [ create_bd_cell -type ip -vlnv xilinx.com:ip:util_ds_buf:2.2 util_ds_buf_2 ]
  set_property -dict [list \
    CONFIG.C_BUF_TYPE {OBUFDS} \
    CONFIG.C_SIZE {2} \
  ] $util_ds_buf_2


  # Create instance: xlconcat_spmc_status, and set properties
  set xlconcat_spmc_status [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconcat:2.1 xlconcat_spmc_status ]
  set_property CONFIG.NUM_PORTS {9} $xlconcat_spmc_status


  # Create instance: xlslice_0, and set properties
  set xlslice_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_0 ]
  set_property CONFIG.DIN_FROM {23} $xlslice_0


  # Create instance: axis_sc26_to_14_0, and set properties
  set block_name axis_sc28_to_14
  set block_cell_name axis_sc26_to_14_0
  if { [catch {set axis_sc26_to_14_0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2095 -severity "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   } elseif { $axis_sc26_to_14_0 eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2096 -severity "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
     return 1
   }
    set_property CONFIG.SRC_BITS {25} $axis_sc26_to_14_0


  # Create interface connections
  connect_bd_intf_net -intf_net PAC_PLL_M_AXIS2 [get_bd_intf_pins PAC_PLL/M_AXIS2] [get_bd_intf_pins SPM_control_logic/S_AXIS_ch5s]
  connect_bd_intf_net -intf_net PS_Amplitude_Controller_M_AXIS_CONTROL [get_bd_intf_pins PAC_PLL/M_AXIS_CONTROL] [get_bd_intf_pins VolumeAdjuster16_14/SV_AXIS]
  connect_bd_intf_net -intf_net PS_Amplitude_Controller_M_AXIS_CONTROL2 [get_bd_intf_pins PAC_PLL/M_AXIS_CONTROL2] [get_bd_intf_pins PS_data_transport/S_AXIS2]
  connect_bd_intf_net -intf_net PS_Amplitude_Controller_M_AXIS_PASS2 [get_bd_intf_pins PAC_PLL/M_AXIS_PASS2] [get_bd_intf_pins PS_data_transport/S_AXIS5]
  connect_bd_intf_net -intf_net PS_BRAM_PORTA [get_bd_intf_pins PS/BRAM_PORTA_PACPLL] [get_bd_intf_pins PS_data_transport/BRAM_PORTB]
  connect_bd_intf_net -intf_net PS_BRAM_PORTA1 [get_bd_intf_pins PS/BRAM_PORTA_SPMC] [get_bd_intf_pins SPM_control_logic/BRAM_PORTB]
  connect_bd_intf_net -intf_net PS_Phase_Controller_M_AXIS_CONTROL2 [get_bd_intf_pins PAC_PLL/M_AXIS_CONTROL3] [get_bd_intf_pins PS_data_transport/S_AXIS3]
  connect_bd_intf_net -intf_net PS_Phase_Controller_M_AXIS_PASS2 [get_bd_intf_pins PAC_PLL/M_AXIS_PASS3] [get_bd_intf_pins PS_data_transport/S_AXIS4]
  connect_bd_intf_net -intf_net PS_data_transport_M_AXIS3 [get_bd_intf_pins PS_data_transport/M_AXIS3] [get_bd_intf_pins SPM_control_logic/S_AXIS_chAs]
  connect_bd_intf_net -intf_net PS_data_transport_M_AXIS5 [get_bd_intf_pins PS_data_transport/M_AXIS5] [get_bd_intf_pins SPM_control_logic/S_AXIS_chCs]
  connect_bd_intf_net -intf_net PS_data_transport_M_AXIS6 [get_bd_intf_pins PS_data_transport/M_AXIS6] [get_bd_intf_pins SPM_control_logic/S_AXIS_chEs]
  connect_bd_intf_net -intf_net PS_data_transport_M_AXIS_ADC2 [get_bd_intf_pins PAC_PLL/M_AXIS_S1] [get_bd_intf_pins SPM_control_logic/S_AXIS]
  connect_bd_intf_net -intf_net PS_data_transport_M_AXIS_aux [get_bd_intf_pins PS_data_transport/M_AXIS_aux] [get_bd_intf_pins axis_sc26_to_14_0/S_AXIS_aux]
  connect_bd_intf_net -intf_net QControl_M_AXIS [get_bd_intf_pins Block_QControl/M_AXIS] [get_bd_intf_pins Volume_QControl_Mixer/S_AXIS_QS]
  connect_bd_intf_net -intf_net S_AXIS1_1 [get_bd_intf_pins PAC_PLL/M_AXIS_S01] [get_bd_intf_pins PS_data_transport/S_AXIS1]
  connect_bd_intf_net -intf_net S_AXIS_ch9s_1 [get_bd_intf_pins SPM_control_logic/S_AXIS_ch9s] [get_bd_intf_pins PS_data_transport/M_AXIS2]
  connect_bd_intf_net -intf_net S_AXIS_chBs_1 [get_bd_intf_pins SPM_control_logic/S_AXIS_chBs] [get_bd_intf_pins PS_data_transport/M_AXIS4]
  connect_bd_intf_net -intf_net VolumeAdjuster16_14_M_AXIS [get_bd_intf_pins VolumeAdjuster16_14/M_AXIS] [get_bd_intf_pins Volume_QControl_Mixer/S_AXIS_VS]
  connect_bd_intf_net -intf_net Volume_QControl_Mixer_0_M_AXIS [get_bd_intf_pins Volume_QControl_Mixer/M_AXIS] [get_bd_intf_pins axis_red_pitaya_dac_0/S_AXIS]
  connect_bd_intf_net -intf_net axis_dc_filter_0_M_AXIS_AC16 [get_bd_intf_pins Block_QControl/S_AXIS_SIGNAL_M] [get_bd_intf_pins PAC_PLL/M_AXIS_AC16]
  connect_bd_intf_net -intf_net axis_dc_filter_0_M_AXIS_ACDC [get_bd_intf_pins PAC_PLL/M_AXIS_ACDC] [get_bd_intf_pins PS_data_transport/S_AXIS6]
  connect_bd_intf_net -intf_net axis_red_pitaya_adc_0_M_AXIS [get_bd_intf_pins PAC_PLL/S_AXIS_SIGNAL] [get_bd_intf_pins axis_red_pitaya_adc_0/M_AXIS]
  connect_bd_intf_net -intf_net axis_sc26_to_14_0_M_AXIS [get_bd_intf_pins VolumeAdjuster16_14/S_AXIS] [get_bd_intf_pins axis_sc26_to_14_0/M_AXIS]
  connect_bd_intf_net -intf_net lms_phase_amplitude_detector_0_M_AXIS_SC [get_bd_intf_pins PAC_PLL/M_AXIS_SC] [get_bd_intf_pins axis_sc26_to_14_0/S_AXIS]
  connect_bd_intf_net -intf_net processing_system7_0_DDR [get_bd_intf_ports DDR] [get_bd_intf_pins PS/DDR]
  connect_bd_intf_net -intf_net processing_system7_0_FIXED_IO [get_bd_intf_ports FIXED_IO] [get_bd_intf_pins PS/FIXED_IO]

  # Create port connections
  connect_bd_net -net Net [get_bd_ports exp_n_io] [get_bd_pins SPM_control_logic/exp_n_io]
  connect_bd_net -net Net1 [get_bd_ports exp_p_io] [get_bd_pins SPM_control_logic/exp_p_io]
  connect_bd_net -net PS_Amplitude_Controller_status_max [get_bd_pins PAC_PLL/status_max] [get_bd_pins led_connect_0/led3]
  connect_bd_net -net PS_Amplitude_Controller_status_min [get_bd_pins PAC_PLL/status_min] [get_bd_pins led_connect_0/led2]
  connect_bd_net -net PS_Dout [get_bd_pins PS/cfg_data_reg_1] [get_bd_pins PAC_PLL/cfg1] [get_bd_pins PS_data_transport/cfg1] [get_bd_pins SPM_control_logic/cfg1]
  connect_bd_net -net PS_Phase_Controller_mon_control_B -boundary_type upper [get_bd_pins PAC_PLL/mon_control_B]
  connect_bd_net -net PS_Phase_Controller_status_max [get_bd_pins PAC_PLL/status_max1] [get_bd_pins led_connect_0/led6]
  connect_bd_net -net PS_Phase_Controller_status_min [get_bd_pins PAC_PLL/status_min1] [get_bd_pins led_connect_0/led5]
  connect_bd_net -net PS_cfg_data [get_bd_pins PS/cfg_data_reg_0] [get_bd_pins Block_QControl/cfg] [get_bd_pins PAC_PLL/cfg] [get_bd_pins PS_data_transport/cfg0]
  connect_bd_net -net PS_cfg_data_reg_2 [get_bd_pins PS/cfg_data_reg_2] [get_bd_pins PS_data_transport/cfg2]
  connect_bd_net -net PS_cfg_data_reg_3 [get_bd_pins PS/cfg_data_reg_3] [get_bd_pins SPM_control_logic/cfg3]
  connect_bd_net -net PS_data_transport_enable [get_bd_pins PS_data_transport/enable] [get_bd_pins led_connect_0/led7]
  connect_bd_net -net PS_data_transport_finished_state [get_bd_pins PS_data_transport/McBSP_Frame] [get_bd_pins led_connect_0/led8]
  connect_bd_net -net PS_data_transport_mon_control [get_bd_pins PS_data_transport/mon_control] [get_bd_pins PS/gpio_io_6_x13]
  connect_bd_net -net PS_data_transport_writeposition [get_bd_pins PS_data_transport/writeposition] [get_bd_pins PS/gpio_io_5_x12]
  connect_bd_net -net SPM_control_logic_M_AXIS_PASS_tdata [get_bd_pins SPM_control_logic/M_AXIS_PASS_tdata] [get_bd_pins PS/gpio_io_6_x14]
  connect_bd_net -net SPM_control_logic_M_AXIS_XSMON_tdata [get_bd_pins SPM_control_logic/M_AXIS_XSMON_tdata] [get_bd_pins PS/gpio_io_0_x1]
  connect_bd_net -net SPM_control_logic_M_AXIS_ZSMON_tdata [get_bd_pins SPM_control_logic/M_AXIS_ZSMON_tdata] [get_bd_pins PS/gpio_io_9_x19]
  connect_bd_net -net SPM_control_logic_dbg_status [get_bd_pins SPM_control_logic/dbg_status] [get_bd_pins xlslice_0/Din]
  connect_bd_net -net SPM_control_logic_enable [get_bd_pins SPM_control_logic/enable] [get_bd_pins xlconcat_spmc_status/In0]
  connect_bd_net -net SPM_control_logic_gvp_finished [get_bd_pins SPM_control_logic/gvp_finished] [get_bd_pins xlconcat_spmc_status/In1]
  connect_bd_net -net SPM_control_logic_gvp_hold [get_bd_pins SPM_control_logic/gvp_hold] [get_bd_pins xlconcat_spmc_status/In2]
  connect_bd_net -net SPM_control_logic_last_write_addr [get_bd_pins SPM_control_logic/last_write_addr] [get_bd_pins PS/gpio_io_10_x21]
  connect_bd_net -net adc_clk_n_i_1 [get_bd_ports adc_clk_n_i] [get_bd_pins axis_red_pitaya_adc_0/adc_clk_n]
  connect_bd_net -net adc_clk_p_i_1 [get_bd_ports adc_clk_p_i] [get_bd_pins axis_red_pitaya_adc_0/adc_clk_p]
  connect_bd_net -net adc_dat_a_i_1 [get_bd_ports adc_dat_a_i] [get_bd_pins axis_red_pitaya_adc_0/adc_dat_a]
  connect_bd_net -net adc_dat_b_i_1 [get_bd_ports adc_dat_b_i] [get_bd_pins axis_red_pitaya_adc_0/adc_dat_b]
  connect_bd_net -net amplitude_controller_mon_signal [get_bd_pins PAC_PLL/mon_signal] [get_bd_pins PS/gpio_io_1_x4]
  connect_bd_net -net axis_dc_filter_0_dbg_m [get_bd_pins PAC_PLL/dbg_m] [get_bd_pins PS/gpio_io_1_x3]
  connect_bd_net -net axis_dc_filter_0_dbg_mdc [get_bd_pins PAC_PLL/dbg_mdc] [get_bd_pins PS/gpio_io_2_x5]
  connect_bd_net -net axis_red_pitaya_adc_0_adc_clk1 [get_bd_pins axis_red_pitaya_adc_0/adc_clk] [get_bd_pins Block_QControl/a_clk] [get_bd_pins PAC_PLL/aclk] [get_bd_pins PS_data_transport/a_clk] [get_bd_pins SPM_control_logic/a_clk] [get_bd_pins VolumeAdjuster16_14/a_clk] [get_bd_pins VolumeAdjuster16_14/adc_clk] [get_bd_pins Volume_QControl_Mixer/a_clk] [get_bd_pins Volume_QControl_Mixer/adc_clk] [get_bd_pins axis_red_pitaya_dac_0/aclk] [get_bd_pins clk_wiz_0/clk_in1] [get_bd_pins axis_sc26_to_14_0/a_clk]
  connect_bd_net -net axis_red_pitaya_adc_0_adc_csn [get_bd_pins axis_red_pitaya_adc_0/adc_csn] [get_bd_ports adc_csn_o]
  connect_bd_net -net axis_red_pitaya_dac_0_dac_clk [get_bd_pins axis_red_pitaya_dac_0/dac_clk] [get_bd_ports dac_clk_o]
  connect_bd_net -net axis_red_pitaya_dac_0_dac_dat [get_bd_pins axis_red_pitaya_dac_0/dac_dat] [get_bd_ports dac_dat_o]
  connect_bd_net -net axis_red_pitaya_dac_0_dac_rst [get_bd_pins axis_red_pitaya_dac_0/dac_rst] [get_bd_ports dac_rst_o]
  connect_bd_net -net axis_red_pitaya_dac_0_dac_sel [get_bd_pins axis_red_pitaya_dac_0/dac_sel] [get_bd_ports dac_sel_o]
  connect_bd_net -net axis_red_pitaya_dac_0_dac_wrt [get_bd_pins axis_red_pitaya_dac_0/dac_wrt] [get_bd_ports dac_wrt_o]
  connect_bd_net -net cfg_axis_phaseinc_status [get_bd_pins PAC_PLL/enable] [get_bd_pins led_connect_0/led4]
  connect_bd_net -net cfg_axis_volume_status [get_bd_pins PAC_PLL/enable1] [get_bd_pins led_connect_0/led1]
  connect_bd_net -net clk_wiz_0_clk_out1 [get_bd_pins clk_wiz_0/clk_out1] [get_bd_pins axis_red_pitaya_dac_0/ddr_clk]
  connect_bd_net -net clk_wiz_0_locked [get_bd_pins clk_wiz_0/locked] [get_bd_pins axis_red_pitaya_dac_0/locked]
  connect_bd_net -net daisy_n_i_1 [get_bd_ports daisy_n_i] [get_bd_pins util_ds_buf_1/IBUF_DS_N]
  connect_bd_net -net daisy_p_i_1 [get_bd_ports daisy_p_i] [get_bd_pins util_ds_buf_1/IBUF_DS_P]
  connect_bd_net -net gpio2_io_9_x20_1 [get_bd_pins SPM_control_logic/M_AXIS_Z0MON_tdata] [get_bd_pins PS/gpio2_io_9_x20]
  connect_bd_net -net gpio2_io_i_1 [get_bd_pins PAC_PLL/mon_signal1] [get_bd_pins PS/gpio_io_4_x10]
  connect_bd_net -net gpio2_io_i_2 [get_bd_pins SPM_control_logic/M_AXIS_Z_tdata] [get_bd_pins PS/gpio_io_10_x22]
  connect_bd_net -net gpio_io_0_x2_1 [get_bd_pins SPM_control_logic/M_AXIS_YSMON_tdata] [get_bd_pins PS/gpio_io_0_x2]
  connect_bd_net -net gpio_io_3_x7_1 [get_bd_pins PAC_PLL/mon_control] [get_bd_pins PS/gpio_io_3_x7]
  connect_bd_net -net gpio_io_3_x8_1 [get_bd_pins PAC_PLL/mon_control1] [get_bd_pins PS/gpio_io_3_x8]
  connect_bd_net -net gpio_io_4_x9_1 [get_bd_pins PAC_PLL/mon_control_lower33] [get_bd_pins PS/gpio_io_4_x9]
  connect_bd_net -net gpio_io_5_x11_1 [get_bd_pins PS_data_transport/delta_frequency_monitor] [get_bd_pins PS/gpio_io_5_x11]
  connect_bd_net -net gpio_io_7_x15_1 [get_bd_pins SPM_control_logic/mon3] [get_bd_pins PS/gpio_io_7_x15]
  connect_bd_net -net gpio_io_7_x16_1 [get_bd_pins SPM_control_logic/mon0] [get_bd_pins PS/gpio_io_7_x16]
  connect_bd_net -net gpio_io_8_x17_1 [get_bd_pins SPM_control_logic/mon1] [get_bd_pins PS/gpio_io_8_x17]
  connect_bd_net -net gpio_io_8_x18_1 [get_bd_pins SPM_control_logic/mon2] [get_bd_pins PS/gpio_io_8_x18]
  connect_bd_net -net led_connect_0_leds [get_bd_pins led_connect_0/leds] [get_bd_ports led_o]
  connect_bd_net -net lms_phase_amplitude_detector_0_zero_spcp [get_bd_pins PAC_PLL/zero_spcp] [get_bd_pins PS_data_transport/zero_spcp]
  connect_bd_net -net util_ds_buf_1_IBUF_OUT [get_bd_pins util_ds_buf_1/IBUF_OUT] [get_bd_pins util_ds_buf_2/OBUF_IN]
  connect_bd_net -net util_ds_buf_2_OBUF_DS_N [get_bd_pins util_ds_buf_2/OBUF_DS_N] [get_bd_ports daisy_n_o]
  connect_bd_net -net util_ds_buf_2_OBUF_DS_P [get_bd_pins util_ds_buf_2/OBUF_DS_P] [get_bd_ports daisy_p_o]
  connect_bd_net -net xlconcat_spmc_status_dout [get_bd_pins xlconcat_spmc_status/dout] [get_bd_pins PS/gpio_io_2_x6]
  connect_bd_net -net xlslice_0_Dout [get_bd_pins xlslice_0/Dout] [get_bd_pins xlconcat_spmc_status/In8]

  # Create address segments
  assign_bd_address -offset 0x40000000 -range 0x00200000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_bram_reader_0/s00_axi/reg0] -force
  assign_bd_address -offset 0x50000000 -range 0x00200000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_bram_reader_1/s00_axi/reg0] -force
  assign_bd_address -offset 0x42000000 -range 0x00002000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_cfg_register_0/s_axi/reg0] -force
  assign_bd_address -offset 0x43000000 -range 0x00010000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_cfg_register_1/s_axi/reg0] -force
  assign_bd_address -offset 0x42002000 -range 0x00001000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_gpio_0/S_AXI/Reg] -force
  assign_bd_address -offset 0x4200C000 -range 0x00001000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_gpio_10/S_AXI/Reg] -force
  assign_bd_address -offset 0x42003000 -range 0x00001000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_gpio_1/S_AXI/Reg] -force
  assign_bd_address -offset 0x42004000 -range 0x00001000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_gpio_2/S_AXI/Reg] -force
  assign_bd_address -offset 0x42005000 -range 0x00001000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_gpio_3/S_AXI/Reg] -force
  assign_bd_address -offset 0x42006000 -range 0x00001000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_gpio_4/S_AXI/Reg] -force
  assign_bd_address -offset 0x42007000 -range 0x00001000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_gpio_5/S_AXI/Reg] -force
  assign_bd_address -offset 0x42008000 -range 0x00001000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_gpio_6/S_AXI/Reg] -force
  assign_bd_address -offset 0x42009000 -range 0x00001000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_gpio_7/S_AXI/Reg] -force
  assign_bd_address -offset 0x4200A000 -range 0x00001000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_gpio_8/S_AXI/Reg] -force
  assign_bd_address -offset 0x4200B000 -range 0x00001000 -target_address_space [get_bd_addr_spaces PS/processing_system7_Zynq/Data] [get_bd_addr_segs PS/axi_gpio_9/S_AXI/Reg] -force

  # Perform GUI Layout
  regenerate_bd_layout -layout_string {
   "ActiveEmotionalView":"Default View",
   "Default View_ScaleFactor":"0.79974",
   "Default View_TopLeft":"-788,3",
   "ExpandedHierarchyInLayout":"",
   "guistr":"# # String gsaved with Nlview 7.5.8 2022-09-21 7111 VDI=41 GEI=38 GUI=JA:10.0 TLS
#  -string -flagsOSRD
preplace port DDR -pg 1 -lvl 9 -x 3840 -y 1010 -defaultsOSRD
preplace port FIXED_IO -pg 1 -lvl 9 -x 3840 -y 1180 -defaultsOSRD
preplace port Vaux0 -pg 1 -lvl 0 -x -10 -y 20 -defaultsOSRD
preplace port Vaux1 -pg 1 -lvl 0 -x -10 -y 50 -defaultsOSRD
preplace port Vaux8 -pg 1 -lvl 0 -x -10 -y 80 -defaultsOSRD
preplace port Vaux9 -pg 1 -lvl 0 -x -10 -y 110 -defaultsOSRD
preplace port Vp_Vn -pg 1 -lvl 0 -x -10 -y 140 -defaultsOSRD
preplace port gpio_rtl_0 -pg 1 -lvl 9 -x 3840 -y 50 -defaultsOSRD
preplace port spi_rtl_0 -pg 1 -lvl 9 -x 3840 -y 240 -defaultsOSRD
preplace port gpio_rtl_1 -pg 1 -lvl 9 -x 3840 -y 80 -defaultsOSRD
preplace port gpio_rtl_2 -pg 1 -lvl 9 -x 3840 -y 110 -defaultsOSRD
preplace port port-id_adc_clk_n_i -pg 1 -lvl 0 -x -10 -y 1410 -defaultsOSRD
preplace port port-id_adc_clk_p_i -pg 1 -lvl 0 -x -10 -y 1380 -defaultsOSRD
preplace port port-id_adc_csn_o -pg 1 -lvl 9 -x 3840 -y 1210 -defaultsOSRD
preplace port port-id_adc_enc_n_o -pg 1 -lvl 9 -x 3840 -y 140 -defaultsOSRD
preplace port port-id_adc_enc_p_o -pg 1 -lvl 9 -x 3840 -y 210 -defaultsOSRD
preplace port port-id_dac_clk_o -pg 1 -lvl 9 -x 3840 -y 1250 -defaultsOSRD
preplace port port-id_dac_rst_o -pg 1 -lvl 9 -x 3840 -y 1280 -defaultsOSRD
preplace port port-id_dac_sel_o -pg 1 -lvl 9 -x 3840 -y 1310 -defaultsOSRD
preplace port port-id_dac_wrt_o -pg 1 -lvl 9 -x 3840 -y 1340 -defaultsOSRD
preplace port port-id_reset_rtl_0 -pg 1 -lvl 0 -x -10 -y 170 -defaultsOSRD
preplace portBus adc_dat_a_i -pg 1 -lvl 0 -x -10 -y 1440 -defaultsOSRD
preplace portBus adc_dat_b_i -pg 1 -lvl 0 -x -10 -y 1470 -defaultsOSRD
preplace portBus dac_dat_o -pg 1 -lvl 9 -x 3840 -y 1370 -defaultsOSRD
preplace portBus dac_pwm_o -pg 1 -lvl 9 -x 3840 -y 20 -defaultsOSRD
preplace portBus daisy_n_i -pg 1 -lvl 0 -x -10 -y 1520 -defaultsOSRD
preplace portBus daisy_n_o -pg 1 -lvl 9 -x 3840 -y 1130 -defaultsOSRD
preplace portBus daisy_p_i -pg 1 -lvl 0 -x -10 -y 1340 -defaultsOSRD
preplace portBus daisy_p_o -pg 1 -lvl 9 -x 3840 -y 1100 -defaultsOSRD
preplace portBus exp_n_io -pg 1 -lvl 9 -x 3840 -y 600 -defaultsOSRD
preplace portBus exp_p_io -pg 1 -lvl 9 -x 3840 -y 320 -defaultsOSRD
preplace portBus led_o -pg 1 -lvl 9 -x 3840 -y 180 -defaultsOSRD
preplace inst Block_QControl -pg 1 -lvl 6 -x 2949 -y 1090 -defaultsOSRD
preplace inst PAC_PLL -pg 1 -lvl 3 -x 940 -y 360 -defaultsOSRD
preplace inst PS -pg 1 -lvl 3 -x 940 -y 1070 -defaultsOSRD
preplace inst PS_data_transport -pg 1 -lvl 4 -x 1780 -y 560 -defaultsOSRD
preplace inst SPM_control_logic -pg 1 -lvl 5 -x 2432 -y 500 -defaultsOSRD
preplace inst VolumeAdjuster16_14 -pg 1 -lvl 6 -x 2949 -y 1280 -defaultsOSRD
preplace inst Volume_QControl_Mixer -pg 1 -lvl 7 -x 3290 -y 1280 -defaultsOSRD
preplace inst axis_red_pitaya_adc_0 -pg 1 -lvl 2 -x 390 -y 1430 -defaultsOSRD
preplace inst axis_red_pitaya_dac_0 -pg 1 -lvl 8 -x 3640 -y 1310 -defaultsOSRD
preplace inst led_connect_0 -pg 1 -lvl 8 -x 3640 -y 180 -defaultsOSRD
preplace inst clk_wiz_0 -pg 1 -lvl 7 -x 3290 -y 1450 -defaultsOSRD
preplace inst util_ds_buf_1 -pg 1 -lvl 7 -x 3290 -y 1100 -defaultsOSRD
preplace inst util_ds_buf_2 -pg 1 -lvl 8 -x 3640 -y 1100 -defaultsOSRD
preplace inst xlconcat_spmc_status -pg 1 -lvl 2 -x 390 -y 960 -defaultsOSRD
preplace inst xlslice_0 -pg 1 -lvl 1 -x 130 -y 1040 -defaultsOSRD
preplace inst axis_sc26_to_14_0 -pg 1 -lvl 5 -x 2432 -y 850 -defaultsOSRD
preplace netloc Net 1 5 4 NJ 580 NJ 580 NJ 580 3800J
preplace netloc Net1 1 5 4 NJ 300 NJ 300 3490J 320 NJ
preplace netloc PS_Amplitude_Controller_status_max 1 3 5 1210J 210 1980J 190 NJ 190 NJ 190 3460
preplace netloc PS_Amplitude_Controller_status_min 1 3 5 1220J 190 1960J 180 NJ 180 NJ 180 3450
preplace netloc PS_Dout 1 2 3 700 1330 1290 740 2252J
preplace netloc PS_Phase_Controller_mon_control_B 1 3 1 N 480
preplace netloc PS_Phase_Controller_status_max 1 3 5 1230J 250 2070J 220 NJ 220 NJ 220 3490
preplace netloc PS_Phase_Controller_status_min 1 3 5 1240J 240 2060J 210 NJ 210 NJ 210 3480
preplace netloc PS_cfg_data 1 2 4 690 1340 1570 1110 NJ 1110 N
preplace netloc PS_cfg_data_reg_2 1 3 1 1300 670n
preplace netloc PS_cfg_data_reg_3 1 3 2 1600 780 2242J
preplace netloc PS_data_transport_enable 1 4 4 2080 230 NJ 230 NJ 230 NJ
preplace netloc PS_data_transport_finished_state 1 4 4 2090 240 NJ 240 NJ 240 3440J
preplace netloc PS_data_transport_mon_control 1 2 3 600 1420 NJ 1420 1970
preplace netloc PS_data_transport_writeposition 1 2 3 640 1400 NJ 1400 1960
preplace netloc SPM_control_logic_M_AXIS_PASS_tdata 1 2 4 630 1460 NJ 1460 NJ 1460 2760
preplace netloc SPM_control_logic_M_AXIS_XSMON_tdata 1 2 4 550 1440 NJ 1440 NJ 1440 2730
preplace netloc SPM_control_logic_M_AXIS_ZSMON_tdata 1 2 4 610 1470 NJ 1470 NJ 1470 2750
preplace netloc SPM_control_logic_dbg_status 1 0 6 20 750 NJ 750 NJ 750 NJ 750 NJ 750 2630
preplace netloc SPM_control_logic_enable 1 1 5 250 760 NJ 760 NJ 760 NJ 760 2710
preplace netloc SPM_control_logic_gvp_finished 1 1 5 270 800 NJ 800 NJ 800 1990J 930 2740
preplace netloc SPM_control_logic_gvp_hold 1 1 5 260 770 NJ 770 NJ 770 NJ 770 2670
preplace netloc SPM_control_logic_last_write_addr 1 2 4 560 1530 NJ 1530 NJ 1530 2700
preplace netloc adc_clk_n_i_1 1 0 2 NJ 1410 260J
preplace netloc adc_clk_p_i_1 1 0 2 NJ 1380 260J
preplace netloc adc_dat_a_i_1 1 0 2 NJ 1440 NJ
preplace netloc adc_dat_b_i_1 1 0 2 10J 1460 NJ
preplace netloc amplitude_controller_mon_signal 1 2 2 680 1350 1130
preplace netloc axis_dc_filter_0_dbg_m 1 2 2 750 780 1180
preplace netloc axis_dc_filter_0_dbg_mdc 1 2 2 740 740 1170
preplace netloc axis_red_pitaya_adc_0_adc_clk1 1 2 6 530 1430 1560 810 2232 940 2779 1190 3130 1190 3440
preplace netloc axis_red_pitaya_adc_0_adc_csn 1 2 7 NJ 1450 1590J 1160 NJ 1160 NJ 1160 3110J 1180 NJ 1180 3790J
preplace netloc axis_red_pitaya_dac_0_dac_clk 1 8 1 3790J 1250n
preplace netloc axis_red_pitaya_dac_0_dac_dat 1 8 1 3800J 1350n
preplace netloc axis_red_pitaya_dac_0_dac_rst 1 8 1 3800J 1280n
preplace netloc axis_red_pitaya_dac_0_dac_sel 1 8 1 NJ 1310
preplace netloc axis_red_pitaya_dac_0_dac_wrt 1 8 1 3790J 1330n
preplace netloc cfg_axis_phaseinc_status 1 3 5 1200J 230 2000J 200 NJ 200 NJ 200 3470
preplace netloc cfg_axis_volume_status 1 3 5 1190J 170 NJ 170 NJ 170 NJ 170 3440
preplace netloc clk_wiz_0_clk_out1 1 7 1 3440 1320n
preplace netloc clk_wiz_0_locked 1 7 1 3490 1340n
preplace netloc daisy_n_i_1 1 0 7 NJ 1520 NJ 1520 NJ 1520 1600J 1180 NJ 1180 NJ 1180 3100J
preplace netloc daisy_p_i_1 1 0 7 NJ 1340 NJ 1340 520J 1390 1580J 1170 NJ 1170 NJ 1170 3090J
preplace netloc gpio2_io_9_x20_1 1 2 4 650 1380 NJ 1380 NJ 1380 2690
preplace netloc gpio2_io_i_1 1 2 2 720 720 1120
preplace netloc gpio2_io_i_2 1 2 4 660 1370 NJ 1370 NJ 1370 2620
preplace netloc gpio_io_0_x2_1 1 2 4 580 1490 NJ 1490 NJ 1490 2720
preplace netloc gpio_io_3_x7_1 1 2 2 760 790 1140
preplace netloc gpio_io_3_x8_1 1 2 2 730 730 1160
preplace netloc gpio_io_4_x9_1 1 2 2 710 710 1150
preplace netloc gpio_io_5_x11_1 1 2 3 540 1510 NJ 1510 1980
preplace netloc gpio_io_7_x15_1 1 2 4 570 1500 NJ 1500 NJ 1500 2680
preplace netloc gpio_io_7_x16_1 1 2 4 670 1360 NJ 1360 NJ 1360 2660
preplace netloc gpio_io_8_x17_1 1 2 4 620 1410 NJ 1410 NJ 1410 2650
preplace netloc gpio_io_8_x18_1 1 2 4 590 1480 NJ 1480 NJ 1480 2640
preplace netloc led_connect_0_leds 1 8 1 NJ 180
preplace netloc lms_phase_amplitude_detector_0_zero_spcp 1 3 1 1190 660n
preplace netloc util_ds_buf_1_IBUF_OUT 1 7 1 N 1100
preplace netloc util_ds_buf_2_OBUF_DS_N 1 8 1 3790J 1120n
preplace netloc util_ds_buf_2_OBUF_DS_P 1 8 1 NJ 1100
preplace netloc xlconcat_spmc_status_dout 1 2 1 N 960
preplace netloc xlslice_0_Dout 1 1 1 NJ 1040
preplace netloc PAC_PLL_M_AXIS2 1 3 2 NJ 300 2060
preplace netloc PS_Amplitude_Controller_M_AXIS_CONTROL 1 3 3 1360 160 NJ 160 2799J
preplace netloc PS_Amplitude_Controller_M_AXIS_CONTROL2 1 3 1 1340 120n
preplace netloc PS_Amplitude_Controller_M_AXIS_PASS2 1 3 1 1270 200n
preplace netloc PS_BRAM_PORTA 1 3 1 1250 430n
preplace netloc PS_BRAM_PORTA1 1 3 2 1280J 370 1960
preplace netloc PS_Phase_Controller_M_AXIS_CONTROL2 1 3 1 1290 140n
preplace netloc PS_Phase_Controller_M_AXIS_PASS2 1 3 1 1260 220n
preplace netloc PS_data_transport_M_AXIS3 1 4 1 2020 460n
preplace netloc PS_data_transport_M_AXIS5 1 4 1 2040 500n
preplace netloc PS_data_transport_M_AXIS6 1 4 1 2050 520n
preplace netloc PS_data_transport_M_AXIS_ADC2 1 3 2 NJ 280 2100
preplace netloc PS_data_transport_M_AXIS_aux 1 4 1 2000 440n
preplace netloc QControl_M_AXIS 1 6 1 3120 1090n
preplace netloc S_AXIS1_1 1 3 1 1160 240n
preplace netloc S_AXIS_ch9s_1 1 4 1 2010 440n
preplace netloc S_AXIS_chBs_1 1 4 1 2030 480n
preplace netloc VolumeAdjuster16_14_M_AXIS 1 6 1 3140 1270n
preplace netloc Volume_QControl_Mixer_0_M_AXIS 1 7 1 N 1280
preplace netloc axis_dc_filter_0_M_AXIS_AC16 1 3 3 1370 150 NJ 150 2809J
preplace netloc axis_dc_filter_0_M_AXIS_ACDC 1 3 1 1330 80n
preplace netloc axis_red_pitaya_adc_0_M_AXIS 1 2 1 510 330n
preplace netloc axis_sc26_to_14_0_M_AXIS 1 5 1 2789 850n
preplace netloc lms_phase_amplitude_detector_0_M_AXIS_SC 1 3 2 NJ 260 2070
preplace netloc processing_system7_0_DDR 1 3 6 1320J 1010 NJ 1010 NJ 1010 NJ 1010 NJ 1010 NJ
preplace netloc processing_system7_0_FIXED_IO 1 3 6 1310J 1000 NJ 1000 NJ 1000 NJ 1000 NJ 1000 3800J
levelinfo -pg 1 -10 130 390 940 1780 2432 2949 3290 3640 3840
pagesize -pg 1 -db -bbox -sgen -190 0 10040 4250
"
}

  # Restore current instance
  current_bd_instance $oldCurInst

  validate_bd_design
  save_bd_design
  close_bd_design $design_name 
}
# End of cr_bd_system()
cr_bd_system ""
set_property REGISTERED_WITH_MANAGER "1" [get_files system.bd ] 
set_property SYNTH_CHECKPOINT_MODE "Hierarchical" [get_files system.bd ] 

set idrFlowPropertiesConstraints ""
catch {
 set idrFlowPropertiesConstraints [get_param runs.disableIDRFlowPropertyConstraints]
 set_param runs.disableIDRFlowPropertyConstraints 1
}

# Create 'synth_1' run (if not found)
if {[string equal [get_runs -quiet synth_1] ""]} {
    create_run -name synth_1 -part xc7z020clg400-1 -flow {Vivado Synthesis 2023} -strategy "Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
} else {
  set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
  set_property flow "Vivado Synthesis 2023" [get_runs synth_1]
}
set obj [get_runs synth_1]
set_property set_report_strategy_name 1 $obj
set_property report_strategy {Vivado Synthesis Default Reports} $obj
set_property set_report_strategy_name 0 $obj
# Create 'synth_1_synth_report_utilization_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
  create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
}
set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
if { $obj != "" } {

}
set obj [get_runs synth_1]
set_property -name "part" -value "xc7z020clg400-1" -objects $obj
set_property -name "auto_incremental_checkpoint" -value "1" -objects $obj
set_property -name "strategy" -value "Vivado Synthesis Defaults" -objects $obj

# set the current synth run
current_run -synthesis [get_runs synth_1]

# Create 'impl_1' run (if not found)
if {[string equal [get_runs -quiet impl_1] ""]} {
    create_run -name impl_1 -part xc7z020clg400-1 -flow {Vivado Implementation 2023} -strategy "Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
} else {
  set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
  set_property flow "Vivado Implementation 2023" [get_runs impl_1]
}
set obj [get_runs impl_1]
set_property set_report_strategy_name 1 $obj
set_property report_strategy {Vivado Implementation Default Reports} $obj
set_property set_report_strategy_name 0 $obj
# Create 'impl_1_init_report_timing_summary_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
  create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
if { $obj != "" } {
set_property -name "is_enabled" -value "0" -objects $obj
set_property -name "options.max_paths" -value "10" -objects $obj
set_property -name "options.report_unconstrained" -value "1" -objects $obj

}
# Create 'impl_1_opt_report_drc_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
  create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
if { $obj != "" } {

}
# Create 'impl_1_opt_report_timing_summary_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
  create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
if { $obj != "" } {
set_property -name "is_enabled" -value "0" -objects $obj
set_property -name "options.max_paths" -value "10" -objects $obj
set_property -name "options.report_unconstrained" -value "1" -objects $obj

}
# Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
  create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
if { $obj != "" } {
set_property -name "is_enabled" -value "0" -objects $obj
set_property -name "options.max_paths" -value "10" -objects $obj
set_property -name "options.report_unconstrained" -value "1" -objects $obj

}
# Create 'impl_1_place_report_io_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
  create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
if { $obj != "" } {

}
# Create 'impl_1_place_report_utilization_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
  create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
if { $obj != "" } {

}
# Create 'impl_1_place_report_control_sets_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
  create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
if { $obj != "" } {
set_property -name "options.verbose" -value "1" -objects $obj

}
# Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
  create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
if { $obj != "" } {
set_property -name "is_enabled" -value "0" -objects $obj

}
# Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
  create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
if { $obj != "" } {
set_property -name "is_enabled" -value "0" -objects $obj

}
# Create 'impl_1_place_report_timing_summary_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
  create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
if { $obj != "" } {
set_property -name "is_enabled" -value "0" -objects $obj
set_property -name "options.max_paths" -value "10" -objects $obj
set_property -name "options.report_unconstrained" -value "1" -objects $obj

}
# Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
  create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
if { $obj != "" } {
set_property -name "is_enabled" -value "0" -objects $obj
set_property -name "options.max_paths" -value "10" -objects $obj
set_property -name "options.report_unconstrained" -value "1" -objects $obj

}
# Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
  create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
if { $obj != "" } {
set_property -name "is_enabled" -value "0" -objects $obj
set_property -name "options.max_paths" -value "10" -objects $obj
set_property -name "options.report_unconstrained" -value "1" -objects $obj

}
# Create 'impl_1_route_report_drc_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
  create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
if { $obj != "" } {

}
# Create 'impl_1_route_report_methodology_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
  create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
if { $obj != "" } {

}
# Create 'impl_1_route_report_power_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
  create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
if { $obj != "" } {

}
# Create 'impl_1_route_report_route_status_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
  create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
if { $obj != "" } {

}
# Create 'impl_1_route_report_timing_summary_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
  create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
if { $obj != "" } {
set_property -name "options.max_paths" -value "10" -objects $obj
set_property -name "options.report_unconstrained" -value "1" -objects $obj

}
# Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
  create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
if { $obj != "" } {

}
# Create 'impl_1_route_report_clock_utilization_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
  create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
if { $obj != "" } {

}
# Create 'impl_1_route_report_bus_skew_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
  create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
if { $obj != "" } {
set_property -name "options.warn_on_violation" -value "1" -objects $obj

}
# Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
  create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
if { $obj != "" } {
set_property -name "options.max_paths" -value "10" -objects $obj
set_property -name "options.report_unconstrained" -value "1" -objects $obj
set_property -name "options.warn_on_violation" -value "1" -objects $obj

}
# Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
  create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
}
set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
if { $obj != "" } {
set_property -name "options.warn_on_violation" -value "1" -objects $obj

}
set obj [get_runs impl_1]
set_property -name "part" -value "xc7z020clg400-1" -objects $obj
set_property -name "strategy" -value "Vivado Implementation Defaults" -objects $obj
set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj

# set the current impl run
current_run -implementation [get_runs impl_1]
catch {
 if { $idrFlowPropertiesConstraints != {} } {
   set_param runs.disableIDRFlowPropertyConstraints $idrFlowPropertiesConstraints
 }
}

puts "INFO: Project created:${_xil_proj_name_}"
# Create 'drc_1' gadget (if not found)
if {[string equal [get_dashboard_gadgets  [ list "drc_1" ] ] ""]} {
create_dashboard_gadget -name {drc_1} -type drc
}
set obj [get_dashboard_gadgets [ list "drc_1" ] ]
set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj

# Create 'methodology_1' gadget (if not found)
if {[string equal [get_dashboard_gadgets  [ list "methodology_1" ] ] ""]} {
create_dashboard_gadget -name {methodology_1} -type methodology
}
set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj

# Create 'power_1' gadget (if not found)
if {[string equal [get_dashboard_gadgets  [ list "power_1" ] ] ""]} {
create_dashboard_gadget -name {power_1} -type power
}
set obj [get_dashboard_gadgets [ list "power_1" ] ]
set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj

# Create 'timing_1' gadget (if not found)
if {[string equal [get_dashboard_gadgets  [ list "timing_1" ] ] ""]} {
create_dashboard_gadget -name {timing_1} -type timing
}
set obj [get_dashboard_gadgets [ list "timing_1" ] ]
set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj

# Create 'utilization_1' gadget (if not found)
if {[string equal [get_dashboard_gadgets  [ list "utilization_1" ] ] ""]} {
create_dashboard_gadget -name {utilization_1} -type utilization
}
set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
set_property -name "run.step" -value "synth_design" -objects $obj
set_property -name "run.type" -value "synthesis" -objects $obj

# Create 'utilization_2' gadget (if not found)
if {[string equal [get_dashboard_gadgets  [ list "utilization_2" ] ] ""]} {
create_dashboard_gadget -name {utilization_2} -type utilization
}
set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj

move_dashboard_gadget -name {utilization_1} -row 0 -col 0
move_dashboard_gadget -name {power_1} -row 1 -col 0
move_dashboard_gadget -name {drc_1} -row 2 -col 0
move_dashboard_gadget -name {timing_1} -row 0 -col 1
move_dashboard_gadget -name {utilization_2} -row 1 -col 1
move_dashboard_gadget -name {methodology_1} -row 2 -col 1
