Chapter 3-Top Level View and Cache Memory-1
Chapter 3-Top Level View and Cache Memory-1
COMPUTER
FUNCTION
ABEBE A. FEBRUARY, 2021
INTRODUCTION
• Consider a processor:
• Containing a single data register, called an
accumulator (AC).
• Both instructions and data are 16 bits long;
• Convenient to organize memory using 16-bit
words;
EXAMPLE
• In textual form:
• The PC contains value 300, the address of the first instruction.
• This instruction (the value 1940 in hexadecimal) is loaded into the instruction register
IR, and the PC is incremented;
• The first 4 bits (first hexadecimal digit) in the IR indicate that the AC is to be loaded.
• The remaining 12 bits (three hexadecimal digits) specify the address (940) from
which data are to be loaded.
• The next instruction (5941) is fetched from location 301, and the PC is incremented.
• The old contents of the AC and the contents of location 941 are added, and the result is
stored in the AC.
• The next instruction (2941) is fetched from location 302, and the PC is incremented.
• The contents of the AC are stored in location 941.
CLASS WORK
• The data bus may consist of 32, 64, 128, or even more separate
lines:
• a.k.a. width of the data bus;
•System bus:
• where the main memory module is attached;
• that also connects to the cache;
• Multiplexing advantage:
• use of fewer lines, which saves space and, usually,
cost.
• Multiplexing disadvantage:
• more complex circuitry is needed within each module;
• potential reduction in performance:
• certain events that share the same lines cannot take
place in parallel.
ELEMENTS OF BUS DESIGN – READING ASSIGNMENT
Typically:
• Higher performance → higher cost;
• Lower performance → lower cost
INTRODUCTION
• Unity of transfer:
• For internal memory, the unit of transfer is equal to the
number of electrical lines into and out of the memory
module.
• This may be equal to the word length, but is often larger,
such as 64,128,or 256 bits.
• To clarify this point, consider three related concepts for
internal memory:
CHARACTERISTICS OF MEMORY SYSTEMS
• Word:
• The “natural” unit of organization of memory.
• The size of the word is typically equal to the number of bits used to represent an integer and to the
instruction length.
• there are many exceptions.
• Addressable units:
• the addressable unit is the word.
• However, many systems allow addressing at the byte level.
• In any case, the relationship between the length in bits A of an address and the number N of
addressable units is N.
• Unit of transfer:
• this is the number of bits read out of or written into memory at a time.
• The unit of transfer need not equal a word or an addressable unit.
• For external memory,
CHARACTERISTICS OF MEMORY SYSTEMS
• Performance:
• Access time ( latency ):
• For RAM: time to perform a read or write operation;
• For Non-RAM: time to position the read-write head at desired location;
• Memory cycle time: Primarily applied to RAM:
• Access time + additional time required before a second access;
• Required for electrical signals to be terminated/regenerated;
• Concerns the system bus.
CHARACTERISTICS OF MEMORY SYSTEMS
• Physical characteristics:
• Volatile: information decays naturally or is lost when powered off;
• Nonvolatile: information remains without deterioration until
changed:
• no electrical power is needed to retain information.;
• E.g.: Magnetic-surface memories are nonvolatile;
• Semiconductor memory (memory on integrated circuits) may be
either volatile or nonvolatile.
MEMORY HIERARCHY
This principle can be applied across more than two levels of memory:
• Processor registers:
• Fastest, smallest, and most expensive type of memory
• Followed immediately by the cache:
• Stages data movement between registers and main memory;
• Improves performance;
• Is not usually visible to the processor;
• Is not usually visible to the programmer.
• Followed by main memory:
• Principal internal memory system of the computer;
• Each location has a unique address
CACHE MEMORY PRINCIPLES
Typically:
• Higher performance → higher cost;
• Lower performance → lower cost
INTERNAL MEMORY
ABEBE A. JUNE, 2019
INTRODUCTION
• Assume:
• • CPU with a clock frequency of 50 Mhz;
• • Memory access time: 65ns;
• • Memory write time: 75ns
• How many clock pulses do we need for read / write operations?
EXAMPLE (2/7)
• Write operation:
• 1 Voltage signal is applied to the bit line
• • Low voltage = 0;
• • High voltage = 1;
• 2 A signal is then applied to the address line:
• • transistor closes...
• • ...charge goes to the capacitor
• How do you think a read operation works?
DYNAMIC RAM (DRAM)
• Read operation:
• 1 Address line is activated
• 2 Transistor turns on
• 3 Capacitor charge goes to bit line...;
• • ...Low voltage = 0
• • ...High voltage = 1
• 4 Cell readout discharges the capacitor:
• • state must be restored;
• Do you have any idea of other type of technology that
can be employed?
STATIC RAM (SRAM)
• • DRAMs:
• • Periodically refresh capacitor’s charge;
• • SRAM:
• • No need to periodically refresh;
DRAM VS SRAM
•
READ-ONLY MEMORY (ROM)