@@ -71,6 +71,12 @@ et_root_dir=$(cd ${script_dir}/../.. && pwd)
7171et_build_dir=${et_root_dir} /cmake-out
7272
7373fvp_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+
7480toolchain_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
@@ -173,13 +178,16 @@ function build_executorch_runner() {
173178 local pte=${1}
174179 if [[ ${target} == * " ethos-u55" * ]]; then
175180 local target_cpu=cortex-m55
181+ local target_board=corstone-300
176182 else
177183 local target_cpu=cortex-m85
184+ local target_board=corstone-320
178185 fi
179186 cd ${script_dir} /executor_runner
180- cmake -DCMAKE_TOOLCHAIN_FILE=${toolchain_cmake} \
187+ cmake -DCMAKE_TOOLCHAIN_FILE=${toolchain_cmake} \
181188 -DTARGET_CPU=${target_cpu} \
182- -DETHOSU_TARGET_NPU_CONFIG=${target} \
189+ -DTARGET_BOARD=${target_board} \
190+ -DETHOSU_TARGET_NPU_CONFIG=${target} \
183191 -B ${executor_runner_path} /cmake-out \
184192 -DETHOS_SDK_PATH:PATH=${ethos_u_root_dir} \
185193 -DET_DIR_PATH:PATH=${et_root_dir} \
@@ -203,9 +211,10 @@ function run_fvp() {
203211 elf=$( find ${executor_runner_path} -name " ${elf_name} " )
204212 [[ ! -f $elf ]] && { echo " [${FUNCNAME[0]} ]: Unable to find executor_runner elf: ${elf} " ; exit 1; }
205213 num_macs=$( echo ${target} | cut -d - -f 3)
214+
206215 if [[ ${target} == * " ethos-u55" * ]]; then
207- echo " Running ${elf} for ${target} run with FVP_Corstone_SSE-300_Ethos-U55 num_macs:${num_macs} "
208- FVP_Corstone_SSE-300_Ethos-U55 \
216+ echo " Running ${elf} for ${target} run with FVP: ${fvp_model} num_macs:${num_macs} "
217+ ${fvp_model} \
209218 -C cpu0.CFGITCMSZ=11 \
210219 -C ethosu.num_macs=${num_macs} \
211220 -C mps3_board.visualisation.disable-visualisation=1 \
@@ -215,6 +224,17 @@ function run_fvp() {
215224 -a " ${elf} " \
216225 --timelimit 120 || true # seconds
217226 echo " [${FUNCNAME[0]} Simulation complete, $? "
227+ elif [[ ${target} == * " ethos-u85" * ]]; then
228+ ${fvp_model} \
229+ -C mps4_board.subsystem.cpu0.CFGITCMSZ=11 \
230+ -C mps4_board.subsystem.ethosu.num_macs=${num_macs} \
231+ -C mps4_board.visualisation.disable-visualisation=1 \
232+ -C vis_hdlcd.disable_visualisation=1 \
233+ -C mps4_board.telnetterminal0.start_telnet=0 \
234+ -C mps4_board.uart0.out_file=' -' \
235+ -C mps4_board.uart0.shutdown_on_eot=1 \
236+ -a " ${elf} " \
237+ --timelimit 120 || true # seconds
218238 else
219239 echo " Running ${elf} for ${target} is not supported"
220240 exit 1
0 commit comments