Skip to content

Commit

Permalink
Do not count dret instruction when not in debug mode - it won't retire (
Browse files Browse the repository at this point in the history
#180)

fixes #164

Signed-off-by: Szymon Bieganski <[email protected]>
  • Loading branch information
szbieg authored Feb 26, 2024
1 parent 8a561ed commit 00bad97
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rtl/cve2_id_stage.sv
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,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
Expand Down

0 comments on commit 00bad97

Please sign in to comment.