We are design a SOC with Neon (r0p4) integrated. I saw the GCC have multiple options for Neon:
Known ARM FPUs (for use with the -mfpu= option): auto crypto-neon-fp-armv8 fp-armv8 fpv4-sp-d16 fpv5-d16 fpv5-sp-d16 neon neon-fp-armv8 neon-fp16 neon-vfpv3 neon-vfpv4 vfp vfp3 vfpv2 vfpv3 vfpv3-d16 vfpv3-d16-fp16 vfpv3-fp16 vfpv3xd vfpv3xd-fp16 vfpv4 vfpv4-d16
gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))
The SOC integration engineer also don't know how to choose from them for best match of our HW. Can you help us? Thanks in advance.
Hi Li,The choice of -mfpu depends on what version of NEON your SOC implements. What version of NEON are you implementing in your SOC?Regards,Andre
Thank you for your response. I had thought no one will check my question.
The ASIC guy told me the neon is r0p4. And our SOC core is base on Cortex-A53. I have tried some neon/fp options these days, while waiting for your response. It seems neon-fp-armv8 may be a correct option. It supports instruction vfma, which works fine on my FPGA verification board. It also support the system register MVFR2.
Do you have any suggestion? It would be better if we can have a table for these GCC options, listing ARM version/Neon/FPU and the corresponding option choice.
Thank you again.
Hi Li,if your SOC is based on Cortex-A53 then indeed neon-fp-armv8 is an appropriate -mfpu option. However, you can also use '-mcpu=cortex-a53 -mfpu=auto -mfloat-abi=hard', the float-abi might not be necessary if you are using a toolchain that has hard float on by default.Traditionally we enable almost all extensions for a cpu when you use -mcpu= option, this means that they will have the appropriate FPU set though you must set -mfpu=auto to guarantee that works! I believe that passing '-mcpu=cortex-a53 -mfpu=auto' is practically the same as passing '-march=armv8-a+crc -mfpu=neon-fp-armv8 -mtune=cortex-a53'.Hope this helps.Kind Regards,Andre
View all questions in Arm Compilers forum