Started benchmark script

This commit is contained in:
lcbcFoo 2018-04-15 22:05:11 -03:00
parent 91ecf18860
commit d3f0c7827f
6 changed files with 52 additions and 10 deletions

View file

@ -1,7 +1,7 @@
################################################################################
#
# Author: Lucas Castro
# Last modification: march/2018
# Last modification: april/2018
#
# Makefile for running programs on ReonV
#
@ -96,6 +96,8 @@ x86: $(X86)
@echo "Generated x86 to check correct output"
bench: tests x86
chmod +x tools/run_bench.sh
tools/run_bench.sh $(GRMON) $(GRMON_OPTIONS)
grmon_run :
$(GRMON) $(GRMON_OPTIONS) -c grmon_script.txt -log grmon_log.txt -abaud 115200 > /dev/null

View file

@ -1,4 +0,0 @@
bload wcet_benchmark/bsort.out
ep 0x40001000
quit

View file

@ -1,5 +0,0 @@
bload wcet_benchmark/insertsort.out
ep 0x40001000
run
dump -binary 0x44000000 1 ../../riscv/res.bin
quit

4
riscv/tools/grmon_norun Normal file
View file

@ -0,0 +1,4 @@
bload wcet_benchmark/ud.out
ep 0x40001000
dump -binary 0x44000000 1 res.bin
quit

5
riscv/tools/grmon_run Normal file
View file

@ -0,0 +1,5 @@
bload wcet_benchmark/ud.out
ep 0x40001000
bload wcet_benchmark/ud.out
dump -binary 0x44000000 1 res.bin
quit

40
riscv/tools/run_bench.sh Executable file
View file

@ -0,0 +1,40 @@
#!/bin/sh
################################################################################
#
# Author: Lucas Castro
# Last modification: april/2018
#
# Bash script for running benchmark programs on ReonV
#
################################################################################
echo $@
if [ ! -d "wcet_benchmark" ]; then
echo "Benchmark repository not found!"
exit
else
echo "Beginning benchmarks"
fi
for input in `ls -1 wcet_benchmark/*.out`; do
echo "Running:" ${input}
rm -f tools/grmon_norun tools/grmon_run
# Generate grmon_norun
echo "bload " ${input} >> tools/grmon_norun
echo "ep 0x40001000" >> tools/grmon_norun
echo "dump -binary 0x44000000 1 res.bin" >> tools/grmon_norun
echo "quit" >> tools/grmon_norun
# Generate grmon_run
echo "bload " ${input} >> tools/grmon_run
echo "ep 0x40001000" >> tools/grmon_run
echo "bload " ${input} >> tools/grmon_run
echo "dump -binary 0x44000000 1 res.bin" >> tools/grmon_run
echo "quit" >> tools/grmon_run
output="${input#wcet_benchmark/}"
output="${output%.out}"
norun_time=$(time $@ -c tools/grmon_norun -log tools/grmon_${output}_log.txt -abaud 115200 > /dev/null)
run_time=$(time $@ -c tools/grmon_run -log tools/grmon_${output}_log.txt -abaud 115200 > /dev/null)
done