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.

MCU-PLUS-SDK-AM243X: Difference with and without FPU setting

Part Number: MCU-PLUS-SDK-AM243X

HI,

I am using the AM243x.
There was no difference in calculation speed between with and without FPU settings.
Please confirm that the setting method is correct.


・FPU Settings
(1) When an FPU is used


(2) When an FPU is not used


・Optimization


Best regards,

H.WAKI

  • Hi

    Please refer to section 1.3.2.4. Select Floating-Point ABI/Coprocessor to use GP Registers instead of FPU for performing floating point calculations.

    https://software-dl.ti.com/codegen/docs/tiarmclang/compiler_tools_user_guide/compiler_manual/using_compiler/compiler_options/processor_options.html

    Could you also tell how you are testing the FPU calculations?

    Thanks & Regards

    Sri Vidya

  • Hi Sri

    I confirmed that there is no problem with the way FPU is configured.


    Overview of input data and processing details
    (1) Simultaneous Fast Fourier Transform of two data (4096 data) *1
    (2) logarithmic operation *2
    Processes 1 and 2 were performed multiple times each.
    *1 Bit shifting, four arithmetic operations.
    *2 log10f, sqrtf, powf, abs and four arithmetic operations.

    Result
    With FPU: 0.06847s
    Without FPU: 0.06846s

    There is no difference in operation processing time with or without FPU.
    Is there anything else I should be careful about when using FPU?

    Best regards,

    H.WAKI

  • Hi

    Got it

    Will check from my end and get back to you.

    Regards

    Sri Vidya

  • Hi

    I have run a small recursive function that using floating point calculations with and without FPU and I have got better results with FPU.

    Function --> performs factorial in recursion.

    With FPU --> 240 cycles (for float)

                     ---> 228 cycles (for int)

    Without FPU --> 1000 to 1150 cycles (for float)

                         --> 363 cycles (for int)

    I have followed the below procedure to disable FPU hardware:

    • modify the ABI parameter in the Arm compiler settings to "soft" --> this disables using the FPU hw.
    • modify the ABI parameter  to "soft" in the no-rtos make file for the nortos libs
    • Make the similar change for the driver libs make file
    • If you are using any other libraries in your example application, then those make files also need to be changed to the parameter "soft"
    • Now Rebuild the SDK libs - in this case the driver libs and no rtos libs.

    Driver Libs:

    • clean ---> gmake -f makefile.am263x drivers_r5f.ti-arm-clang_clean PROFILE:=debug
    • build ---> gmake -f makefile.am263x drivers_r5f.ti-arm-clang PROFILE:=debug

    No rtos Libs:

    • clean ---> gmake -f makefile.am263x nortos_r5f.ti-arm-clang_clean PROFILE:=debug
    • build ---> gmake -f makefile.am263x nortos_r5f.ti-arm-clang PROFILE:=debug

    The above settings will disable the FPU hw.

    Hope this helps.

    Is there anything else I should be careful about when using FPU?

    The compiler settings and the SDK settings are already configured to use FPU Hw. There isnt anything required to be done by the user.

    Regards

    Sri Vidya