xref: /XiangShan/debug/sc_stat.sh (revision 6b98bdcb11eecf38e2b26aebf795186e8b7e900f)
13fce4f48SLingrui98#!/bin/bash
23fce4f48SLingrui98
33fce4f48SLingrui98log_dir=$1
4*6b98bdcbSLingrui98tage_w_sc_w=$(grep "scUpdate" $log_dir | grep "sc(1), tage(1)" -c)
5*6b98bdcbSLingrui98tage_w_sc_r=$(grep "scUpdate" $log_dir | grep "sc(0), tage(1)" -c)
6*6b98bdcbSLingrui98tage_r_sc_w=$(grep "scUpdate" $log_dir | grep "sc(1), tage(0)" -c)
7*6b98bdcbSLingrui98tage_r_sc_r=$(grep "scUpdate" $log_dir | grep "sc(0), tage(0)" -c)
83fce4f48SLingrui98
93fce4f48SLingrui98echo $tage_r_sc_w tage right but mispredicted by sc
103fce4f48SLingrui98echo $tage_w_sc_r tage wrong and rectified by sc
11*6b98bdcbSLingrui98echo `expr $tage_w_sc_w + $tage_r_sc_r` branches remain unchanged, in which $tage_w_sc_w are wrong
123fce4f48SLingrui98
13