This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Sharing EDMA3 resources between DSP and ARM

Hi,

I would like to use EDMA3 in WinCE6 (DM6446 ARM environment) but EDMA3 is used by DM6446 DSP running codecs/algorithms (e.g. mpeg4 encoder).
EDMA configuration in my codec server (cs) is:

// in codec.cfg
var DMAN3 = xdc.useModule('ti.sdo.fc.dman3.DMAN3');
DMAN3.numPaRamGroup[GROUP_0] = 48; // number of PaRAM sets for scratch group 0
DMAN3.numPaRamGroup[GROUP_1] = 0; // number of PaRAM sets for scratch group 1
DMAN3.numTccGroup[GROUP_0] = 32; // number of TCCs assigned to scratch group 0
DMAN3.numTccGroup[GROUP_1] = 0; // number of TCCs assigned to scratch group 1


// in server.cfg:
utils.importFile("codec.cfg");
DMAN3.heapInternal    = "L1DHEAP";
DMAN3.heapExternal    = "DDRALGHEAP";
DMAN3.idma3Internal   = false;
DMAN3.scratchAllocFxn = "DSKT2_allocScratch";
DMAN3.scratchFreeFxn  = "DSKT2_freeScratch";
DMAN3.paRamBaseIndex     = 80;  // 1st EDMA3 PaRAM set available for DMAN3
DMAN3.numQdmaChannels    = 8;   // number of device's QDMA channels to use
DMAN3.qdmaChannels       = [0,1,2,3,4,5,6,7]; // choice of QDMA channels to use
DMAN3.numPaRamEntries    = 48;  // number of PaRAM sets exclusively used by DMAN
DMAN3.tccAllocationMaskL = 0;   // bit mask indicating which TCCs 0..31 to use
DMAN3.tccAllocationMaskH = 0xffffffff; // assign all TCCs 32..63 for DMAN
DMAN3.debug = false;
DMAN3.trace = false;

I see in my configuration:

1. QDMA channels are not shared because all available QDMA channel (=8) are allocated for DSP
2. PaRAM sets are shared because ARM can use PaRAM sets on position 0..79 freely
3. TCCs are shared because ARM can use TCC0..TCC31 freely.

My question is about "normal" DMA channels.
64 DMA channels are existing on DM6446 SoC but I cannot see any parameters or sharing options for that in my configuration files nor DMAN3 interface.

How can I share/allocate DMA channels because I would like to use EDMA3 in ARM and DSP in the same time?
This question is for DSP configuration (e.g. server.cfg) and ARM environment also (I am new in configuring and using EDMA3).

Peter

  • What version of FC are you using ?

    DMAN3 uses QDMA channels only, so ARM side is free to use any DMA channels it needs. FC (DMAN3) would only use QDMA channels, TCCs and PaRAMs. Once you figure out what resources ARM side is using, make sure you configure DMAN3 to skip those resources.

  • Dear Gunjan,

    Thank you for your answer.
    So, I am already understand why was missed the "normal" DMA channels parameters in the DMAN3 configuration.

    But, I have another questions because I've confused...

    1. Is there any standard interface (of course, other than DMAN3) for managing resources of "normal" DMA channels in DSP side?
        (if not, I have to create a special, sharing-capable way to share "normal" DMA channels between my algorithms in DSP and my peripheral drivers in ARM)

    2. How TI's codecs (e.g. mpeg4, h264, etc.) use "normal" DMA?
        (I don't want to conflict with any of them)

    3. And finally: What about DSP+ARM critical and not synchronized EDMA3 register access?
        I mean, when DSP (e.g. using DMAN3) want to modify a register but it has also modified by ARM (with a quite different value)...

    Peter

    PS:
    FC version: 2.26.00.01
    (I think, it couldn't be relevant ...)

  • Hi Peter,

    1. The interface used to manage resources depends on what software you are using on the DSP side. As far as FC is concerned, DMAN3 is your DMA-manager and as I have mentioned before, it does not use/touch DMA channels. Are you aware of any other software being used on the DSP side ?

    2. TI codecs would ideally express their DMA requirements using an IDMA3 interface. DMAN3 is then used on the DSP side to read these requests and grant resources. DMAN3 configuration is adjusted per system availability and requirements to assign the right resources to the codecs. Maybe you can check codec datasheet to confirm that all codecs are using IDMA3 to obtain resources ?

    3. As long as system initialization on ARM side and DMAN3 happens in sequence, after that DMAN3 would only touch registers that correspond to resources it owns. Typically at init time, global initialization registers for EDMA3 are modified (for e.g., queue priorities, queue to TC mappings etc). After that, both ARM and DSP should touch registers that correspond to channels/tccs/params it owns. 

    You can look at this post for some discussion on this topic:- http://e2e.ti.com/support/embedded/linux/f/354/t/47756.aspx