RAM and ROM
RAM and ROM
RAM and ROM
1
Picture of Memory
Address Data
00000000
00000001
• You can think of memory as being one big array
00000002
of data.
.
– The address serves as an array index.
.
– Each address refers to one word of data.
.
.
• You can read or modify the data at any given .
memory address, just like you can read or .
modify the contents of an array at any given
.
index.
.
.
.
FFFFFFFD
FFFFFFFE
FFFFFFFF
Word 2
Memory Signal Types
3
Read-only memory (ROM)
2k x n ROM • Non-volatile
– If un-powered, its content
k
ADRS Data n retains
• Read-only
CS Out – normal operation cannot change
RD contents
4
ROM Programming
5
ROM Usage
6
ROM Structure
7
Memories and functions
8
Logic-in-ROM Example
9
Introduction to RAM
10
Block diagram of RAM
2k x n memory
k ADDRESS DATA n
IN/OUT
RD/WR’
CS
11
Reading RAM
2k x n memory
k ADDRESS DATA n
IN/OUT
RD/WR’
CS
12
Reading RAM
13
Writing RAM
2k x n memory
k ADDRESS DATA n
IN/OUT
RD/WR’
CS
14
Writing RAM
15
Static memory
• Static memory is modeled using one latch for each bit of storage.
16
16x1 RAM Using a 4x4 RAM Cell Array
17
8x2 RAM Using a 4x4 RAM Cell Array
18
Typical memory sizes
Address Data
• Some typical memory capacities: 00000000
– PCs usually come with 128-256MB RAM. 00000001
– PDAs have 8-64MB of memory. 00000002
– Digital cameras and MP3 players can have .
32MB or more of storage. .
.
• Many operating systems implement virtual .
memory, which makes the memory seem larger .
than it really is. .
– Most systems allow up to 32-bit addresses. .
This works out to 232, or about four billion,
different possible addresses. .
– With a data size of one byte, the result is .
apparently a 4GB memory! .
– The operating system uses hard disk space FFFFFFFD
as a substitute for “real” memory. FFFFFFFE
FFFFFFFF
19
Dynamic memory
20
DRAM-chip internal organization
21
DRAM Including Refresh Logic
22
Dynamic vs. static memory
• Real systems augment dynamic memory with small but fast sections of
static memory called caches.
– Typical processor caches range in size from 128KB to 320KB.
– That’s small compared to a 128MB main memory, but it’s enough to
significantly increase a computer’s overall speed.
23
ROMs vs. RAMs
• Some newer types of ROMs do allow for easier writing, although the
speeds still don’t compare with regular RAMs.
– MP3 players, digital cameras and other toys use CompactFlash,
Secure Digital, or MemoryStick cards for non-volatile storage.
– Many devices allow you to upgrade programs stored in “flash ROM.”
24
DRAM read timing