Average Access Time for Cache
The average access time for the cache, denoted as $T_{\text{av}}$, is given by:
$$ T_{\text{av}} = (R_\text{hit} \cdot T_{\text{hit}}) + (R_\text{miss} \cdot T_{\text{miss}}) $$
The hit rate $R_{\text{hit}}$ is typically given. To find the miss rate, use:
$$ R_\text{miss} = 1 - R_\text{hit} $$
The hit time $T_{\text{hit}}$ includes the cache data access time and hit determination time.
The miss penalty $T_{\text{miss}}$ is calculated as:
$$ T_{\text{miss}} = T_{\text{br}} + T_{\text{hit}} $$
where $T_{\text{br}}$ is the time to replace the block.
Block Replacement Time
The block replacement time can be expressed as:
$$ T_{\text{br}} = (T_{\text{addr}} + T_{\text{bt}})(L + BRR) $$
Block Transfer Time
The block transfer time $T_{\text{bt}}$ can be determined by:
$$ T_{\text{bt}} = \text{\# of words} \cdot t_{\text{bus}} $$
where $t_{\text{bus}}$ is the bus clock cycle. If main memory is based on DDR-SDRAM, the block transfer time is divided by $2$.
$$ T_{\text{bt}} = \text{\# of words} \cdot\frac{t_{\text{bus}}}{2} $$
Unit Conversion
Bit ($\text{b}$)
$$ 1\;\text{b} = 2^0\;\text{b} $$
Byte ($\text{B}$)
$$ 1\;\text{B} = 8\;\text{b} = 2^3\;\text{b} $$
For the following sample midterm, I will go over them and provided my own explanations as to how to go about solving them and how the following equations are derived.