Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

52
Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014

Transcript of Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Page 1: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Memory 1Technician Series

©Paul GodinCreated March 2008

Edit Jan 2014

Page 2: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Memory

◊ Digital systems often require the ability to retain and access binary values. Programmable devices and devices that access programs require memory systems to store values for, and after, processing.

◊ Memory systems are comprised of D Flip-Flop or D Latch configurations that are addressed with a decoder.

◊ This presentation addresses basic concepts associated with memory devices.

Memory1.2

Page 3: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Memory Devices

Memory

Read Only Random Access

Storage

Masked ROM

PROM

EPROM

EEPROM

CD-ROMDrives

Flash

SRAM

DRAM

DIMM

SIMM

SDRAM

Memory1.3

Page 4: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Memory

◊ Memory comes in 2 general varieties:

◊ RAM (Random Access Memory)◊ Often considered “volatile” because the data is lost when the

system is turned off.◊ RAM is used by systems to store values that are intended to

change regularly.◊ RAM is fast.

◊ ROM (Read Only Memory)◊ Considered permanent or semi-permanent memory and “non-

volatile” because data is not lost when the system is turned off.◊ ROM is used by systems to store values that are not intended to

change or that change only rarely.◊ ROM is slow for writing operations.

Memory1.4

Page 5: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

READ ONLY MEMORY

Memory1.5

Page 6: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

ROM Varieties – MP-ROM

◊ Mask-Programmed ROM (MP-ROM): ◊ A mask programmed ROM has had the values of the data

bits built into the device on manufacturing it and is therefore very application-specific.

◊ Have very high initial set up costs for manufacturing. Selected only when a large production run is required.

◊ These devices cannot be re-programmed.◊ Examples of Mask-Programmed ROM include game

cartridges and operating systems for smart cards.

◊ Today the availability, variety and lower costs of other ROM types means the use of MP-ROM is somewhat rare.

Memory1.6

Page 7: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

ROM Varieties - PROM

◊ Programmable Read-Only Memory (PROM):◊ Memory devices that contain fusible links that can be

custom programmed one-time (OTP). During the programming process the undesired links are burned open.

◊ Once programmed, PROMs are much less susceptible to data loss than most other ROM devices.

◊ PROMs are inexpensive and come in a variety of shapes and sizes based on the application desired.

◊ Examples of PROMs include operating systems for automotive computers and other portable devices. Proms are also used in space vehicles due to their ruggedness.

Memory1.7

Page 8: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

ROM Varieties - EPROM

◊ Erasable Programmable ROM (EPROM)◊ Devices that can be custom programmed by the user. ◊ Once programmed, the data is non-volatile. ◊ EPROMs can be erased by exposing the circuit to UV light

through a small glass window (typically about 20 minutes). Window should be covered with a sticker.

◊ Can be re-programmed as often as desired. ◊ EPROMs are more expensive than most other ROM

devices (except MP-ROM) and have one of the lowest densities. They are much less popular today than the past.

Memory1.8

Page 9: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

ROM Varieties - EEPROM

◊ Electrically Erasable ROM (EEPROM)◊ Provide the user with the ability to custom program ROM

with the option of erasing the data electrically. ◊ Some EEPROMS can be selectively erased, where only

portions of the memory may be cleared and re-written. ◊ More expensive and has lower density than other ROM

devices.◊ Very popular for many applications. Permits user to

update code without physically handling the device. Used in many computer-based applications.

Memory1.9

Page 10: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

ROM Varieties - Flash

◊ FLASH◊ Flash memory incorporates the advantages of erasable

non-volatile memory with a fast erase capability.◊ Permits selective write capability where specific

addresses may be re-written.◊ Flash ROM is very popular due to its relatively high

speed, ease of use, portability and cost reductions. Used extensively in portable digital electronic applications.

Memory1.10

Flash memory: K9GAG08U0M on a badly soldered boardhttp://www.flash-extractor.com/

Page 11: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

RANDOM ACCESS MEMORY

Memory1.11

Page 12: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

RAM (Random Access Memory)

◊ Referred to as “Read/Write Memory”, this memory is utilized for temporary storage. This is a volatile memory, meaning the data is present as long as power is applied to the IC.

Memory1.12

Page 13: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

RAM Varieties – SRAM

◊ SRAM◊ Static RAM basically consists of flip-flop memory devices.

These individual flip-flops will retain data as long as power is maintained to the device.

◊ Very fast and is often used in applications where speed is of primary concern.

◊ The primary disadvantage is the amount of continuous power it requires and the amount of heat it generates.

◊ Typically used for microprocessor registers and cache.

Memory1.13

Page 14: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

RAM Varieties - DRAM

◊ DRAM◊ Dynamic RAM utilized capacitive charges to maintain

binary values. ◊ has a lower power consumption than SRAM. ◊ requires frequent recharging of the capacitors otherwise

the data will be lost. ◊ Slower than SRAM but continues to improve.◊ DRAM is static sensitive.

Memory1.14

Page 15: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

RAM Structure

◊ DIMM, SIMM, DDR, SDRAM◊ Memory modules may take on various physical forms to

make them easier to handle. ◊ Single In-line Memory Module (SIMM) has a set on

contacts on one side of the board only and 32 bit access.◊ Dual In-line Memory Module has contacts on both sides of

the board and are designed for 64 bit access.◊ Double Data Rate is memory that performs an operation

on both the rising and the falling edge of the clock.◊ SDRAM, EDO, FPM and others offer various options of

handling data while maintaining the highest rates of speed.

Memory1.15

Page 16: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

STORAGE

◊ Various storage devices are used for maintaining large amounts of information and are in a different category than Memory. These storage systems include:

◊ CD and DVD-ROMs◊ hard drives◊ floppy drives◊ tape storage ◊ other systems

◊ Storage devices are considered I/O (Input/Output) devices.

Memory1.16

Page 17: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

MEMORY – BASIC CONCEPTS

Memory1.17

Page 18: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Basic Terminology

◊ Bit◊ A single binary digit (1 or 0) ◊ abbreviated with a small b◊ Communication-based systems use bits as the standard

unit of measure. i.e. USB 2.0 transfer rate is 480 Mbps (Megabits per second), and basic Ethernet is 10 Mbps.

◊ Byte◊ 8 bits ◊ Abbreviated with a capital B◊ Computer-based devices such as memory, hard drives,

ROM drives, flash drives and other similar devices have capacity rated in Bytes. i.e. a 100 GB drive has a stated capacity of 100 Billion Bytes, equal to 800 Billion bits.

Memory1.18

Page 19: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Memory Terminology

◊ Cell: the element that can store a single bit of data.

◊ Word: the number of bits that represent an instruction or data. Usually determined by the data bus width.

◊ Capacity: the total number of bits or bytes a memory device can store.

◊ Density: a ratio, describes the physical space occupied by memory.

Memory1.19

Page 20: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Memory Capacity

◊ Memory devices store bits of data from the data bus, therefore these bits are arranged with the same width as the data bus.

◊ An 8 bit bus has an 8 bit word.

D7 D6 D5 D4 D3 D2 D1 D0

This is a single 8-bit word

Memory1.20

Page 21: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Memory Capacity

◊ In turn, we can access each byte of information stored in a memory device by an individual address.

D7 D6 D5 D4 D3 D2 D1 D0

D7 D6 D5 D4 D3 D2 D1 D0

00

01

10

11

D7 D6 D5 D4 D3 D2 D1 D0

D7 D6 D5 D4 D3 D2 D1 D0

Ad

dre

ss

Memory1.21

Page 22: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Memory Capacity

D7 D6 D5 D4 D3 D2 D1 D0

D7 D6 D5 D4 D3 D2 D1 D0

00

01

10

11

D7 D6 D5 D4 D3 D2 D1 D0

D7 D6 D5 D4 D3 D2 D1 D0

Ad

dre

ss

This example has a 2-bit address (22)There are 4 storage locations for 8 bit wordsTotal capacity is 32 bitsThis memory unit is a “4 x 8” (4 x 8-bit words)

Memory1.22

Page 23: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

◊ With more address bits comes increased capacity.

Memory Capacity

D7 D6 D5 D4 D3 D2 D1 D0

D7 D6 D5 D4 D3 D2 D1 D0

0000

0001

1110

1111 D7 D6 D5 D4 D3 D2 D1 D0

D7 D6 D5 D4 D3 D2 D1 D0

Ad

dre

ss

How many storage locations are there?

Memory1.23

Page 24: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Memory Notation

◊ Standard notation for memory is:# addressable locations x word size

◊ The number of addressable locations is somewhat “rounded”. It follows a pattern that is familiar to us:◊ 1, 2, 4, 8, 16, 32, 64, 128, 256, 512◊ Example: 128k is actually 131,072 addresses (217)

“32k x 8” means 32k of addresses (rounded) for 8 bit words

Memory1.24

Page 25: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Review Questions

Complete the following table.

4k x 8 64k x 16 256k x 4 512 x 32

Capacity (words)

Word Size

# address lines

# data lines

Memory1.25

Page 26: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Tri-State Devices

Page 27: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Logic States

What is the logic state at point A?

1 0

A

What is the logic state of just a piece of wire?

Page 28: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

A 3rd Logic State?

◊ Digital logic has 2 logic states:◊ ‘0’, or low, representing ground, or zero volts◊ ‘1’, or high, representing Vcc, or full operational voltage

◊ Digital logic has 2 dynamic states:◊ ‘0’ to ‘1’ transition◊ ‘1’ to ‘0’ transition

◊ In some cases, connection to a common conductor, such as a BUS, is required. In these cases, we cannot connect two or more standard outputs together. The results will be short circuits, half voltages and unpredictable outcomes.

Page 29: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Tri-States

◊ A Tri-State buffer (or a 3-state buffer) utilizes a second input to electrically disconnect the output.

◊ The third state is called “high impedance”, or simply “Z”. ◊ The control input is often labeled “OE”, or Output Enable.

A OE Y Status

0 1 0Enabled (A to Y)

1 1 1

X 0 Z Disabled (high Z)

A

OE

Y

Elec 1.29

IEEE/ANSI Symbol for Tri-State

Page 30: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Tri-State Bus

In this example, several device outputs share the common bus. The control system is

designed to allow only 1 device to be connected to the bus; all

other devices are tri-stated.

Elec 1.30

Page 31: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Using Tri-State Devices

◊ “Tri-stated” is the term used to describe an output from a tri-state device that is in the high impedance state.

◊ Tri-states should be used cautiously…never allow a gate input to float. Pull-up resistors are frequently used with tristated buses.

A

OE

B X

Elec 1.31

Page 32: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

USING MEMORY

Memory 2.32

Page 33: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Memory

Memory 2.33

Page 34: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Memory in a P System

◊ Memory is an integral part of microcomputers.

◊ Memory quickly provides the data and instructions the microprocessor needs to process.

◊ Memory provides an area where the microprocessor can quickly store processed data.

◊ Memory IC’s come in a variety of configurations and are selected based on the microprocessor and the bus structures.

Memory 2.34

Page 35: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Basic Requirements

◊ A microprocessor needs the ability to:◊ Select the memory device◊ Provide the address◊ Decide to read from it, or write to it◊ Ensure it is ready to send or receive the data

◊ Memory device circuits need:◊ Tri-state outputs because they are connected to a common bus◊ A decoder to select the appropriate word location◊ Direction control◊ Bus connections to receive or send data◊ An enabling input

Memory 2.35

Page 36: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Basic Elements

Memory Device

Data/Instructions

Address Select

Read/Write

Memory 2.36

Page 37: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Interconnection

CPU

MemoryA

dd

ress

Data

Sele

ctR

/W’

Memory 2.37

Page 38: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

The 2114 Memory Chip

◊ The 2114 chip is an old device but it serves as a good example of a basic memory device

◊ Basic Characteristics:◊ Static RAM◊ Non-inverting◊ Common input and output pins◊ TTL compatible

Memory 2.38

Page 39: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

RAM Requirements

◊ An input to control direction: a READ or a WRITE operation.

◊ An input to select the device.◊ Address input◊ Data input/output

A6 VccA5 A7A4 A8A3 A9A0 D0A1 D1A2 D2CS D3Gnd WE

21

14

Memory 2.39

Page 40: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Read/Write

◊ A RAM chip has a read/write selection:◊ If written as :

◊ A logic low will Enable Writing to the device◊ A logic high will Enable Reading from the device

◊ Write = Input to the memory device◊ Read = Output from the memory device

WE

Memory 2.40

Page 41: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Chip Select

◊ A RAM chip has a Chip Select:◊ If written as :

◊ A low will enable the output and enable the input◊ A high will tristate the output and disable the input

◊ CS is used to avoid bus contention problems.

CS

Memory 2.41

Page 42: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

RAM Chip Questions

1. What is the word size?2. How many addressable locations are there?3. What is the capacity?4. What connections and input logic is required to

read from the device?5. What are the origins of the signals?

A6

Vcc

A5

A7

A4

A8

A3

A9

A0

D0

A1

D1

A2

D2

CS

D3

Gn

dW

E

2114

Memory 2.42

Page 43: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Function Table

CS’ WE’ D Mode

H X Hi-Z Disabled

L L H Write H

L L L Write L

L H Dout Read

A6 VccA5 A7A4 A8A3 A9A0 D0A1 D1A2 D2CS D3Gnd WE

21

14

Memory 2.43

Page 44: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Using 2 Memory IC’s

◊ The 2114 is a 210 4, or 1024 4 bit memory device. Each IC has a 4-bit word size; two ICs can be combined to create an 8 bit word.

Memory 2.44

Page 45: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Control and Timing

Memory Device

Data/Instructions

Address Select

Read/Write

Memory 2.45

Page 46: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Specifications

◊ Electrical:◊ Most electrical specifications resemble the TTL-LS

specifications.◊ 4.75 to 5.25 V for Vcc◊ VOH = 2.4V◊ VOL = 0.4V

◊ Exceeds TTL-LS specification for power:◊ ICC = 95 mA at room temperature

Memory 2.46

Page 47: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

DRAM

◊ DRAM is used an memory in computer systems whereas SRAM is used internally by the microprocessor (cache).

◊ Dynamic RAM is inexpensive with greater density and much lower power consumption but is one of the slowest types of memory.

◊ The DRAM stores its values as a capacitive charge on tiny MOS capacitors and therefore requires continual refresh to maintain its values. This is a challenge for designing with DRAM.

◊ Computer systems may have separate circuitry to refresh the DRAM without using CPU cycles.

Memory 2.47

Page 48: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

DRAM

◊ DRAM addressing is somewhat more complex. Each bit is accessed instead of each word as in SRAM. This increases the number of addresses and therefore the number of addresses.

◊ Addressing is done in a matrix configuration with the address split between Rows and Columns. Input pins RAS (Row Address Strobe) and CAS (Column Address Strobe) control the input address.

Memory 2.48

Page 49: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

DRAM

◊ Representation of DRAM (4x4)

Memory 2.49

WIKI CC

Page 50: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

DRAM

◊ A multiplexer is often used to reduce the number of address lines required.

◊ Refreshing DRAM is done in 2 manners:◊ Burst mode, where all values of a Row are enabled at

once, and access to memory is suspended for this time.◊ Distributed mode, where the refresh is done with

memory access functions. This is more complex to manage.

Memory 2.50

Page 51: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

Review

◊ DRAM has advantages over SRAM:◊ Low power◊ High density

◊ DRAM has some disadvantages over SRAM:◊ More difficult to configure◊ Requires refresh cycles

◊ DRAM is popular with microcomputers

Memory 2.51

Page 52: Memory 1 Technician Series ©Paul Godin Created March 2008 Edit Jan 2014.

©Paul R. Godinprgodin°@ gmail.com

END

Memory1.52