-
Notifications
You must be signed in to change notification settings - Fork 115
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
fcvt.s.d gives wrong answer #24
Comments
Hello, Have you checked what is effectively applied to the FPU?
and applying your given input yields Cheers! |
I'm trying with Ariane. How do we debug into it? |
Can you please provide a minimal working code snippet that you execute on Ariane which triggers this issue, so that we may reproduce it? |
I saw this error when I was trying to run riscv-tests (https://github.com/riscv/riscv-tests/blob/master/isa/rv64ud/recoding.S) with OpenPiton. |
I've used the latest tagged release |
We have |
@stmach Can this be a VCS/Modelsim difference? When compiling the FPU I am getting two warnings with the FPU in VCS so that might be related (but I don't think so):
|
@b1f6c1c4 What's your VCS version? Just to be sure we are not hunting bugs in the FPU although they are in the CPU (wrapper for example). Can you provide us with the same screenshot but signals from the |
I tried to run the operation in VCS and indeed i receive Inf ( |
FYI
|
A post-synthesis netlist obtained from Synopsys DC yields the correct result (simulated with Modelsim since I don't have VCS set up), so the issue seems contained to VCS for now. |
Any update on this? |
@stmach @zarubaf Well I'm wondering how can I help for this issue. Will it be helpful if we could agree on a certain version (commit SHA-1) of Ariane and we run VCS and ModelSim separately, and then compare their results? Due to some limitation (broken ModelSim license) I cannot do this on my end. So if you think it will help, you can give me a SHA-1 and I'll do VCS on my end. Otherwise you can debug yourself. |
There was a signedness bug in fpnew_cast_multi that causes VCS to behave incorrectly when converting a small double into float. This fixes openhwgroup#24.
I tried to run
fcvt.s.d
to convert a small double (2.386004908190509275e-40
which is0x37b4c8f800000000
) into single, but it givesinf
(0x7f800000
) instead of2.38600491e-40
(0x0002991f
).The text was updated successfully, but these errors were encountered: