Skip to content

Commit

Permalink
perf_counters: Fix counter resetting to zero
Browse files Browse the repository at this point in the history
events[i] can be '0 when there is nothing to count but that shouldn't
reset the current count.
  • Loading branch information
bluewww committed Oct 18, 2023
1 parent d29021e commit aaaa035
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions core/perf_counters.sv
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ module perf_counters
if ((!debug_mode_i) && (!we_i)) begin
if ((events[i]) == 1 && (!mcountinhibit_i[i+2])) begin
generic_counter_d[i] = generic_counter_q[i] + 1'b1;
end else begin
generic_counter_d[i] = 'b0;
end
end
end
Expand Down

0 comments on commit aaaa035

Please sign in to comment.