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