Lectures‎ > ‎

Week10

Cache Memory

Basic idea: a small, fast memory that holds recently used values.

What we need:
- A way to see if a value is in the cache.
- A way to remove a value if there is a conflict

Caches can be unified or split. Unified means the cache holds both instructions and data, split means you have a separate cache for instructions and a separate cache for data.

Caches usually have a block size, for now we will assume the block size is one word (4 bytes) and a total number of blocks.

Three basic types of caches:
- Direct Mapped
- Fully Associative
- Set Associative

Direct Mapped

Consider an 4 block direct mapped cache.

Draw picture:

Draw address:

Parts: tag and byte offset

Cache implementation: valid bit, tag, data value.

Fully Associative


Set Associative


Some Additional Cache Considerations


Comments