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.

mvd instruction

hi, 

Can you explain the difference between an assignment and  mvd instruction. I know its official description but i don't know how to decide to use mvd instead of a simple assignment. In signal processing library this instruction is occasionally used in various fft routines.

For example the following is taken from DSP_fft16x16_i.c

x0 = (short *)_mvd((int)x);
x2 = (short *)_mvd((int)x0); 

I don't see why these lines are not

x0 = (short *)((int)x);
x2 = (short *)((int)x0);   

Thanks 

  • Haydar,

    Teaching assembly over the forum is very difficult. We provide an excellent compiler to generate very good optimized code so that you can avoid having to learn the detailed architecture of the device that is implemented in the assembly instructions.

    The mvd instruction was added to the C64x architecture to give the compiler one more choice for assignments. The mvd instruction executes on the .M functional units, so it can be used when the other functional units are executing other instructions. The multi-cycle delay may be useful in some situations.

    The best way to figure out why _mvd was used in the source file you mentioned is to try compiling the source both ways and comparing the assembly output.

    It is not common to use _mvd instead of the simple assignment that you show second, above, so please reply back with your findings about the difference between the two cases.

    If you want to learn more about optimizing and pipelining, please search the TI Wiki Pages for "c6000 optimization" (no quotes) for several good articles; include the work "workshop" to find the archived material for our live workshop that covers the details and techniques of software pipelining and other methods for C6000 optimization.

    Regards,
    RandyP