aboutsummaryrefslogtreecommitdiff
path: root/targets/corstone-310/target.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'targets/corstone-310/target.cpp')
-rw-r--r--targets/corstone-310/target.cpp4
1 files changed, 4 insertions, 0 deletions
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(&ethosu_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(&ethosu_ta[i][j], &ethosu_ta_settings[j]);
}
}
+#endif
}
// Initialize Ethos-U NPU driver