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] Failure to Trigger NX Exception Under Specific Microarchitectural Conditions #2062

Open
1 task done
youzi27 opened this issue Apr 20, 2024 · 0 comments
Open
1 task done
Labels
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

Description
I have encountered a bug where the NX (Inexact) bit in the fflags register fails to be set under certain microarchitectural conditions, specifically after clearing the fflags register(necessary) and then executing an operation that should simultaneously trigger both Overflow (OF) and Inexact (NX) exceptions. This behavior deviates from the expected IEEE 754 standard compliance.

Steps to Reproduce

main:
fsflags a2, zero
la t0, value_ft1
la t1, value_ft3
fld ft1, 0(t0) 
fld ft3, 0(t1) 
fdiv.d ft3, ft1, ft3
frflags a2

.section .data
.align 8
value_ft1:
    .dword 0x403d000000000000
value_ft3:
    .dword 0x0000000000000001

Expected Behavior:
fflags = 0x5
Actual Behavior:
fflags = 0x4

Note:
This is a different issue from pulp-platform/fpu_div_sqrt_mvp#15, as they have different triggering conditions. The previous trigger method has already been fixed; now, we are facing a different new bug.

@youzi27 youzi27 added the Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Projects
None yet
Development

No branches or pull requests

1 participant