mutex : Modified namespace from HSM to HSI.
Signed-off-by: Kishore Kumar Korathaluri <kkorath@xilinx.com>
This commit is contained in:
parent
6774a78b0f
commit
a71d6a5dfb
1 changed files with 10 additions and 10 deletions
|
@ -101,12 +101,12 @@ proc xdefine_mutex_config_if {periph hfile_handle cfile_handle num_ifs dev_id ha
|
||||||
proc xdefine_mutex_config_files {drv_handle hfile_name cfile_name drv_string} {
|
proc xdefine_mutex_config_files {drv_handle hfile_name cfile_name drv_string} {
|
||||||
|
|
||||||
# Open include file
|
# Open include file
|
||||||
set hfile_handle [::hsm::utils::open_include_file $hfile_name]
|
set hfile_handle [::hsi::utils::open_include_file $hfile_name]
|
||||||
set cfile_name [file join "src" $cfile_name]
|
set cfile_name [file join "src" $cfile_name]
|
||||||
file delete $cfile_name
|
file delete $cfile_name
|
||||||
set cfile_handle [open $cfile_name w]
|
set cfile_handle [open $cfile_name w]
|
||||||
|
|
||||||
::hsm::utils::write_c_header $cfile_handle "Driver configuration"
|
::hsi::utils::write_c_header $cfile_handle "Driver configuration"
|
||||||
puts $cfile_handle "#include \"xparameters.h\""
|
puts $cfile_handle "#include \"xparameters.h\""
|
||||||
puts $cfile_handle "#include \"[string tolower $drv_string].h\""
|
puts $cfile_handle "#include \"[string tolower $drv_string].h\""
|
||||||
puts $cfile_handle "\n/*"
|
puts $cfile_handle "\n/*"
|
||||||
|
@ -116,7 +116,7 @@ proc xdefine_mutex_config_files {drv_handle hfile_name cfile_name drv_string} {
|
||||||
puts $cfile_handle "\{"
|
puts $cfile_handle "\{"
|
||||||
|
|
||||||
# Get all peripherals connected to this driver
|
# 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]
|
||||||
|
|
||||||
# Print all parameters for all peripherals
|
# Print all parameters for all peripherals
|
||||||
set device_id 0
|
set device_id 0
|
||||||
|
@ -164,7 +164,7 @@ proc check_if_connected {periph if_num} {
|
||||||
# the driver name, in an include file.
|
# the driver name, in an include file.
|
||||||
#
|
#
|
||||||
proc gen_canonical_device_id {file_handle canonical_name periph_name if_num} {
|
proc gen_canonical_device_id {file_handle canonical_name periph_name if_num} {
|
||||||
set lvalue [::hsm::utils::get_driver_param_name $canonical_name "DEVICE_ID"]
|
set lvalue [::hsi::utils::get_driver_param_name $canonical_name "DEVICE_ID"]
|
||||||
set rvalue "XPAR_${periph_name}_IF_${if_num}_DEVICE_ID"
|
set rvalue "XPAR_${periph_name}_IF_${if_num}_DEVICE_ID"
|
||||||
puts $file_handle "#define $lvalue $rvalue"
|
puts $file_handle "#define $lvalue $rvalue"
|
||||||
}
|
}
|
||||||
|
@ -176,15 +176,15 @@ proc gen_canonical_param_def {file_handle canonical_name periph param_prefix par
|
||||||
} else {
|
} else {
|
||||||
set actual_arg "${param_prefix}_${arg}"
|
set actual_arg "${param_prefix}_${arg}"
|
||||||
}
|
}
|
||||||
set lvalue [::hsm::utils::get_driver_param_name $canonical_name $arg]
|
set lvalue [::hsi::utils::get_driver_param_name $canonical_name $arg]
|
||||||
|
|
||||||
|
|
||||||
# The rvalue set below is the actual value of the parameter
|
# The rvalue set below is the actual value of the parameter
|
||||||
set rvalue [::hsm::utils::get_param_value $periph $actual_arg]
|
set rvalue [::hsi::utils::get_param_value $periph $actual_arg]
|
||||||
if {[llength $rvalue] == 0} {
|
if {[llength $rvalue] == 0} {
|
||||||
set rvalue 0
|
set rvalue 0
|
||||||
}
|
}
|
||||||
set rvalue [::hsm::utils::format_addr_string $rvalue $actual_arg]
|
set rvalue [::hsi::utils::format_addr_string $rvalue $actual_arg]
|
||||||
|
|
||||||
puts $file_handle "#define $lvalue $rvalue"
|
puts $file_handle "#define $lvalue $rvalue"
|
||||||
}
|
}
|
||||||
|
@ -229,15 +229,15 @@ proc gen_canonical_if_def {file_handle periph num_ifs drv_string dev_id common_p
|
||||||
#
|
#
|
||||||
proc xdefine_canonical_xpars {drv_handle file_name drv_string args} {
|
proc xdefine_canonical_xpars {drv_handle file_name drv_string args} {
|
||||||
# Open include file
|
# 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
|
# 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]
|
||||||
|
|
||||||
# Print canonical parameters for each peripheral
|
# Print canonical parameters for each peripheral
|
||||||
set device_id 0
|
set device_id 0
|
||||||
foreach periph $periphs {
|
foreach periph $periphs {
|
||||||
set num_ifs [::hsm::utils::get_param_value $periph "C_NUM_AXI"]
|
set num_ifs [::hsi::utils::get_param_value $periph "C_NUM_AXI"]
|
||||||
gen_canonical_if_def $file_handle $periph $num_ifs $drv_string device_id $args
|
gen_canonical_if_def $file_handle $periph $num_ifs $drv_string device_id $args
|
||||||
}
|
}
|
||||||
puts $file_handle "\n/******************************************************************/\n"
|
puts $file_handle "\n/******************************************************************/\n"
|
||||||
|
|
Loading…
Add table
Reference in a new issue