devcfg : added common namespace to all common tcl commands.
Signed-off-by: Nava kishore Manne <navam@xilinx.com>
This commit is contained in:
parent
50c32af632
commit
7377b860ac
2 changed files with 37 additions and 38 deletions
|
@ -62,7 +62,7 @@ proc xdefine_include_file_zynq {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]
|
||||||
|
@ -71,11 +71,11 @@ proc xdefine_include_file_zynq {drv_handle file_name drv_string args} {
|
||||||
|
|
||||||
lappend newargs
|
lappend newargs
|
||||||
foreach arg $args {
|
foreach arg $args {
|
||||||
set value [get_property CONFIG.$arg $drv_handle]
|
set value [common::get_property CONFIG.$arg $drv_handle]
|
||||||
if {[llength $value] == 0} {
|
if {[llength $value] == 0} {
|
||||||
lappend newargs $arg
|
lappend newargs $arg
|
||||||
} else {
|
} else {
|
||||||
puts $file_handle "#define [::hsm::utils::get_driver_param_name $drv_string $arg] [get_property CONFIG.$arg $drv_handle]"
|
puts $file_handle "#define [::hsm::utils::get_driver_param_name $drv_string $arg] [common::get_property CONFIG.$arg $drv_handle]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set args $newargs
|
set args $newargs
|
||||||
|
@ -84,7 +84,7 @@ proc xdefine_include_file_zynq {drv_handle file_name drv_string args} {
|
||||||
set device_id 0
|
set device_id 0
|
||||||
foreach periph $periphs {
|
foreach periph $periphs {
|
||||||
puts $file_handle ""
|
puts $file_handle ""
|
||||||
puts $file_handle "/* Definitions for peripheral [string toupper [get_property NAME $periph]] */"
|
puts $file_handle "/* Definitions for peripheral [string toupper [common::get_property NAME $periph]] */"
|
||||||
foreach arg $args {
|
foreach arg $args {
|
||||||
if {[string compare -nocase "DEVICE_ID" $arg] == 0} {
|
if {[string compare -nocase "DEVICE_ID" $arg] == 0} {
|
||||||
set value $device_id
|
set value $device_id
|
||||||
|
@ -129,9 +129,9 @@ proc xdefine_devcfg_config_file {drv_handle file_name drv_string args} {
|
||||||
set comma ""
|
set comma ""
|
||||||
foreach arg $args {
|
foreach arg $args {
|
||||||
# Check if this is a driver parameter or a peripheral parameter
|
# Check if this is a driver parameter or a peripheral parameter
|
||||||
set value [get_property CONFIG.$arg $drv_handle]
|
set value [common::get_property CONFIG.$arg $drv_handle]
|
||||||
if {[llength $value] == 0} {
|
if {[llength $value] == 0} {
|
||||||
set local_value [get_property CONFIG.$arg $periph]
|
set local_value [common::get_property CONFIG.$arg $periph]
|
||||||
# If a parameter isn't found locally (in the current
|
# If a parameter isn't found locally (in the current
|
||||||
# peripheral), we will (for some obscure and ancient reason)
|
# peripheral), we will (for some obscure and ancient reason)
|
||||||
# look in peripherals connected via point to point links
|
# look in peripherals connected via point to point links
|
||||||
|
@ -182,7 +182,7 @@ proc xdefine_canonical_xpars_zynq {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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ proc xdefine_canonical_xpars_zynq {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
|
||||||
|
@ -236,4 +236,3 @@ proc xdefine_canonical_xpars_zynq {drv_handle file_name drv_string args} {
|
||||||
puts $file_handle "\n/******************************************************************/\n"
|
puts $file_handle "\n/******************************************************************/\n"
|
||||||
close $file_handle
|
close $file_handle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,9 +91,9 @@ proc gen_testfunc_call {swproj mhsinst} {
|
||||||
return ""
|
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 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" } {
|
if { $stdout == "" || $stdout == "none" } {
|
||||||
set hasStdout 0
|
set hasStdout 0
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue