1 /* 2 * Copyright (c) 2016, Texas Instruments Incorporated 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * * Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 12 * * Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * * Neither the name of Texas Instruments Incorporated nor the names of 17 * its contributors may be used to endorse or promote products derived 18 * from this software without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33 /* 34 * Copyright (c) 2016, Texas Instruments Incorporated 35 * All rights reserved. 36 * 37 * Redistribution and use in source and binary forms, with or without 38 * modification, are permitted provided that the following conditions 39 * are met: 40 * 41 * * Redistributions of source code must retain the above copyright 42 * notice, this list of conditions and the following disclaimer. 43 * 44 * * Redistributions in binary form must reproduce the above copyright 45 * notice, this list of conditions and the following disclaimer in the 46 * documentation and/or other materials provided with the distribution. 47 * 48 * * Neither the name of Texas Instruments Incorporated nor the names of 49 * its contributors may be used to endorse or promote products derived 50 * from this software without specific prior written permission. 51 * 52 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 53 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 54 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 55 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 56 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 57 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 58 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 59 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 60 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 61 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 62 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 63 */ 64 /* 65 * ======== Platform.xdc ======== 66 */ 67 package ti.platforms.cortexA; 68 69 /*! 70 * ======== Platform ======== 71 * A generic platform that supports any ARMv8 Cortex-A device 72 * 73 * The device to be used by this platform is passed as the platform instance 74 * name. On the `xdc.tools.configuro` command line, it is done in the 75 * following way: 76 * @p(code) 77 * xs xdc.tools.configuro ... -p "ti.platforms.cortexA:SIMFLEMING" 78 * @p 79 * 80 * In package.bld, the platform instance is selected as in: 81 * @p(code) 82 * Pkg.addExecutable("test", target, "ti.platforms.cortexA:SIMFLEMING"); 83 * @p 84 */ 85 @Template ("./Platform.xdt") 86 metaonly module Platform inherits xdc.platform.IPlatform 87 { 88 config xdc.platform.IPlatform.Board BOARD = { 89 id: "0", 90 boardName: "cortexA", 91 boardFamily: null, 92 boardRevision: null 93 }; 94 95 /*! 96 * ======== nameFormat ======== 97 * Encoding of instance creation parameters in the instance's name 98 * 99 * For this platform, the parameters `deviceName`, `includeLinkCmdFile` 100 * and `clockRate` can be encoded in the instance name supplied on 101 * `xdc.tools.configuro` command line, for example: 102 * @p(code) 103 * xs xdc.tools.configuro ... -p ti.platforms.cortexA:SIMFLEMING:1:20 104 * @p 105 * Optional parameters can be omitted: 106 * @p(code) 107 * xs xdc.tools.configuro ... -p ti.platforms.cortexA:SIMFLEMING 108 * @p 109 */ 110 readonly config string nameFormat 111 = "$(deviceName):$(includeLinkCmdFile):$(clockRate)"; 112 113 instance: 114 115 /* 116 * This platform supports ARMv8 Cortex-A cores. 117 * The corresponding "actual" catalogName is overwritten 118 * in Platform.instance$meta$init() based on the device name 119 */ 120 config xdc.platform.IExeContext.Cpu CPU = { 121 id: "0", 122 clockRate: 1.0, 123 catalogName: "ti.catalog.arm.cortexa53", 124 deviceName: "CortexA", 125 revision: "", 126 }; 127 128 /*! 129 * ======== deviceName ======== 130 * The name of an `ICpuDataSheet` module for the device 131 * 132 * This parameter is required, but it does not have to be set explicitly; 133 * it can be encoded in the instance's name. 134 */ 135 config string deviceName; 136 137 /*! 138 * ======== clockRate ======== 139 * The clock rate for this device. 140 */ 141 config Double clockRate; 142 143 override config string codeMemory = null; 144 145 override config string dataMemory = null; 146 147 override config string stackMemory = null; 148 149 /*! 150 * ======== includeLinkCmdFile ======== 151 * The flag that specifies if the platform should include a linker command 152 * file. 153 * 154 * By default, a user is responsible for adding a linker command file to 155 * the project, or to the linker command line. However, if this flag is 156 * set, this platform will include a default linker command file for the 157 * selected device. 158 */ 159 config Bool includeLinkCmdFile = false; 160 };