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.

RTOS/AM5728: How to improve the execution time of powf() and log10f() for C66x DSP?

Guru 10235 points
Part Number: AM5728
Other Parts Discussed in Thread: TMDSEVM572X, MATHLIB

Tool/software: TI-RTOS

Hello, TI Experts,

 

Our customer sent us about C66x-DSP performance improvement with PROCESSOR-SDK-RTOS-AM57X.

They try to create their DSP program and run TMDSEVM572X.

They said "powf() and log10f() function execution time seems to be bottle-neck".

So, they want to know how to improve those function execution time.

They are using compile option of CCS like attached pdf.

 

Question:

- Could you tell us how to improve the execution time of powf() and log10f() for C66x DSP?

- Are there any effective compile option to add their providing pdf?

  

We would appreciate if you tell us the recommended way of improving the execution time of powf() and log10f() for C66x DSP?

 

Best regards,

opt.pdf

  • Hello!
    The first thought is to consider mathlib. It provides faster implementations of those functions, as well as their vector versions.
  • Matusan,

    I second the suggestion from rrlagic. Powf and log10 are functions that are defined in the C6000 Compiler RTS library.  If those functions need to be accelerated, then you can either choose to replace them with MATHLIB functions  or rebuild the library to override RTS library.

    The performance benefit from using this library is documented here:

    If you build the library in OVERRIDE_RTS mode, then the application code doesn`t need to be changed to take advantage of the performance benefit from MATHLIB.

    Regards,

    Rahul

  • Hello all,

    Thank you for your support.

    Could you tell me the way to rebuild the library to override RTS library?
    I can find the following wiki site; however, it seems the information is old.
    processors.wiki.ti.com/.../How_to_rebuild_the_C6000_RTS

    Best Regards,
    Nomo
  • Nomo,

    the wiki article that you posted describes, how to rebuild the C6000 Compiler RTS library and not MATHLIB.  To rebuild mathlib, you need to use instructions here:

    There are makefile .mk in the folder path mathlib_c66x_3_1_1_0\packages\ti\mathlib\lib. The .mk files define -d OVERRIDE_RTS=0 in KERNELC66CFLAGS which can be changed to OVERRIDE_RTS=1. Build process is described in the MATHLIB_Users_Manual.html in the docs folder.  I am not using CCS projects for rebuilding. I built it using make file at location in the package packages\ti\mathlib. you need to set some paths at the top of the makefile and invoke the make <target>

    I have prebuilt the mathlib for you, which you can use. you need to change the link order to link this library before RTS library:

    AM57xx_C66x_Benchmark_Package (2).zip

    Hope this helps.

    Regards,

    Rahul

  • Hello Rahul-san,

    Thank you for your reply.
    I'll follow your comment and check the result.
    If I have additional question, I'll post another thread.

    Best Regards,
    Nomo