| Performance |
\(Execution Time = \frac{IC \times CPI}{Clock Rate}\) |
Iron Law of Performance |
|
\(Speedup = \frac{T_{old}}{T_{new}}\) |
Amdahl's Law also applies |
| Pipelining |
\(Speedup = \frac{N \cdot k}{k + (N-1)}\) |
\(k\)=stages, \(N\)=instructions |
|
Ideal CPI = 1 |
Stalls increase CPI > 1 |
|
Hazards: Structural (Hardware), Data (Dependency), Control (Branch) |
|
| Cache |
\(AMAT = H_{time} + (MissRate \times MissPenalty)\) |
Hierarchy performance |
|
\(Index = \log_2(\frac{CacheSize}{BlockSize \times Assoc})\) |
Set Index bits |
|
\(Offset = \log_2(BlockSize)\) |
Byte offset bits |
|
\(Tag = AddrBits - Index - Offset\) |
|
| Addressing |
PC-Relative: \(Target = PC + Offset\) |
Used in Branch/Jumps |
|
Base-Register: \(Target = Base + Offset\) |
Used in Array/Struct access |
| I/O |
Memory Mapped: Registers have memory addresses |
Same instructions for Mem/IO |
|
Isolated I/O: Separate address space |
Special IN/OUT instructions |
| DMA |
CPU initializes, DMA transfers block, Interrupts on completion |
Cycle Stealing vs Burst Mode |