# 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" -display_name {FIFOs}]
  #Adding Group
  set Protocol [ipgui::add_group $IPINST -name "Protocol" -parent ${Page_0}]
  ipgui::add_param $IPINST -name "g_max_pkt_len" -parent ${Protocol}

  #Adding Group
  set ARP [ipgui::add_group $IPINST -name "ARP" -parent ${Page_0}]
  set_property tooltip {ARP} ${ARP}
  ipgui::add_param $IPINST -name "g_arp_stack_depth" -parent ${ARP}
  ipgui::add_param $IPINST -name "g_arp_enable" -parent ${ARP}

  #Adding Group
  set FIFO [ipgui::add_group $IPINST -name "FIFO" -parent ${Page_0} -layout horizontal]
  set_property tooltip {FIFO} ${FIFO}
  #Adding Group
  set TX_path [ipgui::add_group $IPINST -name "TX path" -parent ${FIFO}]
  ipgui::add_param $IPINST -name "g_tx_tfifo_type" -parent ${TX_path}
  ipgui::add_param $IPINST -name "g_tx_tfifo_depth" -parent ${TX_path}
  ipgui::add_param $IPINST -name "g_tx_dfifo_type" -parent ${TX_path}
  ipgui::add_param $IPINST -name "g_tx_dfifo_depth" -parent ${TX_path}

  #Adding Group
  set RX_path [ipgui::add_group $IPINST -name "RX path" -parent ${FIFO}]
  set_property tooltip {RX path} ${RX_path}
  ipgui::add_param $IPINST -name "g_rx_tfifo_type" -parent ${RX_path}
  ipgui::add_param $IPINST -name "g_rx_tfifo_depth" -parent ${RX_path}
  ipgui::add_param $IPINST -name "g_rx_dfifo_type" -parent ${RX_path}
  ipgui::add_param $IPINST -name "g_rx_dfifo_depth" -parent ${RX_path}


  #Adding Group
  set info [ipgui::add_group $IPINST -name "info" -parent ${Page_0} -display_name {Info}]
  ipgui::add_static_text $IPINST -name "INFO" -parent ${info} -text {Data FIFOs are 512 bits wide. 
TX and RX data FIFOs depth has to be chosen with respect to maximum packet 
length (MTU). It should be able to store minimum of two packet of this size.

TX and RX tag FIFOs depth corespond to maximum number of packets which
can be simultaneously stored in data FIFOs. 

ARP stack depth specify number of ARP requests which can be stored
in the stack and wait there until TX path is ready to respond.}



}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

