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.

About Parallelism for Video Port's DMA

Other Parts Discussed in Thread: TMS320DM642

I have a question about the Throughouts for DMA&Memory , the scene as followings:

1).I want to capture image of sensor through Video Port(VP), so I configure MEMORY_A (external memory) and EDMA_A to VP for capturing image

2).I want to process the image that filled in MEMORY_A after the VP's interrupt is trigged. So I copy the data from MEMORY_A to another external memory(named as MEMORY_B). We can suppose that the progress of copying is very fast. 

3).VP&Sensor continue to work after the copying, in other word, the sensor continue to capture image, and fill data into MEMORY_A through EDMA_A 

4).Now, I am beginning to process the data saved in MEMORY_B. I want to speed up the processing, so I take use of internal memory(named as INT_MEM_C) and other dma(named as EDMA_B).

Last, let me simplify the above progress as following:

PROGRESS_A:                      MEMORY_A <==> EDMA_A(Configured to VP)

PROGRESS_B:                      MEMORY_B<==> EDMA_B  /  INT_MEM_C <==> EDMA_B

Note, PROGRESS_A and PROGRESS_B are parallel.

My question is that  EDMA_A and EDMA_B will intermingle the parallelism for each other ?

Is there anyone give me some promption?

  • Hi,

    In the scenario you described the sensor is continuously giving the image which should be copied in the memory and you want to process it.

    If you copy image from memory_a to memory_b while edma continues to capture the image from sensor to memory_a, this might cause image overlapping. Instead you can configure the EDMA in the ping pong buffering with 2 memory location. You can refer to the EDMA user guide http://www.ti.com/lit/ug/spru987a/spru987a.pdf , Ping-Pong Buffering example to configure.

    Every EDMA has transfer controllers which will do the actual transfer and only one transfer will be active at a time but you can configure two different channels to do the above two transfers and trigger both of them and these transfers will be serviced based on the priority.

    -- Prasad

  • Hello, Prasad

    Thanks for your replying

    I took my real work just as Ping-Pong Buffer method. Because I want to simplify the description, so I say "So I copy the data from MEMORY_A to another external memory(named as MEMORY_B). We can suppose that the progress of copying is very fast."

    I want to speed up the progress of processing image, so I take use of internal memory and DMA, the method of speed up is named as Ping-Pong Buffer also, in precisely.

    Let's name your Ping-Pong Buffer method as Ping-Pong-Driver, and name my Ping-Poing Buffer method as Ping-Poing-Caculate for deliverance's convenience, OK?

    If we suppose that :

    1)MEMORY_A and MEMORY_B have not any relationship for each other;

    2) EDMA_A and EDMA_B have not any relationship for each other, too;

    You think that PROGRESS_A and PROGRESS_B will affect the parallelism for each other ? In other word, "only one transfer will be active at a time" and "these transfers will be serviced based on the priority".

    As your promption, I should  Ping-Poing-Caculate carefully, because "only one transfer will be active at a time" and "these transfers will be serviced based on the priority".In other word, it will affect the speed of image capturing, if EDMA_B is always being used during the progress of image capturing. Is like that ?

    Is there any other suggetion to avoid the confliction between EDMA_A and EMDA_B(or say Ping-Pong-Driver and Ping-Poing-Caculate), if my understanding is right ?

    Thank you very much

     

     

  • Which device are you working on?  This question should probably be posted to one of the device forums to tap into the expertise there...

  • Hello, David

    Thanks for your replying,

    My device is DM642

    Additional Information, MEMORY_A and MEMORY_B are all external memory, and they are in the same memory space(CE0, connected through EMIF)

  • Is there anyone would give me some promption and suggestion?

  • Shaquille Wu,

    Your initial transfer from the Video Port to MEMORY_A should be where you use the data. Try to avoid doing memory-to-memory copies of the entire frame buffer, since that is a needless use of device resources. You can have more than just ping and pong buffers, you could have 3 or 4 or 5 or more frame buffers to hold the data while you work on it.

    In this method, called zero-copy, you pass pointers to the buffers rather than copying the buffers themselves.

    The drivers that TI supplies for the DM642 support multiple frame buffers. I hope you are using those, if not, try using those to simplify your project.

    The people who know about those drivers would be in the DaVinci forum, although the DM642 does pre-date the DaVinci product line. If you would like to have this thread moved there, please let us know.

    Regards,
    RandyP

  • Dear RandyP

    Thanks for your replying,

    I think you understood my meanings by mistake.

    I took my real work just as Ping-Pong Buffer method. Because I want to simplify the description, so I say "So I copy the data from MEMORY_A to another external memory(named as MEMORY_B). We can suppose that the progress of copying is very fast."

    I want to speed up the progress of processing image, so I take use of internal memory and DMA, the method of speed up is named as Ping-Pong Buffer also, in precisely.

    Let's name your Ping-Pong Buffer method as Ping-Pong-Driver, and name my Ping-Poing Buffer method as Ping-Poing-Caculate for deliverance's convenience, OK?

    If we suppose that :

    1)MEMORY_A and MEMORY_B have not any relationship for each other;

    2) EDMA_A and EDMA_B have not any relationship for each other, too;

    My question is not about the parallelism between PROGRESS_A and Memory-Copy.

    I just want to know if PROGRESS_A and PROGRESS_B will affect the parallelism for each other or not ?

    Thank you very much

     

  • Shaquille Wu,

    Now I do understand that you use ping-pong buffers for VP capture data. And I understand you are not asking a question about how the VP capture data should be considered when it is moving around the DM642 system.

    Shaquille Wu said:
    PROGRESS_B:                      MEMORY_B<==> EDMA_B  /  INT_MEM_C <==> EDMA_B

    I do not understand precisely what PROGRESS_B means.

    If your question is whether two EDMA Transfer Requests can operate in parallel, then it depends on their priorities. If they are set with different priorities, then they can intermingle transfers.

    The detailed operation of the EDMA and how transfer occur are contained in the User's Guides and Application Notes that you can find on the Product Folder for the TMS320DM642.

    Shaquille Wu said:
    I just want to know if PROGRESS_A and PROGRESS_B will affect the parallelism for each other or not ?

    If PROGRESS_A and PROGRESS_B operate in parallel, they will affect each other. But the effect may be very small. The details must be understood, and these details are described in the User's Guides and Application Note. Which of these documents have you studied?

    Regards,
    RandyP

  • Dear RandyP

    Thanks to your replying very much at first.

    PROGRESS_B is processing image by Ping-Pong-Buffer method, the detail is transfer image data from MEMORY_B(external memory) to INT_MEM_C(internal memory) through EDMA_B, and then process data and caculate result in INT_MEM_C. you can also see "2.2.2.1 L2 SRAM Double Buffering Example" in "TMS320C6000 DSP Cache User's Guide"( SPRU656A).

    RandyP said:
    If your question is whether two EDMA Transfer Requests can operate in parallel

     

     My question is just about what you said.

    RandyP said:
    If PROGRESS_A and PROGRESS_B operate in parallel, they will affect each other. But the effect may be very small

    Your promption is anastomosis with my experiment and testing, thank you very much

    But I have another question :

    1)EDMA_A is still an EDMA;

    2)EDMA_B is a DMA(call DAT_Open, DAT_Copy........), not an EDMA

    The  parallelism between PROGRESS_A and PROGRESS_B will be affected as above 2 conditions ?

    RandyP said:
    Which of these documents have you studied

    I am sorry, I have just studied "TMS320C64x DSP Video Port/VCXO Interpolated Control (VIC) Port"(SPRU629E) and "TMS320C6000 DSP Cache User's Guide"( SPRU656A). So, My knowledge about the above parallelism is very poor, would you please introduce any more datasheet about it to me ? 

     

  • Shaquille Wu,

    Shaquille Wu said:
    Your promption is anastomosis with my experiment and testing

    I had to look up the definition of anastomosis, and I still am not sure what it means here. But I think you have said that I addressed your question.

    Shaquille Wu said:
    would you please introduce any more datasheet about it to me ?

    The detailed operation of the EDMA and how transfers occur are contained in the User's Guides and Application Notes that you can find on the Product Folder for the TMS320DM642. Please click on TMS320DM642 to reach the Product Folder, then click on Technical Documents. Use your browser's page search or find function to look for EDMA. Each document may then refer you to other documents that will be of help. Start with the EDMA Reference Guide, which is in the list of User Guides.

    Shaquille Wu said:

    But I have another question :

    1)EDMA_A is still an EDMA;

    2)EDMA_B is a DMA(call DAT_Open, DAT_Copy........), not an EDMA

    The  parallelism between PROGRESS_A and PROGRESS_B will be affected as above 2 conditions ?

    We must both use the same technical terms as they are used in the EDMA Reference Guide and other documents. I believe you mean to say that EDMA_A is a DMA and EDMA_B is a QDMA. A QDMA is the same as a DMA once the transfer request has been submitted.

    With my apologies, I do not understand what your concern is. I do not know what "parallelism" may be "affected". It is easy for me to say truthfully that there will be an effect when two things try to use the same resource at the same time.

    You will learn how EDMA works from the documents you will find in the Product Folder.

    My hope is for good fortune for you and your success.

    Regards,
    RandyP

     

    If you need more help, please reply back. If this answers the question, please click  Verify Answer  , below.

  • RandyP,

    "anastomosis" is "match"

    RandyP said:
    I believe you mean to say that EDMA_A is a DMA and EDMA_B is a QDMA. A QDMA is the same as a DMA once the transfer request has been submitted

    I think I do not delivery clearly in my last post, my meaning is :

    1) If EDMA_A is still an EDMA

    2) If EDMA_B is changed to DMA from EDMA. If the name of EDMA_B affect your understanding, we can name EDMA_B as DMA_B, OK? DMA_B is a DMA, not EDMA or QDMA.(Note, I use DMA through the "DAT_Copy", "DAT_Copy" is a interface in CSL)

    I think DMA is different from EDMA and QDMA as datasheets' description about DM642 or C6000.

    RandyP said:
    It is easy for me to say truthfully that there will be an effect when two things try to use the same resource at the same time

     As above assumption, one resource(EDMA_A) is an EDMA, another resource(DMA_B) is an DMA, they are not the same resource. There will be an effect when I use these two different resource ?

  • Shaquille Wu,

    The detailed operation of the EDMA and how transfers occur are contained in the User's Guides and Application Notes that you can find on the Product Folder for the TMS320DM642. Please click on TMS320DM642 to reach the Product Folder, then click on Technical Documents. Use your browser's page search or find function to look for EDMA. Each document may then refer you to other documents that will be of help. Start with the EDMA Reference Guide, which is in the list of User Guides.

    The EDMA Reference Guide will explain the EDMA operation and terminology much better than I can. The EDMA IO Scheduling and Performance Application Report in the Application Notes section will help you understand usage aspects of the EDMA. In the Performance App Note, it references the EDMA Architecture Application Report which will have an additional description of the details to augment what you find in the EDMA Reference Guide.

    Regards,
    RandyP

  • Thanks for your suggestion, RandyP

    I will study these datasheets for details