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

Non-Zfinx (F only) instructions execute with no illegal instruction exception raised #725

Closed
salaheddinhetalani opened this issue Sep 27, 2022 · 1 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 PARAM:PULP_ZFINX Issue depends on the PULP_ZFINX 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

@salaheddinhetalani
Copy link

Issue Description

Illegal instruction exception is not raised for executing FMV.W.X, FMV.X.W, FLW, FSW or the compressed versions of them, as these instructions shouldn't exist if Zfinx is set.

Component

Component:RTL

RISC-V Specification

The Zfinx extension adds all of the instructions that the F extension adds, except for the transfer instructions FLW, FSW, FMV.W.X, FMV.X.W, C.FLW[SP], and C.FSW[SP].

The Zfinx variants of these F-extension instructions have the same semantics, except that whenever such an instruction would have accessed an f register, it instead accesses the x register with the same number.

Steps to Reproduce

As shown below, the following sequence of instructions happens:

32'h42002007

The flw instruction 32'h42002007 is decoded at t##0 and executed updating the integer register file at t##1 with no illegal instruction exception being raised, as the associated CSRs highlighted are not updated.

Bug_5

Top Level Parameters

cv32e40p_wrapper #(
    .PULP_XPULP       (0),
    .PULP_CLUSTER     (0),
    .FPU              (1),
    .PULP_ZFINX       (1),
    .NUM_MHPMCOUNTERS (1)
)

Git Hash: d0d1c25
Flist: cv32e40p_fpu_manifest.flist
VCD: bug_5.vcd


Product: OneSpin 360 DV-Verify
App: Processor Verification App
Tool's version: 2022.3_1

@pascalgouedo pascalgouedo added Component:RTL For issues in the RTL (e.g. for files in the rtl directory) PARAM:PULP_ZFINX Issue depends on the PULP_ZFINX parameter labels Nov 9, 2022
@pascalgouedo pascalgouedo added the Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system label Mar 23, 2023
pascalgouedo pushed a commit to pascalgouedo/cv32e40p that referenced this issue Apr 21, 2023
Issue openhwgroup#725 correction: Illegal exception for FMV/FLW/FSW when ZFINX.
Updated MISA value and make MSTATUS.FS/SD ZFINX dependent.

Signed-off-by: Pascal Gouedo <[email protected]>
pascalgouedo pushed a commit to pascalgouedo/cv32e40p that referenced this issue Apr 28, 2023
Issue openhwgroup#725 correction: Illegal exception for FMV/FLW/FSW when ZFINX.
Updated MISA value and make MSTATUS.FS/SD ZFINX dependent.

Signed-off-by: Pascal Gouedo <[email protected]>
@pascalgouedo
Copy link

Resolved with PR #801

@pascalgouedo pascalgouedo added 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 labels 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 PARAM:PULP_ZFINX Issue depends on the PULP_ZFINX 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

2 participants