Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Memory - Lec 3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 74

Memory

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 and primary or main memory are the purely


electronic and volatile memory that a computer uses to store
current data and code while executing a program or
application.
• Primary memory works in tandem with the
CPU to store data, programs, and processed
information that can be made immediately
and directly accessible to the CPU or to other
system devices.
• Primary memory also determines the size
and number of programs that can be run
simultaneously.
Memory Speed

• CPU registers can be accessed in a few


nanoseconds (x10-9).
• Cache memories take a small multiple of
CPU registers.
• Main memory accesses are typically a
few tens of nanoseconds.
• Disk access are at least 10msec (x10-3)!
• Tape or optical disk access time can be
measured in seconds.
Register Memory

Registers:
❖Are used to store temporary and partial results of
calculations and sometimes system state information.

❖Reside on the CPU chip.

❖Are fast for CPU to access.

❖They may be as small as one bit or as large as several


words depending upon the processor.

❖Because registers reside on the CPU chip itself there is no


room for too many of them. Most modern processors have
between 32 and 64 registers onboard.
Primary Memory
Computer’s primary memory is arranged as a matrix of"memory
cells" laid out in rows and columns, like squares on a
checkerboard.
◼ Write Operation
◼ Select the Memory Cell :- Address Bus
◼ Data-in :- Data Bus
◼ Write Signal :- Control Bus
◼ Read Operation
◼ Select the Memory Cell:- Address Bus
◼ Read Signal:- Control Bus
◼ Sense the data :- Data Bus
Number of addresses = 2 Address bus width

Capacity of memory = Number x Data bus


of addresses width
Calculate the capacity (Size) of the memory
If, Address bus width= 8 bits
Data bus width= 8 bits
Calculate the capacity of the a memory
If, Address bus width= 16 bits
Data bus width= 8 bits
prefixes

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

data address data address


Memory Expansion
This refers to the construction of a larger
memory in the sense of memory address
space (No of memory locations) or word
length
Address Expansion.
Ex1:
Construct 8x64K memory using 8x32K units
D0

A0 ~ A14
8x32K bit
0
1:2 D7
A15
1 D0

8x32K bit

D7
8 bit

32K 8x32K bit


64K

32K 8x32K bit


Ex2:
Construct 4x32K memory using 4x8K units
Ex3:
Construct 2x64K memory using 2x8K units
Word expansion.

Construct an 8x8K memory using units of


an 4x8K memories
D0

A0 ~ A12 4x8K bit


D3

D4

4x8K bit

D7
8 bit

8K 4x8K bit 4x8K bit


Address & Word expansion. Construct an 8x64K memory using
4 units of an 4x32K memories
D0
A0 ~ A14 (1) 4x32K bit
D3
D4
0 (2) 4x32K bit
D7
A15 1:2 D0
(3) 4x32K bit
1 D3
D4
(4) 4x32K 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

SRAM (Static RAM)

• SRAM are built with flip-flop circuits that allow


electricity to flow through one side or the other
depending on which one of two transistors is
activated.
• This "flow through" design is faster than the
"stored charge" design of RAM, but it consumes
more power.
• SRAM is also volatile (must have power to retain
data) but SRAM does not need to be constantly
refreshed like DRAM.

• SRAM is about five times faster, twice as


expensive, and twice as big as DRAM.

• Because of its lower cost and smaller size,


DRAM is preferred for use in computer main
memory, while SRAM is used primarily for
cache memory because of its speed.
SRAM cell
Operation
•Transistor arrangement gives stable logic state
•State 1
-- C1 high, C2 low
-- T1 T4 off, T2 T3 on

•State 0
-- C2 high, C1 low
-- T2 T3 off, T1 T4 on

•Address line transistors T5 T6 is switch


•Write – apply value to B & compliment to B
•Read – value is on line B
DRAM (Dynamic RAM)

• DRAM is the most common type of computer memory.

• DRAM chips usually forms the core of a computer's main


memory peripherals.

• The system uses this memory to temporarily store


programs, data, and processed information that moves to
and from the processor, video card, and other
• It is called "dynamic" RAM because it must be refreshed,
or reenergized, hundreds of times each second in order
to retain data in its memory cells
DRAM cell
It has to be refreshed because its memory
cells are designed around tiny capacitors that
store electrical charges.

These capacitors work like very tiny batteries


and will gradually lose their stored charges if
they are not re-energized.

Different types of DRAM:


SDRAM ( Synchronous DRAM)
DDR-SDRAM( Double Data Rate SDRAM)
Volatile Memory Comparison

Larger cell, lower density, Smaller cell, higher density, lower


higher cost/bit cost/bit

No refresh required Needs periodic refresh, and


refresh after read
Simple read faster access
Complex read longer access time
Standard IC process natural for
integration with logic Special IC process difficult to
integrate with logic circuits
Cache Memory

Cache memory stores copies of chunks of frequently


accessed RAM which is slower memory running at
system board speed.

When the processor needs data, it will check in high-


speed cache first to see if the data is there (fastest
option). If not, then the processor will retrieve the data
from slower main memory (RAM, slowest option).
Cache memory can be divided into two parts and two
speeds.
• Level 1 (L1) cache is the fastest as it resides on the CPU
chip itself and hence runs at CPU speed.

• Level 2 (L2) cache memory is the next fastest. It resides


off-chip but close by for easy access. L2 cache is a small
block of high-speed memory located between the CPU and
main memory. Although, more and more CPUs are
including L2 caches into their architectures
Physical View
RAM installed in a PC

From the top:


SIMM, DIMM and SODIMM
memory modules
R O M (Read Only Memory)
•ROM
•PROM
•EPROM
•EEPROM
•Flash memory
Each type has unique characteristics, but there are
two things in common. Data stored in these chips is
➢nonvolatile
➢ either unchangeable or requires a special
operation to change
ROM
ROM basically consists of an address
decoder and an encoder as shown below

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.

◼ A great example is the small chip in the singing toy.


This chip, about the size of your fingernail, contains the
30-second song clips in ROM and the control codes to
synchronize the motors to the music.
MOSFET array ROM
VDD
Load
A0 FETs

A1 W0
W1

W2
Address
decoder
A9
W1023

D4 D3 D2 D1 D0

MOSFET having thick oxide layer


◼ A MOSFET with thick oxide layer cannot be
turned on by normal gate voltage and are
permanently OFF
◼ The above encoder is a factory programmed
from MOSFET being inserted at every cross
point.
◼ The transistor with a normal oxide layer
represents a stored bit 0 at a cross point.
◼ Transistor with a thick oxide layer represents a
stored bit 1 .
◼ During the IC fabrication it is much easier to
control the thickness of the oxide layers of the
MOSFETs rather than inserting the transistors
selectively, at the cross points.
PROM- Programmable ROM
◼ PROM chips have a grid of columns and rows just as
ordinary ROMs.
◼ The difference is that every intersection of a column
and row in a PROM chip has a fuse connecting them.
◼ A charge sent through a row will pass through the fuse
in a cell to a grounded column indicating a value of 1.
Since all the cells have a fuse, the initial (blank) state of
a PROM chip is all 1s.
◼ To change the value of a cell to 0, you use a
programmer to send a specific amount of
current to the cell.
◼ The higher voltage breaks the connection
between the column and row by burning out the
fuse.
◼ This process is known as burning the PROM.
PROM contd..
Bipolar array PROM
A0
W0
VCC
W1
Address VCC
decoder W2
Burned
fuse

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

The above EPROM is constructed by inserting FAMOSFET


transistors at any cross points.
A transistor with trapped electrons in the floating gate cannot be
turned on by normal gate voltages and are temporary OFF.
A transistor with trap electrons at the cross points and therefore
represents the stored bit 1.
◼ Normal transistor at a cross point represent a stored
bit 0.
◼ Electrons can be injected to the floating gates of
FAMOSFETs by Applying a high voltage above the
normal operating voltage (12-13V)
◼ to the gate & drain terminals while source is grounded.
◼ The data stored can be erased by exposing the
transistor array with UV light. When the transistors are
exposed to the UV light, the silicon dioxide layers
becoming slightly conductive allow the trapped
electrons to be discharged.
◼ An EPROM eraser is not selective, it will erase
the entire EPROM.
◼ Each EPROM chip has a quartz window on top
of it for UV rays to enter in to the chip for
erasing.
An EPROM

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)

◼ SmartMedia (most often found in digital cameras)

◼ Memory Stick (most often found in digital cameras)

◼ PCMCIA Type I and Type II memory cards (used as


solid-state disks in laptops)
◼ Memory cards for video game consoles
◼ Operation is same as in EEPROM but Flash
memory works much faster than traditional
EEPROMs because instead of erasing one byte
at a time, it erases a block or the entire chip, and
then rewrites it.
◼ Computer's BIOS chip is the most common
form of Flash memory, removable solid-state
storage devices are becoming increasingly
popular.
◼ Smart Media and Compact Flash cards are both
well-known, especially as "electronic film" for
digital cameras. Other removable Flash memory
BIOS uses Flash memory, a type of ROM.
Memory stick

Smart media card


2-128 MB

You might also like