Created
October 1, 2015 15:51
-
-
Save bontorhumala/f1e4668adbb0115cc205 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "Total Cycles,Execution Cycles,Stall Cycles,Nops,Executed Operations" > $1 | |
#loop for each variation | |
for i in {2..6}; do | |
../tools/vex-3.43/bin/cc -ms -O4 -fmm=pipe_1_2_fw.mm -o x264 ../Powerstone/src/x264.c | |
sed -i "s/RES: Alu.0 $i/RES: Alu.0 $((i+1))/g" pipe_1_2_fw.mm; | |
./x264 | |
log_name="ta.log.00"$((i-2)) | |
TOTAL_CYCLES=$(awk '($1=="Total")&&($2=="Cycles:"){print $3}' $log_name) | |
EXECUTION_CYCLES=$(awk '($1=="Execution")&&($2=="Cycles:"){print $3}' $log_name) | |
STALL_CYCLES=$(awk '($1=="Stall")&&($2=="Cycles:"){print $3}' $log_name) | |
NOPS=$(awk '($1=="Nops:"){print $2}' $log_name) | |
EXECUTED_OPERATIONS=$(awk '($1=="Executed")&&($2=="operations:"){print $3}' $log_name) | |
echo $TOTAL_CYCLES","$EXECUTION_CYCLES","$STALL_CYCLES","$NOPS","$EXECUTED_OPERATIONS >> $1 | |
done | |
#cleanups | |
sed -i "s/RES: Alu.0 $((i+1))/RES: Alu.0 2/g" pipe_1_2_fw.mm; | |
rm ta.log.* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment