Memory - Lec 3
Memory - Lec 3
Memory - Lec 3
Memory Basics
Secondary
Memory
Primary
Memory
Input Output
CPU
Devices Devices
Memory Hierarchies
Memory can be categorized into
•Registers
• primary memory (e.g. cache, main memory)
•secondary memory (e.g. disks)
Registers:
❖Are used to store temporary and partial results of
calculations and sometimes system state information.
2 10= k
2 20= M
Calculate the capacity of the a memory
If, Address bus width= 32 bits
Data bus width= 8 bits
◼ In a memory there are 16M address. What is the
width of the address bus?
Calculate the capacity of the a memory
If, No of address= 8M
Data bus width= 8 bits
RAM/ROM Naming Convention
• Examples 8X32, 8 by 32➔ 32 8-bit words
• 1X1M, 1 by 1M➔ 1M 1-bit words
8X32 1X1M
8 5 1 20
A0 ~ A14
8x32K bit
0
1:2 D7
A15
1 D0
8x32K bit
D7
8 bit
D4
4x8K bit
D7
8 bit
(1) (2)
4x32K bit 4x32K bit
64K
(3) (4)
4x32K bit 4x32K bit
Construct an 8x32k memory using 4x16k
memories
Construct an 8x16K memory using 4x4k
memories
Construct 2x64K memory using 2x16K
units
Construct an 4x8K memory using units of
an 1x8K memories
Construct an 4x16K memory using 1x4k
memories
R A M (Random Access Memory)
• Because the bits of data can be individually
accessed, retrieved, and modified at random,
this type of main memory used in computers is
called random access memory (RAM).
• RAM is a volatile form of memory, which means
that it must have power in order to retain data.
When the power is turned off, data in RAM is
lost.
• Contrast this to other storage media such as
disks, tapes, and CDs that retain data even
without power.
There are two main forms of RAM:
• DRAM
• SRAM
•State 0
-- C2 high, C1 low
-- T2 T3 off, T1 T4 on
A0 W0
A1
W1
A2 Encoder
Address W2
A2
Decoder (Memory Matrix)
W1023
A9
D4 D3 D2 D1 D0
DIODE array ROM
A0
W0
A1
W1
W2
Address
decoder
A9 W1023
Pull
down
resistors
D4 D3 D2 D1 D0
◼ Similar to RAM, ROM chips contain a grid of
columns and rows.
◼ ROM uses a diode to connect the lines if the
value is 1.
◼ If the value is 0, then the lines are not connected
at all.
◼ A diode normally allows current to flow in only
one direction. If a diode is present at that cell,
the charge will be conducted through to the
ground, and, under the binary system, the cell
will be read as being "on" (a value of 1)
This is a factory programmed ROM, Diodes are
being inserted at the required cross points which
cannot be reprogrammed.
◼ Creating the original template for a ROM chip is
often a laborious process full of trial and error.
◼ But the benefits of ROM chips outweigh the
drawbacks. Once the template is completed, the
actual chips can cost as little as a few cents each.
◼ They use very little power, are extremely reliable and, in
the case of most small electronic devices, contain all the
necessary programming to control the device.
A1 W0
W1
W2
Address
decoder
A9
W1023
D4 D3 D2 D1 D0
A9 W1023
D4 D3 D2 D1 D0
◼ This is a programmable ROM. BJTs are being inserted
at any cross point.
◼ The emitter of each transistor is having a burnable fuse
which can be burned by sending a comparatively large
current.
◼ During programming higher voltages than the normal
operating voltages are used. The data word to be stored
at a particular address is placed at data terminal and the
location is addressed.
◼ The transistor fuses, those connected to the data
terminals with applied bit zeros will be burned
out due to the large currents across the on
transistors forced by high voltages.
◼ Other fuses, those connected to the applied bit
1, during programming will be served
◼ It is once programmable ROM, since the fuses
cannot be repaired
◼ Creating ROM chips is time-consuming and
very expensive in small quantities.
◼ For this reason, mainly, developers created a
type of ROM known as programmable read-only
memory (PROM).
◼ Blank PROM chips can be bought inexpensively
and coded by anyone with a special tool called a
programmer.
◼ PROMs can only be programmed once. They
are more fragile than ROMs. A jolt of static
electricity can easily cause fuses in the PROM to
burn out, changing essential bits from 1 to 0.
◼ But blank PROMs are inexpensive and are great
for prototyping the data for a ROM before
committing to the costly ROM fabrication
process.
EPROM
◼ Working with ROMs and PROMs can be a wasteful
business even though they are inexpensive.
◼ Erasable programmable read-only memory
(EPROM) addresses this issue.
◼ EPROM chips can be rewritten many times. Erasing
an EPROM requires a special tool that emits a certain
frequency of ultraviolet (UV) light.
◼ EPROMs are configured using an EPROM
programmer that provides voltage at specified levels
depending on the type of EPROM used.
FAMOS Array EPROM
VDD Load
FETs
A0
A1 W0
W1
W2
Addres
s
decoder
A9 W1023
D4 D3 D2 D1 D0
FAMOSFET - Floating gate Avalanche Breakdown MOSFET
D
G
S
27C256
EEPROM
Though EPROMs are a big step up from PROMs in
terms of reusability, they still require dedicated
equipment and a labor-intensive process to remove and
reinstall them each time a change is necessary.
Also, changes cannot be made incrementally to an
EPROM; the whole chip must be erased.
Electrically erasable programmable read-only memory
(EEPROM) chips remove the biggest drawbacks of
EPROMs.
In EEPROMs:
◼ The chip does not have to removed to be
rewritten.
◼ The entire chip does not have to be completely
erased to change a specific portion of it.
◼ Changing the contents does not require
additional dedicated equipment.
◼ Instead of using UV light, you can return the electrons
in the cells of an EEPROM to normal with the
localized application of an electric field to each cell.
◼ This erases the targeted cells of the EEPROM, which
can then be rewritten.
◼ EEPROMs are changed 1 byte at a time, which makes
them versatile but slow.
◼ In fact, EEPROM chips are too slow to use in many
products that make quick changes to the data stored on
the chip.
Manufacturers responded to this limitation with Flash
memory, a type of EEPROM that uses in-circuit
wiring to erase by applying an electrical field to the
entire chip or to predetermined sections of the chip
called blocks.
Flash memory works much faster than traditional
EEPROMs because it writes data in chunks, usually
512 bytes in size, instead of 1 byte at a time.
FLASH MEMORY
◼ Few examples of Flash memory:
◼ Your computer's BIOS chip
◼ CompactFlash (most often found in digital cameras)