1    /*
     2     *  Copyright (c) 2014 by Texas Instruments and others.
     3     *  All rights reserved. This program and the accompanying materials
     4     *  are made available under the terms of the Eclipse Public License v1.0
     5     *  which accompanies this distribution, and is available at
     6     *  http://www.eclipse.org/legal/epl-v10.html
     7     *
     8     *  Contributors:
     9     *      Texas Instruments - initial implementation
    10     *
    11     * */
    12    
    13    /*
    14     *  ======== Platform.xdc ========
    15     *  Platform support for DRA7XX
    16     *
    17     */
    18    
    19    /*!
    20     *  ======== Platform ========
    21     *  Platform support for DRA7XX
    22     *
    23     *  This module implements xdc.platform.IPlatform and defines configuration
    24     *  parameters that correspond to this platform's Cpu's, Board's, etc.
    25     *
    26     *  The configuration parameters are initialized in this package's
    27     *  configuration script (package.cfg) and "bound" to the TCOM object
    28     *  model.  Once they are part of the model, these parameters are
    29     *  queried by a program's configuration script.
    30     *
    31     *  This particular platform has 1 Cortex-A15, 4 EVE's, 2 Benelli/IPU 
    32     *  Sub-system (Dual M4's) and 2 C66x DSP's.
    33     */
    34    metaonly module Platform inherits xdc.platform.IPlatform
    35    {
    36        readonly config xdc.platform.IPlatform.Board BOARD = {
    37            id:             "0",
    38            boardName:      "evmDRA7XX",
    39            boardFamily:    "evmDRA7XX",
    40            boardRevision:  null,
    41        };
    42    
    43        readonly config xdc.platform.IExeContext.Cpu DSP = {
    44            id:             "0",
    45            clockRate:      600,
    46            catalogName:    "ti.catalog.c6000",
    47            deviceName:     "DRA7XX",
    48            revision:       "1.0",
    49        };
    50    
    51        /* Benelli M4 Subsystem */
    52        readonly config xdc.platform.IExeContext.Cpu M4 = {
    53            id:             "1",
    54            clockRate:      212.8,
    55            catalogName:    "ti.catalog.arm.cortexm4",
    56            deviceName:     "DRA7XX",
    57            revision:       "1.0",
    58        };
    59    
    60        /* EVE */
    61        readonly config xdc.platform.IExeContext.Cpu EVE = {
    62            id:             "2",
    63            clockRate:      535.0,
    64            catalogName:    "ti.catalog.arp32",
    65            deviceName:     "DRA7XX",
    66            revision:       "1.0"
    67        };
    68    
    69        /* GPP */
    70        readonly config xdc.platform.IExeContext.Cpu GPP = {
    71            id:             "3",
    72            clockRate:      1000.0,  /* Typically set by the HLOS */
    73            catalogName:    "ti.catalog.arm.cortexa15",
    74            deviceName:     "DRA7XX",
    75            revision:       "1.0"
    76        };
    77    
    78    /*  Memory Map for ti.platforms.evmDRA7XX
    79     *  
    80     *  Virtual     Physical        Size            Comment
    81     *  ------------------------------------------------------------------------
    82     *              8000_0000  1000_0000  ( 256 MB) External Memory
    83     *
    84     *  0000_0000 0 8000_0000        100  ( 256  B) EVE1_VECS (vector table)
    85     *              8000_0100       FF00  ( ~64 KB) --------
    86     *  0000_0000   8001_0000        100  ( 256  B) EVE2_VECS (vector table)
    87     *              8001_0100       FF00  ( ~64 KB) --------
    88     *  0000_0000   8002_0000        100  ( 256  B) EVE3_VECS (vector table)
    89     *              8002_0100       FF00  ( ~64 KB) --------
    90     *  0000_0000   8003_0000        100  ( 256  B) EVE4_VECS (vector table)
    91     *              8003_0100    FE_FF00  ( ~16 MB) --------
    92     *            1 8100_0000    40_0000  (   4 MB) EVE1_PROG (code, data)
    93     *              8140_0000    C0_0000  (  12 MB) --------
    94     *            2 8200_0000    40_0000  (   4 MB) EVE2_PROG (code, data)
    95     *              8240_0000    C0_0000  (  12 MB) --------
    96     *            3 8300_0000    40_0000  (   4 MB) EVE3_PROG (code, data)
    97     *              8340_0000    C0_0000  (  12 MB) --------
    98     *            4 8400_0000    40_0000  (   4 MB) EVE4_PROG (code, data)
    99     *              8440_0000    C0_0000  (  12 MB) --------
   100     *            5 8500_0000   100_0000  (  16 MB) --------
   101     *            6 8600_0000   100_0000  (  16 MB) --------
   102     *            7 8700_0000   100_0000  (  16 MB) --------
   103     *            8 8800_0000   100_0000  (  16 MB) --------
   104     *            9 8900_0000   100_0000  (  16 MB) --------
   105     *            A 8A00_0000    80_0000  (   8 MB) IPU1 (code, data), benelli
   106     *              8A80_0000    80_0000  (   8 MB) IPU2 (code, data), benelli
   107     *            B 8B00_0000   100_0000  (  16 MB) HOST (code, data)
   108     *            C 8C00_0000   100_0000  (  16 MB) DSP1 (code, data)
   109     *            D 8D00_0000   100_0000  (  16 MB) DSP2 (code, data)
   110     *            E 8E00_0000   100_0000  (  16 MB) SR_0 (ipc)
   111     *            F 8F00_0000   100_0000  (  16 MB) --------
   112     */
   113    
   114        readonly config Any SR_0 = {
   115            name: "SR_0", space: "data", access: "RWX",
   116            base: 0x8E000000, len: 0x1000000,
   117            comment: "SR#0 Memory (16 MB)"
   118        };
   119    
   120        readonly config Any DSP1 = {
   121            externalMemoryMap: [
   122                [ "DSP1_PROG", {
   123                    name: "DSP1_PROG", space: "code/data", access: "RWX",
   124                    base: 0x8C000000, len: 0x1000000,
   125                    comment: "DSP1 Program Memory (16 MB)"
   126                }],
   127                [ "SR_0", SR_0 ]
   128            ],
   129            codeMemory:  "DSP1_PROG",
   130            dataMemory:  "DSP1_PROG",
   131            stackMemory: "DSP1_PROG",
   132            l1DMode: "32k",
   133            l1PMode: "32k",
   134            l2Mode: "128k"
   135        };
   136    
   137        readonly config Any DSP2 = {
   138            externalMemoryMap: [
   139                [ "DSP2_PROG", {
   140                    name: "DSP2_PROG", space: "code/data", access: "RWX",
   141                    base: 0x8D000000, len: 0x1000000,
   142                    comment: "DSP2 Program Memory (16 MB)"
   143                }],
   144                [ "SR_0", SR_0 ]
   145            ],
   146            codeMemory:  "DSP2_PROG",
   147            dataMemory:  "DSP2_PROG",
   148            stackMemory: "DSP2_PROG",
   149            l1DMode: "32k",
   150            l1PMode: "32k",
   151            l2Mode: "128k"
   152        };
   153    
   154        readonly config Any EVE1 = {
   155            externalMemoryMap: [
   156                [ "EVEVECS", { /* name used by SYS/BIOS */
   157                    name: "EVEVECS", space: "code/data", access: "RWX",
   158                    base: 0x80000000, len: 0x100, page: 0,
   159                    comment: "EVE1 Vector Table (256 B)"
   160                }],
   161                [ "EVE1_PROG", {
   162                    name: "EVE1_PROG", space: "code/data", access: "RWX",
   163                    base: 0x81000000, len: 0x400000, page: 1,
   164                    comment: "EVE1 Program Memory (4 MB)"
   165                }],
   166                [ "SR_0", SR_0 ]
   167            ],
   168            codeMemory:  "EVE1_PROG",
   169            dataMemory:  "EVE1_PROG",
   170            stackMemory: "EVE1_PROG"
   171        };
   172    
   173        readonly config Any EVE2 = {
   174            externalMemoryMap: [
   175                [ "EVEVECS", { /* name used by SYS/BIOS */
   176                    name: "EVEVECS", space: "code/data", access: "RWX",
   177                    base: 0x80010000, len: 0x100, page: 0,
   178                    comment: "EVE2 Vector Table (256 B)"
   179                }],
   180                [ "EVE2_PROG", {
   181                    name: "EVE2_PROG", space: "code/data", access: "RWX",
   182                    base: 0x82000000, len: 0x400000, page: 1,
   183                    comment: "EVE2 Program Memory (4 MB)"
   184                }],
   185                [ "SR_0", SR_0 ]
   186            ],
   187            codeMemory:  "EVE2_PROG",
   188            dataMemory:  "EVE2_PROG",
   189            stackMemory: "EVE2_PROG"
   190        };
   191    
   192        readonly config Any EVE3 = {
   193            externalMemoryMap: [
   194                [ "EVEVECS", { /* name used by SYS/BIOS */
   195                    name: "EVEVECS", space: "code/data", access: "RWX",
   196                    base: 0x80020000, len: 0x100, page: 0,
   197                    comment: "EVE3 Vector Table (256 B)"
   198                }],
   199                [ "EVE3_PROG", {
   200                    name: "EVE3_PROG", space: "code/data", access: "RWX",
   201                    base: 0x83000000, len: 0x400000, page: 1,
   202                    comment: "EVE3 Program Memory (4 MB)"
   203                }],
   204                [ "SR_0", SR_0 ]
   205            ],
   206            codeMemory:  "EVE3_PROG",
   207            dataMemory:  "EVE3_PROG",
   208            stackMemory: "EVE3_PROG"
   209        };
   210    
   211        readonly config Any EVE4 = {
   212            externalMemoryMap: [
   213                [ "EVEVECS", { /* name used by SYS/BIOS */
   214                    name: "EVEVECS", space: "code/data", access: "RWX",
   215                    base: 0x80030000, len: 0x100, page: 0,
   216                    comment: "EVE4 Vector Table (256 B)"
   217                }],
   218                [ "EVE4_PROG", {
   219                    name: "EVE4_PROG", space: "code/data", access: "RWX",
   220                    base: 0x84000000, len: 0x400000, page: 1,
   221                    comment: "EVE4 Program Memory (4 MB)"
   222                }],
   223                [ "SR_0", SR_0 ]
   224            ],
   225            codeMemory:  "EVE4_PROG",
   226            dataMemory:  "EVE4_PROG",
   227            stackMemory: "EVE4_PROG"
   228        };
   229    
   230        readonly config Any IPU1 = {
   231            externalMemoryMap: [
   232                [ "IPU1_PROG", {
   233                    name: "IPU1_PROG", space: "code/data", access: "RWX",
   234                    base: 0x8A000000, len: 0x800000,
   235                    comment: "IPU1 Program Memory (8 MB)"
   236                }],
   237                [ "SR_0", SR_0 ]
   238            ],
   239            codeMemory:  "IPU1_PROG",
   240            dataMemory:  "IPU1_PROG",
   241            stackMemory: "IPU1_PROG"
   242        };
   243    
   244        readonly config Any IPU2 = {
   245            externalMemoryMap: [
   246                [ "IPU2_PROG", {
   247                    name: "IPU2_PROG", space: "code/data", access: "RWX",
   248                    base: 0x8A800000, len: 0x800000,
   249                    comment: "IPU2 Program Memory (8 MB)"
   250                }],
   251                [ "SR_0", SR_0 ]
   252            ],
   253            codeMemory:  "IPU2_PROG",
   254            dataMemory:  "IPU2_PROG",
   255            stackMemory: "IPU2_PROG"
   256        };
   257    
   258        readonly config Any HOST = {
   259            externalMemoryMap: [
   260                [ "HOST_PROG", {
   261                    name: "HOST_PROG", space: "code/data", access: "RWX",
   262                    base: 0x8B000000, len: 0x1000000,
   263                    comment: "HOST Program Memory (16 MB)"
   264                }],
   265                [ "SR_0", SR_0 ]
   266            ],
   267            codeMemory:  "HOST_PROG",
   268            dataMemory:  "HOST_PROG",
   269            stackMemory: "HOST_PROG"
   270        };
   271    
   272    instance:
   273    
   274        /*!
   275         *  ======== externalMemoryMap ========
   276         *  Memory regions as defined in the DRA7XX Specification
   277         */
   278        override readonly config xdc.platform.IPlatform.Memory
   279            externalMemoryMap[string] = [
   280                ["EXT_RAM", {
   281                    comment: "2 GB External RAM Memory",
   282                    name: "EXT_RAM",
   283                    base: 0x80000000,
   284                    len:  0x80000000
   285                }]
   286            ];
   287    
   288        /*
   289         *  ======== l1PMode ========
   290         *  Define the amount of L1P RAM used for L1 Program Cache.
   291         *
   292         *  Check the device documentation for valid values.
   293         */
   294        config String l1PMode = "32k";
   295    
   296        /*
   297         *  ======== l1DMode ========
   298         *  Define the amount of L1D RAM used for L1 Data Cache.
   299         *
   300         *  Check the device documentation for valid values.
   301         */
   302        config String l1DMode = "32k";
   303    
   304        /*
   305         *  ======== l2Mode ========
   306         *  Define the amount of L2 RAM used for L2 Cache.
   307         *
   308         *  Check the device documentation for valid values.
   309         */
   310        config String l2Mode = "0k";
   311    };
   312    /*
   313     *  @(#) ti.platforms.evmDRA7XX; 1, 0, 0, 0,37; 3-22-2014 18:57:43; /db/ztree/library/trees/platform/platform-o48x/src/
   314     */
   315