xref: /XiangShan/debug/sc_stat.sh (revision 3fce4f48e1f4c43253ff1758dbd05b8b71627990)
1#!/bin/bash
2
3log_dir=$1
4tage_r_sc_r=$(grep "scUpdate" $log_dir | grep "sc(1), tage(1)" -c)
5tage_r_sc_w=$(grep "scUpdate" $log_dir | grep "sc(0), tage(1)" -c)
6tage_w_sc_r=$(grep "scUpdate" $log_dir | grep "sc(1), tage(0)" -c)
7tage_w_sc_w=$(grep "scUpdate" $log_dir | grep "sc(0), tage(0)" -c)
8
9echo $tage_r_sc_w tage right but mispredicted by sc
10echo $tage_w_sc_r tage wrong and rectified by sc
11echo `expr $tage_w_sc_w + $tage_r_sc_r` branches remain unchanged
12
13