1    /*
     2     * Copyright (c) 2012, 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     * ======== UIAMetaData.xdc
    35     */
    36    
    37    /*!
    38     * Unified Arch. Hardware Interrupt Context Instrumentation
    39     *
    40     * The UIAHWICtx module defines context change events
    41     * and methods that allow tooling to identify hardware interrutp context
    42     * switches and to enable HWI-aware filtering, trace and
    43     * analysis.
    44     */
    45    
    46    module UIAMetaData {
    47    
    48        /*!
    49         *  ======== UploadMode ========
    50         */
    51        enum UploadMode {
    52            UploadMode_SIMULATOR = 1, /* note that simulators use probe points */
    53            UploadMode_PROBEPOINT = 2,
    54            UploadMode_JTAGSTOPMODE = 3,
    55            UploadMode_JTAGRUNMODE = 4,
    56            UploadMode_NONJTAGTRANSPORT = 5,
    57            UploadMode_CUSTOM = 6
    58        }
    59    
    60        metaonly function generateXML();
    61    
    62        /*!
    63         *  ======== genXmlEntry ========
    64         *  write an entry into an xml file
    65         *
    66         *  e.g. <myTag>myValue</myTag>\n
    67         */
    68        metaonly function genXmlEntry(indent, tag, value);
    69    
    70        /*!
    71         *  ======== genXmlEntryOpen ========
    72         *  write an entry into an xml file with a key field
    73         *
    74         *  e.g. <myTag myKeyName=myKeyValue>
    75         */
    76        metaonly function  genXmlEntryOpen(indent,  tag);
    77    
    78        /*!
    79         *  ======== genXmlEntryOpenWithKey ========
    80         *  write an entry into an xml file with a key field
    81         *
    82         *  e.g. <myTag myKeyName=myKeyValue>
    83         */
    84        metaonly function  genXmlEntryOpenWithKey(indent,tag,keyName,keyValue,value);
    85    
    86        /*!
    87         *  ======== genXmlEntryWithKey ========
    88         *  write an entry into an xml file with a key field
    89         *
    90         *  e.g. <myTag myKeyName=myKeyValue>myValue</myTag>\n
    91         */
    92         metaonly function  genXmlEntryWithKey(indent,tag,keyName,keyValue,value);
    93    
    94         /*!
    95          *  ======== genXmlComment ========
    96          *  add an XML style comment to the active xml file
    97          */
    98         metaonly function  genXmlComment(indent,  comment);
    99        /*!
   100         *  ======== genXmlEntryClose ========
   101         *  write an entry into an xml file with a key field
   102         *
   103         *  e.g. </myTag>\n
   104         */
   105        metaonly function  genXmlEntryClose(indent,  tag);
   106    
   107        /*!
   108         *  ======== setTransportFields ========
   109         *  Function to populate the transport fields
   110         *
   111         *  This function is used to populate the UIA XML file with
   112         *  transport information. It  writes <transport2> entries.
   113         *  The <transport2> is supported by System Analyzer in 5.2
   114         *  and later.
   115         *
   116         *  The parameters map directly to individual fields in the
   117         *  <transport2> entries. For example
   118         *
   119         *  @a(Example)
   120         *  UIAMetaData.setTransportFields(false, "UART", "UIAPACKET",
   121         *                      true, "timestamps=32bits,sequence=disabled");
   122         *
   123         *  would yield
   124         *
   125         * <transport2>
   126         *    <isMultiCoreTransport>false</isMultiCoreTransport>
   127         *    <supportControl>true</supportControl>
   128         *    <format>UIAPacket</format>
   129         *    <transportType>UART</transportType>
   130         *    <customFields>
   131         *       <timestamps>32bits</timestamps>
   132         *       <sequence>disabled</sequence>
   133         *    </customFields>
   134         * </transport2>
   135         *  @p
   136         *
   137         *  This function can be called multiple times.
   138         *
   139         *  @param(isMultiCoreTransport) Boolean whether it is a multicore
   140         *                               transport. If true, then multiple
   141         *                               cores route their events through
   142         *                               the transport on this core.
   143         *  @param(transportType)        The type of transport (e.g. UART)
   144         *  @param(format)               The format of the data (e.g. UIAPACKET)
   145         *  @param(supportControl)       Boolean whether the transport can receive
   146         *                               control messages from the instrumentation
   147         *                               host.
   148         *  @param(customFields)         Custom fields. Fields are comma separated.
   149         *                               Field name/values are separated by an
   150         *                               '='.
   151         */
   152        metaonly function setTransportFields(isMultiCoreTransport, uploadMode,
   153                                             transportType, format, supportControl,
   154                                             customFields);
   155    
   156        /*! @_nodoc
   157         * ======== setLoggingSetupConfigured ========
   158         * Called by the LoggingSetup module to indicate it is in the .cfg file
   159         *
   160         * Sets an internal metaonly flag that is used to determine the transport used.
   161         */
   162        metaonly function setLoggingSetupConfigured();
   163    
   164        /*! @_nodoc
   165         * ======== isLoggingSetupConfigured ========
   166         * Called by other modules to see if the LoggingSetup module is in the .cfg file
   167         *
   168         * Returns true if the LoggingSetup module can be used to determine the transport used.
   169         */
   170        metaonly function isLoggingSetupConfigured();
   171    
   172        /*! @_nodoc
   173         * ======== setLogSyncInfo ========
   174         * Called by the LogSync module to provide the module name and isEnabled flag
   175         */
   176        metaonly function setLogSyncInfo(moduleName, isEnabled);
   177    
   178        /*! @_nodoc
   179         * ======== setLoggingSetupName ========
   180         * Called by the LoggingSetup module to provide it's module name
   181         */
   182            metaonly function setLoggingSetupName(moduleName);
   183    }