
# Loading additional proc with user specified bodies to compute parameter values.
source [file join [file dirname [file dirname [info script]]] gui/rdma_adc_app_v1_0.gtcl]

# Definitional proc to organize widgets for parameters.
proc init_gui { IPINST } {
  ipgui::add_param $IPINST -name "Component_Name"
  #Adding Page
  set Page_0 [ipgui::add_page $IPINST -name "Page 0"]
  ipgui::add_param $IPINST -name "g_adc_eth_clk_same" -parent ${Page_0}
  ipgui::add_param $IPINST -name "g_packet_length" -parent ${Page_0}
  ipgui::add_param $IPINST -name "g_threshold_words" -parent ${Page_0}
  ipgui::add_param $IPINST -name "g_reg_udp_port" -parent ${Page_0}
  ipgui::add_param $IPINST -name "g_roce_udp_port" -parent ${Page_0}
  ipgui::add_param $IPINST -name "g_roce_qp_num" -parent ${Page_0}
  ipgui::add_param $IPINST -name "g_debug" -parent ${Page_0}


}

proc update_PARAM_VALUE.g_threshold_words { PARAM_VALUE.g_threshold_words PARAM_VALUE.g_threshold_words PARAM_VALUE.g_packet_length } {
	# Procedure called to update g_threshold_words when any of the dependent parameters in the arguments change
	
	set g_threshold_words ${PARAM_VALUE.g_threshold_words}
	set g_packet_length ${PARAM_VALUE.g_packet_length}
	set values(g_threshold_words) [get_property value $g_threshold_words]
	set values(g_packet_length) [get_property value $g_packet_length]
	if { [gen_USERPARAMETER_g_threshold_words_ENABLEMENT $values(g_threshold_words) $values(g_packet_length)] } {
		set_property enabled true $g_threshold_words
	} else {
		set_property enabled false $g_threshold_words
	}
}

proc validate_PARAM_VALUE.g_threshold_words { PARAM_VALUE.g_threshold_words } {
	# Procedure called to validate g_threshold_words
	return true
}

proc update_PARAM_VALUE.g_adc_eth_clk_same { PARAM_VALUE.g_adc_eth_clk_same } {
	# Procedure called to update g_adc_eth_clk_same when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.g_adc_eth_clk_same { PARAM_VALUE.g_adc_eth_clk_same } {
	# Procedure called to validate g_adc_eth_clk_same
	return true
}

proc update_PARAM_VALUE.g_debug { PARAM_VALUE.g_debug } {
	# Procedure called to update g_debug when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.g_debug { PARAM_VALUE.g_debug } {
	# Procedure called to validate g_debug
	return true
}

proc update_PARAM_VALUE.g_packet_length { PARAM_VALUE.g_packet_length } {
	# Procedure called to update g_packet_length when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.g_packet_length { PARAM_VALUE.g_packet_length } {
	# Procedure called to validate g_packet_length
	return true
}

proc update_PARAM_VALUE.g_reg_udp_port { PARAM_VALUE.g_reg_udp_port } {
	# Procedure called to update g_reg_udp_port when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.g_reg_udp_port { PARAM_VALUE.g_reg_udp_port } {
	# Procedure called to validate g_reg_udp_port
	return true
}

proc update_PARAM_VALUE.g_roce_qp_num { PARAM_VALUE.g_roce_qp_num } {
	# Procedure called to update g_roce_qp_num when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.g_roce_qp_num { PARAM_VALUE.g_roce_qp_num } {
	# Procedure called to validate g_roce_qp_num
	return true
}

proc update_PARAM_VALUE.g_roce_udp_port { PARAM_VALUE.g_roce_udp_port } {
	# Procedure called to update g_roce_udp_port when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.g_roce_udp_port { PARAM_VALUE.g_roce_udp_port } {
	# Procedure called to validate g_roce_udp_port
	return true
}


proc update_MODELPARAM_VALUE.g_packet_length { MODELPARAM_VALUE.g_packet_length PARAM_VALUE.g_packet_length } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.g_packet_length}] ${MODELPARAM_VALUE.g_packet_length}
}

proc update_MODELPARAM_VALUE.g_threshold_words { MODELPARAM_VALUE.g_threshold_words PARAM_VALUE.g_threshold_words } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.g_threshold_words}] ${MODELPARAM_VALUE.g_threshold_words}
}

proc update_MODELPARAM_VALUE.g_roce_qp_num { MODELPARAM_VALUE.g_roce_qp_num PARAM_VALUE.g_roce_qp_num } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.g_roce_qp_num}] ${MODELPARAM_VALUE.g_roce_qp_num}
}

proc update_MODELPARAM_VALUE.g_reg_udp_port { MODELPARAM_VALUE.g_reg_udp_port PARAM_VALUE.g_reg_udp_port } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.g_reg_udp_port}] ${MODELPARAM_VALUE.g_reg_udp_port}
}

proc update_MODELPARAM_VALUE.g_roce_udp_port { MODELPARAM_VALUE.g_roce_udp_port PARAM_VALUE.g_roce_udp_port } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.g_roce_udp_port}] ${MODELPARAM_VALUE.g_roce_udp_port}
}

proc update_MODELPARAM_VALUE.g_adc_eth_clk_same { MODELPARAM_VALUE.g_adc_eth_clk_same PARAM_VALUE.g_adc_eth_clk_same } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.g_adc_eth_clk_same}] ${MODELPARAM_VALUE.g_adc_eth_clk_same}
}

proc update_MODELPARAM_VALUE.g_debug { MODELPARAM_VALUE.g_debug PARAM_VALUE.g_debug } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.g_debug}] ${MODELPARAM_VALUE.g_debug}
}

