You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Description
In the CVA6 implementation, when the fdiv.s instruction is used to divide by a single-precision floating-point number representing positive infinity (0x7F800000), the Overflow (OF) flag in fflags is erroneously set. The value of fflags becomes 0x4, indicating an overflow error. However, in the Spike simulator, the fflags value is 0x0. According to the IEEE 754 standard, an Overflow (OF) condition should not occur in this case.
Steps to Reproduce:
Initialize ft4 to 0x00000000 and ft6 to 0x7F800000 (infinity).
Execute the instruction: fdiv.s ft1, ft4, ft6.
Observe the value of fflags.
The log from CVA6 is as follows:
core 0: 0x0000000080002018 (0x186270d3) fdiv.s ft1, ft4, ft6
3 0x0000000080002018 (0x186270d3) f 1 0xffffffff00000000
core 0: 0x000000008000201c (0x001023f3) csrrs t2, fflags, zero
3 0x000000008000201c (0x001023f3) x 7 0x0000000000000004
The bug occurs in the commit version of cvfpu: 3116391, and CVA6 is also using this version of cvfpu.
After reviewing the commit history, I noticed that "THMULTI" was introduced to cvfpu on May 31. When I initially raised this issue, the version in question did not yet include "THMULTI."
Additionally, I have reviewed previously reported bugs but did not find any mention of this particular issue, which is why I decided to raise it. I will proceed to verify if adding "THMULTI" resolves the bug.
Thank you once again for your support and insights.
Bug Description
In the CVA6 implementation, when the fdiv.s instruction is used to divide by a single-precision floating-point number representing positive infinity (
0x7F800000
), the Overflow (OF
) flag in fflags is erroneously set. The value of fflags becomes0x4
, indicating an overflow error. However, in the Spike simulator, the fflags value is0x0
. According to the IEEE 754 standard, an Overflow (OF) condition should not occur in this case.Steps to Reproduce:
ft4
to0x00000000
andft6
to0x7F800000 (infinity).
fdiv.s ft1, ft4, ft6
.fflags
.The log from CVA6 is as follows:
The log from Spike is as follows:
See:openhwgroup/cva6#2111
The text was updated successfully, but these errors were encountered: