-
Notifications
You must be signed in to change notification settings - Fork 3
/
inject_output.sh
executable file
·33 lines (28 loc) · 1.08 KB
/
inject_output.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
bench_home="/home/yohan/miBench"
case "$2" in
susan )
bench="automotive/susan/susan_$1"
options="$bench_home/automotive/susan/input_small.pgm $2/$6/result_$8 -e"
;;
jpeg )
bench="consumer/jpeg/jpeg-6a/cjpeg_$1"
options="-dct int -progressive -opt -outfile $2/$6/result_$8 $bench_home/consumer/jpeg/input_small.ppm"
esac
protection=no_protection # Protection scheme to be used
vul_analysis=no # Enable/Disable vulnerability analysis
cpu_type=MinorCPU # CPU Type
num_procs=1 # Number of processors
gemv_exec_path=./build/$1/gem5.opt # Path to gemv executable
config_path=./configs/example/se.py # Path to config file
$gemv_exec_path -d $2/$6 -re --stdout-file=simout_$5 --stderr-file=simerr_$5 --debug-file=FI_$5 --stats-file=stats_$5 --debug-flags=FI $config_path --cpu-type=$cpu_type --caches -n $num_procs -c "$bench_home/$bench" -o "$options" --injectArch=$6 --injectTime=$3 --injectLoc=$4 -m $7
if cmp -s ./$2/$6/result_$8 golden_output_$2
then
if cmp -s ./$2/$6/stats_$5 bin.txt
then
echo "F $3 $4"
else
echo "NF $3 $4"
fi
else
echo "F $3 $4"
fi