From ebe33a412a845526fac2fb52fb32426ffffa3c04 Mon Sep 17 00:00:00 2001 From: Henrik Hoglind Date: Fri, 17 Jun 2022 11:32:17 +0200 Subject: Disable Timing Adapters for Corstone-310 The Timing Adapters are disabled until a proper configuration exists. Change-Id: I3f44c74f9b11e1c032522c0fda448b9779ddc43f --- targets/corstone-310/CMakeLists.txt | 2 +- targets/corstone-310/target.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/targets/corstone-310/CMakeLists.txt b/targets/corstone-310/CMakeLists.txt index d9da888..ec0a57a 100644 --- a/targets/corstone-310/CMakeLists.txt +++ b/targets/corstone-310/CMakeLists.txt @@ -28,7 +28,7 @@ endif() set(ETHOSU_TARGET_NPU_CONFIG "ethos-u55-256" CACHE STRING "NPU configuration") set(ETHOSU_TARGET_NPU_COUNT 1 CACHE INTERNAL "Number of NPUs") -set(ETHOSU_TARGET_NPU_TA_COUNT 2 CACHE INTERNAL "Number of timing adapters per NPU") +set(ETHOSU_TARGET_NPU_TA_COUNT 0 CACHE INTERNAL "Number of timing adapters per NPU") set(ETHOSU_PMU_EVENT_0 -1 CACHE STRING "PMU Event #0") set(ETHOSU_PMU_EVENT_1 -1 CACHE STRING "PMU Event #1") diff --git a/targets/corstone-310/target.cpp b/targets/corstone-310/target.cpp index c979dbb..3b2820f 100644 --- a/targets/corstone-310/target.cpp +++ b/targets/corstone-310/target.cpp @@ -172,6 +172,7 @@ struct ethosu_driver ethosu0_driver; #define ETHOSU_TA_HISTCNT_1 0 #endif +#if defined(ETHOSU_TARGET_NPU_TA_COUNT) && ETHOSU_TARGET_NPU_TA_COUNT >= 2 static uintptr_t ethosu_ta_base_addrs[ETHOSU_NPU_COUNT][ETHOSU_NPU_TA_COUNT] = { {ETHOSU0_TA0_BASE_ADDRESS, ETHOSU0_TA1_BASE_ADDRESS}}; struct timing_adapter ethosu_ta[ETHOSU_NPU_COUNT][ETHOSU_NPU_TA_COUNT]; @@ -203,6 +204,7 @@ struct timing_adapter_settings ethosu_ta_settings[ETHOSU_NPU_TA_COUNT] = {{ETHOS 0, // Read only register ETHOSU_TA_HISTBIN_1, ETHOSU_TA_HISTCNT_1}}; +#endif #endif @@ -289,6 +291,7 @@ void targetSetup() { #ifdef ETHOSU // Initialize timing adapter(s) for (int i = 0; i < ETHOSU_NPU_COUNT; i++) { +#if defined(ETHOSU_TARGET_NPU_TA_COUNT) && ETHOSU_TARGET_NPU_TA_COUNT >= 2 for (int j = 0; j < ETHOSU_NPU_TA_COUNT; j++) { if (ta_init(ðosu_ta[i][j], ethosu_ta_base_addrs[i][j])) { printf("Failed to initialize timing-adapter %d for NPU %d\n", j, i); @@ -297,6 +300,7 @@ void targetSetup() { ta_set_all(ðosu_ta[i][j], ðosu_ta_settings[j]); } } +#endif } // Initialize Ethos-U NPU driver -- cgit v1.2.1