From f7edeb7fcbb6fcb67c2711db16386c03d6f29d9d Mon Sep 17 00:00:00 2001 From: Kristofer Jonsson Date: Mon, 17 Jan 2022 09:40:09 +0100 Subject: Build system updates Move finding Python after the project command. This was causing incremental CMake configurations to fail. Moving ETHOSU_TARGET_* variables after adding the common subdirectory. It is necessary to set the variables before the core driver is included. Change-Id: I1c6883061cb9247336f8b33d82d2e2de870634fa --- scripts/run_ctest.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/run_ctest.py b/scripts/run_ctest.py index c72d0f7..3e7abfc 100755 --- a/scripts/run_ctest.py +++ b/scripts/run_ctest.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -# Copyright (c) 2021 Arm Limited. All rights reserved. +# Copyright (c) 2021-2022 Arm Limited. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 # @@ -45,15 +45,22 @@ def check_output(args, **kwargs): return subprocess.check_output(args, **kwargs) def run_corstone_300(args): + if not args.arch or args.arch == 'ethos-u55': + fvp = 'FVP_Corstone_SSE-300_Ethos-U55' + elif args.arch == 'ethos-u65': + fvp = 'FVP_Corstone_SSE-300_Ethos-U65' + else: + raise 'Unsupported NPU arch' + # Verify supported FVP version - version = subprocess.check_output(['FVP_Corstone_SSE-300_Ethos-U55', '--version']).decode() + version = subprocess.check_output([fvp, '--version']).decode() supported_version = ['11.13', '11.14', '11.15', '11.16'] if not [s for s in supported_version if s in version]: raise Exception("Incorrect FVP version. Supported versions are '{}'.".format(supported_version)) # FVP executable - cmd = ['FVP_Corstone_SSE-300_Ethos-U55'] + cmd = [fvp] # NPU configuration cmd += ['-C', 'ethosu.num_macs=' + str(args.macs)] @@ -86,7 +93,7 @@ def run_corstone_300(args): if __name__ == '__main__': parser = argparse.ArgumentParser(description='Run a test with given test command and test binary.') parser.add_argument('-t', '--target', choices=['corstone-300'], required=True, help='FVP target.') - parser.add_argument('-a', '--arch', choices=['ethos-u55'], default='ethos-u55', help='NPU architecture.') + parser.add_argument('-a', '--arch', choices=['ethos-u55', 'ethos-u65'], help='NPU architecture.') parser.add_argument('-m', '--macs', type=int, choices=[32, 64, 128, 256], default=128, help='NPU number of MACs.') parser.add_argument('args', nargs='+', help='Arguments.') args = parser.parse_args() -- cgit v1.2.1