MLECO-2471: Move arena-cache-size to setup script

Signed-off-by: Liam Barry <liam.barry@arm.com>
Change-Id: Ibf712cb9359b9bc9977d4f77aec1d7c7f4245825
diff --git a/set_up_default_resources.py b/set_up_default_resources.py
index 4a5ef10..3eff6bf 100755
--- a/set_up_default_resources.py
+++ b/set_up_default_resources.py
@@ -134,6 +134,9 @@
                                     'ethos_u_npu_id',
                                     'ethos_u_config_id'])
 
+# The default internal SRAM size for Corstone-300 implementation on MPS3
+mps3_max_sram_sz = 4 * 1024 * 1024 # 4 MiB
+
 
 def call_command(command: str) -> str:
     """
@@ -192,7 +195,9 @@
     return None
 
 
-def set_up_resources(run_vela_on_models=False, additional_npu_config_names=[]):
+def set_up_resources(run_vela_on_models=False,
+                     additional_npu_config_names=[],
+                     arena_cache_size=mps3_max_sram_sz):
     """
     Helpers function that retrieve the output from a command.
 
@@ -200,6 +205,7 @@
     ----------
     run_vela_on_models (bool):    Specifies if run vela on downloaded models.
     additional_npu_config_names(list): list of strings of Ethos-U NPU configs.
+    arena_cache_size(int):    Specifies arena cache size in bytes.
     """
     current_file_dir = os.path.dirname(os.path.abspath(__file__))
     download_dir = os.path.abspath(os.path.join(current_file_dir, "resources_downloaded"))
@@ -313,7 +319,8 @@
                        f"--config {config_file} " +
                        f"--memory-mode={config.memory_mode} " +
                        f"--system-config={config.system_config} " +
-                       f"--output-dir={output_dir}")
+                       f"--output-dir={output_dir} " +
+                       f"--arena-cache-size={arena_cache_size} ")
 
                 # we want the name to include the configuration suffix. For example: vela_H128,
                 # vela_Y512 etc.
@@ -341,9 +348,15 @@
                         help=f"""Additional (non-default) configurations for Vela:
                         {valid_npu_config_names}""",
                         default=[], action="append")
+    parser.add_argument("--arena-cache-size",
+                        help="Arena cache size in bytes",
+                        type=int,
+                        default=mps3_max_sram_sz)
     args = parser.parse_args()
 
     logging.basicConfig(filename='log_build_default.log', level=logging.DEBUG)
     logging.getLogger().addHandler(logging.StreamHandler(sys.stdout))
 
-    set_up_resources(not args.skip_vela, args.additional_ethos_u_config_name)
+    set_up_resources(not args.skip_vela,
+                     args.additional_ethos_u_config_name,
+                     args.arena_cache_size)