aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--applications/message_handler/message_handler.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/applications/message_handler/message_handler.cpp b/applications/message_handler/message_handler.cpp
index f6135fc..817255f 100644
--- a/applications/message_handler/message_handler.cpp
+++ b/applications/message_handler/message_handler.cpp
@@ -260,11 +260,11 @@ void InferenceHandler::runInference(ethosu_core_inference_req &req, ethosu_core_
const int numEvents = std::min(static_cast<int>(ETHOSU_PMU_Get_NumEventCounters()), ETHOSU_CORE_PMU_MAX);
for (int i = 0; i < numEvents; i++) {
- printf("ethos-u : ethosu_pmu_cntr%d : %" PRIu32 "\n", i, rsp.pmu_event_count[i]);
+ printf("ethosu_pmu_cntr%d : %" PRIu32 "\n", i, rsp.pmu_event_count[i]);
}
if (rsp.pmu_cycle_counter_enable) {
- printf("ethos-u : cycle_cnt : %" PRIu64 " cycles\n", rsp.pmu_cycle_counter_count);
+ printf("ethosu_pmu_cycle_cntr : %" PRIu64 " cycles\n", rsp.pmu_cycle_counter_count);
}
/*
@@ -424,6 +424,9 @@ extern "C" void ethosu_inference_begin(struct ethosu_driver *drv, void *userArg)
// Enable cycle counter
if (self->currentReq->pmu_cycle_counter_enable) {
+ ETHOSU_PMU_PMCCNTR_CFG_Set_Stop_Event(drv, ETHOSU_PMU_NPU_IDLE);
+ ETHOSU_PMU_PMCCNTR_CFG_Set_Start_Event(drv, ETHOSU_PMU_NPU_ACTIVE);
+
ETHOSU_PMU_CNTR_Enable(drv, ETHOSU_PMU_CCNT_Msk);
ETHOSU_PMU_CYCCNT_Reset(drv);
}