======== START LECTURE #20 ========

Chapter 7 Memory

Homework: Read Chapter 7

Ideal memory is

We observe empirically

So use a memory hierarchy

  1. Registers
  2. Cache (really L1 L2 maybe L3)
  3. Memory
  4. Disk
  5. Archive

There is a gap between each pair of adjacent levels. We study the cache <---> memory gap

A cache is a small fast memory between the processor and the main memory. It contains a subset of the contents of the main memory.

A Cache is organized in units of blocks. Common block sizes are 16, 32, and 64 bytes.

A hit occurs when a memory reference is found in the upper level of memory hierarchy.

We start with a very simple cache organization.

Example on pp. 547-8.

Address(10)Address(2)hit/missblock#
2210110miss110
2611010miss010
2210110hit110
2611010hit010
1610000mis000
300011miss011
1610000hit000
1810010miss010

The basic circuitry for this simple cache to determine hit or miss and to return the data is quite easy.

Calculate on the board the total number of bits in this cache.

Homework: 7.1 7.2 7.3

Processing a read for this simple cache

Skip section ``handling cache misses'' as it discusses the multicycle and pipelined implementations of chapter 6, which we skipped.

For our single cycle processor implementation we just need to note a few points

Processing a write for this simple cache