From 4a25eb354297a82eb044ed317a5fd7cd3a454620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Sv=C3=A4rd?= Date: Fri, 11 Feb 2022 13:47:50 +0100 Subject: README: Add section on how to specify NPU config Clarify that Python 3.8+ is a requirement Change-Id: I5fbfdc2e72e7cc75cae992ff2c9d308380838594 --- README.md | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 278f54d..2c02a81 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,11 @@ downloaded from the Ecosystem page at ## Building -Building core platform requires a recent version of CMake, Python 3 and a C/C++ -cross comiler for Arm Cortex-M. There are sample toolchain files provided for +Building core platform requires a recent version of CMake, a C/C++ cross compiler +for Arm Cortex-M and Python 3.8+. There are sample toolchain files provided for Arm Clang and Arm GCC. -To run the helper scripts Python 3 is required with the packages listed in +To run the helper scripts Python 3.8+ is required, together with the packages listed in `requirements.txt`. ``` @@ -33,13 +33,24 @@ $ pip install -U pip $ pip install -r requirements.txt ``` -The following commands will produce an elf file which can be run on the FVP. +The following commands will compile the platform and produce application elf +files that can be run on the FVP. If no NPU configuration is specified, the default +configuration `ethos-u55-128` will be used. ``` $ cmake -B build targets/corstone-300 $ cmake --build build ``` +To specify NPU and configuration, set the `ETHOSU_TARGET_NPU_CONFIG` variable. +Please note that applications compiled for Ethos-U55 will not run on Ethos-U65 FVP +and vice versa. + +``` +$ cmake -B build targets/corstone-300 -DETHOSU_TARGET_NPU_CONFIG=ethos-u65-256 +$ cmake --build build +``` + It is also possible to build with a different toolchain. ``` @@ -90,21 +101,33 @@ $ ctest ``` Individual applications can also be run directly with the FVP, for example like -this. +this ``` $ FVP_Corstone_SSE-300_Ethos-U55 applications/freertos/freertos.elf ``` +or like this for Ethos-U65 FVP. + +``` +$ FVP_Corstone_SSE-300_Ethos-U65 applications/freertos/freertos.elf +``` -The Corstone-300 FVP allows some parameters to be modified, for example the +The Corstone-300 FVP(s) allows some parameters to be modified, for example the number of Ethos-U MAC units can be configured with `-C ethosu.num_macs=<64|128|256|...>`. Please note that the network must be recompiled with Vela if the MAC configuration changes. Please also note that the set of valid MAC configuration is different for Ethos-U55 and Ethos-U65. +Ethos-U55 FVP. + ``` $ FVP_Corstone_SSE-300_Ethos-U55 -C ethosu.num_macs=256 applications/freertos/freertos.elf ``` +Same as above but for Ethos-U65 FVP. + +``` +$ FVP_Corstone_SSE-300_Ethos-U65 -C ethosu.num_macs=512 applications/freertos/freertos.elf +``` ## Corstone-300 MPS3 FPGA -- cgit v1.2.1