Memory and Interface
Memory and Interface
L8: Memories
Memory Organization
Memory stores information such as instructions and data
in binary format (0 and 1). It provides this information to
the microprocessor whenever it is needed.
Memory hierarchy in a computer system
Main Memory: memory unit that communicates
directly with the CPU (RAM)
Auxiliary Memory: device that provide backup storage
(Disk Drives)
Cache Memory: special very-high-speed memory to
increase the processing speed (Cache RAM)
Memory Organization Cont.
Semiconductor Memories
Semiconductor memories are made from silicon, unlike
hard-disk drive memory which are magnetics and optics
Main Difference between Memory Technologies:
RAM:
Data can be read and written but data stored is volatile, i.e. need
power to retain data
ROM:
Data in ROMs are typically pre-configured. Data can only be
read, and the data stored is not volatile, i.e. don’t need power to
retain data
Flash:
Data can be read and written, and data stored is not volatile, i.e.
don’t need power to retain data
ROM
ROM is used to store data that never (or rarely) changed
Data in ROMs are retained even when power is not
supplied – main advantage of ROM
Data in ROMs are typically pre-configured using
specialized equipment
ROM is used as Bootstrap Loader; A program whose
function is to start the computer software operating when
power is turned on
RAM
RAM is a temporary data storage
RAM does not retain its stored data when no power is applied
When a data unit is written into a given address in the RAM,
the data unit previously stored at that address is replaced by
the new unit
When a data unit is read at a given address, the data unit that
is read remains there
There are two types of RAM
Static RAM (SRAM) The difference is how each
Dynamic RAM (DRAM) cell is designed
SRAM vs DRAM
SRAM uses a latch to store 1 bit in cell while DRAM uses a
capacitor to store 1 bit in a cell
Therefore, SRAM is more expensive to implement, i.e.
requires more logic gates per cell compared to DRAM
Because SRAM uses a latch, it works faster than DRAM that
requires the capacitor to be periodically refreshed
SRAM is typically implemented in high speed CPU cache
memory, while DRAM is implemented in main memory
Flash Memory
Flash memory is the closest to the ideal memory:
capable of high storage capacity
retains data when power off
ability to erase and reprogram at will
fast operation
Cheap
Flash memory cell is designed using floating gate MOS
transistor
Computer Memories & Semiconductor
Memories
Source: http://www.vlsifacts.com/classification-of-semiconductor-memories-and-computer-memories/
Size & Dimension of Memory
Size of semiconductor memories is represented in bits
For example, an 8x4 ROM is capable of storing
32 bits
For a 32x8 RAM, how many address line and data lines?
Address Line = 5, data line = 8
The 8085 and Memory
The 8085 has 16 address lines. That means it can address
216 = 64K memory locations
Then it will need 1 memory chip with 64 K locations, or 2 chips with
32 K in each, or 4 with 16 K each or 16 of the 4 K chips, etc.
RD WR
A0
A1
CS
RD WR RD WR RD WR RD WR
A0 A0 A0 A0
A1 A1 A1 A1
CS CS CS CS
A0
A1
A2 2x4
A3 Decoder
Memory Map and Addresses
The memory map is a picture representation of the address
range and shows where the different memory chips are
located within the address range.
Now the chip would have addresses ranging from: 2400 to 27FF.
Changing the combination of the address bits connected to the chip
select changes the address range for the memory chip.
Chip Select Example Cont.
To illustrate this with a picture:
In the first case, the memory chip occupies the piece of the memory
map identified as before.
In the second case, it occupies the piece identified as after.
High-Order vs. Low-Order Address Lines
The address lines of a microprocessor can be classified into two
types:
High-Order
Used for memory chip selection
Low-Order
Used for location selection within a memory chip.