Академический Документы
Профессиональный Документы
Культура Документы
BEE-446 2011
Chapter # 05
Memory
Muhammad Jameel <muhammad.jameel@seecs.edu.pk>
Chapter 5 Memory
Outline
Memory Write Ability and Storage Permanence Common Memory Types Composing Memory Memory Hierarchy and Cache
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
Introduction
Embedded systems functionality aspects
Processing
processors transformation of data
Storage
memory retention of data
Communication
buses transfer of data
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
Introduction
Interfacing memory with CPU
Address lines Data lines Control lines
Enable, read, write, ready, size, cs etc.
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
m words
n bits per word
memory external view
Memory access
r/w: selects read or write enable: read or write only when asserted multiport: multiple accesses to different locations simultaneously
r/w
enable A0 Ak-1
Qn-1 Q0
6
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
Memory Types
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, DDRAM Write ability Manner and speed a memory can be written Storage permanence ability of memory to hold stored bits after they are written
7
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
Write ability
Ranges of write ability
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
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik 8
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 memorys 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 e.g., DRAM
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik 9
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
10
enable A0
Qn-1 Q0
Ak-1
Store software program for general-purpose processor program instructions can be one or more ROM words Store constant data needed by system Implement combinational circuit
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
11
Example: 8 x 4 ROM
Horizontal lines = words Vertical lines = data Lines connected only at circles Decoder sets word 2s 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 2s line Word 2 is not connected with data lines Q2 and Q0 Output is 1010
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik 12
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
13
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
14
ROM
Activity
Sketch a 3 x 4 ROM
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
15
ROM
Activity
Sketch a 3 x 4 ROM
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
16
ROM Types
Masked Programmed OTPROM EPROM EEPROM Flash
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
17
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 cost for a low unit cost
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik 18
(a)
+15V
source drain
(b)
5-30 min
source
drain
(c) (d)
20
. Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
. Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
21
Similar storage permanence to EPROM (about 10 years) Far more convenient than EPROMs, but more expensive
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik 22
Flash Memory
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
Used with embedded systems storing large data items in nonvolatile memory
e.g., digital cameras, TV set-top boxes, cell phones
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik 23
24
Data'
Data
DRAM Data W
RAM Variations
PSRAM: Pseudo-static RAM
DRAM with built-in memory refresh controller Popular low-cost high-density alternative to SRAM
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
26
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
27
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
28
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
29
Multi-Port Memory
Motivation
Consider CPU Core register file
One read or write per cycle limits processors performance Complicates pipelining: Difficult for instructions to simultaneously read/write register file or on-chip memory Common arrangement in pipelined CPU is 2 read ports and 01 write port
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
30
Multi-Port Memory
Add decoder, another set of read/write logic, bit lines, word lines
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
31
Composing memory
Memory size needed often differs from size of readily available memories
Required size is 2^k x 8 but available is 4k x 16
Composing memory
Connect side-by-side to increase width of words
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
33
Composing memory
Connect top to bottom to increase number of words
added high-order address line selects smaller memory containing desired word using a decoder
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
34
Composing memory
Combine techniques to increase number and width of words
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
35
Composing memory
Activity
Compose 1k x 8 ROM into a 2k x 16 ROM
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
36
Composing memory
Compose 1k x 8 ROM into a 2k x 16 ROM
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
37
Basic DRAM
Address bus multiplexed between row and column components Row and column addresses are latched in, sequentially, by strobing ras and cas signals, respectively Refresh circuitry can be external or internal to DRAM device
Refresh circuitry disabled during read or write operation
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
38
Basic DRAM
data
Col Addr . Buffer Data In Buffer
Col Decoder
rd/wr
address
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
Row Decoder
cas address
row col col col
data
data
data
data
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
40
data
data
data
Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis And Dr. Osman Hassan, Modified By : Jameel Nawaz Malik
41