Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

Disable FPU on Arria10 SoC FPGA

Hi Support,

We need to disable FPU on Arria 10 SoC FPGA.

Please let us know the procedure how to disable FPU.

Regards,

Karthik.

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Karthik,

    all you need to do is to clear bit# 30 of the FPEXC register:

    fmrx r0, FPEXC

    bic r0, r0,# 0x40000000

    fmxr FPEXC, r0
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Karthik,

    all you need to do is to clear bit# 30 of the FPEXC register:

    fmrx r0, FPEXC

    bic r0, r0,# 0x40000000

    fmxr FPEXC, r0

    --- Quote End ---

    Hi,

    I ran the above assembly code(assembler) and generated binary from object file, when i try to execute binary it shows segmentation fault.

    please let me know how to check FPU is disabled/not after running the assembly code.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I'm not sure about that one:

    You could also hit another roadblock if the library was built for EABI hard-float.

    EABI hard-float means float/double arguments for functions are typically passed in the FPU registers instead of the R0->R12 basic set.

    As the FPU is disabled, if my understanding is correct, and if your library is hard-float, you will get traps.

    Regards
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    This will be work:

    fmrx r0, FPEXC

    bic r0, r0,# 0x40000000

    fmxr FPEXC, r0