1    /*
     2     *  Copyright 2013 by Texas Instruments Incorporated.
     3     *
     4     */
     5    
     6    /*
     7     * Copyright (c) 2012, Texas Instruments Incorporated
     8     * All rights reserved.
     9     *
    10     * Redistribution and use in source and binary forms, with or without
    11     * modification, are permitted provided that the following conditions
    12     * are met:
    13     *
    14     * *  Redistributions of source code must retain the above copyright
    15     *    notice, this list of conditions and the following disclaimer.
    16     *
    17     * *  Redistributions in binary form must reproduce the above copyright
    18     *    notice, this list of conditions and the following disclaimer in the
    19     *    documentation and/or other materials provided with the distribution.
    20     *
    21     * *  Neither the name of Texas Instruments Incorporated nor the names of
    22     *    its contributors may be used to endorse or promote products derived
    23     *    from this software without specific prior written permission.
    24     *
    25     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    26     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    27     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    28     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    29     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    30     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    31     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    32     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    33     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    34     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    35     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    36     *
    37     */
    38    
    39    /*!
    40     *  ======== DSKT2 ========
    41     *  XDAIS algorithm management library.
    42     */
    43    @Template("./DSKT2.xdt")
    44    
    45    metaonly module DSKT2 {
    46    
    47        /*!
    48         *  ======== DARAM0 ========
    49         *  IALG memory space mapping of IALG_DARAM0.
    50         *
    51         *  This must be assigned the name of an instance of a module that
    52         *  implements IHeap.
    53         */
    54        config String DARAM0;
    55    
    56        /*!
    57         *  ======== DARAM1 ========
    58         *  IALG memory space mapping of IALG_DARAM1.
    59         *
    60         *  This must be assigned the name of an instance of a module that
    61         *  implements IHeap.
    62         */
    63        config String DARAM1;
    64    
    65        /*!
    66         *  ======== DARAM2 ========
    67         *  IALG memory space mapping of IALG_DARAM2.
    68         *
    69         *  This must be assigned the name of an instance of a module that
    70         *  implements IHeap.
    71         */
    72        config String DARAM2;
    73    
    74        /*!
    75         *  ======== SARAM0 ========
    76         *  IALG memory space mapping of IALG_SARAM0.
    77         *
    78         *  This must be assigned the name of an instance of a module that
    79         *  implements IHeap.
    80         */
    81        config String SARAM0;
    82    
    83        /*!
    84         *  ======== SARAM1 ========
    85         *  IALG memory space mapping of IALG_SARAM1.
    86         *
    87         *  This must be assigned the name of an instance of a module that
    88         *  implements IHeap.
    89         */
    90        config String SARAM1;
    91    
    92        /*!
    93         *  ======== SARAM2 ========
    94         *  IALG memory space mapping of IALG_SARAM2.
    95         *
    96         *  This must be assigned the name of an instance of a module that
    97         *  implements IHeap.
    98         */
    99        config String SARAM2;
   100    
   101        /*!
   102         *  ======== ESDATA ========
   103         *  IALG memory space mapping of IALG_ESDATA.
   104         *
   105         *  This must be assigned the name of an instance of a module that
   106         *  implements IHeap.
   107         */
   108        config String ESDATA;
   109    
   110        /*!
   111         *  ======== IPROG ========
   112         *  IALG memory space mapping of IALG_IPROG.
   113         *
   114         *  This must be assigned the name of an instance of a module that
   115         *  implements IHeap.
   116         */
   117        config String IPROG;
   118    
   119        /*!
   120         *  ======== EPROG ========
   121         *  IALG memory space mapping of IALG_EPROG.
   122         *
   123         *  This must be assigned the name of an instance of a module that
   124         *  implements IHeap.
   125         */
   126        config String EPROG;
   127    
   128        /*!
   129         *  ======== DSKT2_HEAP ========
   130         *  Heap for allocating internal DSKT2 data structures.
   131         *
   132         *  Objects internal to the DSKT2 module will be allocated from this heap.
   133         */
   134        config String DSKT2_HEAP;
   135    
   136        /*!
   137         *  ======== ALLOW_EXTERNAL_SCRATCH ========
   138         *  Allow external memory to be used for algorithm scratch memory requests.
   139         *
   140         *  If an algorithm requests scratch memory, and insufficient scratch
   141         *  memory is available, scratch buffers will be allocated in external
   142         *  memory if property is 'true'.
   143         */
   144        config bool   ALLOW_EXTERNAL_SCRATCH = true;
   145    
   146        /*!
   147         *  ======== DARAM_SCRATCH_SIZES ========
   148         *  Shared IALG_DARAM0 scratch group sizes.
   149         */
   150        config UInt   DARAM_SCRATCH_SIZES[] =
   151                      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
   152    
   153        /*!
   154         *  ======== SARAM_SCRATCH_SIZES ========
   155         *  Shared IALG_SARAM0 scratch group sizes.
   156         */
   157        config UInt   SARAM_SCRATCH_SIZES[] =
   158                      [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
   159    
   160    
   161        /*!
   162         *  ======== cacheWritebackInvalidateFxn ========
   163         *  Name of function implementing cache writeback invalidate.
   164         *
   165         *  This function must have the following signature:
   166         *  @p(code)
   167         *  (*DSKT2_CacheWBInvFxn)(Ptr blockPtr, size_t byteCnt, bool wait)
   168         *  @p
   169         *
   170         *  For C6000 platforms DSKT2 calls this function to ensure that the
   171         *  algorithm instance memory is not resident in cache when it is
   172         *  instantiated. This is necessary for compliance with XDAIS C6000 DMA
   173         *  Rules and Guidelines.
   174         */
   175        config String cacheWritebackInvalidateFxn = "DSKT2_cacheWBInv";
   176    
   177        /*!
   178         *  ======== disableLazyDeactivate =======
   179         *
   180         *  Set this to TRUE to disable lazy deactivate feature in DSKT2.
   181         *  This could affect performance of your algorithm, and should be used
   182         *  mostly for diagnostic purposes.
   183         */
   184        config Bool disableLazyDeactivate;
   185    
   186        /*!
   187         *  ======== ipcKeyBase ========
   188         *  Base value of keys of multi-process objects used by DSKT2.
   189         *
   190         *  Linux only. The MP objects created by DSKT2 will use keys starting at
   191         *  this value, and incrementing with each new object. There is currently
   192         *  a DSKT2 lock and semaphores for each scratch group, that use a key.
   193         *  So the keys used by DSKT2 will range from ipcKeyBase to ipcKeyBase +
   194         *  DSKT2_NUM_SCRATCH_GROUPS.
   195         *  The default value of ipcKeyBase is ascii code for "DSKT".
   196         *
   197         *  WARNING: This value should only be changed if it conflicts with
   198         *  another key in the system that cannot be changed. If this value
   199         *  is changed, all programs using DSKT2 that will be run simultaneously
   200         *  must have the ipcKeyBase configured to the new value.
   201         *
   202         *  TODO:H, do we need this since we only support BIOS?
   203         *  @_nodoc
   204         */
   205        config UInt ipcKeyBase = 0x44534B54;
   206    
   207    }
   208    /*
   209     *  @(#) ti.sdo.fc.dskt2; 1, 0, 4,3; 7-23-2013 14:07:57; /db/atree/library/trees/fc/fc-t12/src/ xlibrary
   210    
   211     */
   212