5#define SNRT_NUM_PERF_CNTS SNITCH_CLUSTER_PERIPHERAL_PARAM_NUM_PERF_COUNTERS
12 uint32_t value __attribute__((aligned(8)));
34 return (
perf_regs_t*)snrt_cluster_perf_counters_addr();
44inline void snrt_cfg_perf_counter(uint32_t perf_cnt, uint16_t metric,
46 snrt_perf_counters()->select[perf_cnt].value = (metric << 16) | hart;
54inline void snrt_start_perf_counter(uint32_t perf_cnt) {
55 snrt_perf_counters()->enable[perf_cnt].value = 0x1;
63inline void snrt_stop_perf_counter(uint32_t perf_cnt) {
64 snrt_perf_counters()->enable[perf_cnt].value = 0x0;
72inline void snrt_reset_perf_counter(uint32_t perf_cnt) {
73 snrt_perf_counters()->perf_counter[perf_cnt].value = 0x0;
83inline uint32_t snrt_get_perf_counter(uint32_t perf_cnt) {
84 return snrt_perf_counters()->perf_counter[perf_cnt].value;
Structure representing the performance counters.
Definition perf_cnt.h:22
Union representing a 32-bit performance counter register, with 8-byte alignment.
Definition perf_cnt.h:11