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.

expn() function for C67xx

Other Parts Discussed in Thread: CCSTUDIO

We are porting some of our code from the 5509 to the C6748 and are having troubles with the expn() library function.  It is implemented in ASM on the 5509 and I cannot find an equivalent on the 6748 DSP.  I need to either locate the same library source (or lib) for the new DSP with this function OR translate the assembly.  The original code is located in the C:\CCStudio_v3.3\C5500\dsplib\55x_src\expn.asm file.

Does anyone have ideas, suggestions, or an answer??

Thanks!

  • Hi Brent,

    We do not have exactly the same for C674x, but if you are using fixed point, you can use the IQNexpfunction on the IQmath:

    http://processors.wiki.ti.com/index.php/IQmath_Library_for_C64x%2B

    Please see page 50 of the:

    http://www-s.ti.com/sc/techlit/SPRUGG9

     

  • Brent,

    We are currently working on revamping the C67x FastRTS library ( http://focus.ti.com/docs/toolsw/folders/print/sprc060.html ) and one part of it is to include vector versions for the current math functions (atan, atan2, cos, div, exp, exp2, exp10, log, pow, recip, rsqrt, sin, and sqrt). The release is planned for mid August 2010.

    Attached is the library file and header file for the requested exp (optimized single precision) vector function. 

    The function prototype is:

    void expsp_v(float *arg, float *output, int size)

    The function will raise e to the power of “arg” array and place the answer in the correspond location in “output” array. Size of both “arg” and “output” should be equal to “size”.

    expsp_vec.zip
  • Mario,

    I tried the function but unfortunately it did not work!  After a few debugging session, the problem seems to be in the prototype and variable storage.

    Our function or code requires arrays of Unsigned Short as:

    Uint16 exp_approx(Int16 *x, Int16 *r, Uint16 nx);

     

    Your function is requesting array of float.

    Is there a chance to get the function that uses my prototype?

  • Roland,

                Since you are not interested in using floating-point numbers, I recommend you take a look at the IQMath library (IQNexp for exp function) that Mariana mentioned in the previous post. The C67x FastRTS library is intended and optimized for floating-point number operations. I hope this helps.

    Mario