Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Incorrect Result from 'fdiv' Operation Leading to Negative Infinity Instead of Smallest Negative Number #2060

Open
1 task done
youzi27 opened this issue Apr 20, 2024 · 2 comments
Labels
notCV32A65X It is not an CV32A65X issue PARAM:FPU Issue depends on the FPU parameter Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system

Comments

@youzi27
Copy link

youzi27 commented Apr 20, 2024

Is there an existing CVA6 bug for this?

  • I have searched the existing bug issues

Bug Description

When performing floating-point division using the fdiv.d instruction in CVA6, under specific conditions where the expected result is the smallest representable negative double-precision floating-point number (0xffefffffffffffff), CVA6 incorrectly returns negative infinity (0xfff0000000000000).

Steps to Reproduce:

  1. Load fa7 with 0xc024000000000000.
  2. Load fs3 with 0x00000000000002cc.
  3. Execute the instruction: fdiv.d ft6, fa7, fs3.
  4. Observe the resulting value in ft6.

The log is as follows::

core   0: 0x00000000800052b2 (0x233987d3) fsgnj.d fa5, fs3, fs3
1 0x00000000800052b2 (0x233987d3) f15 0x00000000000002cc
core   0: 0x00000000800052b6 (0x23188853) fsgnj.d fa6, fa7, fa7
1 0x00000000800052b6 (0x23188853) f16 0xc024000000000000
core   0: 0x00000000800052ba (0x1b38f353) fdiv.d  ft6, fa7, fs3
1 0x00000000800052ba (0x1b38f353) f 6 0xfff0000000000000
@youzi27 youzi27 added the Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system label Apr 20, 2024
@JeanRochCoulon JeanRochCoulon added notCV32A65X It is not an CV32A65X issue PARAM:FPU Issue depends on the FPU parameter labels Apr 22, 2024
@JeanRochCoulon
Copy link
Contributor

This Github issue can also be reported on cvfpu side, thanks

@youzi27
Copy link
Author

youzi27 commented Apr 22, 2024

Thanks for the suggestion! I'll report this issue on the cvfpu side as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notCV32A65X It is not an CV32A65X issue PARAM:FPU Issue depends on the FPU parameter Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Projects
None yet
Development

No branches or pull requests

2 participants