From ee4920b338f7d1e690377093bcfaaf0ba203bff0 Mon Sep 17 00:00:00 2001 From: Isabella Gottardi Date: Fri, 25 Feb 2022 14:29:32 +0000 Subject: MLECO-2976: Configurable Ethos-U cache size for Dedicated_Sram MLECO-2949: Platform drivers should own NPU and TA init Change-Id: I13606a0197f137816bae803eb9d7d46c358b5fb8 Signed-off-by: Isabella Gottardi --- scripts/cmake/common_user_options.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/common_user_options.cmake b/scripts/cmake/common_user_options.cmake index 9a13287..a077264 100644 --- a/scripts/cmake/common_user_options.cmake +++ b/scripts/cmake/common_user_options.cmake @@ -1,5 +1,5 @@ #---------------------------------------------------------------------------- -# Copyright (c) 2021 Arm Limited. All rights reserved. +# Copyright (c) 2021-2022 Arm Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -105,10 +105,15 @@ if (NOT TARGET_PLATFORM STREQUAL native) if ((ETHOS_U_NPU_ID STREQUAL U55) OR (ETHOS_U_NPU_ID STREQUAL U65)) if (ETHOS_U_NPU_ID STREQUAL U55) set(DEFAULT_NPU_MEM_MODE "Shared_Sram") - set(DEFAULT_NPU_CONFIG_ID "H128") + set(DEFAULT_NPU_CONFIG_ID "H128") elseif(ETHOS_U_NPU_ID STREQUAL U65) set(DEFAULT_NPU_MEM_MODE "Dedicated_Sram") - set(DEFAULT_NPU_CONFIG_ID "Y256") + set(DEFAULT_NPU_CONFIG_ID "Y256") + set(DEFAULT_NPU_CACHE_SIZE "393216") + + USER_OPTION(ETHOS_U_NPU_CACHE_SIZE "Arm Ethos-U65 NPU Cache Size" + "${DEFAULT_NPU_CACHE_SIZE}" + STRING) endif() else () message(FATAL_ERROR "Non compatible Ethos-U NPU processor ${ETHOS_U_NPU_ID}") -- cgit v1.2.1