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.

Compiler/PROCESSOR-SDK-DRA8X-TDA4X: DSP vector

Part Number: PROCESSOR-SDK-DRA8X-TDA4X

Tool/software: TI C/C++ Compiler

About C66x dsp in TDA4x,

there is datatype named float16(__float16 is equivalent to a vector of 16 float) in head file C6x_vec.h,

but function units support up to 128-bit source operands.

How is float16 handled?

Are there some examples about float16?

Is dataType like float16 supported on TDA4?

 

  • Guoxun said:
    How is float16 handled?

    Like a built-in type that contains 16 float values, each of which is 32-bits wide.

    Guoxun said:
    Are there some examples about float16?

    Here is some C code that uses float16 ...

    void vector_multiply(float const *x, float const *y, float *z, int len )
    {
       int i;
       float16 * restrict v1;
       float16 * restrict v2;
       float16 * restrict v3;
    
       v1 = (float16*)x;
       v2 = (float16*)y;
       v3 = (float16*)z;
    
       #pragma MUST_ITERATE(1,,)
       for (i = 0; i < len / 16; i++)
          *v3++ = *v1++ * *v2++;
    }

    Guoxun said:
    Is dataType like float16 supported on TDA4?

    Yes.

    Thanks and regards,

    -George

  • Hi,

    For C66x DSP:

    The .M units now support up to 128-bit source operands.
     
    The .L/.S units now support up to 64-bit operands.
    "Like a built-in type that contains 16 float values, each of which is 32-bits wide."
    so float16 is 32 * 16 = 512 bit, can C66x DSP process 16 floats at a time?
    Or, float16 is processed by C71x DSP in TDA4x?
    Thanks,
    Guoxun