axiethernet: added common namespace to all common TCL commands.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
This commit is contained in:
Nava kishore Manne 2015-04-09 17:20:45 +05:30
parent 11eb73753f
commit 252cea2a5e
2 changed files with 118 additions and 120 deletions

View file

@ -43,8 +43,6 @@
# properly (CR 810643) # properly (CR 810643)
# 29/10/14 adk Added support for generating parameters for SGMII/1000BaseX modes # 29/10/14 adk Added support for generating parameters for SGMII/1000BaseX modes
# When IP is configured with the PCS/PMA core (CR 828796) # When IP is configured with the PCS/PMA core (CR 828796)
# 8/1/15 adk Fixed TCL errors when axiethernet is configured with the
# Axi stream fifo (CR 835605).
# #
############################################################################### ###############################################################################
#uses "xillib.tcl" #uses "xillib.tcl"
@ -104,7 +102,7 @@ proc xdefine_axiethernet_include_file {drv_handle file_name drv_string} {
# Handle NUM_INSTANCES # Handle NUM_INSTANCES
set periph_ninstances 0 set periph_ninstances 0
puts $file_handle "/* Definitions for driver [string toupper [get_property NAME $drv_handle]] */" puts $file_handle "/* Definitions for driver [string toupper [common::get_property NAME $drv_handle]] */"
foreach periph $periphs { foreach periph $periphs {
init_periph_config_struct $periph_ninstances init_periph_config_struct $periph_ninstances
incr periph_ninstances 1 incr periph_ninstances 1
@ -181,9 +179,9 @@ proc xdefine_axi_target_params {periphs file_handle} {
# Get unique list of p2p peripherals # Get unique list of p2p peripherals
foreach periph $periphs { foreach periph $periphs {
set p2p_periphs [list] set p2p_periphs [list]
set periph_name [string toupper [get_property NAME $periph]] set periph_name [string toupper [common::get_property NAME $periph]]
# Get all point2point buses for periph # Get all point2point buses for periph
set p2p_busifs_i [get_intf_pins -of_objects $periph -filter "TYPE==INITIATOR"] set p2p_busifs_i [hsi::get_intf_pins -of_objects $periph -filter "TYPE==INITIATOR"]
puts $file_handle "" puts $file_handle ""
puts $file_handle "/* Canonical Axi parameters for $periph_name */" puts $file_handle "/* Canonical Axi parameters for $periph_name */"
@ -191,24 +189,24 @@ proc xdefine_axi_target_params {periphs file_handle} {
# Add p2p periphs # Add p2p periphs
foreach p2p_busif $p2p_busifs_i { foreach p2p_busif $p2p_busifs_i {
set busif_name [string toupper [get_property NAME $p2p_busif]] set busif_name [string toupper [common::get_property NAME $p2p_busif]]
set conn_busif_handle [::hsi::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} { if { [string compare -nocase $conn_busif_handle ""] == 0} {
continue continue
} else { } else {
# if there is a single match, we know if it is FIFO or DMA # if there is a single match, we know if it is FIFO or DMA
# no need for further iterations # no need for further iterations
set conn_busif_name [get_property NAME $conn_busif_handle] set conn_busif_name [common::get_property NAME $conn_busif_handle]
set target_periph [get_cells -of_objects $conn_busif_handle] set target_periph [hsi::get_cells -of_objects $conn_busif_handle]
set target_periph_type [get_property IP_NAME $target_periph] set target_periph_type [common::get_property IP_NAME $target_periph]
if { [string compare -nocase $target_periph_type "tri_mode_ethernet_mac"] == 0 } { if { [string compare -nocase $target_periph_type "tri_mode_ethernet_mac"] == 0 } {
continue continue
} }
set tartget_per_name [get_property NAME $target_periph] set tartget_per_name [common::get_property NAME $target_periph]
set target_periph_name [string toupper [get_property NAME $target_periph]] set target_periph_name [string toupper [common::get_property NAME $target_periph]]
set canonical_tag [string toupper [format "AXIETHERNET_%d" $device_id ]] set canonical_tag [string toupper [format "AXIETHERNET_%d" $device_id ]]
set validentry 1 set validentry 1
break break
} }
} }
if {$validentry == 1} { if {$validentry == 1} {
@ -220,16 +218,16 @@ proc xdefine_axi_target_params {periphs file_handle} {
puts $file_handle "#define $canonical_name XPAR_AXI_FIFO" puts $file_handle "#define $canonical_name XPAR_AXI_FIFO"
add_field_to_periph_config_struct $device_id $canonical_name add_field_to_periph_config_struct $device_id $canonical_name
set axi_fifo_baseaddr [get_property CONFIG.C_BASEADDR $target_periph] set axi_fifo_baseaddr [common::get_property CONFIG.C_BASEADDR $target_periph]
set canonical_name [format "XPAR_%s_CONNECTED_BASEADDR" $canonical_tag] set canonical_name [format "XPAR_%s_CONNECTED_BASEADDR" $canonical_tag]
puts $file_handle [format "#define $canonical_name %s" $axi_fifo_baseaddr] puts $file_handle [format "#define $canonical_name %s" $axi_fifo_baseaddr]
add_field_to_periph_config_struct $device_id $canonical_name add_field_to_periph_config_struct $device_id $canonical_name
# FIFO Interrupts Handling # FIFO Interrupts Handling
set int_pin [get_pins -of_objects [get_cells $tartget_per_name] INTERRUPT] set int_pin [hsi::get_pins -of_objects [hsi::get_cells $tartget_per_name] INTERRUPT]
set intc_periph_type [::hsi::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] set intc_name [common::get_property IP_NAME $intc_periph_type]
if { $intc_name != [format "ps7_scugic"] } { if { $intc_name != [format "ps7_scugic"] } {
set int_id [::hsi::utils::get_port_intr_id [get_cells $tartget_per_name] $int_pin] set int_id [::hsi::utils::get_port_intr_id [hsi::get_cells $tartget_per_name] $int_pin]
set canonical_name [format "XPAR_%s_CONNECTED_FIFO_INTR" $canonical_tag] set canonical_name [format "XPAR_%s_CONNECTED_FIFO_INTR" $canonical_tag]
puts $file_handle [format "#define $canonical_name %d" $int_id] puts $file_handle [format "#define $canonical_name %d" $int_id]
add_field_to_periph_config_struct $device_id $canonical_name add_field_to_periph_config_struct $device_id $canonical_name
@ -239,9 +237,9 @@ proc xdefine_axi_target_params {periphs file_handle} {
add_field_to_periph_config_struct $device_id 0xFF add_field_to_periph_config_struct $device_id 0xFF
} else { } else {
set canonical_name [format "XPAR_%s_CONNECTED_FIFO_INTR" $canonical_tag] set canonical_name [format "XPAR_%s_CONNECTED_FIFO_INTR" $canonical_tag]
set temp [string toupper $int_pin] set target_periph_name [string toupper [common::get_property NAME $target_periph_type]]
puts $file_handle [format "#define $canonical_name XPAR_FABRIC_%s_%s_INTR" $target_periph_name $temp] puts $file_handle [format "#define $canonical_name XPAR_FABRIC_%s_S2MM_INTROUT_INTR" $target_periph_name]
add_field_to_periph_config_struct $device_id $canonical_name add_field_to_periph_config_struct $deviceid $canonical_name
puts $file_handle [format "#define XPAR_%s_CONNECTED_DMARX_INTR 0xFF" $canonical_tag] puts $file_handle [format "#define XPAR_%s_CONNECTED_DMARX_INTR 0xFF" $canonical_tag]
puts $file_handle [format "#define XPAR_%s_CONNECTED_DMATX_INTR 0xFF" $canonical_tag] puts $file_handle [format "#define XPAR_%s_CONNECTED_DMATX_INTR 0xFF" $canonical_tag]
add_field_to_periph_config_struct $device_id 0xFF add_field_to_periph_config_struct $device_id 0xFF
@ -249,7 +247,7 @@ proc xdefine_axi_target_params {periphs file_handle} {
} }
} }
if {$target_periph_type == "axi_dma"} { if {$target_periph_type == "axi_dma"} {
set axi_dma_baseaddr [get_property CONFIG.C_BASEADDR $target_periph] set axi_dma_baseaddr [common::get_property CONFIG.C_BASEADDR $target_periph]
# Handle base address and connection type # Handle base address and connection type
set canonical_name [format "XPAR_%s_CONNECTED_TYPE" $canonical_tag] set canonical_name [format "XPAR_%s_CONNECTED_TYPE" $canonical_tag]
puts $file_handle "#define $canonical_name XPAR_AXI_DMA" puts $file_handle "#define $canonical_name XPAR_AXI_DMA"
@ -281,7 +279,7 @@ proc xdefine_axi_target_params {periphs file_handle} {
# ------------------------------------------------------------------ # ------------------------------------------------------------------
proc xdefine_temac_params_canonical {file_handle periph device_id} { proc xdefine_temac_params_canonical {file_handle periph device_id} {
puts $file_handle "\n/* Canonical definitions for peripheral [string toupper [get_property NAME $periph]] */" puts $file_handle "\n/* Canonical definitions for peripheral [string toupper [common::get_property NAME $periph]] */"
set canonical_tag [string toupper [format "XPAR_AXIETHERNET_%d" $device_id]] set canonical_tag [string toupper [format "XPAR_AXIETHERNET_%d" $device_id]]
@ -461,12 +459,12 @@ proc xdefine_axiethernet_config_file {file_name drv_string} {
# ------------------------------------------------------------------ # ------------------------------------------------------------------
proc xdefine_dma_interrupts {file_handle target_periph deviceid canonical_tag dmarx_signal dmatx_signal} { proc xdefine_dma_interrupts {file_handle target_periph deviceid canonical_tag dmarx_signal dmatx_signal} {
set target_periph_name [string toupper [get_property NAME $target_periph]] set target_periph_name [string toupper [common::get_property NAME $target_periph]]
# First get the interrupt ports on this AXI peripheral # First get the interrupt ports on this AXI peripheral
set interrupt_port [get_pins -of_objects $target_periph -filter {TYPE==INTERRUPT&&DIRECTION==O}] set interrupt_port [hsi::get_pins -of_objects $target_periph -filter {TYPE==INTERRUPT&&DIRECTION==O}]
if {$interrupt_port == ""} { if {$interrupt_port == ""} {
puts "Info: There are no AXIDMA Interrupt ports" puts "Info: There are no AXIDMA Interrupt ports"
puts $file_handle [format "#define XPAR_%s_CONNECTED_DMARX_INTR 0xFF" $canonical_tag] puts $file_handle [format "#define XPAR_%s_CONNECTED_DMARX_INTR 0xFF" $canonical_tag]
add_field_to_periph_config_struct $deviceid 0xFF add_field_to_periph_config_struct $deviceid 0xFF
puts $file_handle [format "#define XPAR_%s_CONNECTED_DMATX_INTR 0xFF" $canonical_tag] puts $file_handle [format "#define XPAR_%s_CONNECTED_DMATX_INTR 0xFF" $canonical_tag]
@ -479,8 +477,8 @@ proc xdefine_dma_interrupts {file_handle target_periph deviceid canonical_tag dm
set dmarx "null" set dmarx "null"
set dmatx "null" set dmatx "null"
foreach intr_port $interrupt_port { foreach intr_port $interrupt_port {
set interrupt_signal_name [get_property NAME $intr_port] set interrupt_signal_name [common::get_property NAME $intr_port]
set intc_port [get_pins -of_objects $target_periph -filter {TYPE==INTERRUPT&&DIRECTION==O}] set intc_port [hsi::get_pins -of_objects $target_periph -filter {TYPE==INTERRUPT&&DIRECTION==O}]
# Make sure the interrupt signal was connected in this design. We assume # 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) # at least one is. (could be a bug if user just wants polled mode)
@ -489,10 +487,10 @@ proc xdefine_dma_interrupts {file_handle target_periph deviceid canonical_tag dm
foreach intr_sink $intc_port { foreach intr_sink $intc_port {
set pname_type [::hsi::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"} { if {$pname_type != "chipscope_ila"} {
set special [get_property IP_TYPE $pname_type] set special [common::get_property IP_TYPE $pname_type]
if {[string compare -nocase $special "INTERRUPT_CNTLR"] == 0} { if {[string compare -nocase $special "INTERRUPT_CNTLR"] == 0} {
set found_intc $intr_sink set found_intc $intr_sink
} }
} }
} }
@ -503,11 +501,11 @@ proc xdefine_dma_interrupts {file_handle target_periph deviceid canonical_tag dm
add_field_to_periph_config_struct $deviceid 0xFF add_field_to_periph_config_struct $deviceid 0xFF
puts $file_handle [format "#define XPAR_%s_CONNECTED_DMATX_INTR 0xFF" $canonical_tag] puts $file_handle [format "#define XPAR_%s_CONNECTED_DMATX_INTR 0xFF" $canonical_tag]
add_field_to_periph_config_struct $deviceid 0xFF add_field_to_periph_config_struct $deviceid 0xFF
return return
} }
set intc_periph [get_cells -of_objects $found_intc] set intc_periph [hsi::get_cells -of_objects $found_intc]
set intc_periph_type [get_property IP_NAME $pname_type] set intc_periph_type [common::get_property IP_NAME $pname_type]
set intc_name [string toupper [get_property NAME $pname_type]] set intc_name [string toupper [common::get_property NAME $pname_type]]
} else { } else {
puts "Info: $target_periph_name interrupt signal $interrupt_signal_name not connected" puts "Info: $target_periph_name interrupt signal $interrupt_signal_name not connected"
continue continue
@ -534,12 +532,12 @@ proc xdefine_dma_interrupts {file_handle target_periph deviceid canonical_tag dm
# Now add to the config table in the proper order (RX first, then TX # Now add to the config table in the proper order (RX first, then TX
if { $intc_periph_type == [format "ps7_scugic"] } { if { $intc_periph_type == [format "ps7_scugic"] } {
set canonical_name [format "XPAR_%s_CONNECTED_DMARX_INTR" $canonical_tag] set canonical_name [format "XPAR_%s_CONNECTED_DMARX_INTR" $canonical_tag]
puts $file_handle [format "#define $canonical_name XPAR_FABRIC_%s_S2MM_INTROUT_INTR" $target_periph_name] puts $file_handle [format "#define $canonical_name XPAR_FABRIC_%s_S2MM_INTROUT_INTR" $target_periph_name]
add_field_to_periph_config_struct $deviceid $canonical_name add_field_to_periph_config_struct $deviceid $canonical_name
set canonical_name [format "XPAR_%s_CONNECTED_DMATX_INTR" $canonical_tag] set canonical_name [format "XPAR_%s_CONNECTED_DMATX_INTR" $canonical_tag]
puts $file_handle [format "#define $canonical_name XPAR_FABRIC_%s_MM2S_INTROUT_INTR" $target_periph_name] puts $file_handle [format "#define $canonical_name XPAR_FABRIC_%s_MM2S_INTROUT_INTR" $target_periph_name]
add_field_to_periph_config_struct $deviceid $canonical_name add_field_to_periph_config_struct $deviceid $canonical_name
} }
if { $addentry == 1} { if { $addentry == 1} {
@ -557,7 +555,7 @@ proc xdefine_dma_interrupts {file_handle target_periph deviceid canonical_tag dm
proc xdefine_temac_interrupt {file_handle periph device_id} { proc xdefine_temac_interrupt {file_handle periph device_id} {
#set mhs_handle [xget_hw_parent_handle $periph] #set mhs_handle [xget_hw_parent_handle $periph]
set periph_name [string toupper [get_property NAME $periph]] set periph_name [string toupper [common::get_property NAME $periph]]
# set up the canonical constant name # set up the canonical constant name
set canonical_name [format "XPAR_AXIETHERNET_%d_INTR" $device_id] set canonical_name [format "XPAR_AXIETHERNET_%d_INTR" $device_id]
@ -567,10 +565,10 @@ proc xdefine_temac_interrupt {file_handle periph device_id} {
# for the interrupt ID based on the interrupt signal name of the TEMAC # for the interrupt ID based on the interrupt signal name of the TEMAC
# #
# First get the interrupt ports on this peripheral # First get the interrupt ports on this peripheral
set interrupt_port [get_pins -of_objects $periph -filter {TYPE==INTERRUPT&&DIRECTION==O}] set interrupt_port [hsi::get_pins -of_objects $periph -filter {TYPE==INTERRUPT&&DIRECTION==O}]
if {$interrupt_port == ""} { if {$interrupt_port == ""} {
puts "Info: There are no AXI Ethernet Interrupt ports" puts "Info: There are no AXI Ethernet Interrupt ports"
# No interrupts were connected, so add dummy entry to the config structure # No interrupts were connected, so add dummy entry to the config structure
puts $file_handle [format "#define $canonical_name 0xFF"] puts $file_handle [format "#define $canonical_name 0xFF"]
add_field_to_periph_config_struct $device_id 0xFF add_field_to_periph_config_struct $device_id 0xFF
} }
@ -578,23 +576,23 @@ proc xdefine_temac_interrupt {file_handle periph device_id} {
# For each interrupt port, find out the ordinal of the interrupt line # For each interrupt port, find out the ordinal of the interrupt line
# as connected to an interrupt controller # as connected to an interrupt controller
set addentry 0 set addentry 0
set interrupt_signal_name [get_property NAME $interrupt_port] set interrupt_signal_name [common::get_property NAME $interrupt_port]
#set interrupt_signal [xget_hw_value $interrupt_port] #set interrupt_signal [xget_hw_value $interrupt_port]
set intc_prt [::hsi::utils::get_sink_pins [get_pins -of_objects [get_cells $periph] INTERRUPT]] set intc_prt [::hsi::utils::get_sink_pins [hsi::get_pins -of_objects [hsi::get_cells $periph] INTERRUPT]]
# Make sure the interrupt signal was connected in this design. We assume # 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) # at least one is. (could be a bug if user just wants polled mode)
if { $intc_prt != "" } { if { $intc_prt != "" } {
set found_intc "" set found_intc ""
foreach intr_sink $intc_prt { foreach intr_sink $intc_prt {
set phandle [get_cells -of_objects $intr_sink] set phandle [hsi::get_cells -of_objects $intr_sink]
set pname_type [get_property NAME $phandle] set pname_type [common::get_property NAME $phandle]
if {$pname_type != "chipscope_ila"} { if {$pname_type != "chipscope_ila"} {
set special [get_property IP_TYPE [get_cells $pname_type]] set special [common::get_property IP_TYPE [hsi::get_cells $pname_type]]
if {[string compare -nocase $special "INTERRUPT_CNTLR"] == 0} { if {[string compare -nocase $special "INTERRUPT_CNTLR"] == 0} {
set found_intc $intr_sink set found_intc $intr_sink
break break
} }
} }
} }
@ -602,16 +600,16 @@ proc xdefine_temac_interrupt {file_handle periph device_id} {
puts "Info: Axi Ethernet interrupt not connected to intc\n" puts "Info: Axi Ethernet interrupt not connected to intc\n"
# No interrupts were connected, so add dummy entry to the config structure # No interrupts were connected, so add dummy entry to the config structure
puts $file_handle [format "#define $canonical_name 0xFF"] puts $file_handle [format "#define $canonical_name 0xFF"]
add_field_to_periph_config_struct $device_id 0xFF add_field_to_periph_config_struct $device_id 0xFF
return return
} }
set intc_periph [get_cells -of_objects $found_intc] set intc_periph [hsi::get_cells -of_objects $found_intc]
set intc_periph_type [get_property IP_NAME $intc_periph] set intc_periph_type [common::get_property IP_NAME $intc_periph]
set intc_name [string toupper [get_property NAME $intc_periph]] set intc_name [string toupper [common::get_property NAME $intc_periph]]
} else { } else {
puts "Info: $periph_name interrupt signal $interrupt_signal_name not connected" puts "Info: $periph_name interrupt signal $interrupt_signal_name not connected"
# No interrupts were connected, so add dummy entry to the config structure # No interrupts were connected, so add dummy entry to the config structure
puts $file_handle [format "#define $canonical_name 0xFF"] puts $file_handle [format "#define $canonical_name 0xFF"]
add_field_to_periph_config_struct $device_id 0xFF add_field_to_periph_config_struct $device_id 0xFF
return return
@ -622,7 +620,7 @@ proc xdefine_temac_interrupt {file_handle periph device_id} {
# matches the original interrupt signal we were tracking. # matches the original interrupt signal we were tracking.
if { $intc_periph_type != [format "ps7_scugic"] } { if { $intc_periph_type != [format "ps7_scugic"] } {
set ethernet_int_signal_name [get_pins -of_objects $periph INTERRUPT] set ethernet_int_signal_name [hsi::get_pins -of_objects $periph INTERRUPT]
set int_id [::hsi::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" puts $file_handle "\#define $canonical_name $int_id"
add_field_to_periph_config_struct $device_id $canonical_name add_field_to_periph_config_struct $device_id $canonical_name
@ -642,17 +640,17 @@ proc xdefine_temac_interrupt {file_handle periph device_id} {
proc generate_sgmii_params {drv_handle file_name} { proc generate_sgmii_params {drv_handle file_name} {
set file_handle [::hsi::utils::open_include_file $file_name] set file_handle [::hsi::utils::open_include_file $file_name]
set ips [get_cells "*"] set ips [hsi::get_cells "*"]
foreach ip $ips { foreach ip $ips {
set periph [get_property IP_NAME $ip] set periph [common::get_property IP_NAME $ip]
if { [string compare -nocase $periph "gig_ethernet_pcs_pma"] == 0} { if { [string compare -nocase $periph "gig_ethernet_pcs_pma"] == 0} {
set PhyStandard [get_property CONFIG.Standard $ip] set PhyStandard [common::get_property CONFIG.Standard $ip]
} }
} }
foreach ip $ips { foreach ip $ips {
set periph [get_property IP_NAME $ip] set periph [common::get_property IP_NAME $ip]
if { [string compare -nocase $periph "axi_ethernet_buffer"] == 0} { if { [string compare -nocase $periph "axi_ethernet_buffer"] == 0} {
set phya [is_gige_pcs_pma_ip_present $ip] set phya [is_gige_pcs_pma_ip_present $ip]
if { $phya == 0} { if { $phya == 0} {
@ -681,14 +679,14 @@ proc is_gige_pcs_pma_ip_present {slave} {
set phy_addr 0 set phy_addr 0
set ipconv 0 set ipconv 0
set ips [get_cells "*"] set ips [hsi::get_cells "*"]
set enetipinstance_name [get_property IP_NAME $slave] set enetipinstance_name [common::get_property IP_NAME $slave]
foreach ip $ips { foreach ip $ips {
set periph [get_property IP_NAME $ip] set periph [common::get_property IP_NAME $ip]
if { [string compare -nocase $periph "gig_ethernet_pcs_pma"] == 0} { if { [string compare -nocase $periph "gig_ethernet_pcs_pma"] == 0} {
set sgmii_param [get_property CONFIG.c_is_sgmii $ip] set sgmii_param [common::get_property CONFIG.c_is_sgmii $ip]
set PhyStandarrd [get_property CONFIG.Standard $ip] set PhyStandarrd [common::get_property CONFIG.Standard $ip]
if {$sgmii_param == true || $PhyStandarrd == "1000BASEX"} { if {$sgmii_param == true || $PhyStandarrd == "1000BASEX"} {
set ipconv $ip set ipconv $ip
} }
@ -697,7 +695,7 @@ proc is_gige_pcs_pma_ip_present {slave} {
} }
if { $ipconv != 0 } { if { $ipconv != 0 } {
set port_value [get_pins -of_objects [get_nets -of_objects [get_pins -of_objects $ipconv gmii_txd]]] set port_value [hsi::get_pins -of_objects [hsi::get_nets -of_objects [hsi::get_pins -of_objects $ipconv gmii_txd]]]
if { $port_value != 0 } { if { $port_value != 0 } {
if { [string compare -nocase $enetipinstance_name "axi_ethernet_buffer"] == 0} { if { [string compare -nocase $enetipinstance_name "axi_ethernet_buffer"] == 0} {
set phyaddr [::hsi::utils::get_param_value $ipconv C_PHYADDR] set phyaddr [::hsi::utils::get_param_value $ipconv C_PHYADDR]

View file

@ -117,7 +117,7 @@ proc gen_init_code {swproj mhsinst} {
} }
if {$swproj == 1} { if {$swproj == 1} {
set ipname [get_property NAME $mhsinst] set ipname [common::get_property NAME $mhsinst]
set ifintr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst] set ifintr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
if {$ifintr == 1} { if {$ifintr == 1} {
@ -157,9 +157,9 @@ proc gen_testfunc_call {swproj mhsinst} {
return "" return ""
} }
set ipname [get_property NAME $mhsinst] set ipname [common::get_property NAME $mhsinst]
set deviceid [::hsi::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]] set stdout [common::get_property CONFIG.STDOUT [hsi::get_os]]
if { $stdout == "" || $stdout == "none" } { if { $stdout == "" || $stdout == "none" } {
set hasStdout 0 set hasStdout 0
} else { } else {
@ -175,10 +175,10 @@ proc gen_testfunc_call {swproj mhsinst} {
set dma_ipname [get_dma_info $mhsinst "name"] set dma_ipname [get_dma_info $mhsinst "name"]
if {$ifintr == 1} { if {$ifintr == 1} {
set intr_pin_name [get_pins -of_objects [get_cells $ipname] INTERRUPT] set intr_pin_name [hsi::get_pins -of_objects [hsi::get_cells $ipname] INTERRUPT]
set intcname [::hsi::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 intcvar intc
set proc [get_property IP_NAME [get_cells [get_sw_processor]]] set proc [common::get_property IP_NAME [hsi::get_cells [hsi::get_sw_processor]]]
} }
@ -350,11 +350,11 @@ proc gen_testfunc_call {swproj mhsinst} {
proc get_fifo_info {mhsHandle type} { proc get_fifo_info {mhsHandle type} {
set ipinst_list [get_cells $mhsHandle "*"] set ipinst_list [hsi::get_cells $mhsHandle "*"]
foreach ipinst $ipinst_list { foreach ipinst $ipinst_list {
set coreName [get_property IP_NAME $ipinst] set coreName [common::get_property IP_NAME $ipinst]
set instName [get_property NAME $ipinst] set instName [common::get_property NAME $ipinst]
if {[string compare -nocase $coreName "axi_fifo_mm_s"] == 0} { if {[string compare -nocase $coreName "axi_fifo_mm_s"] == 0} {
@ -370,26 +370,26 @@ proc get_fifo_info {mhsHandle type} {
} }
proc get_dma_info {mhsinst type} { proc get_dma_info {mhsinst type} {
set ipinst_list [get_cells $mhsinst "*"] set ipinst_list [hsi::get_cells $mhsinst "*"]
set p2p_busifs_i [get_intf_pins -of_objects $mhsinst -filter "TYPE==INITIATOR"] set p2p_busifs_i [hsi::get_intf_pins -of_objects $mhsinst -filter "TYPE==INITIATOR"]
# Add p2p periphs # Add p2p periphs
foreach p2p_busif $p2p_busifs_i { foreach p2p_busif $p2p_busifs_i {
set busif_name [string toupper [get_property NAME $p2p_busif]] set busif_name [string toupper [common::get_property NAME $p2p_busif]]
set conn_busif_handle [::hsi::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} { if { [string compare -nocase $conn_busif_handle ""] == 0} {
continue continue
} else { } else {
# if there is a single match, we know if it is FIFO or DMA # if there is a single match, we know if it is FIFO or DMA
# no need for further iterations # no need for further iterations
set conn_busif_name [get_property NAME $conn_busif_handle] set conn_busif_name [common::get_property NAME $conn_busif_handle]
set target_periph [get_cells -of_objects $conn_busif_handle] set target_periph [hsi::get_cells -of_objects $conn_busif_handle]
set target_periph_type [get_property IP_NAME $target_periph] set target_periph_type [common::get_property IP_NAME $target_periph]
if { [string compare -nocase $target_periph_type "tri_mode_ethernet_mac"] == 0 } { if { [string compare -nocase $target_periph_type "tri_mode_ethernet_mac"] == 0 } {
continue continue
} }
set target_periph_name [string toupper [get_property NAME $target_periph]] set target_periph_name [string toupper [common::get_property NAME $target_periph]]
set instName [get_property NAME $target_periph] set instName [common::get_property NAME $target_periph]
if {[string compare -nocase $target_periph_type "axi_dma"] == 0} { if {[string compare -nocase $target_periph_type "axi_dma"] == 0} {
if {[string compare -nocase $type "id"] == 0} { if {[string compare -nocase $type "id"] == 0} {
set deviceid [::hsi::utils::get_ip_param_name $target_periph "DEVICE_ID"] set deviceid [::hsi::utils::get_ip_param_name $target_periph "DEVICE_ID"]