tmrctr : added common namespace to all common tcl commands.
Signed-off-by: Kishore Kumar Korathaluri <kkorath@xilinx.com>
This commit is contained in:
parent
6fd69fae21
commit
d0eb94f319
2 changed files with 10 additions and 10 deletions
|
@ -60,7 +60,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]
|
||||||
|
@ -69,7 +69,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]
|
||||||
set freq [::hsm::utils::get_clk_pin_freq $periph "S_AXI_ACLK"]
|
set freq [::hsm::utils::get_clk_pin_freq $periph "S_AXI_ACLK"]
|
||||||
|
|
||||||
|
@ -89,7 +89,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
|
||||||
|
@ -117,7 +117,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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ proc xdefine_canonical_xpars {drv_handle file_name drv_string args} {
|
||||||
|
|
||||||
set i 0
|
set i 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
|
||||||
|
@ -153,7 +153,7 @@ proc xdefine_canonical_xpars {drv_handle file_name drv_string args} {
|
||||||
if {[string compare -nocase "CLOCK_FREQ_HZ" $arg] == 0} {
|
if {[string compare -nocase "CLOCK_FREQ_HZ" $arg] == 0} {
|
||||||
set rvalue [::hsm::utils::get_ip_param_name $periph $arg]
|
set rvalue [::hsm::utils::get_ip_param_name $periph $arg]
|
||||||
} 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
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,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 iftmrintr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
|
set iftmrintr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
|
||||||
if {$iftmrintr == 1} {
|
if {$iftmrintr == 1} {
|
||||||
set decl " static XTmrCtr ${ipname}_Timer;"
|
set decl " static XTmrCtr ${ipname}_Timer;"
|
||||||
|
@ -123,9 +123,9 @@ proc gen_testfunc_call {swproj mhsinst} {
|
||||||
}
|
}
|
||||||
|
|
||||||
set iftmrintr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
|
set iftmrintr [::hsi::utils::is_ip_interrupting_current_proc $mhsinst]
|
||||||
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 [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 {
|
||||||
|
@ -136,7 +136,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]]]
|
||||||
}
|
}
|
||||||
|
|
||||||
set testfunc_call ""
|
set testfunc_call ""
|
||||||
|
|
Loading…
Add table
Reference in a new issue