mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-20 11:57:12 -04:00
[rtl] Add 16 external performance counters at mhpmcounter[28:13]
This commit is contained in:
parent
0d07047383
commit
54533b0744
3 changed files with 15 additions and 2 deletions
|
@ -71,6 +71,9 @@ module ibex_core #(
|
|||
output logic irq_x_ack_o,
|
||||
output logic [4:0] irq_x_ack_id_o,
|
||||
|
||||
// External performance counters
|
||||
input logic [15:0] external_perf_i, // Bind to zero if unused
|
||||
|
||||
// Debug Interface
|
||||
input logic debug_req_i,
|
||||
|
||||
|
@ -1073,7 +1076,8 @@ module ibex_core #(
|
|||
.mem_store_i ( perf_store ),
|
||||
.dside_wait_i ( perf_dside_wait ),
|
||||
.mul_wait_i ( perf_mul_wait ),
|
||||
.div_wait_i ( perf_div_wait )
|
||||
.div_wait_i ( perf_div_wait ),
|
||||
.external_perf_i ( external_perf_i )
|
||||
);
|
||||
|
||||
// These assertions are in top-level as instr_valid_id required as the enable term
|
||||
|
|
|
@ -65,6 +65,8 @@ module ibex_core_tracing #(
|
|||
output logic irq_x_ack_o,
|
||||
output logic [4:0] irq_x_ack_id_o,
|
||||
|
||||
input logic [15:0] external_perf_i,
|
||||
|
||||
// Debug Interface
|
||||
input logic debug_req_i,
|
||||
|
||||
|
@ -162,6 +164,8 @@ module ibex_core_tracing #(
|
|||
.irq_x_ack_o,
|
||||
.irq_x_ack_id_o,
|
||||
|
||||
.external_perf_i,
|
||||
|
||||
.debug_req_i,
|
||||
|
||||
.rvfi_valid,
|
||||
|
|
|
@ -118,7 +118,8 @@ module ibex_cs_registers #(
|
|||
input logic mem_store_i, // store to memory in this cycle
|
||||
input logic dside_wait_i, // core waiting for the dside
|
||||
input logic mul_wait_i, // core waiting for multiply
|
||||
input logic div_wait_i // core waiting for divide
|
||||
input logic div_wait_i, // core waiting for divide
|
||||
input logic [15:0] external_perf_i // external performance counters
|
||||
);
|
||||
|
||||
import ibex_pkg::*;
|
||||
|
@ -1166,6 +1167,10 @@ module ibex_cs_registers #(
|
|||
mhpmcounter_incr[10] = instr_ret_compressed_i; // num of compressed instr
|
||||
mhpmcounter_incr[11] = mul_wait_i; // cycles waiting for multiply
|
||||
mhpmcounter_incr[12] = div_wait_i; // cycles waiting for divide
|
||||
|
||||
for (int unsigned i=0; i<16; i++) begin : gen_mhpmcounter_incr_external
|
||||
mhpmcounter_incr[13+i] = external_perf_i[i]; // Start at ID=13
|
||||
end
|
||||
end
|
||||
|
||||
// event selector (hardwired, 0 means no event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue