1    /* 
     2     * Copyright (c) 2010, 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    /*
    35     * ======== Settings.xdc ========
    36     * Configuration for the EDMA3 module to be able to create handles to the
    37     * resource handles for various scratch groups.
    38     */
    39    
    40    
    41    @Template("./Settings.xdt")
    42    
    43    metaonly module Settings {
    44    
    45        config UInt controllerId = 0; 
    46    
    47        /*!
    48         * ======== region ========
    49         * Id of the EDMA3 Region we will program with the assigned Resources etc.
    50         * Region number 1 usually corresponds to DSP.
    51         * Region number 0 usually corresponds to ARM. 
    52         */
    53        config UInt region = 1;
    54    
    55        /*!
    56         *  ======== persistentAllocFxn ========
    57         *  Function for allocating persistent memory for RMAN's and other IRESMAN
    58         *  implementation's internal objects.
    59         *
    60         *  This is required to be supplied ONLY if
    61         *  {@link ti.sdo.fc.rman.RMAN#useDSKT2} is set to `false`.
    62         */
    63        config String persistentAllocFxn = null;
    64     
    65        /*!
    66         *  ======== persistentFreeFxn ========
    67         *  Function for freeing persistent memory used by RMAN and other IRESMAN
    68         *  implementation's internal objects.
    69         *
    70         *  This is required to be supplied ONLY if
    71         *  {@link ti.sdo.fc.rman.RMAN#useDSKT2} is set to `false`.
    72         */
    73        config String persistentFreeFxn = null;
    74     
    75        /*!
    76         *  ======== semCreateFxn ========
    77         * Function to create semaphores used by various individual resource
    78         * manager(s) registered with RMAN.
    79         *
    80         *  Function signature is:
    81         *  @p(code)
    82         * Void * _semCreate(Int key, Int count);
    83         */
    84        config String semCreateFxn = null;
    85     
    86        /*!
    87         *  ======== semDeleteFxn ========
    88         * Function to delete semaphores used by various individual resource
    89         * manager(s) registered with RMAN.
    90         *
    91         *  Function signature is:
    92         *  @p(code)
    93         *  Void _semDelete(Void * sem);
    94         */
    95        config String semDeleteFxn = null;
    96      
    97        /*!
    98         *  ======== semPendFxn ========
    99         * Function to pend on semaphores used by various resource manager(s)
   100         * registered with RMAN.
   101         *
   102         *  Function signature is:
   103         *  @p(code)
   104         *  Int _semPend(Void * sem, UInt32 timeout);
   105         */
   106        config String semPendFxn = null;
   107     
   108        /*!
   109         *  ======== semPostFxn ========
   110         * Function to post on Semaphores used by various resource manager(s)
   111         * registered with RMAN.
   112         *
   113         *  Function signature is:
   114         *  @p(code)
   115         * Void _semPost(Void * sem);
   116         */
   117        config String semPostFxn = null;
   118    
   119        /*!
   120         * ======== maxAlgs ========
   121         * Maximum number of algorithm instances that will be created  
   122         */
   123        config UInt maxAlgs = 32;
   124    
   125        /*!
   126         * ========= maxRequests ======
   127         * Maximum number of "active" resource requests that will be 
   128         * made by the algorithms in each scratch group
   129         */  
   130        config UInt maxRequests = 64;
   131    
   132        /*!
   133         * ======== contiguousPaRams ========
   134         * Boolean value indicating if PaRams assigned to scratch groups need to be
   135         * contiguous or not
   136         */
   137        config bool contiguousPaRams = true;
   138    
   139        const UInt EDMA3_MAXGROUPS = 20;  /*! Maximum number of groups for sharing
   140                                     EDMA3 resources. */
   141    
   142        /*!
   143         * ======== globalInit ========
   144         * This flag decides if EDMA3 global registers and PaRam entries will be 
   145         * initialized by this module. 
   146         * If using on a device where ARM-side drivers might perform the 
   147         * intialization, set this to false so it doesn't overwrite the ARM-side
   148         * setup.
   149         *  This is required to be supplied ONLY if
   150         *  Application is built for C64P target .
   151         */
   152        config Bool globalInit = false;
   153    
   154        /*!
   155         * ======== globalConfig ========
   156         * Global configuration required to set the SOC specific configuration of
   157         * of the EDMA3 device
   158         *  This is required to be supplied ONLY if
   159         *  Application is built for C64P target .
   160         * far EDMA3_GblConfigParams _globalConfig;
   161         */
   162        config String globalConfig = null;
   163    
   164        /*!
   165         * ======== regionConfig ========
   166         * Instance specific  configuration required to set the region specific
   167         * resource ownership details of the EDMA3 device
   168         *  This is required to be supplied ONLY if
   169         *  Application is built for C64P target .
   170         * far EDMA3_InstanceInitConfg _regionConfig;
   171         */
   172        config String regionConfig = null;
   173    
   174     
   175        /*!
   176         * ======== maxTccs ========
   177         * Arrays containing the maximum number of TCCs that will be assigned to
   178         * groups for sharing.
   179         * Algorithms created within a given group ID will share the EDMA3 resources
   180         * assigned to that group
   181         *  This is required to be supplied ONLY if
   182         *  Application is built for C64P target .
   183         */
   184        config UInt maxTccs[EDMA3_MAXGROUPS];
   185    
   186        /*!
   187         * ======== maxPaRams ========
   188         * Arrays containing the maximum number of PaRams that will be assigned to
   189         * groups for sharing.
   190         * Algorithms created within a given group ID will share the EDMA3 resources
   191         * assigned to that group
   192         *  This is required to be supplied ONLY if
   193         *  Application is built for C64P target .
   194         */
   195        config UInt maxPaRams[EDMA3_MAXGROUPS];
   196    
   197        /*!
   198         * ======== maxEdmaChannels ========
   199         * Array containing the maximum number of Edma Channels that will be
   200         * assigned to groups for sharing.
   201         * Algorithms created within a given group ID will share the EDMA3 resources
   202         * assigned to that group
   203         * On devices where DCHMAP doesn't exist, it is recommended to request as
   204         * many channels as PaRams requested
   205         *  This is required to be supplied ONLY if
   206         *  Application is built for C64P target .
   207         */
   208        config UInt maxEdmaChannels[EDMA3_MAXGROUPS];
   209    
   210        /*!
   211         * ======== maxQdmaChannels ========
   212         * Array containing the maximum number of Qdma Channels that will be
   213         * assigned to groups for sharing.
   214         * Algorithms created within a given group ID will share the EDMA3 resources
   215         * assigned to that group
   216         *  This is required to be supplied ONLY if
   217         *  Application is built for C64P target .
   218         */
   219        config UInt maxQdmaChannels[EDMA3_MAXGROUPS];
   220    
   221        /*!
   222         * ======== debug ========
   223         *  Enable the debug profile of the EDMA3 library.
   224         *
   225         *  This will likely result in a larger and slower library being linked in.
   226         *
   227         *  @_nodoc
   228         */
   229        config bool debug = false;
   230    
   231        /*!
   232         * ======== trace ========
   233         *  Enable trace support
   234         *  @_nodoc
   235         */
   236        config bool trace = false;
   237    
   238        /*!
   239         *  ======== ipcKeyBase ========
   240         *  Linux only. Base value of keys of Linux IPC objects used by
   241         *  EDMA3. The IPC objects created by EDMA3 will use keys starting 
   242         *  at this
   243         *  value, and incrementing with each new object. There are currently
   244         *  three IPC objects, so keys in the range of ipcKeyBase to ipcKeyBase + 2
   245         *  will be reserved for EDMA3. The default value of ipcKeyBase is
   246         *  ascii code for "3AMD".
   247         *
   248         *  WARNING: This value should only be changed if it conflicts with
   249         *  another IPC key in the system that cannot be changed. If this value
   250         *  is changed, all programs using EDMA3 that will be run simultaneously
   251         *  must have the ipcKeyBase configured to the new value.
   252         *  @_nodoc
   253         */
   254        config UInt ipcKeyBase = 0x33414D44;
   255    
   256        /*!
   257         * ======== Region ========
   258         * Deprecated:
   259         * Id of the EDMA3 Region we will program with the assigned Resources etc.
   260         * @_nodoc
   261         */
   262        config UInt Region = 1;
   263    
   264        /*!
   265         * ======== GlobalInit ========
   266         * Deprecated:
   267         * This flag decides if EDMA3 global registers and PaRam entries will be 
   268         * initialized by this module. 
   269         * @_nodoc
   270         */
   271        config UInt GlobalInit = false;
   272    
   273        /*!
   274         * ======== MaxTccs ========
   275         * Deprecated
   276         * Arrays containing the maximum number of TCCs that will be assigned to
   277         * groups for sharing.
   278         * Algorithms created within a given group ID will share the EDMA3 resources
   279         * assigned to that group
   280         * @_nodoc
   281         */
   282        config UInt MaxTccs[] = [10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
   283    
   284        /*!
   285         *  ======== MaxPaRams ========
   286         * Deprecated
   287         *  Array containing the maximum number of PaRams that will be assigned to
   288         *  groups for sharing.
   289         * @_nodoc
   290         */
   291        config UInt MaxPaRams[] = [20, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   292                0, 0, 0, 0, 0, 0];
   293    
   294        /*!
   295         *  ======== ContigPaRams ========
   296         * Deprecated
   297         *  Boolean value indicating if PaRams assigned to scratch groups need
   298         *  to be contiguous or not.
   299         * @_nodoc
   300         */
   301        config bool ContiguousPaRams = true;
   302    
   303        /*!
   304         *  ======== MaxEdmaChannels ========
   305         *  Deprecated
   306         *  Array containing the maximum number of Edma Channels that will be
   307         *  assigned to groups for sharing.
   308         *  @_nodoc
   309         */
   310        config UInt MaxEdmaChannels[] = [4, 4, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   311                0, 0, 0, 0, 0, 0];
   312    
   313        /*!
   314         *  ======== MaxQdmaChannels ========
   315         *  Deprecated
   316         *  Array containing the maximum number of Qdma Channels that will be
   317         *  assigned to groups for sharing.
   318         *  @_nodoc
   319         */
   320        config UInt MaxQdmaChannels[] = [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   321                0, 0, 0, 0, 0, 0];
   322    
   323        /*!
   324         *  ======== GlobalConfig ========
   325         *  Deprecated
   326         *  Global configuration required to set the SOC specific configuration of
   327         *  of the EDMA3 device.
   328         *  @_nodoc   
   329         */
   330        config String GlobalConfig = null;
   331    
   332        /*!
   333         *  ======== RegionConfig ========
   334         *  Deprecated
   335         *  Instance specific  configuration required to set the region specific
   336         *  resource ownership details of the EDMA3 device.
   337         *  @_nodoc   
   338         */
   339        config String RegionConfig = null;
   340    
   341    }
   342    /*
   343     *  @(#) ti.sdo.fc.edma3; 3, 0, 0,140; 7-2-2010 18:58:35; /db/atree/library/trees/fc/fc-l07x/src/
   344     */
   345