Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00053 #ifndef DSKT2_
00054 #define DSKT2_
00055
00056 #ifdef __cplusplus
00057 extern "C" {
00058 #endif
00059
00062
00063 #include <xdc/std.h>
00064 #include <xdc/runtime/IHeap.h>
00065
00066 #include <ti/xdais/ialg.h>
00067 #include <ti/xdais/ires.h>
00068 #include <stddef.h>
00069
00070 #define DSKT2_NUM_SCRATCH_GROUPS 20
00074 #define DSKT2_MAX_MEM_ALLOCATION_SIZE 0xFFFF
00078
00079 #define DSKT2_NUM_SHAREDHEAPS 2
00080
00089 #define DSKT2_MODNAME "ti.sdo.fc.dskt2"
00090
00098 typedef Void (*DSKT2_CacheWBInvFxn)(Ptr blockPtr, size_t byteCnt, Bool wait);
00099
00100
00104 extern __FAR__ DSKT2_CacheWBInvFxn DSKT2_cacheWBInvFxn;
00105
00106
00107
00108 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_daram0Heap;
00109 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_daram1Heap;
00110 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_daram2Heap;
00111 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_saram0Heap;
00112 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_saram1Heap;
00113 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_saram2Heap;
00114 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_iprogHeap;
00115 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_eprogHeap;
00116 extern __FAR__ xdc_runtime_IHeap_Handle DSKT2_esdataHeap;
00117 extern __FAR__ xdc_runtime_IHeap_Handle _DSKT2_heap;
00118
00119 extern __FAR__ UInt _DSKT2_ALLOW_EXTERNAL_SCRATCH;
00120
00121 extern __FAR__ UInt _DSKT2_DARAM_SCRATCH_SIZES[];
00122 extern __FAR__ UInt _DSKT2_SARAM_SCRATCH_SIZES[];
00123
00124
00125
00129 extern __FAR__ Bool ti_sdo_fc_dskt2_DSKT2_disableLazyDeactivate;
00130
00195 extern Void DSKT2_activateAlg(Int scratchMutexId, IALG_Handle alg);
00196
00197
00230 extern Int DSKT2_controlAlg(IALG_Handle alg, IALG_Cmd cmd,
00231 IALG_Status *status);
00232
00233
00312 extern IALG_Handle DSKT2_createAlg(Int scratchMutexId, IALG_Fxns * fxns,
00313 IALG_Handle parent, IALG_Params * params);
00314
00315
00409 extern IALG_Handle DSKT2_createAlg2(Int scratchMutexId, IALG_Fxns * fxns,
00410 IALG_Handle parent, IALG_Params * params,
00411 xdc_runtime_IHeap_Handle extHeapId);
00412
00413
00489 IALG_Handle DSKT2_createAlgExt(Int scratchId, IALG_Fxns * fxns,
00490 IALG_Handle parent, IALG_Params * params);
00491
00544 extern Void DSKT2_deactivateAlg(Int scratchMutexId, IALG_Handle alg);
00545
00557 extern Int DSKT2_deactivateAll();
00558
00593 extern Bool DSKT2_freeAlg(Int scratchMutexId, IALG_Handle alg);
00594
00624 extern Bool DSKT2_allocScratch(IALG_Handle alg,Int mutexId, IALG_MemRec *memTab,
00625 Int numRecs);
00626
00627 extern Int DSKT2_getScratchId(IALG_Handle alg);
00628
00652 extern Void DSKT2_freeScratch(Int mutexId, Void *addr, UInt size);
00653
00666 extern Bool DSKT2_allocPersistent(IALG_MemRec *memTab, Int numRecs);
00667
00680 extern Void DSKT2_freePersistent(IALG_MemRec *memTab, Int numRecs);
00681
00682
00683
00684
00685
00693 Void DSKT2_yield(IRES_YieldResourceType resource,
00694 IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
00695
00700 IRES_YieldArgs DSKT2_getYieldArgs(Int scratchId);
00701
00706 IRES_YieldArgs DSKT2_setYieldArgs(Int scratchId, Bool yieldFlag);
00707
00708
00709 Void DSKT2_contextRelease(IRES_YieldResourceType resource,
00710 IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
00711
00712 Void DSKT2_contextAcquire(IRES_YieldResourceType resource,
00713 IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
00714
00720 Int DSKT2_getNumAlgs();
00721
00732 Int DSKT2_getAlgList(IALG_Handle * algList, Int * scratchIds);
00733
00737
00738 #ifdef __cplusplus
00739 }
00740 #endif
00741
00742 #endif
00743
00744
00745
00746
00747