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
In some rounding mode, precision errors occur when calculating fsqrt.d. And the results differ from those of Spike.
Testing has shown that RDN, RUP, RMM and DYN all experience rounding errors.
How to reproduce and the logs are as follows:
Example:
Initialize fa7 with 0x402e000000000000 and execute fsqrt.d ft10, fa7.
Under RDN, DYN Mode:
The results differ between CVA6 and Spike simulator as follows:
Round Toward Zero (RTZ) Mode:
CVA6 Result: 0x3fedc14f1407f47f
Spike Result: 0x3fedc14f1407f47e (correct value as verified)
Round Up (RUP), Round to Nearest, Tie to Max Magnitude (RMM), and Dynamic (DYN) Rounding Modes:
CVA6 Result: 0x3fedc14f1407f47e
Spike Result: 0x3fedc14f1407f47f
Bug Description
In some rounding mode, precision errors occur when calculating
fsqrt.d.
And the results differ from those of Spike.Testing has shown that RDN, RUP, RMM and DYN all experience rounding errors.
How to reproduce and the logs are as follows:
Example:
Initialize
fa7
with0x402e000000000000
and executefsqrt.d ft10, fa7
.Under
RDN, DYN
Mode:Spike results are:
ft10 = 0x400efbdeb14f4eda
CVA6 results are:
ft10 = 0x400efbdeb14f4ed9
Under
RUP , RMM
Mode:Spike results are:
ft10 = 0x400efbdeb14f4ed9
CVA6 results are:
ft10 = 0x400efbdeb14f4eda
Moreover:
The vulnerability of the rounding mode mentioned above also occurs in the
fdiv
instruction.Example:
When executing the instruction
fdiv.d fs9, fs10, fa4
with the following register values:The results differ between CVA6 and Spike simulator as follows:
Round Toward Zero (RTZ) Mode:
CVA6 Result:
0x3fedc14f1407f47f
Spike Result:
0x3fedc14f1407f47e
(correct value as verified)Round Up (RUP), Round to Nearest, Tie to Max Magnitude (RMM), and Dynamic (DYN) Rounding Modes:
CVA6 Result:
0x3fedc14f1407f47e
Spike Result:
0x3fedc14f1407f47f
See: openhwgroup/cva6#2057
The text was updated successfully, but these errors were encountered: