forked from TeCSAR-UNCC/gem5-SALAM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
systemValidation.sh
executable file
·81 lines (71 loc) · 1.61 KB
/
systemValidation.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
FLAGS="HWACC"
BENCH=""
DEBUG="false"
PRINT_TO_FILE="false"
while getopts ":b:f:dp" opt
do
case $opt in
b )
BENCH=${OPTARG}
;;
d )
DEBUG="true"
;;
p )
PRINT_TO_FILE="true"
;;
f )
FLAGS+=",${OPTARG}"
;;
* )
echo "Invalid argument: ${OPTARG}"
echo "Usage: $0 -b BENCHMARK (-f DEBUGFLAG) (-p) (-d)"
exit 1
;;
esac
done
if [ "${BENCH}" == "" ]; then
echo "No benchmark specified."
echo "Usage: $0 -b BENCHMARK (-f DEBUGFLAG) (-p) (-d)"
exit 2
fi
if [ "${DEBUG}" == "true" ]; then
BINARY="ddd --gdb --args ${M5_PATH}/build/ARM/gem5.debug"
else
BINARY="${M5_PATH}/build/ARM/gem5.opt"
fi
KERNEL=$M5_PATH/benchmarks/sys_validation/$BENCH/sw/main.elf
SYS_OPTS="--mem-size=4GB \
--mem-type=DDR4_2400_8x8 \
--kernel=$KERNEL \
--disk-image=$M5_PATH/baremetal/common/fake.iso \
--machine-type=VExpress_GEM5_V1 \
--dtb-file=none --bare-metal \
--cpu-type=DerivO3CPU"
CACHE_OPTS="--caches --l2cache"
OUTDIR=BM_ARM_OUT/sys_validation/$BENCH
RUN_SCRIPT="$BINARY --debug-flags=$FLAGS --outdir=$OUTDIR \
configs/SALAM/sys_validation.py $SYS_OPTS \
--accpath=$M5_PATH/benchmarks/sys_validation \
--accbench=$BENCH $CACHE_OPTS"
if [ "${PRINT_TO_FILE}" == "true" ]; then
mkdir -p $OUTDIR
$RUN_SCRIPT > ${OUTDIR}/debug-trace.txt
else
$RUN_SCRIPT
fi
# Debug Flags List
#
# IOAcc
# ClassDetail
# CommInterface
# ComputeUnit
# LLVMInterface
# ComputeNode
# LLVMRegister
# LLVMOp
# LLVMParse
# LLVMGEP
# LLVMRuntime == ComputeNode + LLVMRegister + LLVMOp + LLVMParse
# NoncoherentDma - bfs, fft, gemm, md-knn, nw, spmv