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

Incorrect F Extension Result Calculation - Dynamic Rounding Mode #174

Closed
shetalani opened this issue Sep 30, 2019 · 2 comments
Closed

Incorrect F Extension Result Calculation - Dynamic Rounding Mode #174

shetalani opened this issue Sep 30, 2019 · 2 comments
Assignees
Labels
Component:RTL For issues in the RTL (e.g. for files in the rtl directory) PARAM:FPU Issue depends on the FPU parameter Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system

Comments

@shetalani
Copy link

RISC-V Specification:

  • "Floating-point operations use either a static rounding mode encoded in the instruction, or a dynamic rounding mode held in frm."
  • "Rounding modes are encoded as shown in Table 11.1. A value of 111 in the instruction’s rm field selects the dynamic rounding mode held in frm."
  • "All floating-point to integer and integer to floating-point conversion instructions round according to the rm field."

Issue Description:
A wrong value is written to the normal RF for an F-extension instruction that has a dynamic rounding mode.

Example:

As shown below, the instruction 32'hc00f77d3 (fcvt.w.s x15, f30) is decoded at time point t##0 where rm field has the value 111, and frm has the value 011 (written by a previous instruction). Where f30 has the value 32'h02000000 already by a previous instruction as well. Hence, the result has to be rounded up according to the value of frm. However, the rounding mode signal "...fpnew_bulk.rnd_mode_i" has the value associated with RNE and x15 is written with the value 0 instead of the right result 1.

Apparently, ri5cy doesn't support dynamic rounding mode! Is that right?

Issue_11


Product: OneSpin 360 DV-Verify
App: RVV
Tool's version: 2019.2.2

@stmach
Copy link
Contributor

stmach commented Oct 8, 2019

This bug is related to #169 where the change to frm in the previous cycle is not seen by the fcvt instruction following it.
Leaving this open until #169 is closed.

@Silabs-ArjanB Silabs-ArjanB added Component:RTL For issues in the RTL (e.g. for files in the rtl directory) PARAM:FPU Issue depends on the FPU parameter Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system labels Jul 13, 2020
pascalgouedo pushed a commit to pascalgouedo/cv32e40p that referenced this issue Apr 21, 2023
…ons following CSRW to FRM/FCSR.

Signed-off-by: Pascal Gouedo <pascal.gouedo@dolphin.fr>
pascalgouedo pushed a commit to pascalgouedo/cv32e40p that referenced this issue Apr 28, 2023
…ons following CSRW to FRM/FCSR.

Signed-off-by: Pascal Gouedo <pascal.gouedo@dolphin.fr>
@pascalgouedo
Copy link

Resolved with PR #801

@pascalgouedo pascalgouedo added the Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:RTL For issues in the RTL (e.g. for files in the rtl directory) PARAM:FPU Issue depends on the FPU parameter Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Projects
None yet
Development

No branches or pull requests

4 participants