Skip to content

Commit cbb9cea

Browse files
committed
Arm Backend: Expose PMU trace output from FVP run
Change-Id: I2c7d202e81ac81f98561904ad14bfcf2b0071bb6
1 parent d43cde5 commit cbb9cea

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

backends/arm/scripts/run_fvp.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ data_file=""
2222
target="ethos-u55-128"
2323
timeout="600"
2424
etrecord_file=""
25+
trace_file=""
2526

2627
help() {
2728
echo "Usage: $(basename $0) [options]"
@@ -31,6 +32,7 @@ help() {
3132
echo " --target=<TARGET> Target to build and run for Default: ${target}"
3233
echo " --timeout=<TIME_IN_SEC> Maximum target runtime, used to detect hanging, might need to be higer on large models Default: ${timeout}"
3334
echo " --etrecord=<FILE> If ETDump is used you can supply a ETRecord file matching the PTE"
35+
echo " --trace_file=<FILE> File to write PMU trace output to"
3436
exit 0
3537
}
3638

@@ -42,6 +44,7 @@ for arg in "$@"; do
4244
--target=*) target="${arg#*=}";;
4345
--timeout=*) timeout="${arg#*=}";;
4446
--etrecord=*) etrecord_file="${arg#*=}";;
47+
--trace_file=*) trace_file="${arg#*=}";;
4548
*)
4649
;;
4750
esac
@@ -86,13 +89,22 @@ fi
8689

8790
log_file=$(mktemp)
8891

92+
extra_args_u55=()
93+
extra_args_u85=()
94+
95+
if [[ -n "${trace_file}" ]]; then
96+
extra_args_u55+=(-C "ethosu.extra_args=--pmu-trace ${trace_file}")
97+
extra_args_u85+=(-C "mps4_board.subsystem.ethosu.extra_args=--pmu-trace ${trace_file}")
98+
fi
99+
89100
if [[ ${target} == *"ethos-u55"* ]]; then
90101
${nobuf} ${fvp_model} \
91102
-C ethosu.num_macs=${num_macs} \
92103
-C mps3_board.visualisation.disable-visualisation=1 \
93104
-C mps3_board.telnetterminal0.start_telnet=0 \
94105
-C mps3_board.uart0.out_file='-' \
95106
-C mps3_board.uart0.shutdown_on_eot=1 \
107+
"${extra_args_u55[@]}" \
96108
-a "${elf_file}" \
97109
${data_file} \
98110
--timelimit ${timeout} 2>&1 | sed 's/\r$//' | tee ${log_file} || true # seconds
@@ -105,6 +117,7 @@ elif [[ ${target} == *"ethos-u85"* ]]; then
105117
-C mps4_board.telnetterminal0.start_telnet=0 \
106118
-C mps4_board.uart0.out_file='-' \
107119
-C mps4_board.uart0.shutdown_on_eot=1 \
120+
"${extra_args_u85[@]}" \
108121
-a "${elf_file}" \
109122
${data_file} \
110123
--timelimit ${timeout} 2>&1 | sed 's/\r$//' | tee ${log_file} || true # seconds

0 commit comments

Comments
 (0)