Professional Documents
Culture Documents
Memory
Memory
1
Address Lines
2
Data Lines
• Data Connections: All memory devices have a set of data output pins (for ROM
devices), or input/output pins (for RAM devices).
– Most RAM chips have common bi-directional I/O connections.
– Most memory devices have 1, 8 or 16 data lines.
3
Control Lines
• Enable Connections:
– All memory devices have at least one Chip Select (CS) or Chip Enable (CE)
input, used to select or enable the memory device.
• If a device is not selected or enabled then no data can be read from, or
written into it.
• The CS or CE input is usually controlled by the microprocessor through the
higher address lines via an address decoding circuit.
• Control Connections:
– RAM chips have two control input signals that specify the type of memory
operation: the Read (RD) and the Write (WR) signals.
• Some RAM chips have a common Read/ Write (R/W) signal.
– ROM chips can perform only memory read operations, thus there is no need
for a Write (WR) signal.
• In most real ROM devices the Read signal is called the Output Enable
(OE) signal.
4
Memory Read Operations
• A memory read operation is carried out in the following steps:
– The processor loads on the Address bus the address of the memory location to be read (Step 1).
• Some of the address lines select the memory devices that owns the memory location
to be read (Step 1a), while the rest point to the required memory location within the
memory device.
– The processor activates the Read (RD) signal (Step 2).
• The selected memory device loads on the data bus the content of the memory
location specified by the address bus (Step 3).
– The processor reads the data from the data bus, and resets the RD signal (Step 4).
Clock T1 T2 T3
Chip Enable
Read (RD)
5
Memory Write Operations
• A memory write operation is carried out in the following steps:
– The processor loads on the Address bus the address of the memory location (Step 1).
• Some of the address lines select the memory devices that owns the memory location
to be written (Step 1a), while the rest point to the required memory location within
the memory device.
– The processor loads on the data bus the data to be written (Step 2).
– The processor activates the Write (WR) signal (Step 3).
• The data at the data bus is stored in the memory location specified by the address
bus (Step 4).
Clock T1 T2 T3
Chip Enable
Write (WR)
Step 2
Step 1
Step 4
Step 1a Step 3
6
Types of semiconductor memory devices: EPROM
• EPROM is a type of ROM that can be erased and re-programmed. There are two types
of EPROMs: the ultra-violet (UV-EPROMs) and the electrically erasable (EEPROMs)
often called the flash memory.
• UV-EPROMs are erased by inserting the device in ultra violet light and programmed
using a special EPROM programmer. UV-EPROMs need to be removed from the PCB
in order to erased and programmed.
• The most common family of EPROMs is the 27XXX series, or the CMOS 27CXXX
where XXX indicates the memory capacity in Kbits. Some members of this family are
the following:
2716/27C16 (2Kx8) 2732/27C16 (4Kx8)
2764/27C64 (8Kx8) 27128/27C128 (16Kx8)
27256/27C256 (32Kx8) 27512/27C512 (64Kx8)
27010/27C010 (128Kx8) 271024/27C1024 (64Kx16)
27020/27C020 (256Kx8) 272048/27C2048 (128Kx16)
27040/27C040 (512Kx8) 274096/27C4096 (256Kx16)
7
Types of semiconductor memory devices: Static RAM
• Static RAM (also called SRAM)devices retain their data for as long as the DC power is
applied.
• The most common family of SRAM are the 61XXX, 62XXX or the CMOS 62CXXX
series, where XXX indicates the memory capacity in Kbits. Some members of this
family are the following:
6116/6216 (2Kx8) 6164/6264 (8Kx8)
61256/62256 (32Kx8) 611024/621024 (128Kx8)
• These series of SRAM devices are pin compatible with the 27XXX series of EPROMs,
with the difference that the WR signal is replaced by the programming voltage pin
(Vpp) on the EPROM. This allows a single socket on the PCB hold either a SRAM,
during system development, or an EPROM, after the operation of the program is
verified to be the expected one.
• Static RAM is fast with access times much less than 100ns. SRAM chips with access
times less than 10ns are often used as cache memory in computers.
8
Semiconductor Memory Expansion
• The size of memory devices is usually less than the memory requirements of a computer system.
• In all computers, more than one memory devices are combined together to form the main
memory of the system.
• Any computer must have at least one ROM chip and one RAM chip.
• Word size memory expansion:
– Most memory devices have a word size (number of data lines) of 8 or 16 bits.
– The word size of today’s microprocessors is 32 bits (80386, 80486) or 64 bits
(Pentium)
• Address size memory expansion:
– The size of common memory chips is usually less or in the order of 256M-byte.
– Most personal computers have more than 2 Gbytes of RAM.
– Workstations and other high throughput computers have more than 4Gbytes of RAM.
9
Memory Address Size Expansion
• More than one memory devices can be used to expand the number of memory
locations on the system.
• To expand the word size do the following:
– Determine the number of memory chips required, by dividing the required
memory size with the size of the memory devices to be used.
– Connect the data lines of each memory chip in parallel on the data lines of
the processor.
– Connect the address lines of each memory chip in parallel with the low
address lines of the processor.
– Connect the CS lines of each memory device with the high address lines of
the processor through an address decoding circuit..
– Connect together all WR and all RD lines of each memory device.
10
Address Size Expansion: (32X4 RAM module using 8X4 RAM chips)
D0
D1
D2
D3
RAM1 D3 D0 RAM2 D3 D0 RAM3 D3 D0 RAM4 D3 D0
0 0 0 0
1 1 1 1
2 2 2 2
A0 3 A0 3 A0 3 A0 3
A1 4 A1 4 A1 4 A1 4
A2 5 A2 5 A2 5 A2 5
6 6 6 6
7 7 7 7
RD WR CS RD WR CS RD WR CS RD WR CS
RD
WR
A0
A1
A2
A3 A Y0
A4 B Y1
A5 Y2
CS
A6 Y3
Address 2X4 DEC.
Selection
11
Memory Maps
• Tables that show the addresses occupied by each memory device in a system.
decoder. 58 - 5F RAM 4
60 - 67 RAM 1
60 - 7F Not 60 - 7F Not Not 68 - 6F RAM 2
60 - 7F
Used Used Used 70 - 77 RAM 3
78 - 7F RAM 4
12
Effect of the Address Selection Circuit
• The memory block occupied by the memory module depends on the connection of the
address selection circuit (AND gate) that enables the decoder.
• Two address lines are used to control the address selection circuit, thus the circuit can be
configured to occupy four different areas in the address space.
13
Example: (32X4 RAM module using 8X4 RAM chips - Assume an 8-address line processor)
D3 D0 D3 D0 D3 D0 D3 D0
D3
8x4 RAM 1 8x4 RAM 2 8x4 RAM 3 8x4 RAM 4
A0 A0 A0 A0
D0
A2 A2 A2 A2
RD WR CS RD WR CS RD WR CS RD WR CS
RD
WR
A0
2X4 DEC.
A2
A3 A Y0
A4 B Y1
A5 Y2
A6 CS Y3
A7
14
Memory Map for previous example.
• There are three address lines connected on the address selection circuit. Thus there can
be eight different memory map configurations.
• Three possible memory map configurations are shown below.
15
Design Example:
Design an 8KX8 RAM module using 2KX8 RAM chips. The module should be connected on
an 8-bit processor with a 16-bit address bus, and occupy the address range starting from the
address A000. Show the circuit and the memory map.
16
Circuit Diagram
D7
D0 D7 D0 D7 D0 D7 D0 D7
D0 A0 A0 A0 A0
RD WR CS RD WR CS RD WR CS RD WR CS
RD
WR
A0
2X4 DEC.
A11
A Y0
A12
B Y1
A13
Y2
A14
CS Y3
A15 A15
17