#!/bin/bash

if [[ "$#" -ne 1 ]]; then
    echo "Provide experiment name as argument"
    exit;
fi




# 
ROOT=../../../
OUT_DIR="m5out/$1"


echo ""
echo ""
$ROOT/build/ARM/gem5.opt -d ./$OUT_DIR ./main.py
echo ""
echo "#### GREP'd REPORT ####"
grep -E "sim_insts|sim_ticks|system.l2cache.overall_misses::total|system.mem_ctrl.bw_read::total|system.cpu.icache.overall_misses::total|system.cpu.dcache.overall_misses::total" "m5out/$1/stats.txt"
