SlideShare a Scribd company logo
1 of 34
1
Semiconductor Memory
ECE 3710 Fall 2006
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
2
Memory: basic concepts
• Stores large number of bits
– m x n: m words of n bits each
– k = Log2(m) address input signals
– or m = 2k words
– e.g., 4,096 x 8 memory:
• 32,768 bits
• 12 address input signals
• 8 input/output data signals
• Memory access
– r/w: selects read or write
– enable: read or write only when asserted
– multiport: multiple accesses to different locations
simultaneously
m × n memory
…
…
n bits per word
m
words
enable
2k × n read and write
memory
A0
…
r/w
…
Q0
Qn-1
Ak-1
memory external view
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
3
Write ability and storage permanence
• Traditional ROM/RAM distinctions
– ROM
• read only, bits stored without power
– RAM
• read and write, lose stored bits without
power
• Traditional distinctions blurred
– Advanced ROMs can be written to
• e.g., EEPROM
– Advanced RAMs can hold bits without
power
• e.g., NVRAM
• Write ability
– Manner and speed a memory can be
written
• Storage permanence
– Ability of memory to hold stored bits
after they are written
Write ability and storage permanence of memories,
showing relative degrees along each axis (not to scale).
External
programmer
OR in-system,
block-oriented
writes, 1,000s
of cycles
Battery
life (10
years)
Write
ability
EPROM
Mask-programmed ROM
EEPROM FLASH
NVRAM
SRAM/DRAM
Storage
permanence
Nonvolatile
In-system
programmable
Ideal memory
OTP ROM
During
fabrication
only
External
programmer,
1,000s
of cycles
External
programmer,
one time only
External
programmer
OR in-system,
1,000s
of cycles
In-system, fast
writes,
unlimited
cycles
Near
zero
Tens of
years
Life of
product
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
4
Writability
• Ranges of writability
– High end
• processor writes to memory simply and quickly
• e.g., RAM
– Middle range
• processor writes to memory, but slower
• e.g., FLASH, EEPROM
– Lower range
• special equipment, “programmer”, must be used to write to memory
• e.g., EPROM, OTP ROM
– Low end
• bits stored only during fabrication
• e.g., Mask-programmed ROM
• In-system programmable memory
– Can be written to by a processor in the microcomputer system using the memory
– Memories in high end and middle range of write ability
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
5
Storage permanence
• Range of storage permanence
– High end
• essentially never loses bits
• e.g., mask-programmed ROM
– Middle range
• holds bits days, months, or years after memory’s power source turned off
• e.g., NVRAM
– Lower range
• holds bits as long as power supplied to memory
• e.g., SRAM
– Low end
• begins to lose bits almost immediately after written – refreshing needed
• e.g., DRAM
• Nonvolatile memory
– Holds bits after power is no longer supplied
– High end and middle range of storage permanence
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
6
ROM: “Read-Only” Memory
• Nonvolatile
• Can be read from but not written to, by a
processor in an microcomputer system
• Traditionally written to, “programmed”,
before inserting to microcomputer system
• Uses
– Store software program for general-purpose
processor
– Store constant data (parameters) needed by system
– Implement combinational circuits (e.g., decoders)
2k × n ROM
…
Q0
Qn-1
A0
…
enable
Ak-1
External view
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
7
Example: 8 x 4 ROM
• Horizontal lines = words
• Vertical lines = data
• Lines connected only at circles
• Decoder sets word 2’s line to 1 if
address input is 010
• Data lines Q3 and Q1 are set to 1
because there is a “programmed”
connection with word 2’s line
• Word 2 is not connected with data
lines Q2 and Q0
• Output is 1010
8 × 4 ROM
3×8
decoder
Q0
Q3
A0
enable
A2
word 0
word 1
A1
Q2 Q1
programmable
connection
word line
data line
word 2
Internal view
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
8
Mask-programmed ROM
• Connections “programmed” at fabrication
– set of masks
• Lowest write ability
– only once
• Highest storage permanence
– bits never change unless damaged
• Typically used for final design of high-volume systems
– spread out NRE (non-recurrent engineering) cost for a low unit cost
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
9
OTP ROM: One-time programmable ROM
• Connections “programmed” after manufacture by user
– user provides file of desired contents of ROM
– file input to machine called ROM programmer
– each programmable connection is a fuse
– ROM programmer blows fuses where connections should not exist
• Very low write ability
– typically written only once and requires ROM programmer device
• Very high storage permanence
– bits don’t change unless reconnected to programmer and more fuses
blown
• Commonly used in final products
– cheaper, harder to inadvertently modify
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
10
.
(d)
(a)
(b)
source drain
+15V
source drain
0V
(c)
source drain
floating gate
5-30 min
EPROM: Erasable programmable ROM
• Programmable component is a MOS transistor
– Transistor has “floating” gate surrounded by an insulator
– (a) Negative charges form a channel between source and drain
storing a logic 1
– (b) Large positive voltage at gate causes negative charges to
move out of channel and get trapped in floating gate storing a
logic 0
– (c) (Erase) Shining UV rays on surface of floating-gate causes
negative charges to return to channel from floating gate restoring
the logic 1
– (d) An EPROM package showing quartz window through which
UV light can pass
• Better write ability
– can be erased and reprogrammed thousands of times
• Reduced storage permanence
– program lasts about 10 years but is susceptible to
radiation and electric noise
• Typically used during design development
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
11
Sample EPROM components
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
12
Sample EPROM programmers
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
13
EEPROM: Electrically erasable
programmable ROM
• Programmed and erased electronically
– typically by using higher than normal voltage
– can program and erase individual words
• Better write ability
– can be in-system programmable with built-in circuit to provide higher
than normal voltage
• built-in memory controller commonly used to hide details from memory user
– writes very slow due to erasing and programming
• “busy” pin indicates to processor EEPROM still writing
– can be erased and programmed tens of thousands of times
• Similar storage permanence to EPROM (about 10 years)
• Far more convenient than EPROMs, but more expensive
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
14
FLASH
• Extension of EEPROM
– Same floating gate principle
– Same write ability and storage permanence
• Fast erase
– Large blocks of memory erased at once, rather than one word at a time
– Blocks typically several thousand bytes large
• Writes to single words may be slower
– Entire block must be read, word updated, then entire block written back
• Used with embedded microcomputer systems storing large data
items in nonvolatile memory
– e.g., digital cameras, MP3, cell phones
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
15
Class Project Program Memory
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
16
Example
Show how to use a 128K x 8 FLASH to implement an 8K x 8 FLASH.
A0 – A12
13
A13 – A16
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
17
RAM: “Random-access” memory
• Typically volatile memory
– bits are not held without power supply
• Read and written to easily by microprocessor
during execution
• Internal structure more complex than ROM
– a word consists of several memory cells, each
storing 1 bit
– each input and output data line connects to each
cell in its column
– rd/wr connected to every cell
– when row is enabled by decoder, each cell has logic
that stores input data bit when rd/wr indicates write
or outputs stored bit when rd/wr indicates read
enable
2k × n read and write
memory
A0
…
r/w
…
Q0
Qn-1
Ak-1
external view
4×4 RAM
2×4
decoder
Q0
Q3
A0
enable
A1
Q2 Q1
Memory
cell
I0
I3 I2 I1
rd/wr To every cell
internal view
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
18
Basic types of RAM
• SRAM: Static RAM
– Memory cell uses flip-flop to store bit
– Requires 6 transistors
– Holds data as long as power supplied
• DRAM: Dynamic RAM
– Memory cell uses MOS transistor and
capacitor to store bit
– More compact than SRAM
– Retains data for only 2 – 4 ms
– “Refresh” required due to capacitor leak
• word’s cells refreshed when read
– Slower to access than SRAM
memory cell internals
Data
W
Data'
SRAM
Data
W
DRAM
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
19
RAM variations
• PSRAM: Pseudo-static RAM
– DRAM with built-in memory refresh controller
– Popular low-cost high-density alternative to SRAM
• NVRAM: Nonvolatile RAM
– Holds data after external power removed
– Battery-backed RAM
• SRAM with own permanently connected battery
• writes as fast as reads
• no limit on number of writes unlike nonvolatile ROM-based memory
– SRAM with EEPROM or FLASH
• stores complete RAM contents on EEPROM or FLASH before power turned off
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
20
Class Project data/stack memory
HM6264ALP
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
21
Example:
HM6264 & 27C256 RAM/ROM devices
• Low-cost low-capacity memory
devices
• Commonly used in 8-bit
microcontroller-based
embedded systems
• First two numeric digits indicate
device type
– RAM: 62
– ROM: 27
• Subsequent digits indicate
capacity in kilobits
– 64 Kbits = 8 Kbytes
– 256 Kbits = 32 Kbytes
Device Access Time (ns) Standby Pwr. (mW) Active Pwr. (mW) Vcc Voltage (V)
HM6264 85-100 .01 15 5
27C256 90 .5 100 5
22
20
data<7…0>
addr<12...0>
/OE
/WE
/CS1
CS2 HM6264
11-13, 15-19
2,23,21,24,
25, 3-10
22
27
20
26
data<7…0>
addr<14...0>
/OE
/CS
27C256
11-13, 15-19
27,26,2,23,21,
24,25, 3-10
block diagrams
device characteristics
HM6264 timing
diagrams
data
addr
OE
/CS1
CS2
Read operation
data
addr
WE
/CS1
CS2
Write operation
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
22
DRAM Structure
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
23
The TMS4464 (64Kx4) DRAM
But a 64K memory needs 16 address lines?
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
24
The TMS4464 DRAM Timing
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
25
DRAM Address Multiplexer
74LS157, quad 2-line to 1-line data selector/multiplexer
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
26
The 41256 (256Kx1) DRAM
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
27
Example: Address decoding
• 16-bit address bus (A0 – A15)
• Desired memory space:
– EPROM 16 Kbytes (0000, ..., 3FFF)
– RAM 8 Kbytes (4000, ..., 5FFF)
Address A15 A14 A13 /CS_EPROM /CS_RAM
0000 – 1FFF 0 0 0 0 1
2000 – 3FFF 0 0 1 0 1
4000 – 5FFF 0 1 0 1 0
Enable inputs
(active low)
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
28
Implementing combinational function
• Any combinational circuit of n functions of same k variables
can be done with 2k x n ROM
• How could we implement the previous EPROM/RAM decoder
with a tiny (and fast) 16-bit ROM circuit?
– a = A15, b = A14, c = A13, y = /CS_EPROM, z = /CS_RAM
Truth table
Inputs (address) Outputs
a b c y z
0 0 0 0 1
0 0 1 0 1
0 1 0 1 0
0 1 1 1 1
1 0 0 1 1
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1
0 1
0 1
1 0
1 1
1 1
1 1
1 1
1 1
z
y
c
enable
a
b
8×2 ROM
word 0
word 1
word 7
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
29
Composing memory
• Memory size needed often differs from size of readily
available memories
• When available memory is larger, simply ignore unneeded
high-order address bits and higher data lines
• When available memory is smaller, compose several smaller
memories into one larger memory
– Connect side-by-side to increase width of words
– Connect top to bottom to increase number of words
• added high-order address line selects smaller memory
containing desired word using a decoder
– Combine techniques to increase number and width of words
…
2m × 3n ROM
2m × n ROM
A0 …
enable 2m × n ROM
…
2m × n ROM
…
Q3n-1 Q2n-1
…
Q0
…
Am
Increase width
of words
2m+1 × n ROM
2m × n ROM
A0
…
enable
…
2m × n ROM
Am-1
Am
1 × 2
decoder
…
…
…
Qn-1 Q0
…
Increase number of words
A
enable
outputs
Increase number
and width of
words
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
30
Memory hierarchy
• Want inexpensive, fast
memory
• Main memory
– Large, inexpensive, slow
memory stores entire
program and data
• Cache
– Small, expensive, fast
memory stores copy of likely
accessed parts of larger
memory
– Can be multiple levels of
cache
Processor
Cache
Main memory
Hard disk
CD or DVD
Registers
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
31
Cache
• Usually designed with SRAM
– faster but more expensive than DRAM
• Usually on same chip as processor
– space limited, so much smaller than off-chip main memory
– faster access (1 cycle vs. several cycles for main memory)
• Cache operation:
– Request for main memory access (read or write)
– First, check cache for copy
• cache hit
– copy is in cache, quick access
• cache miss
– copy not in cache, read address and possibly its neighbors into cache
• Several cache design choices
– cache mapping, replacement policies, and write techniques
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
32
Dual-port RAM (DPRAM)
• Usually a static RAM circuit with two address and
data bus connections
– Shared RAM for two independent users
• Flexible communication link between two processors
– Master/slave
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
33
Serial memory interface
• Typically EEPROM or FLASH memory
– Compact package
– Low cost
– Slow access
– A convenient program storage
Serial vs. parallel interface
(32 Kbytes)
Embedded Systems Design: A Unified Hardware/Software Introduction
© 2000 Vahid & Givargis ECE 3710 Fall 2008
34
Summary
• Two memory categories:
– Write ability
– Storage permanence
• Various RAM and ROM alternatives for different needs
• Typically byte-wide memory components in embedded
microcomputer systems
• Compose smaller memory components into larger
memory systems
• Hierarchical memory even in many embedded systems

More Related Content

Similar to Memory.ppt

Embedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_MicrocontrollersEmbedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_Microcontrollersdundappabhangari
 
BAIT1003 Chapter 2
BAIT1003 Chapter 2BAIT1003 Chapter 2
BAIT1003 Chapter 2limsh
 
Computer memory
Computer memoryComputer memory
Computer memoryJayapal Jp
 
Rom (read only memory)
Rom (read only memory)Rom (read only memory)
Rom (read only memory)Hemin Patel
 
Microcontroller overview 1
Microcontroller overview 1Microcontroller overview 1
Microcontroller overview 1Sally Salem
 
Microprocessor fundamentals
Microprocessor fundamentalsMicroprocessor fundamentals
Microprocessor fundamentalsJLoknathDora
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptxPratik Gohel
 
06. System unit of computer
06. System unit of computer06. System unit of computer
06. System unit of computerTimesRide
 
LDC Seminar Hardware.ppt
LDC Seminar Hardware.pptLDC Seminar Hardware.ppt
LDC Seminar Hardware.pptkoodalcsc
 
Porting_uClinux_CELF2008_Griffin
Porting_uClinux_CELF2008_GriffinPorting_uClinux_CELF2008_Griffin
Porting_uClinux_CELF2008_GriffinPeter Griffin
 
Presentacion pujol
Presentacion pujolPresentacion pujol
Presentacion pujolDylan Real G
 
Avr microcontrollers training (sahil gupta - 9068557926)
Avr microcontrollers training  (sahil gupta - 9068557926)Avr microcontrollers training  (sahil gupta - 9068557926)
Avr microcontrollers training (sahil gupta - 9068557926)Sahil Gupta
 
Embedded system book very helpful needed and use by everyone
Embedded system book very helpful needed and use by everyoneEmbedded system book very helpful needed and use by everyone
Embedded system book very helpful needed and use by everyoneManojGupta666004
 
Introduction to Embedded C++.pptx
Introduction to Embedded C++.pptxIntroduction to Embedded C++.pptx
Introduction to Embedded C++.pptxMohamedSaied316569
 
Mces MOD 1.pptx
Mces MOD 1.pptxMces MOD 1.pptx
Mces MOD 1.pptxRadhaC10
 

Similar to Memory.ppt (20)

Embedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_MicrocontrollersEmbedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_Microcontrollers
 
BAIT1003 Chapter 2
BAIT1003 Chapter 2BAIT1003 Chapter 2
BAIT1003 Chapter 2
 
Computer memory
Computer memoryComputer memory
Computer memory
 
Rom (read only memory)
Rom (read only memory)Rom (read only memory)
Rom (read only memory)
 
Day1
Day1Day1
Day1
 
Microcontroller overview 1
Microcontroller overview 1Microcontroller overview 1
Microcontroller overview 1
 
Microprocessor fundamentals
Microprocessor fundamentalsMicroprocessor fundamentals
Microprocessor fundamentals
 
Micro controller
Micro controllerMicro controller
Micro controller
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptx
 
Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
 
06. System unit of computer
06. System unit of computer06. System unit of computer
06. System unit of computer
 
LDC Seminar Hardware.ppt
LDC Seminar Hardware.pptLDC Seminar Hardware.ppt
LDC Seminar Hardware.ppt
 
Porting_uClinux_CELF2008_Griffin
Porting_uClinux_CELF2008_GriffinPorting_uClinux_CELF2008_Griffin
Porting_uClinux_CELF2008_Griffin
 
Presentacion pujol
Presentacion pujolPresentacion pujol
Presentacion pujol
 
Avr microcontrollers training (sahil gupta - 9068557926)
Avr microcontrollers training  (sahil gupta - 9068557926)Avr microcontrollers training  (sahil gupta - 9068557926)
Avr microcontrollers training (sahil gupta - 9068557926)
 
Embedded system book very helpful needed and use by everyone
Embedded system book very helpful needed and use by everyoneEmbedded system book very helpful needed and use by everyone
Embedded system book very helpful needed and use by everyone
 
Introduction to Embedded C++.pptx
Introduction to Embedded C++.pptxIntroduction to Embedded C++.pptx
Introduction to Embedded C++.pptx
 
Mces MOD 1.pptx
Mces MOD 1.pptxMces MOD 1.pptx
Mces MOD 1.pptx
 
10. compute-part-1
10. compute-part-110. compute-part-1
10. compute-part-1
 
Window ce
Window ceWindow ce
Window ce
 

Recently uploaded

CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixingviprabot1
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 

Recently uploaded (20)

CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixing
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 

Memory.ppt

  • 2. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 2 Memory: basic concepts • Stores large number of bits – m x n: m words of n bits each – k = Log2(m) address input signals – or m = 2k words – e.g., 4,096 x 8 memory: • 32,768 bits • 12 address input signals • 8 input/output data signals • Memory access – r/w: selects read or write – enable: read or write only when asserted – multiport: multiple accesses to different locations simultaneously m × n memory … … n bits per word m words enable 2k × n read and write memory A0 … r/w … Q0 Qn-1 Ak-1 memory external view
  • 3. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 3 Write ability and storage permanence • Traditional ROM/RAM distinctions – ROM • read only, bits stored without power – RAM • read and write, lose stored bits without power • Traditional distinctions blurred – Advanced ROMs can be written to • e.g., EEPROM – Advanced RAMs can hold bits without power • e.g., NVRAM • Write ability – Manner and speed a memory can be written • Storage permanence – Ability of memory to hold stored bits after they are written Write ability and storage permanence of memories, showing relative degrees along each axis (not to scale). External programmer OR in-system, block-oriented writes, 1,000s of cycles Battery life (10 years) Write ability EPROM Mask-programmed ROM EEPROM FLASH NVRAM SRAM/DRAM Storage permanence Nonvolatile In-system programmable Ideal memory OTP ROM During fabrication only External programmer, 1,000s of cycles External programmer, one time only External programmer OR in-system, 1,000s of cycles In-system, fast writes, unlimited cycles Near zero Tens of years Life of product
  • 4. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 4 Writability • Ranges of writability – High end • processor writes to memory simply and quickly • e.g., RAM – Middle range • processor writes to memory, but slower • e.g., FLASH, EEPROM – Lower range • special equipment, “programmer”, must be used to write to memory • e.g., EPROM, OTP ROM – Low end • bits stored only during fabrication • e.g., Mask-programmed ROM • In-system programmable memory – Can be written to by a processor in the microcomputer system using the memory – Memories in high end and middle range of write ability
  • 5. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 5 Storage permanence • Range of storage permanence – High end • essentially never loses bits • e.g., mask-programmed ROM – Middle range • holds bits days, months, or years after memory’s power source turned off • e.g., NVRAM – Lower range • holds bits as long as power supplied to memory • e.g., SRAM – Low end • begins to lose bits almost immediately after written – refreshing needed • e.g., DRAM • Nonvolatile memory – Holds bits after power is no longer supplied – High end and middle range of storage permanence
  • 6. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 6 ROM: “Read-Only” Memory • Nonvolatile • Can be read from but not written to, by a processor in an microcomputer system • Traditionally written to, “programmed”, before inserting to microcomputer system • Uses – Store software program for general-purpose processor – Store constant data (parameters) needed by system – Implement combinational circuits (e.g., decoders) 2k × n ROM … Q0 Qn-1 A0 … enable Ak-1 External view
  • 7. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 7 Example: 8 x 4 ROM • Horizontal lines = words • Vertical lines = data • Lines connected only at circles • Decoder sets word 2’s line to 1 if address input is 010 • Data lines Q3 and Q1 are set to 1 because there is a “programmed” connection with word 2’s line • Word 2 is not connected with data lines Q2 and Q0 • Output is 1010 8 × 4 ROM 3×8 decoder Q0 Q3 A0 enable A2 word 0 word 1 A1 Q2 Q1 programmable connection word line data line word 2 Internal view
  • 8. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 8 Mask-programmed ROM • Connections “programmed” at fabrication – set of masks • Lowest write ability – only once • Highest storage permanence – bits never change unless damaged • Typically used for final design of high-volume systems – spread out NRE (non-recurrent engineering) cost for a low unit cost
  • 9. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 9 OTP ROM: One-time programmable ROM • Connections “programmed” after manufacture by user – user provides file of desired contents of ROM – file input to machine called ROM programmer – each programmable connection is a fuse – ROM programmer blows fuses where connections should not exist • Very low write ability – typically written only once and requires ROM programmer device • Very high storage permanence – bits don’t change unless reconnected to programmer and more fuses blown • Commonly used in final products – cheaper, harder to inadvertently modify
  • 10. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 10 . (d) (a) (b) source drain +15V source drain 0V (c) source drain floating gate 5-30 min EPROM: Erasable programmable ROM • Programmable component is a MOS transistor – Transistor has “floating” gate surrounded by an insulator – (a) Negative charges form a channel between source and drain storing a logic 1 – (b) Large positive voltage at gate causes negative charges to move out of channel and get trapped in floating gate storing a logic 0 – (c) (Erase) Shining UV rays on surface of floating-gate causes negative charges to return to channel from floating gate restoring the logic 1 – (d) An EPROM package showing quartz window through which UV light can pass • Better write ability – can be erased and reprogrammed thousands of times • Reduced storage permanence – program lasts about 10 years but is susceptible to radiation and electric noise • Typically used during design development
  • 11. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 11 Sample EPROM components
  • 12. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 12 Sample EPROM programmers
  • 13. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 13 EEPROM: Electrically erasable programmable ROM • Programmed and erased electronically – typically by using higher than normal voltage – can program and erase individual words • Better write ability – can be in-system programmable with built-in circuit to provide higher than normal voltage • built-in memory controller commonly used to hide details from memory user – writes very slow due to erasing and programming • “busy” pin indicates to processor EEPROM still writing – can be erased and programmed tens of thousands of times • Similar storage permanence to EPROM (about 10 years) • Far more convenient than EPROMs, but more expensive
  • 14. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 14 FLASH • Extension of EEPROM – Same floating gate principle – Same write ability and storage permanence • Fast erase – Large blocks of memory erased at once, rather than one word at a time – Blocks typically several thousand bytes large • Writes to single words may be slower – Entire block must be read, word updated, then entire block written back • Used with embedded microcomputer systems storing large data items in nonvolatile memory – e.g., digital cameras, MP3, cell phones
  • 15. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 15 Class Project Program Memory
  • 16. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 16 Example Show how to use a 128K x 8 FLASH to implement an 8K x 8 FLASH. A0 – A12 13 A13 – A16
  • 17. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 17 RAM: “Random-access” memory • Typically volatile memory – bits are not held without power supply • Read and written to easily by microprocessor during execution • Internal structure more complex than ROM – a word consists of several memory cells, each storing 1 bit – each input and output data line connects to each cell in its column – rd/wr connected to every cell – when row is enabled by decoder, each cell has logic that stores input data bit when rd/wr indicates write or outputs stored bit when rd/wr indicates read enable 2k × n read and write memory A0 … r/w … Q0 Qn-1 Ak-1 external view 4×4 RAM 2×4 decoder Q0 Q3 A0 enable A1 Q2 Q1 Memory cell I0 I3 I2 I1 rd/wr To every cell internal view
  • 18. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 18 Basic types of RAM • SRAM: Static RAM – Memory cell uses flip-flop to store bit – Requires 6 transistors – Holds data as long as power supplied • DRAM: Dynamic RAM – Memory cell uses MOS transistor and capacitor to store bit – More compact than SRAM – Retains data for only 2 – 4 ms – “Refresh” required due to capacitor leak • word’s cells refreshed when read – Slower to access than SRAM memory cell internals Data W Data' SRAM Data W DRAM
  • 19. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 19 RAM variations • PSRAM: Pseudo-static RAM – DRAM with built-in memory refresh controller – Popular low-cost high-density alternative to SRAM • NVRAM: Nonvolatile RAM – Holds data after external power removed – Battery-backed RAM • SRAM with own permanently connected battery • writes as fast as reads • no limit on number of writes unlike nonvolatile ROM-based memory – SRAM with EEPROM or FLASH • stores complete RAM contents on EEPROM or FLASH before power turned off
  • 20. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 20 Class Project data/stack memory HM6264ALP
  • 21. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 21 Example: HM6264 & 27C256 RAM/ROM devices • Low-cost low-capacity memory devices • Commonly used in 8-bit microcontroller-based embedded systems • First two numeric digits indicate device type – RAM: 62 – ROM: 27 • Subsequent digits indicate capacity in kilobits – 64 Kbits = 8 Kbytes – 256 Kbits = 32 Kbytes Device Access Time (ns) Standby Pwr. (mW) Active Pwr. (mW) Vcc Voltage (V) HM6264 85-100 .01 15 5 27C256 90 .5 100 5 22 20 data<7…0> addr<12...0> /OE /WE /CS1 CS2 HM6264 11-13, 15-19 2,23,21,24, 25, 3-10 22 27 20 26 data<7…0> addr<14...0> /OE /CS 27C256 11-13, 15-19 27,26,2,23,21, 24,25, 3-10 block diagrams device characteristics HM6264 timing diagrams data addr OE /CS1 CS2 Read operation data addr WE /CS1 CS2 Write operation
  • 22. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 22 DRAM Structure
  • 23. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 23 The TMS4464 (64Kx4) DRAM But a 64K memory needs 16 address lines?
  • 24. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 24 The TMS4464 DRAM Timing
  • 25. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 25 DRAM Address Multiplexer 74LS157, quad 2-line to 1-line data selector/multiplexer
  • 26. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 26 The 41256 (256Kx1) DRAM
  • 27. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 27 Example: Address decoding • 16-bit address bus (A0 – A15) • Desired memory space: – EPROM 16 Kbytes (0000, ..., 3FFF) – RAM 8 Kbytes (4000, ..., 5FFF) Address A15 A14 A13 /CS_EPROM /CS_RAM 0000 – 1FFF 0 0 0 0 1 2000 – 3FFF 0 0 1 0 1 4000 – 5FFF 0 1 0 1 0 Enable inputs (active low)
  • 28. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 28 Implementing combinational function • Any combinational circuit of n functions of same k variables can be done with 2k x n ROM • How could we implement the previous EPROM/RAM decoder with a tiny (and fast) 16-bit ROM circuit? – a = A15, b = A14, c = A13, y = /CS_EPROM, z = /CS_RAM Truth table Inputs (address) Outputs a b c y z 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 z y c enable a b 8×2 ROM word 0 word 1 word 7
  • 29. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 29 Composing memory • Memory size needed often differs from size of readily available memories • When available memory is larger, simply ignore unneeded high-order address bits and higher data lines • When available memory is smaller, compose several smaller memories into one larger memory – Connect side-by-side to increase width of words – Connect top to bottom to increase number of words • added high-order address line selects smaller memory containing desired word using a decoder – Combine techniques to increase number and width of words … 2m × 3n ROM 2m × n ROM A0 … enable 2m × n ROM … 2m × n ROM … Q3n-1 Q2n-1 … Q0 … Am Increase width of words 2m+1 × n ROM 2m × n ROM A0 … enable … 2m × n ROM Am-1 Am 1 × 2 decoder … … … Qn-1 Q0 … Increase number of words A enable outputs Increase number and width of words
  • 30. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 30 Memory hierarchy • Want inexpensive, fast memory • Main memory – Large, inexpensive, slow memory stores entire program and data • Cache – Small, expensive, fast memory stores copy of likely accessed parts of larger memory – Can be multiple levels of cache Processor Cache Main memory Hard disk CD or DVD Registers
  • 31. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 31 Cache • Usually designed with SRAM – faster but more expensive than DRAM • Usually on same chip as processor – space limited, so much smaller than off-chip main memory – faster access (1 cycle vs. several cycles for main memory) • Cache operation: – Request for main memory access (read or write) – First, check cache for copy • cache hit – copy is in cache, quick access • cache miss – copy not in cache, read address and possibly its neighbors into cache • Several cache design choices – cache mapping, replacement policies, and write techniques
  • 32. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 32 Dual-port RAM (DPRAM) • Usually a static RAM circuit with two address and data bus connections – Shared RAM for two independent users • Flexible communication link between two processors – Master/slave
  • 33. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 33 Serial memory interface • Typically EEPROM or FLASH memory – Compact package – Low cost – Slow access – A convenient program storage Serial vs. parallel interface (32 Kbytes)
  • 34. Embedded Systems Design: A Unified Hardware/Software Introduction © 2000 Vahid & Givargis ECE 3710 Fall 2008 34 Summary • Two memory categories: – Write ability – Storage permanence • Various RAM and ROM alternatives for different needs • Typically byte-wide memory components in embedded microcomputer systems • Compose smaller memory components into larger memory systems • Hierarchical memory even in many embedded systems