drivers : created a new minor version for driver cpu_cortexa9
this patch creates a new minor version v2_1 for driver cpu_cortexa9 Signed-off-by: Kinjal Pravinbhai Patel <patelki@xilinx.com> Acked-by: Anirudha Sarangi <anirudh@xilinx.com>
This commit is contained in:
parent
0b2b088c58
commit
a404324e7d
4 changed files with 256 additions and 0 deletions
49
XilinxProcessorIPLib/drivers/cpu_cortexa9/data/cpu_cortexa9.mdd
Executable file
49
XilinxProcessorIPLib/drivers/cpu_cortexa9/data/cpu_cortexa9.mdd
Executable file
|
@ -0,0 +1,49 @@
|
|||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2011 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
#
|
||||
###############################################################################
|
||||
OPTION psf_version = 2.1;
|
||||
|
||||
BEGIN driver cpu_cortexa9
|
||||
|
||||
OPTION copyfiles = all;
|
||||
OPTION driver_state = ACTIVE;
|
||||
OPTION supported_peripherals = (ps7_cortexa9);
|
||||
OPTION default_os = "standalone_v3_05_a";
|
||||
OPTION VERSION = 2.1;
|
||||
OPTION NAME = cpu_cortexa9;
|
||||
|
||||
|
||||
PARAM name = compiler, desc = "Compiler used to compile both BSP/Libraries and Applications.", type = string, default = arm-xilinx-eabi-gcc;
|
||||
PARAM name = archiver, desc = "Archiver used to archive libraries for both BSP generation as well as for applications", type = string, default = arm-xilinx-eabi-ar;
|
||||
PARAM name = compiler_flags, desc = "Compiler flags used in BSP and library generation. '-c' flag stands for 'compile and assemble, but do not link'. Without this flag, gcc tries to link the code, which will fail bacause there is no application involved during libgen. '-O2' can be overwritten by extra compiler flags", type = string, default = "-O2 -c", permit = none;
|
||||
PARAM name = extra_compiler_flags, desc = "Extra compiler flags used in BSP and library generation.", type = string, default = "-g";
|
||||
|
||||
END driver
|
145
XilinxProcessorIPLib/drivers/cpu_cortexa9/data/cpu_cortexa9.tcl
Executable file
145
XilinxProcessorIPLib/drivers/cpu_cortexa9/data/cpu_cortexa9.tcl
Executable file
|
@ -0,0 +1,145 @@
|
|||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2011 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# 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.00a sdm 05/16/10 Updated to support AXI version of the core
|
||||
# 2.0 adk 10/12/13 Updated as per the New Tcl API's
|
||||
#
|
||||
##############################################################################
|
||||
#uses "xillib.tcl"
|
||||
|
||||
############################################################
|
||||
# "generate" procedure
|
||||
############################################################
|
||||
proc generate {drv_handle} {
|
||||
|
||||
xdefine_cortexa9_params $drv_handle
|
||||
xdefine_include_file $drv_handle "xparameters.h" "XCPU_CORTEXA9" "C_CPU_CLK_FREQ_HZ"
|
||||
xdefine_canonical_xpars $drv_handle "xparameters.h" "CPU_CORTEXA9" "C_CPU_CLK_FREQ_HZ"
|
||||
xdefine_addr_params_for_ext_intf $drv_handle "xparameters.h"
|
||||
}
|
||||
|
||||
proc xdefine_cortexa9_params {drvhandle} {
|
||||
|
||||
set sw_proc_handle [get_sw_processor]
|
||||
set hw_proc_handle [get_cells [get_property HW_INSTANCE $sw_proc_handle ]]
|
||||
|
||||
set periphs [::hsm::utils::get_common_driver_ips $drvhandle]
|
||||
set lprocs [get_cells -filter "IP_NAME==ps7_cortexa9"]
|
||||
set lprocs [lsort $lprocs]
|
||||
|
||||
set config_inc [::hsm::utils::open_include_file "xparameters.h"]
|
||||
puts $config_inc "/* Definition for CPU ID */"
|
||||
|
||||
foreach periph $periphs {
|
||||
set iname [get_property NAME $periph]
|
||||
|
||||
#-----------
|
||||
# Set CPU ID
|
||||
#-----------
|
||||
set id 0
|
||||
foreach processor $lprocs {
|
||||
if {[string compare -nocase $processor $iname] == 0} {
|
||||
puts $config_inc "#define XPAR_CPU_ID $id"
|
||||
}
|
||||
incr id
|
||||
}
|
||||
}
|
||||
|
||||
close $config_inc
|
||||
}
|
||||
|
||||
proc xdefine_addr_params_for_ext_intf {drvhandle file_name} {
|
||||
set sw_proc_handle [get_sw_processor]
|
||||
set hw_proc_handle [get_cells [get_property HW_INSTANCE $sw_proc_handle ]]
|
||||
|
||||
# Open include file
|
||||
set file_handle [::hsm::utils::open_include_file $file_name]
|
||||
|
||||
set mem_ranges [get_mem_ranges -of_objects $hw_proc_handle]
|
||||
foreach mem_range $mem_ranges {
|
||||
set inst [get_property INSTANCE $mem_range]
|
||||
if {$inst != ""} {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
set bparam_name [get_property BASE_NAME $mem_range]
|
||||
set bparam_value [get_property BASE_VALUE $mem_range]
|
||||
set hparam_name [get_property HIGH_NAME $mem_range]
|
||||
set hparam_value [get_property HIGH_VALUE $mem_range]
|
||||
|
||||
# Print all parameters for all peripherals
|
||||
|
||||
|
||||
set name [string toupper [get_property NAME $mem_range]]
|
||||
puts $file_handle ""
|
||||
puts $file_handle "/* Definitions for interface [string toupper $name] */"
|
||||
set name [format "XPAR_%s_" $name]
|
||||
|
||||
|
||||
if {$bparam_value != ""} {
|
||||
set value [::hsm::utils::format_addr_string $bparam_value $bparam_name]
|
||||
set param [string toupper $bparam_name]
|
||||
if {[string match C_* $param]} {
|
||||
set name [format "%s%s" $name [string range $param 2 end]]
|
||||
} else {
|
||||
set name [format "%s%s" $name $param]
|
||||
}
|
||||
|
||||
puts $file_handle "#define $name $value"
|
||||
}
|
||||
|
||||
set name [string toupper [get_property NAME $mem_range]]
|
||||
set name [format "XPAR_%s_" $name]
|
||||
if {$hparam_value != ""} {
|
||||
set value [::hsm::utils::format_addr_string $hparam_value $hparam_name]
|
||||
set param [string toupper $hparam_name]
|
||||
if {[string match C_* $param]} {
|
||||
set name [format "%s%s" $name [string range $param 2 end]]
|
||||
} else {
|
||||
set name [format "%s%s" $name $param]
|
||||
}
|
||||
|
||||
puts $file_handle "#define $name $value"
|
||||
}
|
||||
|
||||
|
||||
puts $file_handle ""
|
||||
}
|
||||
|
||||
close $file_handle
|
||||
}
|
||||
|
23
XilinxProcessorIPLib/drivers/cpu_cortexa9/src/Makefile
Executable file
23
XilinxProcessorIPLib/drivers/cpu_cortexa9/src/Makefile
Executable file
|
@ -0,0 +1,23 @@
|
|||
COMPILER=
|
||||
ARCHIVER=
|
||||
CP=cp
|
||||
COMPILER_FLAGS=
|
||||
EXTRA_COMPILER_FLAGS=
|
||||
LIB=libxil.a
|
||||
|
||||
RELEASEDIR=../../../lib
|
||||
INCLUDEDIR=../../../include
|
||||
INCLUDES=-I${INCLUDEDIR}
|
||||
|
||||
OUTS = *.o
|
||||
|
||||
LIBSOURCES=*.c
|
||||
INCLUDEFILES=*.h
|
||||
|
||||
libs:
|
||||
echo "Compiling cpu_cortexa9"
|
||||
|
||||
.PHONY: include
|
||||
include:
|
||||
${CP} $(INCLUDEFILES) $(INCLUDEDIR)
|
||||
|
39
XilinxProcessorIPLib/drivers/cpu_cortexa9/src/xcpu_cortexa9.h
Executable file
39
XilinxProcessorIPLib/drivers/cpu_cortexa9/src/xcpu_cortexa9.h
Executable file
|
@ -0,0 +1,39 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2011 - 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xcpu_cortexa9.h
|
||||
*
|
||||
* dummy file
|
||||
*
|
||||
******************************************************************************/
|
Loading…
Add table
Reference in a new issue