Framework Components Application Programming Interface (API)  fc-t15
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dskt2.h
Go to the documentation of this file.
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  */
53 #ifndef DSKT2_
54 #define DSKT2_
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
62 
63 #include <xdc/std.h>
64 #include <xdc/runtime/IHeap.h>
65 
66 #include <ti/xdais/ialg.h>
67 #include <ti/xdais/ires.h>
68 #include <stddef.h>
69 
70 #define DSKT2_NUM_SCRATCH_GROUPS 20
74 #define DSKT2_MAX_MEM_ALLOCATION_SIZE 0xFFFF
78 /* NOTE: DO NOT Change NUM_SHAREDHEAPS*/
79 #define DSKT2_NUM_SHAREDHEAPS 2
80 
89 #define DSKT2_MODNAME "ti.sdo.fc.dskt2"
90 
98 typedef Void (*DSKT2_CacheWBInvFxn)(Ptr blockPtr, size_t byteCnt, Bool wait);
99 
100 
105 
106 /* TODO: Should these be declared here ? User should know they can initialize
107  these entries */
108 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_daram0Heap;
109 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_daram1Heap;
110 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_daram2Heap;
111 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_saram0Heap;
112 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_saram1Heap;
113 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_saram2Heap;
114 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_iprogHeap;
115 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_eprogHeap;
116 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_esdataHeap;
117 extern __FAR__ xdc_runtime_IHeap_Handle _DSKT2_heap;
118 
119 extern __FAR__ UInt _DSKT2_ALLOW_EXTERNAL_SCRATCH;
120 
121 extern __FAR__ UInt _DSKT2_DARAM_SCRATCH_SIZES[];
122 extern __FAR__ UInt _DSKT2_SARAM_SCRATCH_SIZES[];
123 
124 /* ENDTODO */
125 
130 
195 extern Void DSKT2_activateAlg(Int scratchMutexId, IALG_Handle alg);
196 
197 
230 extern Int DSKT2_controlAlg(IALG_Handle alg, IALG_Cmd cmd,
231  IALG_Status *status);
232 
233 
312 extern IALG_Handle DSKT2_createAlg(Int scratchMutexId, IALG_Fxns * fxns,
313  IALG_Handle parent, IALG_Params * params);
314 
315 
409 extern IALG_Handle DSKT2_createAlg2(Int scratchMutexId, IALG_Fxns * fxns,
410  IALG_Handle parent, IALG_Params * params,
411  xdc_runtime_IHeap_Handle extHeapId);
412 
413 
489 IALG_Handle DSKT2_createAlgExt(Int scratchId, IALG_Fxns * fxns,
490  IALG_Handle parent, IALG_Params * params);
491 
544 extern Void DSKT2_deactivateAlg(Int scratchMutexId, IALG_Handle alg);
545 
557 extern Int DSKT2_deactivateAll();
558 
593 extern Bool DSKT2_freeAlg(Int scratchMutexId, IALG_Handle alg);
594 
624 extern Bool DSKT2_allocScratch(IALG_Handle alg,Int mutexId, IALG_MemRec *memTab,
625  Int numRecs);
626 
627 extern Int DSKT2_getScratchId(IALG_Handle alg);
628 
652 extern Void DSKT2_freeScratch(Int mutexId, Void *addr, UInt size);
653 
666 extern Bool DSKT2_allocPersistent(IALG_MemRec *memTab, Int numRecs);
667 
680 extern Void DSKT2_freePersistent(IALG_MemRec *memTab, Int numRecs);
681 
682 /*
683  * Functions below are friend functions that are used by RMAN and some IRES
684  * implementations to cooperatively yield to higher priority algorithms.
685  */
693 Void DSKT2_yield(IRES_YieldResourceType resource,
694  IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
695 
700 IRES_YieldArgs DSKT2_getYieldArgs(Int scratchId);
701 
706 IRES_YieldArgs DSKT2_setYieldArgs(Int scratchId, Bool yieldFlag);
707 
708 
709 Void DSKT2_contextRelease(IRES_YieldResourceType resource,
710  IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
711 
712 Void DSKT2_contextAcquire(IRES_YieldResourceType resource,
713  IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
714 
720 Int DSKT2_getNumAlgs();
721 
732 Int DSKT2_getAlgList(IALG_Handle * algList, Int * scratchIds);
733 
737 
738 #ifdef __cplusplus
739 }
740 #endif /* extern "C" */
741 
742 #endif /* DSKT2_ */
743 /*
744  * @(#) ti.sdo.fc.dskt2; 1, 0, 4,; 10-29-2013 18:37:11; /db/atree/library/trees/fc/fc-t15/src/ xlibrary
745 
746  */
747 
Copyright 2013, Texas Instruments Incorporated