1    /* --COPYRIGHT--,EPL
     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     * --/COPYRIGHT--*/
    12    /*
    13     *  ======== IExeContext.xdc ========
    14     */
    15    package xdc.platform;
    16    
    17    /*!
    18     *  ======== IExeContext ========
    19     *  Execution environment interface between a platform and an executable
    20     *
    21     *  This interface describes the execution environment provided by a
    22     *  platform as seen by an executable on a particular CPU at the time 
    23     *  it is loaded.
    24     *
    25     *  Execution contexts are created by platforms via
    26     *  `{@link xdc.platform.IPlatform#getExeContext()}`.  Execution contexts are
    27     *  created implicitly just prior to executing a program's configuration
    28     *  script.  This execution context is made available to the configuration
    29     *  script as the global read-only `Program.cpu` configuration parameter;
    30     *  see `{@link xdc.cfg.Program}`.
    31     */
    32    metaonly interface IExeContext
    33    {
    34        /*!
    35         *  ======== Cpu ========
    36         *  CPU attributes necessary to create an execution context.
    37         *
    38         *  Attributes that uniquely identify the CPU responsible for executing
    39         *  an executable image.
    40         */
    41        struct Cpu {
    42            string      id;             /*! unique id within the platform */
    43            string      catalogName;    /*! name of catalog package */
    44            string      deviceName;     /*! module name within catalog package */
    45            string      revision;       /*! revision of specified device */
    46            float       clockRate;      /*! clock rate in MHz of CPU on board */
    47        };
    48        
    49    instance:
    50        /*!
    51         *  ======== id ========
    52         *  The CPU's unique id within the platform
    53         *
    54         *  This id is the string used to identify a specific CPU within
    55         *  the platform that provides this execution context.
    56         *
    57         *  @a(readonly) This parameter is set by the platform and is readonly 
    58         *  for configuration scripts.
    59         */
    60        config string id;
    61    
    62        /*!
    63         *  ======== catalogName ========
    64         *  The name of the package containing the module named by deviceName
    65         *
    66         *  This string names a package containing one or more modules that
    67         *  implements the `{@link xdc.platform.ICpuDataSheet}` interface.
    68         *
    69         *  @a(readonly) This parameter is set by the platform and is readonly for
    70         *  configuration scripts.
    71         */
    72        config string catalogName;
    73    
    74        /*!
    75         *  ======== deviceName ========
    76         *  The name of a CPU device within the catalog package catalogName
    77         *
    78         *  This string names a module in the catalog package, specified by
    79         *  catalogName, that represents the CPU that runs the executable; i.e.,
    80         *  it implements the `{@link xdc.platform.ICpuDataSheet}` interface.
    81         */
    82        config string deviceName;
    83    
    84        /*!
    85         *  ======== revision ========
    86         *  The revision of the CPU
    87         *
    88         *  @a(readonly) This parameter is set by the platform and is readonly for
    89         *  configuration scripts.
    90         */
    91        config string revision = "";
    92    
    93        /*!
    94         *  ======== clockRate ========
    95         *  The clock rate in MHz of the CPU
    96         *
    97         *  @a(readonly) This parameter is set by the platform and is readonly for
    98         *  configuration scripts.
    99         */
   100        config float clockRate;
   101    
   102        /*!
   103         *  ======== board ========
   104         *  The board-level attributes
   105         *
   106         *  This parameter defines the static attributes of the board
   107         *  containing the CPU that runs the executable.
   108         *
   109         *  @a(readonly) This parameter is set by the platform and is readonly for
   110         *  configuration scripts.
   111         */
   112        readonly config IPlatform.Board board;
   113        
   114        /*!
   115         *  ======== attrs ========
   116         *  The CPU "data-sheet" attributes
   117         *
   118         *  This "data sheet" allows one to get information about the CPU that
   119         *  runs the run the executable associated with this execution context.
   120         *
   121         *  Multi-CPU platforms provide multiple execution contexts; each
   122         *  context is associated with a single CPU on the platform.
   123         *
   124         *  @a(readonly) This parameter is set by the platform and is readonly for
   125         *  configuration scripts.
   126         */
   127        config ICpuDataSheet.Instance attrs;
   128    
   129        /*!
   130         *  ======== memoryMap ========
   131         *  The memory map seen by executables at the time they are loaded
   132         *
   133         *  @a(readonly) This parameter is set by the platform and is readonly for
   134         *  configuration scripts.
   135         */
   136        config IPlatform.Memory memoryMap[string];
   137    };
   138    /*
   139     *  @(#) xdc.platform; 1, 0, 1, 0,239; 6-9-2010 16:24:42; /db/ztree/library/trees/xdc/xdc-u18x/src/packages/
   140     */
   141