mig_7series : added common namespace for all common tcl commands.
Signed-off-by: Kishore Kumar Korathaluri <kkorath@xilinx.com>
This commit is contained in:
parent
67aeeba5a8
commit
e1d52efe0b
1 changed files with 9 additions and 9 deletions
|
@ -60,7 +60,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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,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
|
||||||
|
@ -93,7 +93,7 @@ proc xdefine_canonical_xpars {drv_handle file_name drv_string args} {
|
||||||
set addr_params ""
|
set addr_params ""
|
||||||
set addr_params [hsi::utils::find_addr_params $periph]
|
set addr_params [hsi::utils::find_addr_params $periph]
|
||||||
set arguments [concat $args $addr_params]
|
set arguments [concat $args $addr_params]
|
||||||
set memtype [get_property CONFIG.MEM_TYPE $periph]
|
set memtype [common::get_property CONFIG.MEM_TYPE $periph]
|
||||||
|
|
||||||
foreach arg $arguments {
|
foreach arg $arguments {
|
||||||
set lvalue [hsi::utils::get_driver_param_name $canonical_name $arg]
|
set lvalue [hsi::utils::get_driver_param_name $canonical_name $arg]
|
||||||
|
@ -136,7 +136,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 [hsi::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]
|
set args [lreplace $args $posn $posn]
|
||||||
|
@ -145,11 +145,11 @@ proc xdefine_include_file {drv_handle file_name drv_string args} {
|
||||||
# Check if it is a driver parameter
|
# Check if it is a driver parameter
|
||||||
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 [hsi::utils::get_driver_param_name $drv_string $arg] [get_property $arg $drv_handle]"
|
puts $file_handle "#define [hsi::utils::get_driver_param_name $drv_string $arg] [common::get_property $arg $drv_handle]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set args $newargs
|
set args $newargs
|
||||||
|
@ -158,14 +158,14 @@ proc xdefine_include_file {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]] */"
|
||||||
set memtype [get_property CONFIG.MEM_TYPE $periph]
|
set memtype [common::get_property CONFIG.MEM_TYPE $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
|
||||||
incr device_id
|
incr device_id
|
||||||
} else {
|
} else {
|
||||||
set value [get_property "CONFIG.${memtype}_$arg" $periph]
|
set value [common::get_property "CONFIG.${memtype}_$arg" $periph]
|
||||||
}
|
}
|
||||||
if {[llength $value] == 0} {
|
if {[llength $value] == 0} {
|
||||||
set value 0
|
set value 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue