CCS/TMS320C6670: Problems testing EDMA on C6670 simulator in CCSv5

Part Number: TMS320C6670

Tool/software: Code Composer Studio

I'm using Windows 7 64-bit, Service Pack 1, CCS version 5.5.0.00077 and Vision SDK 2.10.

I've been trying to test an EDMA autoincrement2D example as described in VISION_SDK_02_10_00_00\ti_components\algorithms_codecs\eve_sw_01_12_00_00\starterware\docs\eve_starterware_userguide.pdf using C6670 Device Cycle Approximate Simulator, Little Endian. (Note that in the end the example should work on a TDA2x board but I need to simulate it in CCS first).

However, I am facing a problem regarding wait(In/Out)Channel calls when a deadlock happens. Here is a code snippet (the test simply transfers data back and forth using two in and out buffers):

int bufId = 0;

//DMA trigger for pipe-up, out transfer is dummy and handled inside DMA utility EDMA_UTILS_autoIncrement_triggerInChannel(dmaAutoContextInOut[bufId]); //Below 2 extra transfers are dummy and needed by DMA utility EDMA_UTILS_autoIncrement_triggerOutChannel(dmaAutoContextInOut[bufId]); EDMA_UTILS_autoIncrement_triggerOutChannel(dmaAutoContextInOut[bufId^1]) ; numRowsPending = height ; while (numRowsPending) { //Wait for previous transfer of in EDMA_UTILS_autoIncrement_waitInChannel(dmaAutoContextInOut[bufId]); // it hangs here but it was triggered, it should finish eventually //DMA trigger for next in buffer EDMA_UTILS_autoIncrement_triggerInChannel(dmaAutoContextInOut[bufId^1]); //Wait for previous transfer out EDMA_UTILS_autoIncrement_waitOutChannel(dmaAutoContextInOut[bufId]) ; EDMA_UTILS_autoIncrement_triggerOutChannel(dmaAutoContextInOut[bufId]) ; bufId ^= 1; numRowsPending -= blkHeight; } //Need to wait for last out transfer EDMA_UTILS_autoIncrement_waitOutChannel(dmaAutoContextInOut[bufId]) ;

I was wondering if I could test this on a simulator at all, and if yes, do I need to configure some additional settings.

I will appreciate any help. Thanks.

  • Hi Nik,
    Unfortunately, we have not supported simulators for quite some time so there is not much help we can provide with them. Sorry

    ki

    -----------------------------------

    Don't forget to verify answers to your forum questions by using the "Verify Answer" button.

    Did you read the CCS Forum Guidelines & FAQ? If not, PLEASE read it. If you haven't read it in awhile, please read it again to see if any updates were made.

    Having CCS problems? Check out the CCS Troubleshooting Guide

    Looking for CCS Training? Check out the CCS Training Site

     

  • In reply to Ki-Soo Lee:

    Hi Ki,

    Is there a chance for this thread to be moved to a VisionSDK-related part of the forum because the question is more related to the example which comes with VisionSDK installation? I only seem to find this automotive (read-only) forum where it is not possible to make new thread.

    Thanks in advance.
  • In reply to Nik Trif:

    Hi Nik,
    I moved it. Good luck!

    ki

    -----------------------------------

    Don't forget to verify answers to your forum questions by using the "Verify Answer" button.

    Did you read the CCS Forum Guidelines & FAQ? If not, PLEASE read it. If you haven't read it in awhile, please read it again to see if any updates were made.

    Having CCS problems? Check out the CCS Troubleshooting Guide

    Looking for CCS Training? Check out the CCS Training Site

     

  • In reply to Ki-Soo Lee:

    Hi Nik,

    I have forwarded your question to an EVE expert.

    Regards,
    Yordan

     Note: If this answer solves your question click the Verify Answer button.

     Please make sure you read the forum guidelines first.

  • Hi,
    TDA2X simulator supports EDMA so there should not be any problem in running EDMA example on simulator. Can you check the IPR register of EDMA value and see why during wait you are not getting the same value as it was set in ESR register during trigger.

    Regards,
    Anshu
  • In reply to Anshu Jain:

    Hi Anshu,

    Actually I'm testing the example on C6670 and TCI6616 simulators which have TMS320C66x cores so I should be able to test it on them. I'm having problems with debugging step by step at the moment so the only information I can provide you with is the state of interrupt-related registers that I get when I pause the execution of waitInChannel() call. They are here: http://tinypic.com/view.php?pic=2k1v8z&s=9#.WNuIfmclGUk

    What should I be expecting there?

    I will be back with more information when I configure debugging successfully.

    I appreciate your help and I'm looking forward to hearing from you.

    EDIT: I did step by step debugging on other machine and can now confirm that the register states from the aforementioned picture remain the same from the beginning of the example to the waitInChannel() and during its execution.

  • In reply to Nik Trif:

    Hi Nik,

       In the code snippet you added  with this thread , the comment says it hanged in the wait call at the beginning of while loop. My question is that does it hang in the first iteration itself or at a later iteration?

    Regards,

    Anshu

  • In reply to Anshu Jain:

    Hi Anshu,

    Yes, it happens right away, in the first iteration. I inspected the problem further and have found that the execution is stuck in a while loop which waits for the wait_word to arrive by comparing the value of the IPR register to it, specifically in an inline function DMA_WAIT in the "dma_funcs.h" file. So you were right about the IPR register and the missing interrupt. Now my question is what is the cause to this behavior and do I need to make some adjustments to the target configuration in order to make it work or could the missing volatile keyword somewhere be the cause here? I can confirm that the test I am trying to run works correctly on the XDS220 emulator but I need to have it running in a simulator in CCS if it is possible.

    Thank you for your time, I'm very grateful to you for your help.

    EDIT: I have managed to make the execution leave the loop by manually setting the IPR value during debugging in the watches list but, as expected, the results are not logically correct in the end.

  • In reply to Nik Trif:

    Hi Nik,

       When you say that this code works correctly on  XDS220 emulator,  which device you are using to run? Is it TDA2X? Generally if your code works on target it should work on simulator also, thats why want to get confirmation from you on this.


    Regards,

    Anshu

  • In reply to Anshu Jain:

    Hi Anshu,

    I couldn't reply earlier because I was on a vacation, I apologize for that.

    Answer to your question is yes, the test works correctly on XDS220 emulator on a TDA2x board.

    Something occured to me in the meantime, what if the execution is not blocked but takes very long time to finish? Is it a common thing for simulators? I get the same behavior when transferring any amount of data, from 8 bytes to 500 megabytes, it hangs there waiting for the correct word to arrive.

    Thanks in advance.