diff options
author | Anton Moberg <anton.moberg@arm.com> | 2021-05-24 09:16:07 +0200 |
---|---|---|
committer | Anton Moberg <anton.moberg@arm.com> | 2021-05-24 09:16:07 +0200 |
commit | 596a4663da4a6ae4be6bb4cc7c80d6f98f4874bc (patch) | |
tree | 957a195605a2372f846f04895fcbec66c55f623c /lib/ethosu_profiler | |
parent | a9c0e9a647a18761a49a93dbb2360f8b8299a58d (diff) | |
download | ethos-u-core-software-596a4663da4a6ae4be6bb4cc7c80d6f98f4874bc.tar.gz |
[Core Software] Update and remove pmu "v2"-functions
NPU PMU interface currently have functions that have been stepped
each time a compatibilty breaking changed has been introduced. Old
entrypoints have been redefined with macro to use the latest version
for backwards compatibility. This series of patches will remove any
such functions and macro to unify the interface.
Update: All PMU entrypoints to support updated interface
Change-Id: I56f47a36dcba66f884e721dddc844b8983aca1dd
Diffstat (limited to 'lib/ethosu_profiler')
-rw-r--r-- | lib/ethosu_profiler/src/ethosu_profiler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ethosu_profiler/src/ethosu_profiler.cpp b/lib/ethosu_profiler/src/ethosu_profiler.cpp index 9ddea13..bf4aae7 100644 --- a/lib/ethosu_profiler/src/ethosu_profiler.cpp +++ b/lib/ethosu_profiler/src/ethosu_profiler.cpp @@ -31,7 +31,7 @@ namespace { uint64_t GetCurrentEthosuTicks(struct ethosu_driver *drv) { - return ETHOSU_PMU_Get_CCNTR_v2(drv); + return ETHOSU_PMU_Get_CCNTR(drv); } } // namespace @@ -44,8 +44,8 @@ EthosUProfiler::EthosUProfiler(size_t max_events) : max_events_(max_events) { end_ticks_ = std::make_unique<uint64_t[]>(max_events_); struct ethosu_driver *drv = ethosu_reserve_driver(); - ETHOSU_PMU_CNTR_Enable_v2(drv, ETHOSU_PMU_CCNT_Msk); - ETHOSU_PMU_CYCCNT_Reset_v2(drv); + ETHOSU_PMU_CNTR_Enable(drv, ETHOSU_PMU_CCNT_Msk); + ETHOSU_PMU_CYCCNT_Reset(drv); ethosu_release_driver(drv); } @@ -60,9 +60,9 @@ uint32_t EthosUProfiler::BeginEvent(const char *tag) { if (strcmp("ethos-u", tag) == 0) { struct ethosu_driver *ethosu_drv = ethosu_reserve_driver(); - ETHOSU_PMU_CYCCNT_Reset_v2(ethosu_drv); - ETHOSU_PMU_PMCCNTR_CFG_Set_Start_Event_v2(ethosu_drv, ETHOSU_PMU_NPU_ACTIVE); - ETHOSU_PMU_PMCCNTR_CFG_Set_Stop_Event_v2(ethosu_drv, ETHOSU_PMU_NPU_IDLE); + ETHOSU_PMU_CYCCNT_Reset(ethosu_drv); + ETHOSU_PMU_PMCCNTR_CFG_Set_Start_Event(ethosu_drv, ETHOSU_PMU_NPU_ACTIVE); + ETHOSU_PMU_PMCCNTR_CFG_Set_Stop_Event(ethosu_drv, ETHOSU_PMU_NPU_IDLE); start_ticks_[num_events_] = GetCurrentEthosuTicks(ethosu_drv); ethosu_release_driver(ethosu_drv); } else { |