diff --git a/tools/plot.sh b/tools/plot.sh index b2a1302..ea046a7 100755 --- a/tools/plot.sh +++ b/tools/plot.sh @@ -22,9 +22,13 @@ jq -r '.Cycles[]| [.C,.L1,.VDI]|@csv' -- "$IN" > "$CSV_FILE" BASE_GNUPLOT_OPTIONS="set datafile separator ',';set term svg;set output \"${OUT}\";" +parse_cache_size(){ + CACHE_SIZE=$(jq -r .L1_size -- "$IN") +} + case "$2" in "cache_time") - CACHE_SIZE=$(jq -r .L1_size -- "$IN") + parse_cache_size gnuplot -e "${BASE_GNUPLOT_OPTIONS}\ set xlabel \"Clock cycles\";\ set ylabel \"Cache utilisation (bytes)\";\ @@ -32,13 +36,15 @@ set offsets 0, 0, 3, 1;\ set ytics 0,1,$((CACHE_SIZE-1));\ unset colorbox;\ set ytics add (\"Valid\" -1);\ +set grid ytics;\ +set yrange [-2:${CACHE_SIZE}];\ set palette model RGB defined ( 0 'red', 1 'green' );\ -plot '${CSV_FILE}' using 1:2 with lines notitle ,\ +plot '${CSV_FILE}' using 1:2 with histeps notitle ,\ '${CSV_FILE}' using 1:(-0.75):(0):(-0.5):3 with vectors nohead palette notitle" ;; "cache_util_freq") - CACHE_SIZE=$(jq -r .L1_size -- "$IN") + parse_cache_size gnuplot -e "${BASE_GNUPLOT_OPTIONS}\ set xlabel \"Utilisation (bytes)\";\ set ylabel \"Occurrences\";\