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.

Accessing MessageQ from simulator

I am running the "C6472 Device Cycle Accurate Simulator, Little Endian" simulator.  In my code, I am using the ti.sdo.ipc.MessageQ module.

Is there a way to use the simulator to put a message directly into a queue?  This would simulate an external entity.

  • Brian,

    I don't quite understand what you mean here by 'put a message directly into a queue'?  Are you talking about a sofware queue?  What do you mean by "external entity"?

    MessageQ is a software module that can be used to pass messages between different threads on the same processor or threads on different processors.

    MessageQ is supported on certain devices, C6472 is one of the supported devices.

    Judah

  • I would like to inject a message onto a software queue from either the simulator itself, or better yet, a program or script on my computer which executes outside of the simulator.  In practice, my program will be using the NDK to receive data via ethernet, and put that data onto a queue for either another thread on the same core, or a thread on a different core (yes, I am using the C6472).  Since the EMAC is not supported in the simulator, I need an alternate means to get data into my program.  Access to the queue directly would be the least intrusive to my code since I am already using MessageQ.

  • Brian,

    I don't know the capabilities of the Simulator and what can be done throught the simulator.  This probably requires someone with more Simulator knowledge.

    I do want to point out that with MessageQ, you need to know where the destination queue is and you need to be able to interrupt that processor if its not local.  I don't know if this is achieveable from an external source.

    Judah

  • Hi Brian,

    Do you want to pump in data into the simulated memory so that the program running on the simulator could consume it? What action in your application triggers this "getDataIntoMyProgram()" activity?

    One way to think about this is to use the Breakpoints and Gel scripts. Details on GEL is available @ http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=spra601&fileType=pdf. 

    One could associate a GEL script execution on a Breakpoint. One could code-up the functionality of getDataIntoMyProgram() in GEL and associate it with a breakpoint. This breakpoint will be applied on the application where you need the data to be pumped in. This way, whenever the simulator reaches this breakpoint, it would execute the GEL script and continue the simulation.

     

    Hope this helps

     

    Regards,

    Nizam


  • Nizamudheen A said:

    Do you want to pump in data into the simulated memory so that the program running on the simulator could consume it?

    Yes, this is what I would like to do.

    Nizamudheen A said:

    What action in your application triggers this "getDataIntoMyProgram()" activity?

    Ideally, I would like this activity to be triggered outside of my program.  I had not though of using a GEL script, it is an interesting solution.

  • Hi Brian,

    Were you able to pump-in date into the simulator using the GEL Script approach? LMk if you need help in this regards.

     

    Regards,

    Nizam

     

     

     

  • Nizam,

    I did not try the GEL script approach.  While it seems like a novel idea, I decided to go a more traditional route and create a task which reads from a file and places the data into a MessageQ.  This of course is not exactly what I wanted either, but I defined the file such as to have a field which defines the time to wait after inserting the data.  I was hoping to have such a program running off the chip, but I am making due with it running on the DSP.

     

    Brian