Ch4 CacheMemory
Ch4 CacheMemory
Cache Memory
Computer
Architecture
Memory Connection to CPU
• Assignment solution:
Assume that a computer system needs 512 bytes of RAM and
512 bytes of ROM. The available capacity of RAM chip is 128 x
8 and available capacity of ROM chip is 512 x 8. Each RAM and
ROM chip has 2 chip select lines (one active high and the other
active low).
Solution
▪ Required RAM Module: 512 x 8-bit
▪ Available RAM chips: 128 x 8-bit
▪ Required RAM Chips: 4 chips.
▪ Required ROM Module: 512 x 8-bit
▪ Available ROM chips: 512 x 8-bit
▪ Required ROM Chips: 1 ROM chip.
Memory Connection to CPU
Outline
▪ Introduction
▪ Memory Types
▪ The Memory Hierarchy
▪ Cache Memory (Mapping function)
▪ Cache Replacement policies
▪ References.
4.1 Introduction
14
Direct Mapping Scheme
16
Direct Mapping Scheme
17
Fully Associative Scheme
21
Set Associative Scheme
22
Set Associative Scheme
23
Cache Replacement Policies