uartns550 : added common namespace to all common tcl commands.

Signed-off-by: Kishore Kumar Korathaluri <kkorath@xilinx.com>
This commit is contained in:
Kishore Kumar Korathaluri 2015-01-12 09:34:16 +05:30 committed by Nava kishore Manne
parent d5ee439ea5
commit 081de99016
2 changed files with 19 additions and 19 deletions

View file

@ -77,7 +77,7 @@ proc xdefine_include_file {drv_handle file_name drv_string args} {
set arg "NUM_INSTANCES" set arg "NUM_INSTANCES"
set posn [lsearch -exact $args $arg] set posn [lsearch -exact $args $arg]
if {$posn > -1} { if {$posn > -1} {
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]] */"
# Define NUM_INSTANCES # Define NUM_INSTANCES
puts $file_handle "#define [::hsm::utils::get_driver_param_name $drv_string $arg] [llength $periphs]" puts $file_handle "#define [::hsm::utils::get_driver_param_name $drv_string $arg] [llength $periphs]"
set args [lreplace $args $posn $posn] set args [lreplace $args $posn $posn]
@ -89,7 +89,7 @@ proc xdefine_include_file {drv_handle file_name drv_string args} {
set periph [lindex $periphs 0] set periph [lindex $periphs 0]
set freq [xget_freq $periph] set freq [xget_freq $periph]
if {[llength $freq] == 0} { if {[llength $freq] == 0} {
set freq [get_property CONFIG.C_S_AXI_ACLK_FREQ_HZ $periph] set freq [common::get_property CONFIG.C_S_AXI_ACLK_FREQ_HZ $periph]
if {[llength $freq] == 0} { if {[llength $freq] == 0} {
set freq "100000000" set freq "100000000"
} }
@ -99,7 +99,7 @@ proc xdefine_include_file {drv_handle file_name drv_string args} {
# Print all parameters for all peripherals # Print all parameters for all peripherals
set device_id 0 set device_id 0
foreach periph $periphs { foreach periph $periphs {
set periph_name [string toupper [get_property NAME $periph]] set periph_name [string toupper [common::get_property NAME $periph]]
set freq [xget_freq $periph] set freq [xget_freq $periph]
puts $file_handle "" puts $file_handle ""
@ -111,7 +111,7 @@ proc xdefine_include_file {drv_handle file_name drv_string args} {
incr device_id incr device_id
} elseif {[string compare -nocase "CLOCK_FREQ_HZ" $arg] == 0} { } elseif {[string compare -nocase "CLOCK_FREQ_HZ" $arg] == 0} {
if {[llength $freq] == 0} { if {[llength $freq] == 0} {
set freq [get_property CONFIG.C_S_AXI_ACLK_FREQ_HZ $periph] set freq [common::get_property CONFIG.C_S_AXI_ACLK_FREQ_HZ $periph]
if {[llength $freq] == 0} { if {[llength $freq] == 0} {
set freq "100000000" set freq "100000000"
puts "WARNING: Clock frequency information is not available in the design, \ puts "WARNING: Clock frequency information is not available in the design, \
@ -122,7 +122,7 @@ proc xdefine_include_file {drv_handle file_name drv_string args} {
} }
set value $freq set value $freq
} else { } else {
set value [get_property CONFIG.$arg $periph] set value [common::get_property CONFIG.$arg $periph]
} }
if {[llength $value] == 0} { if {[llength $value] == 0} {
set value 0 set value 0
@ -189,7 +189,7 @@ proc xdefine_canonical_xpars {drv_handle file_name drv_string args} {
# Get the names of all the peripherals connected to this driver # Get the names of all the peripherals connected to this driver
foreach periph $periphs { foreach periph $periphs {
set peripheral_name [string toupper [get_property NAME $periph]] set peripheral_name [string toupper [common::get_property NAME $periph]]
lappend peripherals $peripheral_name lappend peripherals $peripheral_name
} }
@ -211,7 +211,7 @@ proc xdefine_canonical_xpars {drv_handle file_name drv_string args} {
set i 0 set i 0
set device_id 0 set device_id 0
foreach periph $periphs { foreach periph $periphs {
set periph_name [string toupper [get_property NAME $periph]] set periph_name [string toupper [common::get_property NAME $periph]]
# Generate canonical definitions only for the peripherals whose # Generate canonical definitions only for the peripherals whose
# canonical name is not the same as hardware instance name # canonical name is not the same as hardware instance name
@ -229,7 +229,7 @@ proc xdefine_canonical_xpars {drv_handle file_name drv_string args} {
set rvalue $device_id set rvalue $device_id
incr device_id incr device_id
} else { } else {
set rvalue [get_property CONFIG.$arg $periph] set rvalue [common::get_property CONFIG.$arg $periph]
if {[llength $rvalue] == 0} { if {[llength $rvalue] == 0} {
set rvalue 0 set rvalue 0
} }
@ -254,7 +254,7 @@ proc xget_freq {periph} {
set freq "" set freq ""
# Check if the device uses external XIN # Check if the device uses external XIN
set use_xin_clk [get_property CONFIG.C_HAS_EXTERNAL_XIN $periph] set use_xin_clk [common::get_property CONFIG.C_HAS_EXTERNAL_XIN $periph]
if { $use_xin_clk == "1" } { if { $use_xin_clk == "1" } {
set port_name "xin" set port_name "xin"
} }
@ -265,7 +265,7 @@ proc xget_freq {periph} {
# read the value of the parameter C_EXTERNAL_XIN_CLK_HZ to get # read the value of the parameter C_EXTERNAL_XIN_CLK_HZ to get
# the frequency # the frequency
if { $use_xin_clk == "1" } { if { $use_xin_clk == "1" } {
set freq [get_property CONFIG.C_EXTERNAL_XIN_CLK_HZ $periph] set freq [common::get_property CONFIG.C_EXTERNAL_XIN_CLK_HZ $periph]
} }
return $freq return $freq
} }

View file

@ -82,7 +82,7 @@ proc gen_include_files {swproj mhsinst} {
return "xuartns550_l.h" return "xuartns550_l.h"
} }
if {$swproj == 1} { if {$swproj == 1} {
set stdout [get_property CONFIG.STDOUT [hsi::get_os]] set stdout [common::get_property CONFIG.STDOUT [hsi::get_os]]
set isStdout [string match $stdout $mhsinst] set isStdout [string match $stdout $mhsinst]
if {${isStdout} == 0} { if {${isStdout} == 0} {
set ifuartns550intr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst] set ifuartns550intr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
@ -104,7 +104,7 @@ proc gen_src_files {swproj mhsinst} {
return "" return ""
} }
if {$swproj == 1} { if {$swproj == 1} {
set stdout [get_property CONFIG.STDOUT [hsi::get_os]] set stdout [common::get_property CONFIG.STDOUT [hsi::get_os]]
set isStdout [string match $stdout $mhsinst] set isStdout [string match $stdout $mhsinst]
if {${isStdout} == 0} { if {${isStdout} == 0} {
set ifuartns550intr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst] set ifuartns550intr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
@ -125,11 +125,11 @@ proc gen_testfunc_def {swproj mhsinst} {
proc gen_init_code {swproj mhsinst} { proc gen_init_code {swproj mhsinst} {
set stdout [get_property CONFIG.STDOUT [hsi::get_os]] set stdout [common::get_property CONFIG.STDOUT [hsi::get_os]]
set isStdout [string match $stdout $mhsinst] set isStdout [string match $stdout $mhsinst]
if {${isStdout} == 0} { if {${isStdout} == 0} {
if {$swproj == 1} { if {$swproj == 1} {
set ipname [get_property NAME $mhsinst] set ipname [common::get_property NAME $mhsinst]
set ifuartns550intr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst] set ifuartns550intr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
if {$ifuartns550intr == 1} { if {$ifuartns550intr == 1} {
set decl " static XUartNs550 ${ipname}_UartNs550;" set decl " static XUartNs550 ${ipname}_UartNs550;"
@ -144,7 +144,7 @@ proc gen_init_code {swproj mhsinst} {
set clockhz [::hsi::utils::get_driver_param_name "XUartNs550" "CLOCK_HZ"] set clockhz [::hsi::utils::get_driver_param_name "XUartNs550" "CLOCK_HZ"]
set baseaddr [::hsi::utils::get_ip_param_name $mhsinst "BASEADDR"] set baseaddr [::hsi::utils::get_ip_param_name $mhsinst "BASEADDR"]
set ipname [get_property NAME $mhsinst] set ipname [common::get_property NAME $mhsinst]
append testfunc_call " append testfunc_call "
/* Initialize ${ipname} - Set baudrate and number of stop bits */ /* Initialize ${ipname} - Set baudrate and number of stop bits */
@ -156,7 +156,7 @@ proc gen_init_code {swproj mhsinst} {
proc gen_testfunc_call {swproj mhsinst} { proc gen_testfunc_call {swproj mhsinst} {
set ipname [get_property NAME $mhsinst] set ipname [common::get_property NAME $mhsinst]
set ifuartns550intr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst] set ifuartns550intr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
set testfunc_call "" set testfunc_call ""
@ -164,7 +164,7 @@ proc gen_testfunc_call {swproj mhsinst} {
return $testfunc_call return $testfunc_call
} }
set stdout [get_property CONFIG.STDOUT [hsi::get_os]] set stdout [common::get_property CONFIG.STDOUT [hsi::get_os]]
set isStdout [string match $stdout $mhsinst] set isStdout [string match $stdout $mhsinst]
if {${isStdout} == 1} { if {${isStdout} == 1} {
append testfunc_call " append testfunc_call "
@ -177,7 +177,7 @@ proc gen_testfunc_call {swproj 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 [hsi::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 {
@ -187,7 +187,7 @@ proc gen_testfunc_call {swproj mhsinst} {
set intr_pin_name [hsi::get_pins -of_objects [hsi::get_cells $ipname] -filter "TYPE==INTERRUPT"] set intr_pin_name [hsi::get_pins -of_objects [hsi::get_cells $ipname] -filter "TYPE==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 [hsi::get_cells [hsi::get_sw_processor]]] set proc [common::get_property IP_NAME [hsi::get_cells [hsi::get_sw_processor]]]
} }
if {${hasStdout} == 0} { if {${hasStdout} == 0} {