emacps : added common namesapce to all common tcl commands.
Signed-off-by: Nava kishore Manne <navam@xilinx.com>
This commit is contained in:
parent
365439178c
commit
9cef23fa37
2 changed files with 42 additions and 42 deletions
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 2011 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
|
@ -20,7 +20,7 @@
|
|||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
|
@ -38,7 +38,7 @@
|
|||
# 1.00a sdm 11/22/11 Created
|
||||
# 2.0 adk 10/12/13 Updated as per the New Tcl API's
|
||||
# 2.1 adk 11/08/14 Fixed the CR#811288 when PCS/PMA core is present in the hw
|
||||
# XPAR_GIGE_PCS_PMA_CORE_PRESENT and phy address values
|
||||
# XPAR_GIGE_PCS_PMA_CORE_PRESENT and phy address values
|
||||
# should export to the xparameters.h file.
|
||||
# 2.1 bss 09/08/14 Fixed CR#820349 to export phy address in xparameters.h
|
||||
# when GMII to RGMII converter is present in hw.
|
||||
|
@ -53,22 +53,22 @@
|
|||
proc generate {drv_handle} {
|
||||
xdefine_zynq_include_file $drv_handle "xparameters.h" "XEmacPs" "NUM_INSTANCES" "DEVICE_ID" "C_S_AXI_BASEADDR" "C_S_AXI_HIGHADDR" "C_ENET_CLK_FREQ_HZ" "C_ENET_SLCR_1000Mbps_DIV0" "C_ENET_SLCR_1000Mbps_DIV1" "C_ENET_SLCR_100Mbps_DIV0" "C_ENET_SLCR_100Mbps_DIV1" "C_ENET_SLCR_10Mbps_DIV0" "C_ENET_SLCR_10Mbps_DIV1"
|
||||
|
||||
xdefine_zynq_config_file $drv_handle "xemacps_g.c" "XEmacPs" "DEVICE_ID" "C_S_AXI_BASEADDR"
|
||||
xdefine_zynq_config_file $drv_handle "xemacps_g.c" "XEmacPs" "DEVICE_ID" "C_S_AXI_BASEADDR"
|
||||
|
||||
xdefine_zynq_canonical_xpars $drv_handle "xparameters.h" "XEmacPs" "DEVICE_ID" "C_S_AXI_BASEADDR" "C_S_AXI_HIGHADDR" "C_ENET_CLK_FREQ_HZ" "C_ENET_SLCR_1000Mbps_DIV0" "C_ENET_SLCR_1000Mbps_DIV1" "C_ENET_SLCR_100Mbps_DIV0" "C_ENET_SLCR_100Mbps_DIV1" "C_ENET_SLCR_10Mbps_DIV0" "C_ENET_SLCR_10Mbps_DIV1"
|
||||
|
||||
|
||||
generate_gmii2rgmii_params $drv_handle "xparameters.h"
|
||||
|
||||
|
||||
generate_sgmii_params $drv_handle "xparameters.h"
|
||||
|
||||
}
|
||||
|
||||
proc generate_gmii2rgmii_params {drv_handle file_name} {
|
||||
set file_handle [::hsi::utils::open_include_file $file_name]
|
||||
set ips [get_cells "*"]
|
||||
set ips [hsi::get_cells "*"]
|
||||
foreach ip $ips {
|
||||
set ipname [get_property NAME $ip]
|
||||
set periph [get_property IP_NAME $ip]
|
||||
set ipname [common::get_property NAME $ip]
|
||||
set periph [common::get_property IP_NAME $ip]
|
||||
if { [string compare -nocase $periph "ps7_ethernet"] == 0} {
|
||||
set phya [is_gmii2rgmii_conv_present $ip]
|
||||
if { $phya == 0} {
|
||||
|
@ -76,7 +76,7 @@ proc generate_gmii2rgmii_params {drv_handle file_name} {
|
|||
return 0
|
||||
}
|
||||
puts $file_handle "/* Definition for the MDIO address for the GMII2RGMII converter PL IP*/"
|
||||
|
||||
|
||||
if { [string compare -nocase $ipname "ps7_ethernet_0"] == 0} {
|
||||
puts $file_handle "\#define XPAR_GMII2RGMIICON_0N_ETH0_ADDR $phya"
|
||||
}
|
||||
|
@ -89,24 +89,24 @@ proc generate_gmii2rgmii_params {drv_handle file_name} {
|
|||
}
|
||||
close $file_handle
|
||||
}
|
||||
|
||||
|
||||
proc is_gmii2rgmii_conv_present {slave} {
|
||||
set port_value 0
|
||||
set phy_addr 0
|
||||
set ipconv 0
|
||||
set ips [get_cells "*"]
|
||||
set enetipinstance_name [get_property NAME $slave]
|
||||
|
||||
set ips [hsi::get_cells "*"]
|
||||
set enetipinstance_name [common::get_property NAME $slave]
|
||||
|
||||
foreach ip $ips {
|
||||
set convipname [get_property NAME $ip]
|
||||
set periph [get_property IP_NAME $ip]
|
||||
set convipname [common::get_property NAME $ip]
|
||||
set periph [common::get_property IP_NAME $ip]
|
||||
if { [string compare -nocase $periph "gmii_to_rgmii"] == 0} {
|
||||
set ipconv $ip
|
||||
break
|
||||
}
|
||||
}
|
||||
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 } {
|
||||
set tmp [string first "ENET0" $port_value]
|
||||
if { $tmp >= 0 } {
|
||||
|
@ -136,13 +136,13 @@ proc is_gmii2rgmii_conv_present {slave} {
|
|||
|
||||
proc generate_sgmii_params {drv_handle file_name} {
|
||||
set file_handle [::hsi::utils::open_include_file $file_name]
|
||||
set ips [get_cells "*"]
|
||||
set ips [hsi::get_cells "*"]
|
||||
|
||||
foreach ip $ips {
|
||||
set ipname [get_property NAME $ip]
|
||||
set periph [get_property IP_NAME $ip]
|
||||
set ipname [common::get_property NAME $ip]
|
||||
set periph [common::get_property IP_NAME $ip]
|
||||
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]
|
||||
}
|
||||
if { [string compare -nocase $ipname "ps7_ethernet_0"] == 0} {
|
||||
set phya [is_gige_pcs_pma_ip_present $ip]
|
||||
|
@ -166,30 +166,30 @@ proc generate_sgmii_params {drv_handle file_name} {
|
|||
}
|
||||
close $file_handle
|
||||
}
|
||||
|
||||
|
||||
proc is_gige_pcs_pma_ip_present {slave} {
|
||||
set port_value 0
|
||||
set phy_addr 0
|
||||
set ipconv 0
|
||||
|
||||
set ips [get_cells "*"]
|
||||
set enetipinstance_name [get_property IP_NAME $slave]
|
||||
|
||||
set ips [hsi::get_cells "*"]
|
||||
set enetipinstance_name [common::get_property IP_NAME $slave]
|
||||
|
||||
foreach ip $ips {
|
||||
set convipname [get_property NAME $ip]
|
||||
set periph [get_property IP_NAME $ip]
|
||||
set convipname [common::get_property NAME $ip]
|
||||
set periph [common::get_property IP_NAME $ip]
|
||||
if { [string compare -nocase $periph "gig_ethernet_pcs_pma"] == 0} {
|
||||
set sgmii_param [get_property CONFIG.c_is_sgmii $ip]
|
||||
set PhyStandarrd [get_property CONFIG.Standard $ip]
|
||||
set sgmii_param [common::get_property CONFIG.c_is_sgmii $ip]
|
||||
set PhyStandarrd [common::get_property CONFIG.Standard $ip]
|
||||
if {$sgmii_param == true || $PhyStandarrd == "1000BASEX"} {
|
||||
set ipconv $ip
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
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 } {
|
||||
set tmp [string first "ENET0" $port_value]
|
||||
if { $tmp >= 0 } {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 2011 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
|
@ -20,7 +20,7 @@
|
|||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
|
@ -133,7 +133,7 @@ proc gen_init_code {swproj mhsinst} {
|
|||
if {$ispcs_pma == 0} {
|
||||
if {$swproj == 1} {
|
||||
|
||||
set ipname [get_property NAME $mhsinst]
|
||||
set ipname [common::get_property NAME $mhsinst]
|
||||
set decl " static XEmacPs ${ipname};"
|
||||
set inc_file_lines $decl
|
||||
return $inc_file_lines
|
||||
|
@ -150,9 +150,9 @@ proc gen_testfunc_call {swproj mhsinst} {
|
|||
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 stdout [get_property CONFIG.STDOUT [get_os]]
|
||||
set stdout [common::get_property CONFIG.STDOUT [hsi::get_os]]
|
||||
if { $stdout == "" || $stdout == "none" } {
|
||||
set hasStdout 0
|
||||
} else {
|
||||
|
@ -171,9 +171,9 @@ proc gen_testfunc_call {swproj mhsinst} {
|
|||
if {$isintr == 1} {
|
||||
set intr_id "XPAR_${ipname}_INTR"
|
||||
set intr_id [string toupper $intr_id]
|
||||
|
||||
|
||||
append testfunc_call "
|
||||
|
||||
|
||||
{
|
||||
int Status;
|
||||
Status = EmacPsDmaIntrExample(&${intcvar}, &${ipname}, \\
|
||||
|
@ -190,20 +190,20 @@ proc gen_testfunc_call {swproj mhsinst} {
|
|||
if {$isintr == 1} {
|
||||
set intr_id "XPAR_${ipname}_INTR"
|
||||
set intr_id [string toupper $intr_id]
|
||||
|
||||
|
||||
append testfunc_call "
|
||||
{
|
||||
int Status;
|
||||
|
||||
print(\"\\r\\n Running Interrupt Test for ${ipname}...\\r\\n\");
|
||||
|
||||
|
||||
Status = EmacPsDmaIntrExample(&${intcvar}, &${ipname}, \\
|
||||
${deviceid}, \\
|
||||
${intr_id});
|
||||
|
||||
|
||||
if (Status == 0) {
|
||||
print(\"EmacPsDmaIntrExample PASSED\\r\\n\");
|
||||
}
|
||||
}
|
||||
else {
|
||||
print(\"EmacPsDmaIntrExample FAILED\\r\\n\");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue