Memory

There is a trade-off among the three key characteristics of memory: namely, capacity, access time, and cost

Memory Hierarchy:

The design constraints on a computer’s memory can be summed up by three questions: How much? How fast? How expensive?

As one goes down the hierarchy, the following occur:

  1. Decreasing cost per bit
  2. Increasing capacity
  3. Increasing access time
  4. Decreasing frequency of access to the memory by the processor

Thus, smaller, more expensive, faster memories are supplemented by larger, cheaper, slower memories. The key to the success of this organization is the decreasing frequency of access at lower levels.

Summary

The fastest, smallest, and most expensive type of memory consists of the registers internal to the processor. Typically, a processor will contain a few dozen such registers, although some processors contain hundreds of registers. Skipping down two levels, main memory is the principal internal memory system of the computer. Each location in main memory has a unique address, and most machine instructions refer to one or more main memory addresses. Main memory is usually extended with a higher-speed, smaller cache. The cache is not usually visible to the programmer or, indeed, to the processor. It is a device for staging the movement of data between main memory and processor registers to improve performance.

The three forms of memory just described are, typically, volatile and employ semiconductor technology.

External, nonvolatile memory is also referred to as secondary memory or auxiliary memory.

A hard disk is also used to provide an extension to main memory known as virtual memory.

  • Memory constraints in memory:
    • Amount
    • Speed
    • Expense
  • Memory must be able to “keep u” with processor
  • Memory cost must be reasonable

Direct Memory Access

  • Traversing the hierarchy
    • Decreasing cost per bit
    • Increasing capacity
    • Increasing access time
    • Decreasing frequency of access

Modern Processors: Processor Large number of bits.

Different kinds of memory found on embedded processor:

Misaligned Memory

M[address] M[R[rsl]+Imm] (7:0) meaning 7 down to 0 (specifying which byte to take)

Smaller memory is faster. Instruction cache vs memory cache?

SRAM memory module

  • Address: the address going in, which address we are writing to OR the address we are reading from
  • Din[15-0]: data to be written to the SRAM
  • Dout[15-0]: output data if we are reading
  • Ignore chip select
  • Output enable: allows ot read from memory
  • Write enable: write signals