From 48471fbde6a9dac3d0f058171ff3fd34258ff2cd Mon Sep 17 00:00:00 2001 From: Naga Sureshkumar Relli Date: Fri, 21 Aug 2015 19:33:07 +0800 Subject: [PATCH] ddrps: Add support for Packaged BD designs This patch adds Packaged BD support to ddrps. Signed-off-by: Naga Sureshkumar Relli Reviewed-by: Kedareswara rao Appana --- .../drivers/ddrps/data/ddrps.tcl | 29 ++++++++++++++----- .../drivers/ddrps/src/xddrps.h | 4 +++ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/XilinxProcessorIPLib/drivers/ddrps/data/ddrps.tcl b/XilinxProcessorIPLib/drivers/ddrps/data/ddrps.tcl index 6c427a41..269e1b8c 100755 --- a/XilinxProcessorIPLib/drivers/ddrps/data/ddrps.tcl +++ b/XilinxProcessorIPLib/drivers/ddrps/data/ddrps.tcl @@ -28,7 +28,15 @@ # in advertising or otherwise to promote the sale, use or other dealings in # this Software without prior written authorization from Xilinx. # -################################################################################ + # + # MODIFICATION HISTORY: + # Ver Who Date Changes + # -------- ------ -------- ------------------------------------ + # 1.0 nsk 08/06/15 First Release. + # 1.0 nsk 08/20/15 Updated define_addr_params to support + # PBD Designs (CR#876857). + # + ################################################################################ proc generate {drv_handle} { define_addr_params $drv_handle "xparameters.h" @@ -39,19 +47,26 @@ proc define_addr_params {drv_handle file_name} { # Open include file set file_handle [::hsi::utils::open_include_file $file_name] + set sw_proc [hsi::get_sw_processor] set periphs [::hsi::utils::get_common_driver_ips $drv_handle] foreach periph $periphs { puts $file_handle "" puts $file_handle "/* Definitions for peripheral [string toupper [common::get_property NAME $periph]] */" set addr_params [list] - set interface_base_names [get_property BASE_NAME [get_mem_ranges $periph]] - set interface_high_names [get_property HIGH_NAME [get_mem_ranges $periph]] + set interface_base_names [get_property BASE_NAME [get_mem_ranges \ + -of_objects [get_cells -hier $sw_proc] $periph]] + set interface_high_names [get_property HIGH_NAME [get_mem_ranges \ + -of_objects [get_cells -hier $sw_proc] $periph]] set i 0 foreach interface_base $interface_base_names interface_high $interface_high_names { - set base_name [common::get_property BASE_NAME [lindex [get_mem_ranges $periph] $i]] - set base_value [common::get_property BASE_VALUE [lindex [get_mem_ranges $periph] $i]] - set high_name [common::get_property HIGH_NAME [lindex [get_mem_ranges $periph] $i]] - set high_value [common::get_property HIGH_VALUE [lindex [get_mem_ranges $periph] $i]] + set base_name [common::get_property BASE_NAME [lindex [get_mem_ranges \ + -of_objects [get_cells -hier $sw_proc] $periph] $i]] + set base_value [common::get_property BASE_VALUE [lindex [get_mem_ranges \ + -of_objects [get_cells -hier $sw_proc] $periph] $i]] + set high_name [common::get_property HIGH_NAME [lindex [get_mem_ranges \ + -of_objects [get_cells -hier $sw_proc] $periph] $i]] + set high_value [common::get_property HIGH_VALUE [lindex [get_mem_ranges \ + -of_objects [get_cells -hier $sw_proc] $periph] $i]] set bposn [lsearch -exact $addr_params $base_name] set hposn [lsearch -exact $addr_params $high_name] if {$bposn > -1 || $hposn > -1 } { diff --git a/XilinxProcessorIPLib/drivers/ddrps/src/xddrps.h b/XilinxProcessorIPLib/drivers/ddrps/src/xddrps.h index 6a9fa096..fe7adb06 100644 --- a/XilinxProcessorIPLib/drivers/ddrps/src/xddrps.h +++ b/XilinxProcessorIPLib/drivers/ddrps/src/xddrps.h @@ -47,6 +47,10 @@ * * Ver Who Date Changes * ----- ---- -------- ----------------------------------------------- + * 1.0 nsk 08/06/15 First Release + * 1.0 nsk 08/20/15 Updated define_addr_params in ddrps.tcl + * to support PBD Designs (CR #876857) + * * * *******************************************************************************/