Skip to content

fix nan box issue#158

Open
canxin121 wants to merge 2 commits intoopenhwgroup:developfrom
HardwareFuzz:develop
Open

fix nan box issue#158
canxin121 wants to merge 2 commits intoopenhwgroup:developfrom
HardwareFuzz:develop

Conversation

@canxin121
Copy link

@canxin121 canxin121 commented Oct 24, 2025

@rgiunti
Copy link
Contributor

rgiunti commented Dec 3, 2025

I checked the PR performing a regression test with https://github.com/FondazioneChipsIT/cvfpu-uvm.git. The test runs 10000 random transactions with random operation, operands, FP format (between FP64 and FP32) and FP rounding mode (between RNE, RTZ, RDN and RUP) repeated for 10 different seeds where the results are compared with those given by the MPFR golden model. The test passed without errors, the PR can be merged in my opinion.

@canxin121
Copy link
Author

I checked the PR performing a regression test with https://github.com/FondazioneChipsIT/cvfpu-uvm.git. The test runs 10000 random transactions with random operation, operands, FP format (between FP64 and FP32) and FP rounding mode (between RNE, RTZ, RDN and RUP) repeated for 10 different seeds where the results are compared with those given by the MPFR golden model. The test passed without errors, the PR can be merged in my opinion.

I also conducted extensive testing using my own differential testing framework and random instruction generation library, and the results are currently largely consistent with Spike's calculations.

@IhsaneTahir
Copy link

Hi @rgiunti, the current CVFPU UVM environment always NaN-boxes input operands. That’s why this specific bug hasn’t shown up, and also why it won’t be able to indicate whether this PR fixes the issue. I’m currently updating the UVM environment to make NaN boxing configurable, so we can first reproduce the bug and then verify whether the proposed fix works.

@rgiunti
Copy link
Contributor

rgiunti commented Feb 16, 2026

Hi @rgiunti, the current CVFPU UVM environment always NaN-boxes input operands. That’s why this specific bug hasn’t shown up, and also why it won’t be able to indicate whether this PR fixes the issue. I’m currently updating the UVM environment to make NaN boxing configurable, so we can first reproduce the bug and then verify whether the proposed fix works.

Hi @IhsaneTahir, yes you're right thank you for your job, please keep me updated about that.

@MikeOpenHWGroup
Copy link
Member

@canxin121, @rgiunti and @IhsaneTahir, is it possible that the original developers of fpnew/cvfpu assumed that the host core would perform the Nan-boxing? @davideschiavone, would you have any insight about that? What does the CV32E40P do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants