tmrctr : 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 11:46:11 +05:30 committed by Suneel Garapati
parent 1e7813173f
commit 0e43d545e9
2 changed files with 17 additions and 17 deletions

View file

@ -51,10 +51,10 @@ proc generate {drv_handle} {
#
proc xdefine_include_file {drv_handle file_name drv_string args} {
# 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]
# Handle special cases
set arg "NUM_INSTANCES"
@ -62,7 +62,7 @@ proc xdefine_include_file {drv_handle file_name drv_string args} {
if {$posn > -1} {
puts $file_handle "/* Definitions for driver [string toupper [get_property NAME $drv_handle]] */"
# Define NUM_INSTANCES
puts $file_handle "#define [::hsm::utils::get_driver_param_name $drv_string $arg] [llength $periphs]"
puts $file_handle "#define [::hsi::utils::get_driver_param_name $drv_string $arg] [llength $periphs]"
set args [lreplace $args $posn $posn]
}
@ -71,7 +71,7 @@ proc xdefine_include_file {drv_handle file_name drv_string args} {
foreach periph $periphs {
set periph_name [string toupper [get_property NAME $periph]]
#set freq [xget_freq $periph]
set freq [::hsm::utils::get_clk_pin_freq $periph "S_AXI_ACLK"]
set freq [::hsi::utils::get_clk_pin_freq $periph "S_AXI_ACLK"]
puts $file_handle ""
puts $file_handle "/* Definitions for peripheral $periph_name */"
@ -94,8 +94,8 @@ proc xdefine_include_file {drv_handle file_name drv_string args} {
if {[llength $value] == 0} {
set value 0
}
set value [::hsm::utils::format_addr_string $value $arg]
puts $file_handle "#define [::hsm::utils::get_ip_param_name $periph $arg] $value"
set value [::hsi::utils::format_addr_string $value $arg]
puts $file_handle "#define [::hsi::utils::get_ip_param_name $periph $arg] $value"
}
puts $file_handle ""
}
@ -110,10 +110,10 @@ proc xdefine_include_file {drv_handle file_name drv_string args} {
#
proc xdefine_canonical_xpars {drv_handle file_name drv_string args} {
# 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 the 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]
# Get the names of all the peripherals connected to this driver
foreach periph $periphs {
@ -147,17 +147,17 @@ proc xdefine_canonical_xpars {drv_handle file_name drv_string args} {
set canonical_name [format "%s_%s" $drv_string [lindex $indices $i]]
foreach arg $args {
set lvalue [::hsm::utils::get_driver_param_name $canonical_name $arg]
set lvalue [::hsi::utils::get_driver_param_name $canonical_name $arg]
#handle CLOCK_FREQ_HZ as a special case
if {[string compare -nocase "CLOCK_FREQ_HZ" $arg] == 0} {
set rvalue [::hsm::utils::get_ip_param_name $periph $arg]
set rvalue [::hsi::utils::get_ip_param_name $periph $arg]
} else {
set rvalue [get_property CONFIG.$arg $periph]
if {[llength $rvalue] == 0} {
set rvalue 0
}
set rvalue [::hsm::utils::format_addr_string $rvalue $arg]
set rvalue [::hsi::utils::format_addr_string $rvalue $arg]
}
puts $file_handle "#define $lvalue $rvalue"

View file

@ -66,7 +66,7 @@ proc gen_include_files {swproj mhsinst} {
return ""
}
if {$swproj == 1} {
set iftmrintr [::hsm::utils::is_ip_interrupting_current_proc $mhsinst]
set iftmrintr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
if {$iftmrintr == 1} {
set inc_file_lines {xtmrctr.h tmrctr_header.h tmrctr_intr_header.h}
} else {
@ -81,7 +81,7 @@ proc gen_src_files {swproj mhsinst} {
return ""
}
if {$swproj == 1} {
set iftmrintr [::hsm::utils::is_ip_interrupting_current_proc $mhsinst]
set iftmrintr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
if {$iftmrintr == 1} {
set inc_file_lines {examples/xtmrctr_selftest_example.c examples/xtmrctr_intr_example.c data/tmrctr_header.h data/tmrctr_intr_header.h}
@ -104,7 +104,7 @@ proc gen_init_code {swproj mhsinst} {
if {$swproj == 1} {
set ipname [get_property NAME $mhsinst]
set iftmrintr [::hsm::utils::is_ip_interrupting_current_proc $mhsinst]
set iftmrintr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
if {$iftmrintr == 1} {
set decl " static XTmrCtr ${ipname}_Timer;"
set inc_file_lines $decl
@ -122,9 +122,9 @@ proc gen_testfunc_call {swproj mhsinst} {
return ""
}
set iftmrintr [::hsm::utils::is_ip_interrupting_current_proc $mhsinst]
set iftmrintr [::hsi::utils::is_ip_interrupting_current_proc $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
@ -134,7 +134,7 @@ proc gen_testfunc_call {swproj mhsinst} {
if {$iftmrintr == 1} {
set intr_pin_name [get_pins -of_objects [get_cells $ipname] -filter "TYPE==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]]]
}