現在我正在學習simplescalar源代碼。但是我對預測模塊感到困惑。這是關於雙模預測器。 這裏是初始化: case BPred2bit:
if (!l1size || (l1size & (l1size-1)) != 0)
fatal("2bit table size, `%d', must be non-zero and a power of two",
l
我已經計算了一個包含緩存未命中率(mr)與緩存大小(sc)的圖。如何計算各種緩存大小的CPI(每條指令週期)。 假設是: Given cache miss latency (say 10) ,
base CPI of 1 and
33.33% of instructions as memory operations.
我的理解是,CPI可以用下面的公式來計算。下面的方法是否正確? CPI