COA Module 4 Notes_copy
COA Module 4 Notes_copy
COMPUTER
ORGANIZATION
AND
ARCHITECTURE
Module 4
THE MEMORY SYSTEM
• The
processor reads data from the memory by loading the address of the required
memory location into the MAR register and setting the R/𝑊 ̅ line to 1.
• The memory responds by placing the data from the addressed location onto
the data lines, and confirms this action by asserting the MFC signal.
• Upon receipt of the MFC signal, the processor loads the data on the data lines
into the MDR register.
• The processor writes data into a memory location by loading the address of
this location into MAR and loading the data into MDR.
• ̅ line to 0.
It indicates that a write operation is involved by setting the R/𝑊
• If read or write operations involve consecutive address locations in the main
memory, then a "block transfer" operation can be performed in which the only
address sent to the memory is the one that identifies the first location.
• Memory accesses may be synchronized using a clock, or they may be
controlled using special signals that control transfers on the bus, using the
bus signaling schemes.
• Memory read and write operations are controlled as input and output bus
transfers, respectively.
● Memory Access Time: the time that elapses between the initiation of an
operation and the completion of that operation.
● For example, the time between the Read and the MFC signals.
● Memory Cycle Time: which is the minimum time delay required between the
initiation of two successive memory operations.
● For example, the time between two successive Read operations.
● Random Access Memory (RAM): A memory unit is called random-access
memory (RAM) if any location can be accessed for a Read or Write operation
in some fixed amount of time that is independent of the location's address.
● The basic technology for implementing the memory uses semiconductor
integrated circuits.
● The processor of a computer can usually process instructions and data faster
than they can be fetched from a reasonably priced memory unit.
● The memory cycle time, then, is the bottleneck in the system.
● One way to reduce the memory access time is to use a cache memory.
● This is a small, fast memory that is inserted between the larger, slower main
memory and the processor.
● It holds the currently active segments of a program and their data.
● Virtual memory is another important concept related to memory organization.
● Data may be stored in physical memory locations that have addresses
different from those specified by the program.
● The memory control circuitry translates the address specified by the program
into an address that can be used to access the physical memory.
● In such a case, an address generated by the processor is referred to as a
virtual or logical address.
● The virtual address space is mapped onto the physical memory where data
are actually stored.
• Memory cells are usually organized in the form of an array, in which each
cell is capable of storing one bit of information. A possible organization is
illustrated in Figure 5.2.
• Each row of cells constitutes a memory word, and all cells of a row are
connected to a common line referred to as the word line, which is driven by
the address decoder on the chip.
• The cells in each column are connected to a Sense/Write circuit by two bit
lines.
• The Sense/Write circuits are connected to the data input/output lines of
the chip.
• The required 10-bit address is divided into two groups of 5 bits each to form
the row and column addresses for the cell array.
• A row address selects a row of 32 cells, all of which are accessed in parallel.
• However, according to the column address, only one of these cells is
connected to the external data line by the output multiplexer and input
demultiplexer.
• Commercially available memory chips contain a much larger number of
memory cells than the examples shown in Figures 5.2 and 5.3.
• For example, a 4M-bit chip may have a 512K x 8 organization, in which
case 19 address and 8 data input/output pins are needed.
Static Memories
• This state is maintained as long as the signal on the word line is at ground
level.
Read Operation
• In order to read the state of the SRAM cell, the word line is activated to
close switches T1 and T2.
• If the cell is in state 1, the signal on bit line b is high and the signal on
bit line b' is low.
• The opposite is true if the cell is in state 0. Thus, b and b' are
complements of each other.
• Sense/Write circuits at the end of the bit lines monitor the state of b
and b' and set the output accordingly.
Write Operation
• The state of the cell is set by placing the appropriate value on bit line b
and its complement on b', and then activating the word line.
• This forces the cell into the corresponding state.
• The required signals on the bit lines are generated by the Sense/Write
circuit.
CMOS Cell
Asynchronous DRAMs
• Static RAMs are fast, but they come at a high cost because their cells
require several transistors.
• Less expensive RAMs can be implemented if simpler cells are used.
• How-ever, such cells do not retain their state indefinitely; hence, they
are called dynamic RAMs (DRAMs).
• Information is stored in a dynamic memory cell in the form of a charge
on a capacitor, and this charge can be maintained for only tens of
milliseconds.
• Since the cell is required to store information for a much longer time,
its contents must be periodically refreshed by restoring the capacitor
charge to its full value.
• This information is then used to overwrite the contents of the selected cells
in the corresponding 8 columns.
• We should note that in commercial DRAM chips, the RAS and CAS control
signals are active low so that they cause the latching of addresses when
they change from high to low.
• To indicate this fact, these signals are shown on diagrams as ̅̅̅̅̅̅
𝑅𝐴𝑆 and ̅̅̅̅̅
𝐶𝐴𝑆.
• Applying a row address causes all cells on the corresponding row to be read
and refreshed during both Read and Write operations.
• To ensure that the contents of a DRAM are maintained, each row of cells
must be accessed periodically.
• A refresh circuit usually performs this function automatically.
• Many dynamic memory chips incorporate a refresh facility within the chips
themselves.
• In this case, the dynamic nature of these memory chips is almost invisible
to the user.
• In the DRAM described in this section, the timing of the memory device is
con-trolled asynchronously.
• A specialized memory controller circuit provides the necessary control
signals, RAS and CAS, that govern the timing.
• The processor must take into account the delay in the response of the
memory.
• Such memories are referred to as asynchronous DRAMs.
• Because of their high density and low cost, DRAMs are widely used in the
memory units of computers.
• Available chips range in size from 1M to 256M bits, and even larger chips
are being developed.
• To reduce the number of memory chips needed in a given computer, a
DRAM chip is organized to read or write a number of bits in parallel, as
indicated in Figure 5.7.
• To provide flexibility in designing memory systems, these chips are
manufactured in different organizations. For example, a 64-Mbit chip may
be organized as 16M x 4, 8M x 8, or 4M x 16.
• When the DRAM in Figure 5.7 is accessed, the contents of all 4096 cells in
the selected row are sensed, but only 8 bits are placed on the data lines D7-
0.
• This byte is selected by the column address bits A8-0.
• A simple modification can make it possible to access the other bytes in the
same row without having to reselect the row.
• A latch can be added at the output of the sense amplifier in each column.
• The application of a row address will load the latches corresponding to all
bits in the selected row.
• Then, it is only necessary to apply different column addresses to place the
different bytes on the data lines.
• The most useful arrangement is to transfer the bytes in sequential order,
which is achieved by applying a consecutive sequence of column addresses
under the control of successive CAS signals.
• This scheme allows transferring a block of data at a much faster rate than
can be achieved for transfers involving random addresses.
• The block transfer capability is referred to as the fast page mode feature.
• The faster rate attainable in block transfers can be exploited in applications
in which memory accesses follow regular patterns, such as in graphics
terminals.
• This feature is also beneficial in general-purpose computers for transferring
data blocks between the main memory and a cache.
• Thus, the transistor switch is closed and the voltage on the bit line
drops to near zero if there is a connection between the transistor
and ground.
• If there is no connection to ground, the bit line remains at the high
voltage, indicating a 1.
• A sense circuit at the end of the bit line generates the proper output
value.
• Data are written into a ROM when it is manufactured.
2. PROM
• Some ROM designs allow the data to be loaded by the user, thus
providing a programmable ROM (PROM).
• Programmability is achieved by inserting a fuse at point P in Figure
5.12. Before it is programmed, the memory contains all 0s.
• The user can insert 1s at the required locations by burning out the
fuses at these locations using high-current pulses.
• Of course, this process is irreversible. PROMs provide flexibility and
convenience not available with ROMs.
• The latter are economically attractive for storing fixed programs and
data when high volumes of ROMs are produced.
• However, the cost of preparing the masks needed for storing a particular
information pattern in ROMs makes them very expensive when only a
small number are required.
• In this case, PROMs provide a faster and considerably less expensive
approach because they can be programmed directly by the user.
3. EPROM
• Another type of ROM chip allows the stored data to be erased and new
data to be loaded.
• Such an erasable, reprogrammable ROM is usually called an EPROM.
• It pro-vides considerable flexibility during the development phase of
digital systems.
• Since EPROMs are capable of retaining stored information for a long
time, they can be used in place of ROMs while software is being
developed.
• In this way, memory changes and updates can be easily made.
• An EPROM cell has a structure similar to the ROM cell in Figure 5.12.
• In an EPROM cell, however, the connection to ground is always made
at point P and a special transistor is used, which has the ability to
4. EEPROM
• A significant disadvantage of EPROMs is that a chip must be physically
removed from the circuit for reprogramming and that its entire contents
are erased by the ultraviolet light.
• It is possible to implement another version of erasable PROMs that can
be both programmed and erased electrically.
• Such chips, called EEPROMs, do not have to be removed for erasure.
• Moreover, it is possible to erase the cell contents selectively.
• The only disadvantage of EEPROMs is that different voltages are needed
for erasing, writing, and reading the stored data.
5. Flash Memory
• A flash cell is based on a single transistor controlled by trapped charge,
just like an EEPROM cell.
• In EEPROM it is possible to read and write the contents of a single cell.
• In a flash device it is possible to read the contents of a single cell, but
it is only possible to write an entire block of cells.
• Prior to writing, the previous contents of the block are erased.
• Flash devices have greater density, which leads to higher capacity and
a lower cost per bit.
• They require a single power supply voltage, and consume less power in
their operation.
• The low power consumption of flash memory makes it attractive for use
in portable equipment that is battery driven.
Flash Cards
• One way of constructing a larger module is to mount flash chips on a
small card.
• Such flash cards have a standard interface that makes them usable in
a variety of products.
• A card is simply plugged into a conveniently accessible slot. Flash cards
come in a variety of memory sizes.
• Typical sizes are 8, 32, and 64 Mbytes.
• A minute of music can be stored in about 1 Mbyte of memory, using the
MP3 encoding formal. Hence, a 64-MB flash card can store an hour of
music.
Flash Drives
• Larger flash memory modules have been developed to replace hard disk
drives.
• These flash drives are designed to fully emulate the hard disks, to the
point that they can be fitted into standard disk drive bays.
• However, the storage capacity of flash drives is significantly lower.
• Currently, the capacity of flash drives is less than one gigabyte.
• In contrast, hard disks can store many gigabytes.
• The fact that flash drives are solid state electronic devices that have no
movable parts provides some important advantages.
• They have shorter seek and access times, which results in faster
response.
• They have lower power consumption, which makes them attractive for
battery driven applications, and they are also insensitive to vibration.
• The disadvantages of flash drives versus hard disk drives are their
smaller capacity and higher cost per bit.
• Disks provide an extremely low cost per bit.
• Another disadvantage is that the flash memory will deteriorate after it
has been written a number of times. Fortunately, this number is high,
typically at least one million times.