aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2022-01-14 16:38:17 +0100
committerKristofer Jonsson <kristofer.jonsson@arm.com>2022-01-21 10:57:37 +0100
commit6e9fdc0565ff07fce1fb5efc18bb7d5dbe3da489 (patch)
tree7fbe3c12b6227292f6c3890cd235a3b116a03703 /scripts
parentf7edeb7fcbb6fcb67c2711db16386c03d6f29d9d (diff)
downloadethos-u-core-platform-6e9fdc0565ff07fce1fb5efc18bb7d5dbe3da489.tar.gz
Adding Corstone-Polaris target
Corstone-Polaris is the upcoming Corstone-3xx platform featuring the Cortex-Olympus CPU. Change-Id: I17b56b6e94f040e7f9a39dddad2e98309c82b294
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/run_ctest.py62
1 files changed, 49 insertions, 13 deletions
diff --git a/scripts/run_ctest.py b/scripts/run_ctest.py
index 3e7abfc..cc02226 100755
--- a/scripts/run_ctest.py
+++ b/scripts/run_ctest.py
@@ -44,6 +44,23 @@ def check_output(args, **kwargs):
__print_arguments(args)
return subprocess.check_output(args, **kwargs)
+def run_fvp(cmd):
+ # Run FVP and tee output to console while scanning for exit tag
+ ret = 1
+ proc = Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ while True:
+ line = proc.stdout.readline().decode()
+ if not line:
+ break
+
+ if 'Application exit code: 0.' in line:
+ ret = 0
+
+ sys.stdout.write(line)
+ sys.stdout.flush()
+
+ return ret
+
def run_corstone_300(args):
if not args.arch or args.arch == 'ethos-u55':
fvp = 'FVP_Corstone_SSE-300_Ethos-U55'
@@ -74,25 +91,42 @@ def run_corstone_300(args):
cmd += args.args
- # Run FVP and tee output to console while scanning for exit tag
- ret = 1
- proc = Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- while True:
- line = proc.stdout.readline().decode()
- if not line:
- break
+ return run_fvp(cmd)
- if 'Application exit code: 0.' in line:
- ret = 0
+def run_corstone_polaris(args):
+ # Verify supported FVP version
+ version = subprocess.check_output(['FVP_Corstone-Polaris', '--version']).decode()
+ supported_version = ['11.16']
- sys.stdout.write(line)
- sys.stdout.flush()
+ if not [s for s in supported_version if s in version]:
+ raise Exception("Incorrect FVP version. Supported versions are '{}'.".format(supported_version))
- return ret
+ # FVP executable
+ cmd = ['FVP_Corstone-Polaris']
+
+ # NPU configuration
+ cmd += ['-C', 'ethosu.num_macs=' + str(args.macs)]
+
+ # 32kB ITCM, 32kB DTCM, 2MB SRAM
+ cmd += ['-C', 'cpu0.CFGITCMSZ=6',
+ '-C', 'cpu0.CFGDTCMSZ=6',
+ '-C', 'mps3_board.sse300.NUMVMBANK=1',
+ '-C', 'mps3_board.sse300.VM_BANK_SIZE=2048']
+
+ # Output parameters
+ cmd += ['-C', 'mps3_board.visualisation.disable-visualisation=1',
+ '-C', 'mps3_board.telnetterminal0.start_telnet=0',
+ '-C', 'mps3_board.uart0.out_file="-"',
+ '-C', 'mps3_board.uart0.unbuffered_output=1',
+ '-C', 'mps3_board.uart0.shutdown_on_eot=1']
+
+ cmd += args.args
+
+ return run_fvp(cmd)
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('-t', '--target', choices=['corstone-300', 'corstone-polaris'], required=True, help='FVP target.')
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.')
@@ -100,3 +134,5 @@ if __name__ == '__main__':
if args.target == 'corstone-300':
sys.exit(run_corstone_300(args))
+ elif args.target == 'corstone-polaris':
+ sys.exit(run_corstone_polaris(args))