Skip to content

Commit 3db491c

Browse files
committed
Enable Ethos-U85 and Corstone-320 in Arm run.sh flow
Signed-off-by: Rob Elliott <robert.elliott@arm.com>
1 parent b614236 commit 3db491c

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

examples/arm/run.sh

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ et_root_dir=$(cd ${script_dir}/../.. && pwd)
7171
et_build_dir=${et_root_dir}/cmake-out
7272

7373
fvp_model=FVP_Corstone_SSE-300_Ethos-U55
74+
if [[ ${target} =~ "ethos-u85" ]]
75+
then
76+
echo "target is ethos-u85 variant so switching to CS320 FVP"
77+
fvp_model=FVP_Corstone_SSE-320
78+
fi
79+
7480
toolchain_cmake=${script_dir}/ethos-u-setup/arm-none-eabi-gcc.cmake
7581
_setup_msg="please refer to ${script_dir}/ethos-u-setup/setup.sh to properly install necessary tools."
7682

@@ -82,8 +88,7 @@ function generate_pte_file() {
8288

8389
local model_filename=${model}_arm_${target}.pte
8490
if [[ "${model_compiler_flags}" == *"--delegate"* ]]; then
85-
# Name aligned with default aot_arm_compiler output - run.sh only supports
86-
# running on Corstone-300 with Ethos-U55 FVP at the moment.
91+
# Name aligned with default aot_arm_compiler output
8792
model_filename=${model}_arm_delegate_${target}.pte
8893
fi
8994
cd $et_root_dir
@@ -174,13 +179,16 @@ function build_executorch_runner() {
174179
local pte=${1}
175180
if [[ ${target} == *"ethos-u55"* ]]; then
176181
local target_cpu=cortex-m55
182+
local target_board=corstone-300
177183
else
178184
local target_cpu=cortex-m85
185+
local target_board=corstone-320
179186
fi
180187
cd ${script_dir}/executor_runner
181-
cmake -DCMAKE_TOOLCHAIN_FILE=${toolchain_cmake} \
188+
cmake -DCMAKE_TOOLCHAIN_FILE=${toolchain_cmake} \
182189
-DTARGET_CPU=${target_cpu} \
183-
-DETHOSU_TARGET_NPU_CONFIG=${target} \
190+
-DTARGET_BOARD=${target_board} \
191+
-DETHOSU_TARGET_NPU_CONFIG=${target} \
184192
-B ${executor_runner_path}/cmake-out \
185193
-DETHOS_SDK_PATH:PATH=${ethos_u_root_dir} \
186194
-DET_DIR_PATH:PATH=${et_root_dir} \
@@ -205,9 +213,10 @@ function run_fvp() {
205213
elf=$(find ${executor_runner_path} -name "${elf_name}")
206214
[[ ! -f $elf ]] && { echo "[${FUNCNAME[0]}]: Unable to find executor_runner elf: ${elf}"; exit 1; }
207215
num_macs=$(echo ${target} | cut -d - -f 3)
216+
208217
if [[ ${target} == *"ethos-u55"* ]]; then
209-
echo "Running ${elf} for ${target} run with FVP_Corstone_SSE-300_Ethos-U55 num_macs:${num_macs}"
210-
FVP_Corstone_SSE-300_Ethos-U55 \
218+
echo "Running ${elf} for ${target} run with FVP:${fvp_model} num_macs:${num_macs}"
219+
${fvp_model} \
211220
-C cpu0.CFGITCMSZ=11 \
212221
-C ethosu.num_macs=${num_macs} \
213222
-C mps3_board.visualisation.disable-visualisation=1 \
@@ -217,6 +226,17 @@ function run_fvp() {
217226
-a "${elf}" \
218227
--timelimit 120 || true # seconds
219228
echo "[${FUNCNAME[0]} Simulation complete, $?"
229+
elif [[ ${target} == *"ethos-u85"* ]]; then
230+
${fvp_model} \
231+
-C mps4_board.subsystem.cpu0.CFGITCMSZ=11 \
232+
-C mps4_board.subsystem.ethosu.num_macs=128 \
233+
-C mps4_board.visualisation.disable-visualisation=1 \
234+
-C vis_hdlcd.disable_visualisation=1 \
235+
-C mps4_board.telnetterminal0.start_telnet=0 \
236+
-C mps4_board.uart0.out_file='-' \
237+
-C mps4_board.uart0.shutdown_on_eot=1 \
238+
-a "${elf}" \
239+
--timelimit 120 || true # seconds
220240
else
221241
echo "Running ${elf} for ${target} is not supported"
222242
exit 1

0 commit comments

Comments
 (0)