Chapitre 2
Chapitre 2
BOUKRA A.
[email protected]
aboukra@usthb
The memories
• Memory is organized around several levels of memory, creating a hierarchy of
memories
• In this hierarchy, the memories closest to the processor are the fastest, but
also the smallest in capacity. On the other hand, the memories furthest from
the processor are the slowest but have the largest capacity.
• the programme and data are stored in the central memory (RAM) for
execution by the central processor (microprocessor)
When the computer starts up, a program is run that is pre-recorded in a specialized
memory (ROM), which loads the operating system kernel from the magnetic disk
into the main memory.
•To harmonize the speeds of the processor and RAM memory, and thus
improve performance, a faster memory is placed between the processor and
RAM memory: this is the cache memory.
This means that the information stored in a
computer is not stored in a single place, but is
organized in a hierarchy of memories
The two main classes of
memories
working memory refers to memory which is
active during the execution of a program.
They include the processor registers, main
memory, cache memory, support memory and
read-only memory. These are electronic
memories;
storage memories, such as magnetic disks, are
used to store large quantities of information
permanently. The information stored there is
not directly involved in the execution of a
program, but must be loaded into the main
memory to be used by the processor.These
are mass storage devices, and can be magnetic
or optical.
Memory characteristics
memory capacity indicates the amount of information
that a memory can store. In general, this capacity can be
expressed in bits, bytes or, more rarely, words. The
following table summarizes the main expressions of
memory capacity;
latency is the time between the request for data and the
effective start of the operation.
Cycle time: this represents the minimum interval between two
successive read or write requests.
The memory access time is the time interval between
the read/write request and the availability of the data.
For an electronic memory, which is a very fast memory
(RAM, ROM, register, etc.), this time is measured in
nanoseconds (one billionth of a second: 10-9 s).
This speed can also be expressed as a clock frequency
characteristic of the memory, equal to the inverse of the
access time and measured in hertz (Hz). For example, an
access time of 10 nanoseconds corresponds to a
frequency of 100 Mhz (1 Mhz = 106 Hz). For magnetic or
optical memories (mass storage) this time is measured in
milliseconds (thousandths of a second:10-3 s).
memory bandwidth. This criterion is expressed as the
product of the data bus width and the memory frequency.
volatility represents the permanence of information
availability. Magnetic memories are non-volatile: the
information is retained even after the power supply is cut
off. Electronic memories are generally volatile and lose
information as soon as the power supply is cut off: this is
the case with random access memories such as RAM;
space requirements. Physical memories are taking up
less and less space, allowing greater integration. This is a
major factor in the development of computing.
Cost is a very important criterion in IT developments.
Electronic memories have a relatively high storage cost
and therefore their capacities are even lower. Magnetic
memories are much cheaper and therefore have greater
storage capacity..
Different types of memories Joëlle Delacroix -
[
NFA004]
M
A Memory
𝑅𝑅 ⁄𝑤𝑤
�
R
MDR
MDR
MDR
The communication between the memory and its environment is established by means of
:
Control lines
Address lines
Data lines
IF SELECT=1
THEN the bit is selected
IF R/W=1
THEN the bit stored in the flip-flop will be
available at the output o
ELSE the bit i available at the input will be stored in
the flip-flop
ELSE the bit is not concerned py the opertation
• The internal structure of a RAM with m words of n bits (m x n
memory) is made up of m x n storage bits and logic circuits
which are used to select a word. ).
• Example of a 4 x 3 RAM (We have used 4 words of 03 bits to
simplify the diagram.
In this diagram:
If Validator =0 then all the decoder outputs are zero, so the
memory is not used.
If Validator=1, then an output Di of the decoder is equal to 1, so
word i of the memory is selected for a read or write operation.
Memory blocks
• To create large-capacity memories, we can use
small-capacity memories and connect them together.
This circuit is equivalent to the circuit for a 1K x 8 RAM. The complementary address
bit A9 selects the RAM to be activated.
If A9 = 0, the first RAM is activated
if A9 = 1, the second RAM is activated.
Example 2
m = 10 n = 8 and p = 8
We want to create a 1K x 8 RAM from 256 x 8 RAM. The number of RAMs required
is: 210 / 28 = 22 = 4 RAMs
We will have an 8-bit MAR and 2 additional address bits, the MDR contains 8 bits.
This circuit is equivalent to the circuit for a 1K x 8 RAM. It is the additional address bits
A9 and A8 which will select, via a decoder, the RAM which must be activated. If, for
example, A9A8 = 1 0 then CS3 = 1, then the third RAM is activated.
Increasing word length
If you want to increase the length of a memory word, you need to connect
several units in series; to do this, they need to have the same number of
words.
We will use a single n-bit address register (MAR), a virtual P-bit data register
made up of several Q bit registers (the number of these registers is equal to
P/Q) and the same Chip Select for the 2 RAMs.
Example
n = 10 P = 8 and Q = 4
We want to make a 1K x 8 RAM using 1K x 4 RAM.
The number of RAMs required is: 8 / 4 = 2 RAMs
We will have a 10-bit MAR and the MDR contains 2 x 4 = 8 bits
To do this, divide the number of bits in the RAM you want, by the number of
RAMs available: (2m x P) / (2n x Q) = 2m-n x P/Q
This gives 2m-n RAMs in parallel, each made up of (P/Q) RAMs in series.
Example
m = 10 P = 8 and n = 8 Q = 4
We want to make 1K x 8 RAM from 256 x 4 RAM.
The number of RAMs required is:
(1024 x 8) / (256 x 4) = (1024 / 256) x (8 / 4) = (4 x 2) RAMs.
You need 4 RAMs, each one composed of 2 RAMs in series
Read only memory (ROM)
RAM can be read and written, but is volatile.
Flash.
is an EEPROM-type
memory that can be
ROM (Read only reprogrammed
Memory) electrically.
PROM
(Programmable EPROM EEPROM
ROM) (Erasable (electrically
allows unique PROM) EPROM)
writing by the Once written, they are
user using a they can be electrically
special machine. erased using an erasable
ultraviolet beam
which forces all
the bits to the
same value.
Example of a read-only memory
We want to implement the Boolean functions AND, OR and
XOR using ROM. We use the function arguments as ROM
addresses. The results of the functions will be stored in ROM.