YosysHQ / picorv32

PicoRV32 - A Size-Optimized RISC-V CPU
ISC License
2.86k stars 715 forks source link

Dhrystone Floating Extension Problem ? #260

Open drkome opened 1 month ago

drkome commented 1 month ago

hello first, When I examined your dhrystone commands, I saw that there were float operations in the dhry1 file. I think you used float operation to prevent overflow but I'm running into problems while compiling. How did you prevent this? Or how will my processor perform the float operation when I use this? When I look at it, picorv32 does not have float operations either. Which is the important point here.

/opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld: /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/libgcc.a(divsf3.o): can't link double-float modules with soft-float modules /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld: failed to merge target specific data of file /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/libgcc.a(divsf3.o) /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld: /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/libgcc.a(_clzsi2.o): can't link double-float modules with soft-float modules /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld: failed to merge target specific data of file /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/libgcc.a(_clzsi2.o) /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld: /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/libgcc.a(_clz.o): can't link double-float modules with soft-float modules /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld: failed to merge target specific data of file /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/libgcc.a(_clz.o) /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld: warning: dhrystone.riscv has a LOAD segment with RWX permissions /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld: dhrystone.riscv-dhry_1.o: in function.L0 ': dhry_1.c:(.text.startup.main+0x750): undefined reference to __floatsisf' /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld: dhry_1.c:(.text.startup.main+0x770): undefined reference tomulsf3' /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld: dhry_1.c:(.text.startup.main+0x7b8): undefined reference to __fixsfsi' /opt/riscv/lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld: dhry_1.c:(.text.startup.main+0x7e0): undefined reference tofixsfsi' collect2: error: ld returned 1 exit status make: *** [Makefile:19: dhrystone] Error 1`

I generally deal with RTL design and I don't know much about compilers. I have struggled with this for a long time, but this problem cannot be solved without removing the float operation. I would be happy if you help.