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.

How do I extend data structure for dm6446??

I have a question like this:

now, I have a data structure

 typedef struct macroblock{
      int    qp;                 
      int    qpc[2];          
      int    slice_nr;
      int    delta_quant;}Macroblock

This data structure is a pointer.  I want to send this data structure to DSP from ARM.  

This structure means the information of macroblocks, 99 macroblocks.

In short, I want to konw the information of macroblocks in DSP-side like ARM-side

I want to use XDM_Buf Desc structure to transmit the data structure. Am I right?

anyone could tell me how can i write the code?   Thanks very much.

 

  • Assuming you want to use the Codec Engine framework, you'll need to be careful using pointers since they won't always be address translated. One way to do this is as follows:

    Say you have an FIR filter with pointer to coefficients and you're using the IUNIVERSAL interface (although this can be applied to other VISA interfaces). We will pass the pointer that will be address translated between the ARM and DSP in IUNIVERSAL_Status->data.

    Define FIR_TI_Obj { IALG_Obj, Short *coeff, ... }; so that it includes the pointer.

    Create a control() call which takes IUNIVERSAL_Status *status as an argument. In this fxn, if the cmd is XDM_SETPARAMS, set (FIR_TI_Obj) fir->coeff = (Short *)status->data.descs[0].buf;

    In the CE app, then create your status.data.descs[0].buf = (XDAS_Int8 *)data. Call UNIVERSAL_control( codec, XDM_SETPARAMS, &dynParam, &status). Now the DSP can use the fir->coeff as they have been address translated in its process() fxn.

     

    For some example code (including docs on this in particular): https://www-a.ti.com/downloads/sds_support/applications_packages/iuniversal_examples/index.htm