DECO - Module 4.1 - Main Memory
DECO - Module 4.1 - Main Memory
Memory Organization
Topics to be covered
Memory Hierarchy
Main Memory
Auxiliary Memory
Associative Memory
Cache Memory
Virtual Memory
Memory Management Hardware
2
Memory Hierachy
Memory unit is an essential component in any digital
computer since it is needed for storing programs and
data.
3
4
This Memory Hierarchy Design is divided into 2 main types:
External Memory or Secondary Memory –
Comprising of Magnetic Disk, Optical Disk, Magnetic Tape i.e.
peripheral storage devices which are accessible by the
processor via I/O Module.
Internal Memory or Primary Memory –
Comprising of Main Memory, Cache Memory & CPU registers.
This is directly accessible by the processor.
5
Capacity:
It is the global volume of information the memory can store.
As we move from top to bottom in the Hierarchy, the capacity
increases.
Access Time:
It is the time interval between the read/write request and the
availability of the data. As we move from top to bottom in the
Hierarchy, the access time increases.
Cost per bit:
As we move from bottom to top in the Hierarchy, the cost per
bit increases i.e. Internal memory is costlier than external
memory.
6
Memory Hierarchy in a computer
system
Auxiliary Memory
Magnetic
Tapes Main
I/O Processor Memory
Magnetic
Disks
Cache
CPU Memory
7
Memory Hierarchy
8
Main Memory
9
RAM Chip
10
RAM Chip
• The capacity of the memory is 128 words of eight bits per word.
• The two chip selects (CS) control inputs are for enabling the chip
only when it is selected by the microprocessor. The availability of
more than one control input to select the chip facilitates the
decoding of the address lines when multiple chips are used
11 in the
microcomputer.
Function Table (RAM chip)
12
Operation of RAM chip
The unit is in operation only when CS1=1 and CS2’=0.
If the chip select inputs are not enabled , or they are
enabled but Read or Write inputs are not enabled, the
memory is inhibited and data bus is in high impedance
state.
When CS1=1 and CS2’=0, the memory can be placed in a
write or read mode.
When the WR input is enabled, the memory stores a
byte from the data bus into a location specified by the
address input lines.
When the RD input is enabled , the content of the
selected byte is placed onto the data bus.
13
ROM chip
14
ROM chip
A ROM chip is organized externally in a similar manner.
Since a ROM can only be read so data bus can only be in
an output mode.
For the same size chip , it is possible to have more bits
of ROM than of RAM because the internal binary cells in
ROM occupy less space than in RAM. So here a 512byte
ROM is represented , while RAM has only 128 bytes.
The 9 address lines in the ROM specify any one of the
512 bytes stored in it.
There is no need for a read or write control because the
unit can only be read.
So, when the chip is enabled by two select inputs , the
byte selected by the address lines appears on the bus.
15
Memory Address Map
The addressing of memory can
be established by means of a
table that specifies the memory
address assigned to each chip.
18
Memory connection to CPU
RAM and ROM chips are connected to CPU through the data
and address buses.
The low-order lines in the address bus select the byte within
the chips and other lines in the address bus select a
particular chip through its chip select inputs.
The configuration used here gives the memory capacity of 512
bytes of RAM and 128 bytes of ROM.
Each RAM receives the 7 low order bits of the address bus to
select one of 128 possible bytes.
The particular RAM chip selected is determined from lines 8
and 9 in the address bus.This is done through a 2X4 decoder
whose outputs go to the CS1 inputs in each RAM chip.
19
Memory connection to CPU
20
Numericals
Q1:
Sol:
21
Numericals
22
Solution
23
Reference
24
THANK YOU
25