1    /* 
     2     *  Copyright (c) 2008 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     *  ======== Utils.xdc ========
    14     */
    15    
    16    package xdc.platform;
    17    
    18    /*!
    19     *  ======== Utils ========
    20     *  Misc platform utilities
    21     */
    22    metaonly module Utils
    23    {
    24        /*!
    25         *  ======== assembleMemoryMap ========
    26         *  Combine the device and the external memory map into a platform map
    27         *
    28         *  This function combines memory maps and also applies memory map name
    29         *  changes requested through renameMap.
    30         *
    31         *  @param(cpu)     an `xdc.platform.IExeContext` object
    32         *
    33         *  @param(plat)    a platform instance
    34         *
    35         *  @param(noCheck) if true, and a custom memory map is defined, the
    36         *                  function does not check if the custom memory map fits
    37         *                  into the available physical memory
    38         *
    39         *  @a(returns)     platform memory map
    40         */
    41        function assembleMemoryMap(cpu, plat, noCheck);
    42    
    43        /*!
    44         *  ======== checkDefaults ========
    45         *  Check if dataMemory, codeMemory and stackMemory are set correctly
    46         *
    47         *  The `xdc.platform.IPlatform` instance parameters 'dataMemory',
    48         *  'codeMemory', and 'stackMemory' are strings. This function verifies
    49         *  that those strings correspond to names of the memory objects in the
    50         *  supplied memory map.
    51         *
    52         *  @param(inst)    an `xdc.platform.IPlatform` instance
    53         *
    54         *  @param(memMap)  a map of `xdc.platform.IPlatform.Memory` objects
    55         *
    56         *  @a(returns)     'true' if checked parameters are valid, 'false'
    57         *                  otherwise
    58         */
    59        function checkDefaults(inst, memMap);
    60    
    61        /*!
    62         *  ======== checkFit ========
    63         *  Check if a memory map fits into available physical memory
    64         *
    65         *  A custom memory map segment can be spread over multiple physical
    66         *  memories or multiple custom memory map segments can be located in
    67         *  one physical memory. However, code/data restrictions must be followed.
    68         *  A custom memory segment with the parameter 'space' set to "code/data",
    69         *  which is the default value if the parameter was not specified, can fit
    70         *  only into "code/data" physical memories. Custom memory segments with
    71         *  'space' set to "code" can fit into "code" and "code/data" memories, and
    72         *  custom memory segments with 'space' set to "data" can fit into "data"
    73         *  and "code/data" physical memories. 
    74         *
    75         *  @param(realMemMap)      a map of `xdc.platform.IPlatform.Memory`
    76         *                          objects containing physical memory map as
    77         *                          defined in datasheets for the device and the
    78         *                          platform
    79         *
    80         *  @param(customMemMap)    a map of `xdc.platform.IPlatform.Memory`
    81         *                          objects containing user defined memory map,
    82         *                          which must fit within boundaries of 'realMemMap'
    83         *
    84         *  @a(returns)             'true', if customMemMap fits within realMemMap,
    85         *                          and 'false' otherwise
    86         */
    87        function checkFit(realMemMap, customMemMap);
    88    
    89        /*!
    90         *  ======== checkOverlap ========
    91         *  Check if there is an overlap among memory objects in a memory map
    92         *
    93         *  @param(memMap)  a map of `xdc.platform.IPlatform.Memory` objects
    94         *
    95         *  @a(returns)     a string with names of Memory objects that overlap
    96         */
    97        function checkOverlap(memMap);
    98    
    99        /*!
   100         *  ======== getCpuDataSheet ========
   101         *  Get the specified cpu data sheet object
   102         *
   103         *  @param(cpuDesc) an `xdc.platform.IExeContext.Cpu` object identifying 
   104         *                  the CPU device
   105         *
   106         *  @a(returns)     an `xdc.platform.ICpuDataSheet.Instance` object that
   107         *                  corresponds to the specified cpuDesc
   108         *
   109         *  @a(throws)      `Error` exceptions are thrown for fatal errors
   110         */
   111        function getCpuDataSheet(cpuDesc);
   112    }
   113    
   114    /*
   115     *  @(#) xdc.platform; 1, 0, 1, 0,289; 8-20-2010 17:20:52; /db/ztree/library/trees/xdc/xdc-v48x/src/packages/
   116     */
   117