Framework Components Application Programming Interface (API)
fc-v04
|
Functions | |
Void | DSKT2_activateAlg (Int scratchMutexId, IALG_Handle alg) |
Prepares a XDAIS algorithm instance object to start using its scratch memory. More... | |
Int | DSKT2_controlAlg (IALG_Handle alg, IALG_Cmd cmd, IALG_Status *status) |
This is a convenience API to call a XDAIS algorithm instance's algControl function. More... | |
IALG_Handle | DSKT2_createAlg (Int scratchMutexId, IALG_Fxns *fxns, IALG_Handle parent, IALG_Params *params) |
Creates and initializes a XDAIS algorithm instance object. More... | |
IALG_Handle | DSKT2_createAlg2 (Int scratchMutexId, IALG_Fxns *fxns, IALG_Handle parent, IALG_Params *params, xdc_runtime_IHeap_Handle extHeapId) |
Creates and initializes a XDAIS algorithm instance object. More... | |
IALG_Handle | DSKT2_createAlgExt (Int scratchId, IALG_Fxns *fxns, IALG_Handle parent, IALG_Params *params) |
Creates and initializes a XDAIS algorithm instance object, allocating all algorithm memory in external memory. More... | |
Void | DSKT2_deactivateAlg (Int scratchMutexId, IALG_Handle alg) |
Prepares a XDAIS algorithm instance object to give up using its scratch memory. More... | |
Int | DSKT2_deactivateAll () |
All algorithms that have been deactivated lazily are now really deactivate. Any algorithms that are still currently active will be left as is. The number of algorithms that are still active will be returned from this call. More... | |
Bool | DSKT2_freeAlg (Int scratchMutexId, IALG_Handle alg) |
Deletes a XDAIS algorithm instance object and frees all persistent memory allocated for the instance object. More... | |
Bool | DSKT2_allocScratch (IALG_Handle alg, Int mutexId, IALG_MemRec *memTab, Int numRecs) |
Alocates memory from a DSKT2 shared scratch group buffer. More... | |
Int | DSKT2_getScratchId (IALG_Handle alg) |
Void | DSKT2_freeScratch (Int mutexId, Void *addr, UInt size) |
Alocates memory from a DSKT2 shared scratch group buffer. More... | |
Bool | DSKT2_allocPersistent (IALG_MemRec *memTab, Int numRecs) |
Alocates persistent memory to the requesting algorithm. More... | |
Void | DSKT2_freePersistent (IALG_MemRec *memTab, Int numRecs) |
Frees persistent memory from the requesting algorithm. More... | |
Macros | |
#define | DSKT2_NUM_SCRATCH_GROUPS 20 |
#define | DSKT2_MAX_MEM_ALLOCATION_SIZE 0xFFFF |
#define | DSKT2_NUM_SHAREDHEAPS 2 |
#define | DSKT2_MODNAME "ti.sdo.fc.dskt2" |
Name to pass to Diags_setMask() to enable logging for DSKT2 functions. For example, Diags_setMask(DSKT2_MODNAME"+EX1234567"); turns on all Log statements in this module. Diags_setMask() must be called after initialization to take effect. More... | |
Typedefs | |
typedef Void(* | DSKT2_CacheWBInvFxn) (Ptr blockPtr, size_t byteCnt, Bool wait) |
Function prototype of cache writeback function: Writes back the memory within the range of blockPtr and blockPtr + byteCnt. More... | |
Variables | |
__FAR__ DSKT2_CacheWBInvFxn | DSKT2_cacheWBInvFxn |
Cache writeback function pointer used by DSKT2 if not NULL. More... | |
__FAR__ xdc_runtime_IHeap_Handle | DSKT2_daram0Heap |
__FAR__ xdc_runtime_IHeap_Handle | DSKT2_daram1Heap |
__FAR__ xdc_runtime_IHeap_Handle | DSKT2_daram2Heap |
__FAR__ xdc_runtime_IHeap_Handle | DSKT2_saram0Heap |
__FAR__ xdc_runtime_IHeap_Handle | DSKT2_saram1Heap |
__FAR__ xdc_runtime_IHeap_Handle | DSKT2_saram2Heap |
__FAR__ xdc_runtime_IHeap_Handle | DSKT2_iprogHeap |
__FAR__ xdc_runtime_IHeap_Handle | DSKT2_eprogHeap |
__FAR__ xdc_runtime_IHeap_Handle | DSKT2_esdataHeap |
__FAR__ xdc_runtime_IHeap_Handle | _DSKT2_heap |
__FAR__ UInt | _DSKT2_ALLOW_EXTERNAL_SCRATCH |
__FAR__ UInt | _DSKT2_DARAM_SCRATCH_SIZES [] |
__FAR__ UInt | _DSKT2_SARAM_SCRATCH_SIZES [] |
__FAR__ Bool | ti_sdo_fc_dskt2_DSKT2_disableLazyDeactivate |
Set this to TRUE to disable lazy deactivate feature in DSKT2. More... | |
The XDAIS Socket Library provides services to support the creation, initialization, control, and deletion of XDAIS algorithm instance objects.
Void DSKT2_activateAlg | ( | Int | scratchMutexId, |
IALG_Handle | alg | ||
) |
Prepares a XDAIS algorithm instance object to start using its scratch memory.
[in] | scratchMutexId | scratch-group Id used to associate the instance with a scratch group. The value must be the same id used when creating this algorithm instance. |
[in] | alg | IALG_Handle of the algorithm instance to be activated. |
None |
scratchMutexId
will not be activated simultaneously. Usually the scratch group id is associated to the priority of the task in which the algorithm is running.Int DSKT2_controlAlg | ( | IALG_Handle | alg, |
IALG_Cmd | cmd, | ||
IALG_Status * | status | ||
) |
This is a convenience API to call a XDAIS algorithm instance's algControl function.
[in] | alg | IALG_Handle of the algorithm instance. |
[in] | cmd | IALG_Cmd structure for the control operation. |
[in] | status | Pointer to IALG_Status structure for algorithm to return status. |
IALG_EOK | The control operation was successful |
otherwise | A failure occurred during the control operation |
alg
must be a valid handle for the algorithm's instance object returned by an earlier call to DSKT2_createAlg().IALG_Handle DSKT2_createAlg | ( | Int | scratchMutexId, |
IALG_Fxns * | fxns, | ||
IALG_Handle | parent, | ||
IALG_Params * | params | ||
) |
Creates and initializes a XDAIS algorithm instance object.
[in] | scratchMutexId | Scratch-group Id for determining the shared scratch memory buffer. Value -1 is used to disable scratch sharing for this algorithm instance. A value between 0 and (DSKT2_NUM_SCRATCH_GROUPS-1) indicates a valid scratch group |
[in] | fxns | Pointer to the algorithm's IALG_Fxns table. |
[in] | parent | Handle of parent algorithm (optional). |
[in] | params | Pointer to an IALG_Params structure. |
non-NULL | IALG_Handle for the new instance object. |
NULL | Failure. |
IALG_Handle DSKT2_createAlg2 | ( | Int | scratchMutexId, |
IALG_Fxns * | fxns, | ||
IALG_Handle | parent, | ||
IALG_Params * | params, | ||
xdc_runtime_IHeap_Handle | extHeapId | ||
) |
Creates and initializes a XDAIS algorithm instance object.
[in] | scratchMutexId | Scratch-group Id for determining the shared scratch memory buffer. Value -1 is used to disable scratch sharing for this algorithm instance. A value between 0 and (DSKT2_NUM_SCRATCH_GROUPS-1) indicates a valid scratch group |
[in] | fxns | Pointer to the algorithm's IALG_Fxns table. |
[in] | parent | Handle of parent algorithm (optional). |
[in] | params | Pointer to an IALG_Params structure. |
[in] | extHeapId | Segment Id of memory heap to be used for all allocations in memory space IALG_ESDATA. This segment will be used instead of the default external memory segment. |
non-NULL | IALG_Handle for the new instance object. |
NULL | Failure. |
IALG_Handle DSKT2_createAlgExt | ( | Int | scratchId, |
IALG_Fxns * | fxns, | ||
IALG_Handle | parent, | ||
IALG_Params * | params | ||
) |
Creates and initializes a XDAIS algorithm instance object, allocating all algorithm memory in external memory.
[in] | scratchId | Scratch-group Id for determining the shared scratch memory buffer. Value -1 is used to disable scratch sharing for this algorithm instance. A value between 0 and (DSKT2_NUM_SCRATCH_GROUPS-1) indicates a valid scratch group |
[in] | fxns | Pointer to the algorithm's IALG_Fxns table. |
[in] | parent | Handle of parent algorithm (optional). |
[in] | params | Pointer to an IALG_Params structure. |
non-NULL | IALG_Handle for the new instance object. |
NULL | Failure. |
space
field of the IALG_MemRec
table entries filled in by the algorithm's algAlloc() function, and allocate all of the memory in the memory segment that is mapped to DSKT2.ESDATA.Void DSKT2_deactivateAlg | ( | Int | scratchMutexId, |
IALG_Handle | alg | ||
) |
Prepares a XDAIS algorithm instance object to give up using its scratch memory.
[in] | scratchMutexId | scratch-group Id used for determining the shared scratch memory. |
[in] | alg | IALG_Handle of the algorithm instance to be deactivated. |
None |
Int DSKT2_deactivateAll | ( | ) |
All algorithms that have been deactivated lazily are now really deactivate. Any algorithms that are still currently active will be left as is. The number of algorithms that are still active will be returned from this call.
>=0 | The number of currently active algorithms |
Bool DSKT2_freeAlg | ( | Int | scratchMutexId, |
IALG_Handle | alg | ||
) |
Deletes a XDAIS algorithm instance object and frees all persistent memory allocated for the instance object.
[in] | scratchMutexId | scratch-group Id used for determining the shared scratch memory. Must be the same Id used when algorithm instance is created |
[in] | alg | IALG_Handle of the algorithm instance to be deleted |
TRUE | Success |
FALSE | Failure |
Bool DSKT2_allocScratch | ( | IALG_Handle | alg, |
Int | mutexId, | ||
IALG_MemRec * | memTab, | ||
Int | numRecs | ||
) |
Alocates memory from a DSKT2 shared scratch group buffer.
[in] | alg | IALG_Handle of the algorithm instance to be granted shared scratch memory. Could be NULL. |
[in] | mutexId | scratch-group Id used for determining the shared scratch memory. Must be the same Id used when algorithm instance is created |
[in] | memTab | Array of IALG_MemRec structures describing the memory required by the algorithm |
[in] | numRecs | Number of IALG_MemRec structures |
TRUE | Success |
FALSE | Failure |
alg
is not NULL, then it must be a valid handle for an algorithm instance returned by an earlier call to DSKT2_createAlg().Int DSKT2_getScratchId | ( | IALG_Handle | alg | ) |
Void DSKT2_freeScratch | ( | Int | mutexId, |
Void * | addr, | ||
UInt | size | ||
) |
Alocates memory from a DSKT2 shared scratch group buffer.
[in] | mutexId | scratch-group Id used for determining the shared scratch memory. Must be the same Id used when algorithm instance is created |
[in] | addr | Address of the memory to be freed, that was previous allocated using DSKT2_allocScratch |
[in] | size | Size of memory to be freed. |
Bool DSKT2_allocPersistent | ( | IALG_MemRec * | memTab, |
Int | numRecs | ||
) |
Alocates persistent memory to the requesting algorithm.
[in] | memTab | Array of IALG_MemRec structures describing the memory required by the algorithm |
[in] | numRecs | Number of IALG_MemRec structures |
TRUE | Success |
FALSE | Failure |
Void DSKT2_freePersistent | ( | IALG_MemRec * | memTab, |
Int | numRecs | ||
) |
Frees persistent memory from the requesting algorithm.
[in] | memTab | Array of IALG_MemRec structures describing the memory granted to the algorithm, to be freed. |
[in] | numRecs | Number of IALG_MemRec structures |
#define DSKT2_NUM_SCRATCH_GROUPS 20 |
Maximum number of scratch groups that can be supported.
#define DSKT2_MAX_MEM_ALLOCATION_SIZE 0xFFFF |
Maximum memory allocation.
#define DSKT2_NUM_SHAREDHEAPS 2 |
#define DSKT2_MODNAME "ti.sdo.fc.dskt2" |
Name to pass to Diags_setMask() to enable logging for DSKT2 functions. For example, Diags_setMask(DSKT2_MODNAME"+EX1234567"); turns on all Log statements in this module. Diags_setMask() must be called after initialization to take effect.
typedef Void(* DSKT2_CacheWBInvFxn) (Ptr blockPtr, size_t byteCnt, Bool wait) |
Function prototype of cache writeback function: Writes back the memory within the range of blockPtr and blockPtr + byteCnt.
wait
is TRUE
, wait for the writeback to complete before returning from this fuction call. __FAR__ DSKT2_CacheWBInvFxn DSKT2_cacheWBInvFxn |
Cache writeback function pointer used by DSKT2 if not NULL.
__FAR__ xdc_runtime_IHeap_Handle DSKT2_daram0Heap |
__FAR__ xdc_runtime_IHeap_Handle DSKT2_daram1Heap |
__FAR__ xdc_runtime_IHeap_Handle DSKT2_daram2Heap |
__FAR__ xdc_runtime_IHeap_Handle DSKT2_saram0Heap |
__FAR__ xdc_runtime_IHeap_Handle DSKT2_saram1Heap |
__FAR__ xdc_runtime_IHeap_Handle DSKT2_saram2Heap |
__FAR__ xdc_runtime_IHeap_Handle DSKT2_iprogHeap |
__FAR__ xdc_runtime_IHeap_Handle DSKT2_eprogHeap |
__FAR__ xdc_runtime_IHeap_Handle DSKT2_esdataHeap |
__FAR__ xdc_runtime_IHeap_Handle _DSKT2_heap |
__FAR__ UInt _DSKT2_ALLOW_EXTERNAL_SCRATCH |
__FAR__ UInt _DSKT2_DARAM_SCRATCH_SIZES[] |
__FAR__ UInt _DSKT2_SARAM_SCRATCH_SIZES[] |
__FAR__ Bool ti_sdo_fc_dskt2_DSKT2_disableLazyDeactivate |
Set this to TRUE to disable lazy deactivate feature in DSKT2.