axiethernet : Modified namespace from HSM to HSI.

Signed-off-by: Kishore Kumar Korathaluri <kkorath@xilinx.com>
This commit is contained in:
Kishore Kumar Korathaluri 2014-12-23 10:56:56 +05:30 committed by Nava kishore Manne
parent 1da61a9d14
commit 928304cce1
2 changed files with 70 additions and 70 deletions

View file

@ -65,7 +65,7 @@ proc add_field_to_periph_config_struct { deviceid fieldval } {
}
proc display_avb_warning_if_applicable { periph } {
set avb_param_val ""
set avb_param_val [::hsm::utils::get_param_value $periph C_AVB]
set avb_param_val [::hsi::utils::get_param_value $periph C_AVB]
if { $avb_param_val == 1 } {
puts "*******************************************************************************\r\n"
puts "WARNING: Audio Video Bridging (AVB) functionality is ENABLED in the AXI Ethernet core."
@ -91,10 +91,10 @@ proc xdefine_axiethernet_include_file {drv_handle file_name drv_string} {
global periph_ninstances
# Open include file
set file_handle [::hsm::utils::open_include_file $file_name]
set file_handle [::hsi::utils::open_include_file $file_name]
# Get all peripherals connected to this driver
set periphs [::hsm::utils::get_common_driver_ips $drv_handle]
set periphs [::hsi::utils::get_common_driver_ips $drv_handle]
# ----------------------------------------------
# PART 1 - AXI Ethernet related parameters
@ -104,10 +104,10 @@ proc xdefine_axiethernet_include_file {drv_handle file_name drv_string} {
set periph_ninstances 0
puts $file_handle "/* Definitions for driver [string toupper [get_property NAME $drv_handle]] */"
foreach periph $periphs {
init_periph_config_struct $periph_ninstances
incr periph_ninstances 1
init_periph_config_struct $periph_ninstances
incr periph_ninstances 1
}
puts $file_handle "\#define [::hsm::utils::get_driver_param_name $drv_string NUM_INSTANCES] $periph_ninstances"
puts $file_handle "\#define [::hsi::utils::get_driver_param_name $drv_string NUM_INSTANCES] $periph_ninstances"
close $file_handle
# Now print all useful parameters for all peripherals
@ -117,7 +117,7 @@ proc xdefine_axiethernet_include_file {drv_handle file_name drv_string} {
xdefine_include_file $drv_handle "xparameters.h" "XAxiEthernet" "NUM_INSTANCES" "DEVICE_ID" "C_BASEADDR" "C_HIGHADDR" "C_TYPE" "C_TXCSUM" "C_RXCSUM" "C_PHY_TYPE" "C_TXVLAN_TRAN" "C_RXVLAN_TRAN" "C_TXVLAN_TAG" "C_RXVLAN_TAG" "C_TXVLAN_STRP" "C_RXVLAN_STRP" "C_MCAST_EXTEND" "C_STATS" "C_AVB" "C_PHYADDR"
set file_handle [::hsm::utils::open_include_file $file_name]
set file_handle [::hsi::utils::open_include_file $file_name]
# Create canonical definitions
xdefine_temac_params_canonical $file_handle $periph $device_id
@ -136,7 +136,7 @@ proc xdefine_axiethernet_include_file {drv_handle file_name drv_string} {
# -------------------------------------------------------
# PART 2 -- AXIFIFO/AXIDMA Connection related parameters
# -------------------------------------------------------
set file_handle [::hsm::utils::open_include_file $file_name]
set file_handle [::hsi::utils::open_include_file $file_name]
xdefine_axi_target_params $periphs $file_handle
puts $file_handle "\n/******************************************************************/\n"
@ -190,7 +190,7 @@ proc xdefine_axi_target_params {periphs file_handle} {
foreach p2p_busif $p2p_busifs_i {
set busif_name [string toupper [get_property NAME $p2p_busif]]
set conn_busif_handle [::hsm::utils::get_connected_intf $periph $busif_name]
set conn_busif_handle [::hsi::utils::get_connected_intf $periph $busif_name]
if { [string compare -nocase $conn_busif_handle ""] == 0} {
continue
} else {
@ -224,10 +224,10 @@ proc xdefine_axi_target_params {periphs file_handle} {
add_field_to_periph_config_struct $device_id $canonical_name
# FIFO Interrupts Handling
set int_pin [get_pins -of_objects [get_cells $tartget_per_name] INTERRUPT]
set intc_periph_type [::hsm::utils::get_connected_intr_cntrl $tartget_per_name $int_pin]
set intc_periph_type [::hsi::utils::get_connected_intr_cntrl $tartget_per_name $int_pin]
set intc_name [get_property IP_NAME $intc_periph_type]
if { $intc_name != [format "ps7_scugic"] } {
set int_id [::hsm::utils::get_port_intr_id [get_cells $tartget_per_name] $int_pin]
set int_id [::hsi::utils::get_port_intr_id [get_cells $tartget_per_name] $int_pin]
set canonical_name [format "XPAR_%s_CONNECTED_FIFO_INTR" $canonical_tag]
puts $file_handle [format "#define $canonical_name %d" $int_id]
add_field_to_periph_config_struct $device_id $canonical_name
@ -290,15 +290,15 @@ proc xdefine_temac_params_canonical {file_handle periph device_id} {
# Handle BASEADDR specially
set canonical_name [format "%s_BASEADDR" $canonical_tag]
puts $file_handle "\#define $canonical_name [::hsm::utils::get_param_value $periph C_BASEADDR]"
puts $file_handle "\#define $canonical_name [::hsi::utils::get_param_value $periph C_BASEADDR]"
add_field_to_periph_config_struct $device_id $canonical_name
# Handle HIGHADDR specially
set canonical_name [format "%s_HIGHADDR" $canonical_tag]
puts $file_handle "\#define $canonical_name [::hsm::utils::get_param_value $periph C_HIGHADDR]"
puts $file_handle "\#define $canonical_name [::hsi::utils::get_param_value $periph C_HIGHADDR]"
set canonical_name [format "%s_TEMAC_TYPE" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_TYPE]
set value [::hsi::utils::get_param_value $periph C_TYPE]
if {[llength $value] == 0} {
set value 0
}
@ -306,15 +306,15 @@ proc xdefine_temac_params_canonical {file_handle periph device_id} {
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_TXCSUM" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_TXCSUM]
set value [::hsi::utils::get_param_value $periph C_TXCSUM]
if {[llength $value] == 0} {
set value 0
set value 0
}
puts $file_handle "\#define $canonical_name $value"
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_RXCSUM" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_RXCSUM]
set value [::hsi::utils::get_param_value $periph C_RXCSUM]
if {[llength $value] == 0} {
set value 0
}
@ -322,31 +322,31 @@ proc xdefine_temac_params_canonical {file_handle periph device_id} {
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_PHY_TYPE" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_PHY_TYPE]
set value [::hsi::utils::get_param_value $periph C_PHY_TYPE]
if {[llength $value] == 0} {
set value 0
set value 0
}
puts $file_handle "\#define $canonical_name $value"
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_TXVLAN_TRAN" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_TXVLAN_TRAN]
set value [::hsi::utils::get_param_value $periph C_TXVLAN_TRAN]
if {[llength $value] == 0} {
set value 0
set value 0
}
puts $file_handle "\#define $canonical_name $value"
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_RXVLAN_TRAN" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_RXVLAN_TRAN]
set value [::hsi::utils::get_param_value $periph C_RXVLAN_TRAN]
if {[llength $value] == 0} {
set value 0
set value 0
}
puts $file_handle "\#define $canonical_name $value"
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_TXVLAN_TAG" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_TXVLAN_TAG]
set value [::hsi::utils::get_param_value $periph C_TXVLAN_TAG]
if {[llength $value] == 0} {
set value 0
}
@ -354,15 +354,15 @@ proc xdefine_temac_params_canonical {file_handle periph device_id} {
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_RXVLAN_TAG" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_RXVLAN_TAG]
set value [::hsi::utils::get_param_value $periph C_RXVLAN_TAG]
if {[llength $value] == 0} {
set value 0
set value 0
}
puts $file_handle "\#define $canonical_name $value"
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_TXVLAN_STRP" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_TXVLAN_STRP]
set value [::hsi::utils::get_param_value $periph C_TXVLAN_STRP]
if {[llength $value] == 0} {
set value 0
}
@ -370,15 +370,15 @@ proc xdefine_temac_params_canonical {file_handle periph device_id} {
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_RXVLAN_STRP" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_RXVLAN_STRP]
set value [::hsi::utils::get_param_value $periph C_RXVLAN_STRP]
if {[llength $value] == 0} {
set value 0
set value 0
}
puts $file_handle "\#define $canonical_name $value"
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_MCAST_EXTEND" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_MCAST_EXTEND]
set value [::hsi::utils::get_param_value $periph C_MCAST_EXTEND]
if {[llength $value] == 0} {
set value 0
}
@ -386,30 +386,30 @@ proc xdefine_temac_params_canonical {file_handle periph device_id} {
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_STATS" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_STATS]
set value [::hsi::utils::get_param_value $periph C_STATS]
if {[llength $value] == 0} {
set value 0
set value 0
}
puts $file_handle "\#define $canonical_name $value"
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_AVB" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_AVB]
set value [::hsi::utils::get_param_value $periph C_AVB]
if {[llength $value] == 0} {
set value 0
}
puts $file_handle "\#define $canonical_name $value"
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_ENABLE_SGMII_OVER_LVDS" $canonical_tag]
set value [::hsm::utils::get_param_value $periph C_ENABLE_LVDS]
set value [::hsi::utils::get_param_value $periph C_ENABLE_LVDS]
if {[llength $value] == 0} {
set value 0
}
puts $file_handle "\#define $canonical_name $value"
add_field_to_periph_config_struct $device_id $canonical_name
set canonical_name [format "%s_PHYADDR" $canonical_tag]
set phyaddr [::hsm::utils::get_param_value $periph C_PHYADDR]
set value [::hsm::utils::convert_binary_to_decimal $phyaddr]
set phyaddr [::hsi::utils::get_param_value $periph C_PHYADDR]
set value [::hsi::utils::convert_binary_to_decimal $phyaddr]
if {[llength $value] == 0} {
set value 0
}
@ -427,7 +427,7 @@ proc xdefine_axiethernet_config_file {file_name drv_string} {
set filename [file join "src" $file_name]
file delete $filename
set config_file [open $filename w]
::hsm::utils::write_c_header $config_file "Driver configuration"
::hsi::utils::write_c_header $config_file "Driver configuration"
puts $config_file "\#include \"xparameters.h\""
puts $config_file "\#include \"[string tolower $drv_string].h\""
puts $config_file "\n/*"
@ -485,10 +485,10 @@ proc xdefine_dma_interrupts {file_handle target_periph deviceid canonical_tag dm
if { $intc_port != "" } {
set found_intc ""
foreach intr_sink $intc_port {
set pname_type [::hsm::utils::get_connected_intr_cntrl $target_periph $intr_sink]
set pname_type [::hsi::utils::get_connected_intr_cntrl $target_periph $intr_sink]
if {$pname_type != "chipscope_ila"} {
set special [get_property IP_TYPE $pname_type]
if {[string compare -nocase $special "INTERRUPT_CNTLR"] == 0} {
set special [get_property IP_TYPE $pname_type]
if {[string compare -nocase $special "INTERRUPT_CNTLR"] == 0} {
set found_intc $intr_sink
}
}
@ -516,11 +516,11 @@ proc xdefine_dma_interrupts {file_handle target_periph deviceid canonical_tag dm
# matches the original interrupt signal we were tracking.
# If it does, put out the XPAR
if { $intc_periph_type != [format "ps7_scugic"] } {
set rx_int_id [::hsm::utils::get_port_intr_id $target_periph $dmarx_signal]
set rx_int_id [::hsi::utils::get_port_intr_id $target_periph $dmarx_signal]
set canonical_name [format "XPAR_%s_CONNECTED_DMARX_INTR" $canonical_tag]
puts $file_handle [format "#define $canonical_name %d" $rx_int_id]
add_field_to_periph_config_struct $deviceid $canonical_name
set tx_int_id [::hsm::utils::get_port_intr_id $target_periph $dmatx_signal]
set tx_int_id [::hsi::utils::get_port_intr_id $target_periph $dmatx_signal]
set canonical_name [format "XPAR_%s_CONNECTED_DMATX_INTR" $canonical_tag]
puts $file_handle [format "#define $canonical_name %d" $tx_int_id]
add_field_to_periph_config_struct $deviceid $canonical_name
@ -578,7 +578,7 @@ proc xdefine_temac_interrupt {file_handle periph device_id} {
set addentry 0
set interrupt_signal_name [get_property NAME $interrupt_port]
#set interrupt_signal [xget_hw_value $interrupt_port]
set intc_prt [::hsm::utils::get_sink_pins [get_pins -of_objects [get_cells $periph] INTERRUPT]]
set intc_prt [::hsi::utils::get_sink_pins [get_pins -of_objects [get_cells $periph] INTERRUPT]]
# Make sure the interrupt signal was connected in this design. We assume
# at least one is. (could be a bug if user just wants polled mode)
@ -621,7 +621,7 @@ proc xdefine_temac_interrupt {file_handle periph device_id} {
if { $intc_periph_type != [format "ps7_scugic"] } {
set ethernet_int_signal_name [get_pins -of_objects $periph INTERRUPT]
set int_id [::hsm::utils::get_port_intr_id $periph $ethernet_int_signal_name]
set int_id [::hsi::utils::get_port_intr_id $periph $ethernet_int_signal_name]
puts $file_handle "\#define $canonical_name $int_id"
add_field_to_periph_config_struct $device_id $canonical_name
set addentry 1
@ -639,7 +639,7 @@ proc xdefine_temac_interrupt {file_handle periph device_id} {
}
proc generate_sgmii_params {drv_handle file_name} {
set file_handle [::hsm::utils::open_include_file $file_name]
set file_handle [::hsi::utils::open_include_file $file_name]
set ips [get_cells "*"]
foreach ip $ips {
@ -698,8 +698,8 @@ proc is_gige_pcs_pma_ip_present {slave} {
set port_value [get_pins -of_objects [get_nets -of_objects [get_pins -of_objects $ipconv gmii_txd]]]
if { $port_value != 0 } {
if { [string compare -nocase $enetipinstance_name "axi_ethernet_buffer"] == 0} {
set phyaddr [::hsm::utils::get_param_value $ipconv C_PHYADDR]
set phy_addr [::hsm::utils::convert_binary_to_decimal $phyaddr]
set phyaddr [::hsi::utils::get_param_value $ipconv C_PHYADDR]
set phy_addr [::hsi::utils::convert_binary_to_decimal $phyaddr]
if {[llength $phy_addr] == 0} {
set phy_addr 0
}

View file

@ -55,7 +55,7 @@ proc gen_include_files {swproj mhsinst} {
return ""
}
if {$swproj == 1} {
set ifintr [::hsm::utils::is_ip_interrupting_current_proc $mhsinst]
set ifintr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
set dmaType [get_dma_type $mhsinst]
if {$ifintr == 1} {
@ -87,7 +87,7 @@ proc gen_src_files {swproj mhsinst} {
return ""
}
if {$swproj == 1} {
set ifintr [::hsm::utils::is_ip_interrupting_current_proc $mhsinst]
set ifintr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
set dmaType [get_dma_type $mhsinst]
if {$ifintr == 1} {
@ -118,7 +118,7 @@ proc gen_init_code {swproj mhsinst} {
if {$swproj == 1} {
set ipname [get_property NAME $mhsinst]
set ifintr [::hsm::utils::is_ip_interrupting_current_proc $mhsinst]
set ifintr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
if {$ifintr == 1} {
set dmaType [get_dma_type $mhsinst]
@ -158,7 +158,7 @@ proc gen_testfunc_call {swproj mhsinst} {
}
set ipname [get_property NAME $mhsinst]
set deviceid [::hsm::utils::get_ip_param_name $mhsinst "DEVICE_ID"]
set deviceid [::hsi::utils::get_ip_param_name $mhsinst "DEVICE_ID"]
set stdout [get_property CONFIG.STDOUT [get_os]]
if { $stdout == "" || $stdout == "none" } {
set hasStdout 0
@ -166,7 +166,7 @@ proc gen_testfunc_call {swproj mhsinst} {
set hasStdout 1
}
set dma [get_dma_type $mhsinst]
set ifintr [::hsm::utils::is_ip_interrupting_current_proc $mhsinst]
set ifintr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
set fifo_deviceid [get_fifo_info $mhsinst "id"]
set fifo_ipname [get_fifo_info $mhsinst "name"]
@ -176,7 +176,7 @@ proc gen_testfunc_call {swproj mhsinst} {
if {$ifintr == 1} {
set intr_pin_name [get_pins -of_objects [get_cells $ipname] INTERRUPT]
set intcname [::hsm::utils::get_connected_intr_cntrl $ipname $intr_pin_name]
set intcname [::hsi::utils::get_connected_intr_cntrl $ipname $intr_pin_name]
set intcvar intc
set proc [get_property IP_NAME [get_cells [get_sw_processor]]]
}
@ -359,7 +359,7 @@ proc get_fifo_info {mhsHandle type} {
if {[string compare -nocase $coreName "axi_fifo_mm_s"] == 0} {
if {[string compare -nocase $type "id"] == 0} {
set deviceid [::hsm::utils::get_ip_param_name $ipinst "DEVICE_ID"]
set deviceid [::hsi::utils::get_ip_param_name $ipinst "DEVICE_ID"]
return $deviceid
}
if {[string compare -nocase $type "name"] == 0} {
@ -376,7 +376,7 @@ proc get_dma_info {mhsinst type} {
# Add p2p periphs
foreach p2p_busif $p2p_busifs_i {
set busif_name [string toupper [get_property NAME $p2p_busif]]
set conn_busif_handle [::hsm::utils::get_connected_intf $mhsinst $busif_name]
set conn_busif_handle [::hsi::utils::get_connected_intf $mhsinst $busif_name]
if { [string compare -nocase $conn_busif_handle ""] == 0} {
continue
} else {
@ -392,7 +392,7 @@ proc get_dma_info {mhsinst type} {
set instName [get_property NAME $target_periph]
if {[string compare -nocase $target_periph_type "axi_dma"] == 0} {
if {[string compare -nocase $type "id"] == 0} {
set deviceid [::hsm::utils::get_ip_param_name $target_periph "DEVICE_ID"]
set deviceid [::hsi::utils::get_ip_param_name $target_periph "DEVICE_ID"]
return $deviceid
}
if {[string compare -nocase $type "name"] == 0} {