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
00054 #ifndef ti_sdo_fc_dman3_DMAN3_
00055 #define ti_sdo_fc_dman3_DMAN3_
00056
00059
00060
00061 #ifdef __cplusplus
00062 extern "C" {
00063 #endif
00064
00065 #include <xdc/std.h>
00066 #include <xdc/runtime/IHeap.h>
00067
00068 #include <ti/xdais/ialg.h>
00069 #include <ti/xdais/idma3.h>
00070
00071
00080 #define DMAN3_MODNAME "ti.sdo.fc.dman3"
00081
00082 #define DMAN3_GTNAME "ti.sdo.fc.dman3"
00084 #define DMAN3_MAXGROUPS 20
00093 #define DMAN3_SOK 0
00094 #define DMAN3_EOUTOFMEMORY -1
00097 #define DMAN3_EFAIL -2
00098 #define DMAN3_EFREE -3
00100 #define DMAN3_EOUTOFTCCS -4
00103 #define DMAN3_EOUTOFPARAMS -5
00106 #define DMAN3_ETCCCONFIG -6
00112 #define DMAN3_EPARAMCONFIG -7
00119
00120
00129 typedef Bool (*DMAN3_ScratchAllocFxn)(IALG_Handle alg, Int mutexId,
00130 IALG_MemRec *memTab, Int numRecs);
00131
00137 typedef Void (*DMAN3_ScratchFreeFxn)(Int mutexId, Void *addr, Uns size);
00138
00139
00150 typedef struct DMAN3_Params {
00157 Uns *qdmaPaRamBase;
00158
00165 Uns maxPaRamEntries;
00166
00176 Uns paRamBaseIndex;
00177
00185 Uns numPaRamEntries;
00186
00193 Uns maxQdmaChannels;
00194
00201 Uns numQdmaChannels;
00202
00210 Uns *qdmaChannels;
00211
00225 Uns tccAllocationMaskH;
00226
00240 Uns tccAllocationMaskL;
00241
00252 xdc_runtime_IHeap_Handle heapInternal;
00253
00265 xdc_runtime_IHeap_Handle heapExternal;
00266
00275 unsigned char numTccGroup[DMAN3_MAXGROUPS];
00285 unsigned short numPaRamGroup[DMAN3_MAXGROUPS];
00296 Bool idma3Internal;
00297
00310 DMAN3_ScratchAllocFxn scratchAllocFxn;
00311
00323 DMAN3_ScratchFreeFxn scratchFreeFxn;
00324
00331 Uns nullPaRamIndex;
00332
00337 Uns maxTCs;
00338
00346 Uns *qdmaQueueMap;
00347
00352 Uns *queueTCMap;
00353
00358 Uns *queuePri;
00359
00387 Bool allowUnshared;
00388 } DMAN3_Params;
00389
00390
00394 extern DMAN3_Params DMAN3_PARAMS;
00395
00400 extern Uns ti_sdo_fc_dman3_DMAN3_numQdmaGroup[DMAN3_MAXGROUPS + 1];
00401
00405 extern Bool ti_sdo_fc_dman3_DMAN3_useCustomDma;
00406
00450 extern Int DMAN3_grantDmaChannels(Int groupId, IALG_Handle algHandle[],
00451 IDMA3_Fxns *dmaFxns[], Int numAlgs);
00452
00456 extern Void DMAN3_exit(Void);
00457
00499 extern Int DMAN3_createChannels(Int groupId, IDMA3_ChannelRec dmaTab[],
00500 Int numChans);
00501
00502
00510 extern Void DMAN3_init(Void);
00511
00512
00534 extern Int DMAN3_releaseDmaChannels(IALG_Handle algHandle[],
00535 IDMA3_Fxns *dmaFxns[], Int numAlgs);
00536
00537
00553 extern Int DMAN3_freeChannels(IDMA3_Handle channelTab[], Int numChans);
00554
00555
00556 #ifdef __cplusplus
00557 }
00558 #endif
00559
00560
00563 #endif
00564
00565
00566
00567
00568