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

fence instruction throwing unexpected illegal in RV32E congfiguration #2022

Open
tzwaenn opened this issue Apr 21, 2023 · 2 comments
Open

fence instruction throwing unexpected illegal in RV32E congfiguration #2022

tzwaenn opened this issue Apr 21, 2023 · 2 comments

Comments

@tzwaenn
Copy link

tzwaenn commented Apr 21, 2023

Observed Behavior

In a configuration with RV32E, I see an illegal exception being thrown for a fence instruction. While this instruction has fields rs1 and rd, the spec clarifies
"The unused fields in the FENCE instructions—rs1 and rd—are reserved for finer-grain fences in future extensions. For forward compatibility, base implementations shall ignore these fields, and standard software shall zero these fields."
So it is clearly not intended that a fence with rs1[4]==1 or rd[4]==1 should throw an illegal exception on RV32E - it is not accessing any integer registers.

EDA tool and version:
The issue was found with the Siemens Processor Verification App.

Version of the Ibex source code:
033abfc with RTL parameter RV32E=1

@tzwaenn tzwaenn added the Type:Bug Bugs label Apr 21, 2023
@tzwaenn tzwaenn changed the title fence instruction throwing unexpected illagal in RV32E congfiguration fence instruction throwing unexpected illegal in RV32E congfiguration Apr 21, 2023
@GregAC
Copy link
Collaborator

GregAC commented Apr 25, 2023

Thanks for the report @tzwaenn. If you have a fix feel free to submit a PR otherwise we will take a look though this isn't a priority for us right now (current development focus is on the opentitan configuration which has E=0).

@tzwaenn
Copy link
Author

tzwaenn commented Apr 25, 2023

Understood. I think removing line 1145 in ibex_decoder.sv
alu_op_a_mux_sel_o = OP_A_REG_A;
would do the trick (fence does not use the source register), though I also do not have the bandwidth right now to run experiments.

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

No branches or pull requests

2 participants