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.

[OMAP3530] Using EDMA for transfers between DSP Internal Mem and CMEM in Codec Engine Framework

Other Parts Discussed in Thread: OMAP3530

Hi,

I am working on OMAP 3530 EVM from Mistral.

Can we use EDMA for transfers between DSP Internal Memory and CMEM in Codec Engine framework?

I have read in the OMAP3530 TRM (pdf) that, EDMA can be used for DSP Internal mem to external transfers, but there will be considerable delay in the transfer.

I have a Codec library which has some info in the internal memory. From the Application side, I assign a buffer to DSP using CMEM. I wish to transfer the data into a contiguous buffer given by CMEM from the Codec. Can we use EDMA for the same?

If the CMEM is cached, will there be any Data corruption problems in the generated CMEM buffer?

Also regarding Cache, I have another query: we set the c64PlusMAR128to159 bit as 0xffff. This means that the ARM memory is cacheable to DSP if it accesses the CMEM. For ARM view of caching the CMEM, we need to set the AccessMask bits appropriately. Please confirm.

In both the cases, will there be any caching issues if I do a EDMA transfer from Internal mem to CMEM.

Thanks,

Ravi

  • ravidevroy said:

    Can we use EDMA for transfers between DSP Internal Memory and CMEM in Codec Engine framework?

    The EDMA is physically capable of transferring between the external memory section corresponding to CMEM and the internal memory of the DSP.  When using the EDMA within a Codec Engine environment you must make sure you do not trample on another algorithm also using EDMA.  Generally this is accompished using DMAN3/ACPY3.

    ravidevroy said:

    I have read in the OMAP3530 TRM (pdf) that, EDMA can be used for DSP Internal mem to external transfers, but there will be considerable delay in the transfer.

    There's an MMU on the IVA subsystem so all the EDMA transfers would undergo address translation.  I don't know quantitatively what effects it has.  I imagine there's some minimal latency.

    ravidevroy said:

    I have a Codec library which has some info in the internal memory. From the Application side, I assign a buffer to DSP using CMEM. I wish to transfer the data into a contiguous buffer given by CMEM from the Codec. Can we use EDMA for the same?

    I assume by "application side" you are referring to the ARM side.  It's not going to be easy to use the EDMA to transfer data from the ARM side into a CMEM buffer.  A couple issues:

    1. The MMU on the DSP side would need to have a section added to allow the DSP access to any memory space where data is being touched.  (Alternatively you could disable the DSP MMU which then defaults to "pass through".)
    2. The EDMA will need to operate on the physical addresses, not the virtual addresses as seen by your ARM application.

    ravidevroy said:

    If the CMEM is cached, will there be any Data corruption problems in the generated CMEM buffer?

    Cached by which core?  EDMA operates on physical memory so you would have to perform user-initiated cache operations before/after.

    ravidevroy said:

    Also regarding Cache, I have another query: we set the c64PlusMAR128to159 bit as 0xffff. This means that the ARM memory is cacheable to DSP if it accesses the CMEM. For ARM view of caching the CMEM, we need to set the AccessMask bits appropriately. Please confirm.

    Setting those MAR bits means that 256MB of external memory will be cacheable starting from base address 0x80000000.

    ravidevroy said:

    In both the cases, will there be any caching issues if I do a EDMA transfer from Internal mem to CMEM.

    If I recall correctly the buffers allocated by CMEM are non-cacheable from the ARM side by default.  Therefore from the ARM perspective you don't need to worry about doing any cache operations on the CMEM buffers.

    On the DSP side there are cache operations performed by Codec Engine if the appropriate flags are set by the XDM algorithms (e.g. accessMask).

    Please make sure you read the following wiki article carefully as much of what you are asking is covered there:

    http://wiki.davincidsp.com/index.php?title=Cache_Management

    Brad