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.

DSP Multithreading / Multitasking

Guru 10685 points

I have an XDM compliant video decoder running on my DM6467 and according to the statistics coming back from Codec Engine, I still have a good 40% of the DSP's utilisation to play with. In this 40% I would like to run my own algorithm.

My question is, how do the XDM TI decoders multitask if not using the TSK_yield and TSK_sleep functions? I need to know this as I need to make my algorithm multitask correctly with the TI decoder.

This forum post says you should not use these functions in DSP code to handle multitasking if you have an XDM algorithm running:

http://e2e.ti.com/support/embedded/f/354/p/65026/235022.aspx#235022

but I can't find any more functions referring to multitasking (and I only found TSK_yield and TSK_sleep from forum posts, not in the official IRES documentation).


Also, please can someone tell me where the official documentation on TSK_yield and TSK_sleep is?

Thanks,

Ralph

 

 

P.S.

I've read the documentation here already:

http://processors.wiki.ti.com/index.php/Resource_Management_Framework_Components#Cooperative_Multitasking_and_Preemption

  • The execution flow for remote algorithms is described here:

    http://processors.wiki.ti.com/index.php/Codec_Engine_Server_Integrator_User%27s_Guide#What_is_the_Execution_Flow.3F

    Each instance of a codec/alg (i.e., every create() call) gets its own DSP-side thread, which runs at the alg-specific priority declared in the Server's cfg script.

    BIOS is a pre-emptive multitasking kernel, so a currently running alg/codec can be pre-empted by a higher priority one.  If your alg is more of a background task, you could simply configure it into the Server with a lower priority than the video decoder; then if the video decoder is needed, it will pre-empt your background task alg.

    Specific use cases might help further explanations, if you need them.

    Chris

  • Thanks for that. Basically I wanted to make use of the DSP's idle cycles while it was waiting for the interrupt from the HDVICP to say that the video processing had finished. I didn't know that BIOS is a pre-emptive OS so I have done as you suggested and placed the priority of my algorithm at a lower one than the TI decoder. All seems to be well now.

    Ralph