Skip to content

Commit 171982f

Browse files
MLECO-5486: Adding support for Arm Corstone-320
First release of Arm Corstone-320 BSP v1.0.0 added to enable all projects to be built for this new target. Recently updated version of the NPU driver used to enable support for the new Arm Ethos-U85 NPU. Change-Id: Ia684a011e14e0374dc9e3fef927deecbe04a49ce Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
1 parent b9c9bf2 commit 171982f

File tree

21 files changed

+16989
-111
lines changed

21 files changed

+16989
-111
lines changed

cmsis-pack-examples/.ci/vcpkg-configuration.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"arm:tools/kitware/cmake": "^3.28.4",
1212
"arm:tools/ninja-build/ninja": "^1.12.0",
1313
"arm:compilers/arm/armclang": "^6.22.0",
14-
"arm:compilers/arm/arm-none-eabi-gcc": "^13.2.1",
15-
"arm:models/arm/avh-fvp": "^11.26.11"
14+
"arm:models/arm/avh-fvp": "^11.27.31"
1615
}
1716
}

cmsis-pack-examples/.github/workflows/AVH-FVP-CI.yml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,26 @@ jobs:
3030

3131
matrix:
3232
target: [
33-
{proj: kws, board: AVH-SSE-300, model: FVP_Corstone_SSE-300, uart: mps3_board.uart0},
34-
{proj: kws, board: AVH-SSE-300-U55, model: FVP_Corstone_SSE-300_Ethos-U55, uart: mps3_board.uart0},
35-
{proj: kws, board: AVH-SSE-300-U65, model: FVP_Corstone_SSE-300_Ethos-U65, uart: mps3_board.uart0},
36-
{proj: kws, board: AVH-SSE-310, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
37-
{proj: kws, board: AVH-SSE-310-U55, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
38-
{proj: kws, board: AVH-SSE-310-U65, model: FVP_Corstone_SSE-310_Ethos-U65, uart: mps3_board.uart0},
39-
{proj: object-detection, board: AVH-SSE-300, model: FVP_Corstone_SSE-300, uart: mps3_board.uart0},
40-
{proj: object-detection, board: AVH-SSE-300-U55, model: FVP_Corstone_SSE-300_Ethos-U55, uart: mps3_board.uart0},
41-
{proj: object-detection, board: AVH-SSE-300-U65, model: FVP_Corstone_SSE-300_Ethos-U65, uart: mps3_board.uart0},
42-
{proj: object-detection, board: AVH-SSE-310, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
43-
{proj: object-detection, board: AVH-SSE-310-U55, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
44-
{proj: object-detection, board: AVH-SSE-310-U65, model: FVP_Corstone_SSE-310_Ethos-U65, uart: mps3_board.uart0}
33+
{proj: kws, board: AVH-SSE-300, model: FVP_Corstone_SSE-300, base: mps3, uart: uart0},
34+
{proj: kws, board: AVH-SSE-300-U55, model: FVP_Corstone_SSE-300_Ethos-U55, base: mps3, uart: uart0},
35+
{proj: kws, board: AVH-SSE-300-U65, model: FVP_Corstone_SSE-300_Ethos-U65, base: mps3, uart: uart0},
36+
{proj: kws, board: AVH-SSE-310, model: FVP_Corstone_SSE-310, base: mps3, uart: uart0},
37+
{proj: kws, board: AVH-SSE-310-U55, model: FVP_Corstone_SSE-310, base: mps3, uart: uart0},
38+
{proj: kws, board: AVH-SSE-310-U65, model: FVP_Corstone_SSE-310_Ethos-U65, base: mps3, uart: uart0},
39+
{proj: kws, board: AVH-SSE-315, model: FVP_Corstone_SSE-315, base: mps4, uart: uart0},
40+
{proj: kws, board: AVH-SSE-315-U65, model: FVP_Corstone_SSE-315_Ethos-U65, base: mps4, uart: uart0},
41+
{proj: kws, board: AVH-SSE-320, model: FVP_Corstone_SSE-320, base: mps4, uart: uart0},
42+
{proj: kws, board: AVH-SSE-320-U85, model: FVP_Corstone_SSE-320_Ethos-U85, base: mps4, uart: uart0},
43+
{proj: object-detection, board: AVH-SSE-300, model: FVP_Corstone_SSE-300, base: mps3, uart: uart0},
44+
{proj: object-detection, board: AVH-SSE-300-U55, model: FVP_Corstone_SSE-300_Ethos-U55, base: mps3, uart: uart0},
45+
{proj: object-detection, board: AVH-SSE-300-U65, model: FVP_Corstone_SSE-300_Ethos-U65, base: mps3, uart: uart0},
46+
{proj: object-detection, board: AVH-SSE-310, model: FVP_Corstone_SSE-310, base: mps3, uart: uart0},
47+
{proj: object-detection, board: AVH-SSE-310-U55, model: FVP_Corstone_SSE-310, base: mps3, uart: uart0},
48+
{proj: object-detection, board: AVH-SSE-310-U65, model: FVP_Corstone_SSE-310_Ethos-U65, base: mps3, uart: uart0},
49+
{proj: object-detection, board: AVH-SSE-315, model: FVP_Corstone_SSE-315, base: mps4, uart: uart0},
50+
{proj: object-detection, board: AVH-SSE-315-U65, model: FVP_Corstone_SSE-315_Ethos-U65, base: mps4, uart: uart0},
51+
{proj: object-detection, board: AVH-SSE-320, model: FVP_Corstone_SSE-320, base: mps4, uart: uart0},
52+
{proj: object-detection, board: AVH-SSE-320-U85, model: FVP_Corstone_SSE-320_Ethos-U85, base: mps4, uart: uart0}
4553
]
4654

4755
fail-fast: false
@@ -69,8 +77,8 @@ jobs:
6977
run: |
7078
${{ matrix.target.model }} \
7179
-a ./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Release/${{ matrix.target.proj }}.axf \
72-
-f ./FVP/${{ matrix.target.model }}/fvp_config.txt \
73-
-C ${{ matrix.target.uart }}.out_file=./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Release/fvp_stdout.log \
80+
-f ./device/corstone/fvp-configs/${{ matrix.target.base }}_fvp_config.txt \
81+
-C ${{ matrix.target.base }}_board.${{ matrix.target.uart }}.out_file=./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Release/fvp_stdout.log \
7482
--simlimit 60 --stat
7583
cat ./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Release/fvp_stdout.log
7684
@@ -79,7 +87,7 @@ jobs:
7987
run: |
8088
${{ matrix.target.model }} \
8189
-a ./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Debug/${{ matrix.target.proj }}.axf \
82-
-f ./FVP/${{ matrix.target.model }}/fvp_config.txt \
83-
-C ${{ matrix.target.uart }}.out_file=./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Debug/fvp_stdout.log \
90+
-f ./device/corstone/fvp-configs/${{ matrix.target.base }}_fvp_config.txt \
91+
-C ${{ matrix.target.base }}_board.${{ matrix.target.uart }}.out_file=./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Debug/fvp_stdout.log \
8492
--simlimit 60 --stat
85-
cat ./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Debug/fvp_stdout.log
93+
cat ./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Debug/fvp_stdout.log

cmsis-pack-examples/FVP/FVP_Corstone_SSE-300/fvp_config.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

cmsis-pack-examples/FVP/FVP_Corstone_SSE-300_Ethos-U65/fvp_config.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

cmsis-pack-examples/FVP/FVP_Corstone_SSE-310/fvp_config.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

cmsis-pack-examples/FVP/FVP_Corstone_SSE-310_Ethos-U65/fvp_config.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

cmsis-pack-examples/README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
- [Generate and build the project](#generate-and-build-the-project)
2222
- [Execute Project](#execute-project)
2323
- [Working with Virtual Streaming Interface](#working-with-virtual-streaming-interface)
24+
- [Arm MPS3 based FVPs](#arm-mps3-based-fvps)
25+
- [Arm MPS4 based FVPs](#arm-mps4-based-fvps)
2426
- [Application output](#application-output)
2527
- [Trademarks](#trademarks)
2628
- [Licenses](#licenses)
@@ -48,10 +50,12 @@ Target platforms supported:
4850
| Arm® Corstone™-300-U55 | Virtual or physical | Arm® Cortex®-M55 CPU with Arm® Ethos™-U55 | All |
4951
| Arm® Corstone™-300-U65 | Virtual or physical | Arm® Cortex®-M55 CPU with Arm® Ethos™-U65 | All |
5052
| Arm® Corstone™-310 | Virtual or physical | Arm® Cortex®-M85 CPU | All |
51-
| Arm® Corstone™-310 | Virtual or physical | Arm® Cortex®-M85 CPU with Arm® Ethos™-U55 | All |
53+
| Arm® Corstone™-310-U55 | Virtual or physical | Arm® Cortex®-M85 CPU with Arm® Ethos™-U55 | All |
5254
| Arm® Corstone™-310-U65 | Virtual or physical | Arm® Cortex®-M85 CPU with Arm® Ethos™-U65 NPU | All |
5355
| Arm® Corstone™-315 | Virtual or physical | Arm® Cortex®-M85 CPU | All |
5456
| Arm® Corstone™-315-U65 | Virtual or physical | Arm® Cortex®-M85 CPU with Arm® Ethos™-U65 NPU | All |
57+
| Arm® Corstone™-320 | Virtual or physical | Arm® Cortex®-M85 CPU | All |
58+
| Arm® Corstone™-320-U85 | Virtual or physical | Arm® Cortex®-M85 CPU with Arm® Ethos™-U85 NPU | All |
5559
| Alif™ Ensemble™ E7 AI/ML Kit | Physical board | Arm® Cortex®-M55 CPU with Arm® Ethos™-U55 NPU | All |
5660
| STM32® F746G-Discovery | Physical board | Arm® Cortex®-M7 CPU | KWS |
5761
| NXP® FRDM-K64F | Physical board | Arm® Cortex®-M4 CPU | KWS |
@@ -195,12 +199,15 @@ The built artifacts will be located under the `out/` directory in the project ro
195199
The project is configured for execution on Arm Virtual Hardware which removes the requirement for
196200
a physical hardware board.
197201

198-
- When using a Fixed Virtual Platform (FVP) installed locally:
202+
- When using a Fixed Virtual Platform (FVP) installed locally by `vcpkg`:
199203
```shell
200-
$ FVP_Corstone_SSE-300_Ethos-U55 -a out/object-detection/AVH-SSE-300-U55/Release/object-detection.axf -f ./FVP/FVP_Corstone_SSE-300/fvp_config.txt
204+
$ FVP_Corstone_SSE-300_Ethos-U55 \
205+
-a out/object-detection/AVH-SSE-300-U55/Release/object-detection.axf \
206+
-f device/corstone/fvp-configs/mps3_fvp_config.txt
201207
```
202208
> **NOTE**: The FVP defaults to running 128 MAC configuration for Arm® Ethos™-U55 NPU.
203-
> However, our default neural network model for the NPU is for 256 MAC configuration.
209+
> However, our default neural network model for the NPU is for 256 MAC configuration. The FVP
210+
> configuration file sets the MAC units to be 256.
204211
205212
- [Keil Studio Cloud](https://studio.keil.arm.com/) integrates also the Arm Virtual Hardware
206213
VHT_Corstone_SSE-300_Ethos-U55 model. The steps to use the example are:
@@ -235,7 +242,9 @@ your local machine and stream these over to the application running within the F
235242

236243
To run the VSI application, append the command line with the v_path argument. For example:
237244

238-
#### Arm Corstone-300 + Arm Corstone-310
245+
#### Arm MPS3 based FVPs
246+
247+
For Arm Corstone-300 and Arm Corstone-310:
239248

240249
```shell
241250
$ <path_to_installed_FVP> \
@@ -244,7 +253,9 @@ To run the VSI application, append the command line with the v_path argument. Fo
244253
-C mps3_board.v_path=./device/corstone/vsi/video/python/
245254
```
246255

247-
#### Arm Corstone-315
256+
#### Arm MPS4 based FVPs
257+
258+
For Arm Corstone-315 and Arm Corstone-320:
248259

249260
```shell
250261
$ <path_to_installed_FVP> \

cmsis-pack-examples/cdefault.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717
# yaml-language-server: $schema=https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/schemas/projmgr/2.4.0/tools/projmgr/schemas/cdefault.schema.json
1818

1919
default:
20-
# Note that we need AC6@6.18 or higher to compile for Corstone-310 target.
21-
compiler: AC6
2220

2321
misc:
22+
# Note that we need AC6@6.18 or higher to compile for Arm Cortex-M85 based targets.
2423
- for-compiler: AC6
2524
CPP:
2625
- -std=c++17

cmsis-pack-examples/common/include/BufAttributes.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright 2022 Arm Limited and/or its
2+
* SPDX-FileCopyrightText: Copyright 2022, 2024 Arm Limited and/or its
33
* affiliates <open-source-office@arm.com>
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -19,9 +19,9 @@
1919
#ifndef BUF_ATTRIBUTES_HPP
2020
#define BUF_ATTRIBUTES_HPP
2121

22-
#if defined(ETHOSU55) || defined(ETHOSU65)
22+
#if defined(ETHOSU55) || defined(ETHOSU65) || defined(ETHOSU85)
2323
#define ARM_NPU
24-
#endif /* defined(ETHOSU55) || defined(ETHOSU65) */
24+
#endif /* defined(ETHOSU55) || defined(ETHOSU65) || defined(ETHOSU85) */
2525

2626
#if defined(ARM_NPU)
2727
/* When Arm NPU is defined, we use the config set by NPU mem parameters */

cmsis-pack-examples/common/include/ethosu_mem_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 Arm Limited. All rights reserved.
2+
* Copyright (c) 2022, 2024 Arm Limited. All rights reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,11 +25,11 @@
2525
#define ETHOS_U_MEM_BYTE_ALIGNMENT 16
2626

2727
#ifndef ETHOS_U_NPU_MEMORY_MODE
28-
#if defined(ETHOSU65)
28+
#if defined(ETHOSU65) || defined(ETHOSU85)
2929
#define ETHOS_U_NPU_MEMORY_MODE ETHOS_U_NPU_MEMORY_MODE_DEDICATED_SRAM
3030
#else
3131
#define ETHOS_U_NPU_MEMORY_MODE ETHOS_U_MEMORY_MODE_SHARED_SRAM
32-
#endif /* defined (ETHOSU65) */
32+
#endif /* defined (ETHOSU65) || defined(ETHOSU85) */
3333
#endif /* ETHOS_U_NPU_MEMORY_MODE */
3434

3535
#if (ETHOS_U_NPU_MEMORY_MODE == ETHOS_U_NPU_MEMORY_MODE_DEDICATED_SRAM)

cmsis-pack-examples/device/corstone/corstone-device.clayer.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,22 @@
1818

1919
layer:
2020

21-
description: Corstone-300/310 device related components and files.
21+
description: Arm Corstone reference package related components and files.
2222

2323
groups:
2424
- group: Retarget
2525
for-context:
2626
- +AVH-SSE-300
27-
- +AVH-SSE-310
28-
- +AVH-SSE-315
2927
- +AVH-SSE-300-U55
30-
- +AVH-SSE-310-U55
3128
- +AVH-SSE-300-U65
29+
- +AVH-SSE-310
30+
- +AVH-SSE-310-U55
3231
- +AVH-SSE-310-U65
32+
- +AVH-SSE-315
3333
- +AVH-SSE-315-U65
34+
- +AVH-SSE-320
35+
- +AVH-SSE-320-U85
36+
3437
files:
3538
- file: src/retarget.c
3639
- file: src/uart_cmsdk_apb.c
@@ -58,15 +61,20 @@ layer:
5861
- +AVH-SSE-300-U65
5962
- +AVH-SSE-310-U65
6063
- +AVH-SSE-315-U65
64+
- component: Arm::Machine Learning:NPU Support:Ethos-U Driver&Generic U85
65+
for-context:
66+
- +AVH-SSE-320-U85
6167
- component: tensorflow::Machine Learning:TensorFlow:Kernel&Ethos-U
6268
for-context:
6369
- +AVH-SSE-300-U55
6470
- +AVH-SSE-310-U55
6571
- +AVH-SSE-300-U65
6672
- +AVH-SSE-310-U65
6773
- +AVH-SSE-315-U65
74+
- +AVH-SSE-320-U85
6875
- component: tensorflow::Machine Learning:TensorFlow:Kernel&CMSIS-NN
6976
for-context:
7077
- +AVH-SSE-300
7178
- +AVH-SSE-310
7279
- +AVH-SSE-315
80+
- +AVH-SSE-320

cmsis-pack-examples/FVP/FVP_Corstone_SSE-300_Ethos-U55/fvp_config.txt renamed to cmsis-pack-examples/device/corstone/fvp-configs/mps3_fvp_config.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Notes:
21
# Parameters:
32
# instance.parameter=value #(type, mode) default = 'def value' : description : [min..max]
43
#---------------------------------------------------------------------------------------------------
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Parameters:
2+
# instance.parameter=value #(type, mode) default = 'def value' : description : [min..max]
3+
#---------------------------------------------------------------------------------------------------
4+
mps4_board.visualisation.disable-visualisation=1 # (bool , init-time) default = '0' : Enable/disable visualisation
5+
vis_hdlcd.disable_visualisation=1 # (bool , init-time) default = '0' : Enable/disable visualisation
6+
mps4_board.uart0.shutdown_on_eot=1 # (bool , init-time) default = '0' : Shutdown simulation when a EOT (ASCII 4) char is transmitted (useful for regression tests when semihosting is not available)
7+
mps4_board.subsystem.ethosu.num_macs=256 # (int , init-time) default = '0x100' : Number of 8x8 MACs performed per cycle (256 or 512)
8+
#---------------------------------------------------------------------------------------------------

cmsis-pack-examples/device/corstone/src/BoardInit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static int arm_ethosu_npu_init(void)
9494
#if defined(CORSTONE300_FVP)
9595
void* const ethosu_base_address = (void*)(ETHOS_U55_APB_BASE_S);
9696
#else
97-
void* const ethosu_base_address = (void*)(NPU0_APB_BASE_NS);
97+
void* const ethosu_base_address = (void*)(NPU0_APB_BASE_S);
9898
#endif
9999

100100
debug("Cache arena: 0x%p\n", get_cache_arena());

cmsis-pack-examples/kws/kws.cproject.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ project:
2626
- group: Wav file based example
2727
for-context:
2828
- +AVH-SSE-300
29-
- +AVH-SSE-310
30-
- +AVH-SSE-315
29+
- +AVH-SSE-300-U55
3130
- +AVH-SSE-300-U65
31+
- +AVH-SSE-310
32+
- +AVH-SSE-310-U55
3233
- +AVH-SSE-310-U65
34+
- +AVH-SSE-315
3335
- +AVH-SSE-315-U65
34-
- +AVH-SSE-300-U55
35-
- +AVH-SSE-310-U55
36+
- +AVH-SSE-320
37+
- +AVH-SSE-320-U85
3638
- +FRDM-K64F
3739

3840
files:
@@ -69,13 +71,18 @@ project:
6971
- +AVH-SSE-310-U65
7072
- +AVH-SSE-315-U65
7173

74+
- file: src/kws_micronet_m_vela_Z256.tflite.cpp
75+
for-context:
76+
- +AVH-SSE-320-U85
77+
7278
- file: src/kws_micronet_m.tflite.cpp
7379
for-context:
7480
- +FRDM-K64F
7581
- +STM32F746-DISCO
7682
- +AVH-SSE-300
7783
- +AVH-SSE-310
7884
- +AVH-SSE-315
85+
- +AVH-SSE-320
7986

8087
- group: Device Files
8188
files:
@@ -84,19 +91,26 @@ project:
8491
- +AVH-SSE-300
8592
- +AVH-SSE-300-U55
8693
- +AVH-SSE-300-U65
94+
8795
- file: linker/mps3-sse-310.sct
8896
for-context:
8997
- +AVH-SSE-310
9098
- +AVH-SSE-310-U55
9199
- +AVH-SSE-310-U65
100+
92101
- file: linker/mps4-sse-315.sct
93102
for-context:
94103
- +AVH-SSE-315
95104
- +AVH-SSE-315-U65
105+
- +AVH-SSE-320
106+
- +AVH-SSE-320-U85
107+
96108
- file: linker/frdm-k64f.sct
97109
for-context: +FRDM-K64F
110+
98111
- file: linker/stm32f746-disco.sct
99112
for-context: +STM32F746-DISCO
113+
100114
- file: linker/alif-e7-m55-he.sct
101115
for-context: +Alif-E7-M55-HE
102116

@@ -115,6 +129,8 @@ project:
115129
- +AVH-SSE-310-U65
116130
- +AVH-SSE-315
117131
- +AVH-SSE-315-U65
132+
- +AVH-SSE-320
133+
- +AVH-SSE-320-U85
118134

119135
- layer: ../device/frdm-k64f/frdm-k64f-device.clayer.yml
120136
for-context:

0 commit comments

Comments
 (0)