aboutsummaryrefslogtreecommitdiff
path: root/src/ethosu_pmu.c
diff options
context:
space:
mode:
authorJonny Svärd <jonny.svaerd@arm.com>2021-12-17 17:00:57 +0100
committerJonny Svärd <jonny.svaerd@arm.com>2021-12-22 13:11:51 +0100
commit20ce37ffbafcd76775c7011fea4d017de4669d0a (patch)
treee5a8d0aac839378fef7b4bff9b04261da4c9d532 /src/ethosu_pmu.c
parent6d5b083e2e4279284f406d73c7f92e48ef28b218 (diff)
downloadethos-u-core-driver-20ce37ffbafcd76775c7011fea4d017de4669d0a.tar.gz
Add func to get nbr of PMU event counters
Small bugfix to a print in driver Change-Id: I277a441a9f65c647c338b92af5a908176929102c
Diffstat (limited to 'src/ethosu_pmu.c')
-rw-r--r--src/ethosu_pmu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ethosu_pmu.c b/src/ethosu_pmu.c
index 647f3b0..e11636a 100644
--- a/src/ethosu_pmu.c
+++ b/src/ethosu_pmu.c
@@ -101,6 +101,11 @@ void ETHOSU_PMU_Disable(struct ethosu_driver *drv)
set_clock_and_power_request(drv, ETHOSU_PMU_REQUEST, ETHOSU_CLOCK_Q_ENABLE, ETHOSU_POWER_Q_ENABLE);
}
+uint32_t ETHOSU_PMU_Get_NumEventCounters(void)
+{
+ return NPU_REG_PMEVCNTR_ARRLEN;
+}
+
void ETHOSU_PMU_Set_EVTYPER(struct ethosu_driver *drv, uint32_t num, enum ethosu_pmu_event_type type)
{
assert(num < ETHOSU_PMU_NCOUNTERS);