Open shetalani opened 4 years ago
Same happens for ecall and ebreak instructions, as well as load/ store access faults. For your reference, please check https://github.com/openhwgroup/cv32e40p/issues/533
@tomroberts-lowrisc is this issue fixed by https://github.com/lowRISC/ibex/pull/1141, or are there outstanding issues?
AFAIK @shetalani are you able to rerun and confirm this is now fixed?
Hi @tomroberts-lowrisc, not really. It's not for the illegal cases of executing dret outside debug mode, or mret in U mode.
Ok - thanks for confirming @shetalani I'll have a look at adding the missing things you mentioned
From a quick look I think the issue is using the illegal_insn_dec
signal as an indication of an illegal instruction, instead we want the illegal_insn_d
signal from inside the controller (this may allows us to drop some other terms from the current instr_perf_count_id_o
expression.
Indeed I think the illegal_insn_o
signal in ibex_id_stage.sv is a little broken. It's only for RVFI (so no functional issues from it being broken) but should be fixed. Maybe illegal_insn_d
gets output as illegal_insn_o
from the controller and fed out to top-level? May need some renaming as we'll have an illegal_insn_i
and illegal_insn_o
with subtly different meanings on the controller.
RISC-V Specification
Issue Description
An illegal instruction increments the minstret counter as if it was a legal one.
Steps to Reproduce
As shown below, the minstret counter is incremented for the illegal instruction csrrw x8, 0x010, x3, knowing that IR bit of mcountinhibit is set to '0 and thus allowing for the minstret to be incremented.
Product: OneSpin 360 DV-Verify App: Processor Verification App Tool's version: 2020.2.0