simulation-run.fish (908B)
1 #!/bin/fish 2 3 date 4 module load questa/10v7a 5 6 set root $PWD 7 set defconf config/default.mk 8 set result "$root/results.csv" 9 10 rm -f $defconf 11 12 echo 'NR_LANES;VLEN;datalayout;order;M;K;cycles' > $result 13 14 for nrl in 2 4 8 16 15 for vl in 512 1024 2048 4096 16 # Write config 17 echo "nr_lanes ?= $nrl" > $defconf 18 echo "vlen ?= $vl" >> $defconf 19 # Compile binary 20 cd apps 21 rm -f gfdmrv/src/gfdrmv.c.o 22 rm -f gfdmrv/data.S.o 23 make bin/gfdmrv 24 make bin/gfdmrv 25 cd $root 26 #Run simulation 27 cd hardware 28 app=gfdmrv timeout -s KILL 1h make simc 29 grep "~~~~~" build/transcript 30 if set resline (grep "~~~~~" build/transcript) 31 echo $resline | sed "s/# ~~~~~/$nrl;$vl;/" >> $result 32 else 33 echo "Something went wrong for NR_LANES $nrl and VLEN $vl" 34 end 35 cd $root 36 end 37 end 38 39 date