Do not count dret instruction when not in debug mode - it won't retire

fixes #164

Signed-off-by: Szymon Bieganski <szymon.bieganski@oss.nxp.com>
This commit is contained in:
Szymon Bieganski 2023-12-20 11:07:49 +01:00
parent b8c94a3e84
commit 21ba59ced7
No known key found for this signature in database
GPG key ID: 9C9AB9AA6A1FEF4F

View file

@ -786,6 +786,7 @@ module cve2_id_stage #(
// Signal which instructions to count as retired in minstret, all traps along with ebrk and
// ecall instructions are not counted.
assign instr_perf_count_id_o = ~ebrk_insn & ~ecall_insn_dec & ~illegal_insn_dec &
~(dret_insn_dec & ~debug_mode_o) &
~illegal_csr_insn_i & ~instr_fetch_err_i;
// An instruction is ready to move to the writeback