lowRISC / lowRISC/ibex

fence instruction throwing unexpected illegal in RV32E congfiguration

Open
#2,022 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component:RTL Priority:P3 Type:Bug
Dominant language
SystemVerilog
Stars
2.1k
Forks
810
Avg merge
5d 23h
Merged PRs (30d)
9

Description

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:
033abfc09faa9c208af257acb30fa15aa011f3c3 with RTL parameter RV32E=1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Check out commit 033abfc09faa9c208af257acb30fa15aa011f3c3 with RV32E enabled, then trace FENCE decoding and illegal-exception handling for the unused rs1 and rd fields. Reproduce the case with the Siemens Processor Verification App; done means those fields no longer cause an illegal exception for FENCE instructions in RV32E.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.