diff options
author | Anton Moberg <anton.moberg@arm.com> | 2021-05-03 17:03:41 +0200 |
---|---|---|
committer | Anton Moberg <anton.moberg@arm.com> | 2021-05-24 09:11:06 +0200 |
commit | 0cb936d6affb4cbc58c1766932d579eb5906d3a3 (patch) | |
tree | d978287a213b20bdc955df2532627a2aca2533e2 | |
parent | 3b9505876b4d7d22c7cb029feba11d120b450857 (diff) | |
download | ethos-u-core-platform-0cb936d6affb4cbc58c1766932d579eb5906d3a3.tar.gz |
[Core Platform] 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: I12113649cfbbe162f0fc66563868ec9df0382cbe
-rw-r--r-- | applications/driver_unit_tests/command_stream.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/applications/driver_unit_tests/command_stream.cpp b/applications/driver_unit_tests/command_stream.cpp index ede9dd6..e099b73 100644 --- a/applications/driver_unit_tests/command_stream.cpp +++ b/applications/driver_unit_tests/command_stream.cpp @@ -58,38 +58,38 @@ bool DataPointer::operator!=(const DataPointer &other) { Pmu::Pmu(ethosu_driver *_drv, const PmuEvents &_config) : drv(_drv), config(_config) { // Enable PMU block - ETHOSU_PMU_Enable_v2(drv); + ETHOSU_PMU_Enable(drv); // Enable cycle counter - ETHOSU_PMU_CNTR_Enable_v2(drv, ETHOSU_PMU_CCNT_Msk); + ETHOSU_PMU_CNTR_Enable(drv, ETHOSU_PMU_CCNT_Msk); // Configure event types for (size_t i = 0; i < config.size(); i++) { - ETHOSU_PMU_Set_EVTYPER_v2(drv, i, config[i]); - ETHOSU_PMU_CNTR_Enable_v2(drv, 1 << i); + ETHOSU_PMU_Set_EVTYPER(drv, i, config[i]); + ETHOSU_PMU_CNTR_Enable(drv, 1 << i); } } void Pmu::clear() { - ETHOSU_PMU_CYCCNT_Reset_v2(drv); - ETHOSU_PMU_EVCNTR_ALL_Reset_v2(drv); + ETHOSU_PMU_CYCCNT_Reset(drv); + ETHOSU_PMU_EVCNTR_ALL_Reset(drv); } void Pmu::print() { printf("PMU={cycleCount=%llu, events=[%" PRIu32 ", %" PRIu32 ", %" PRIu32 ", %" PRIu32 "]}\n", - ETHOSU_PMU_Get_CCNTR_v2(drv), - ETHOSU_PMU_Get_EVCNTR_v2(drv, 0), - ETHOSU_PMU_Get_EVCNTR_v2(drv, 1), - ETHOSU_PMU_Get_EVCNTR_v2(drv, 2), - ETHOSU_PMU_Get_EVCNTR_v2(drv, 3)); + ETHOSU_PMU_Get_CCNTR(drv), + ETHOSU_PMU_Get_EVCNTR(drv, 0), + ETHOSU_PMU_Get_EVCNTR(drv, 1), + ETHOSU_PMU_Get_EVCNTR(drv, 2), + ETHOSU_PMU_Get_EVCNTR(drv, 3)); } uint64_t Pmu::getCycleCount() const { - return ETHOSU_PMU_Get_CCNTR_v2(drv); + return ETHOSU_PMU_Get_CCNTR(drv); } uint32_t Pmu::getEventCount(size_t index) const { - return ETHOSU_PMU_Get_EVCNTR_v2(drv, index); + return ETHOSU_PMU_Get_EVCNTR(drv, index); } /**************************************************************************** |