Professional Documents
Culture Documents
Lecture 4 Main Memories
Lecture 4 Main Memories
Computer Architecture
Lecture 4: Internal Memories
ROM
DRAM
FLASH
Non-volatile Memory
Tham khảo chương 5, “Computer Organization and Architecture:
Designing for Performance”, William Stallings, 10th edition
• Bộ nhớ: thiết bị có thể bảo quản và khôi phục một thông tin
• Từ nhớ: tập bits có thể được đọc hay ghi đồng thời
1. Vị trí
2. Dung lượng
3. Đơn vị truyền
4. Kiểu truy cập
5. Hiệu năng
6. Kiểu vật liệu
7. Đặc trưng vật liệu
8. Tổ chức
• Vị trí
– CPU
– Internal
– External
• Dung lượng
– Phụ thuộc vào kích thước từ nhớ, và
– Số lượng từ nhớ
• Đơn vị truyền
– Bên trong: phụ thuộc vào độ rộng bus dữ liệu
– Bên ngoài: block(>từ nhớ)
– Đơn vị có thể đánh địa chỉ được
• Chiến thuật phân cấp bộ nhớ: How much? How fast? How
expensive?
– Registers g-
Re r s
e
i st
– L1 Cache Inb
me oard
mo
Ca
ch
e
in
ry Ma ory
– L2 Cache m e m
– Main memory Ou
t cd
eti M
isk
sto boar g n
M a D- R W
O
rag d
– Disk cache e C D -R W
C
D-
R M
D V D- R A y
a
DV lu-R
– Disk B
– Optical Of
f ta p
e
sto -line eti
c
rag gn
Ma
– Tape e
• Hiệu năng:
– Thời gian truy cập: khoảng thời gian từ khi gửi địa chỉ cho đến khi thu
được dữ liệu trọn vẹn
– Thời gian chu trình nhớ - Memory Cycle Time:
• Thời gian bộ nhớ đòi hỏi để “hồi phục” trước lần truy cập kế tiếp
• = access + recovery
– Tốc độ chuyển dữ liệu
• Kiểu vật liệu:
– Semiconductor :RAM
– Magnetic: Disk & Tape
– Optical: CD & DVD
– Others: Bubble, Hologram
2. Bộ nhớ trong
RAM
ROM
DRAM
FLASH
Non-volatile Memory
Control Control
• Random Access Memory (RAM): lưu giữ những dữ liệu tạm thời
• Read Only Memory (ROM): lưu giữ thông tin cố định
sense amp
Vdd
bitline
1
0 voltage
Wordline Enabled
DRAM cells
Sense Amps
Row Buffer
• State 0
– C2 high, C1 low
– T2 T3 off, T1 T4 on
• Dynamic cell
– Đơn giản, kích thước nhỏ gọn
– Mật độ cell cao
– Chi phí thấp
– Cần chu kỳ làm tươi
– Cho phép kết hợp thành các đơn vi nhớ lớn
• Static
– Nhanh hơn, cồng kềnh hơn
– Cho phép xây dựng các bộ nhớ Cache
Flash
EPROM EEPROM
Memory
Electrically erasable
programmable read-only Intermediate between
Erasable programmable
memory EPROM and EEPROM in
read-only memory
both cost and functionality
• Truy cập được đồng bộ hoá với một đồng hồ bên ngoài
– Địa chỉ được truyền đến RAM
– RAM tìm dữ liệu (CPU đợi như DRAM thông thường)
– Khi SDRAM chuyển dữ liệu theo thời gian đồng bộ với system clock,
CPU biết được khi nào dữ liệu sẵn sàng
=> CPU không cần phải chờ và có thể làm việc khác
– Burst mode: cho phép SDRAM thiết lập dòng dữ liệu theo từng block
– Chỉ chuyển dữ liệu 1 lần trong 1 chu kỳ đồng hồ
• DDR-SDRAM - Double-data-rate 1 SDRAM
– Gửi dữ liệu 2 lần trong một chu kỳ đồng hồ (leading & trailing edge)
• DDR2-SDRAM - Double-data-rate 2 SDRAM
• DDR3-SDRAM - Double-data-rate 3 SDRAM
• Cache DRAM: (misubishi)
– Tích hợp SRAM cache (16k) vào trong DRAM chip
Command frequency
does not change
Burst Length
Row Decoder
Row Memory
Address Cell Array
Sense Amps
Row Buffer
Column
Address Column Decoder
Data Bus
9/14/2021 Duy-Hieu Bui 29
ĐẠI HỌC
CÔNG NGHỆ
Ví dụ : 16 Mb DRAM (4M x 4)
RAS CAS WE OE
Refresh
Counter MUX
Data Input
A10 Column Buffer D1
Address D2
Refresh circuitry D3
Buffer Data Output D4
Buffer
Column Decoder
Sense Amps
Row Buffer
0x001
0x000
0x002 Column Decoder
Data Bus
512 words by
Decode 1 of
Memory address 512 bits
512
register (MAR) Chip #1
9 Decode 1 of
512 bit-sense Memory buffer
register (MBR)
1
2
9 3
4
5
6
7
8
512 words by
Decode 1 of
512 bits
512
Chip #8
Decode 1 of
512 bit-sense
(+ return trip…)
Scheduler Buffer
Memory
Controller
Bank 0 Bank 1
• Thường từ 60-100ns
• Thường từ 60-100ns
• Hard Failure
– Permanent physical defect
– Memory cell or cells affected cannot reliably store data but become
stuck at 0 or 1 or switch erratically between 0 and 1
– Can be caused by:
• Harsh environmental abuse
• Manufacturing defects
• Wear
• Soft Error
– Random, non-destructive event that alters the contents of one or more
memory cells
– No permanent damage to memory
– Can be caused by:
• Power supply problems
• Alpha particles
Error Signal
Data Out M
Corrector
Data In M M K
f
Memory Compare
K K
f
1 1 1 0
1 1
1 0 1 0
0
C C
(c) A B (d) A B
1 1 0 1 1 0
1 1
0 0 0 0
0 0
C C
9/14/2021 Duy-Hieu Bui 42
ĐẠI HỌC
CÔNG NGHỆ
Error correcting code efficiency
Bit
12 11 10 9 8 7 6 5 4 3 2 1
Position
Position
1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001
Number
Data
D8 D7 D6 D5 D4 D3 D2 D1
Bit
Check
C8 C4 C2 C1
Bit
Bit
12 11 10 9 8 7 6 5 4 3 2 1
position
Position
1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001
number
Data bit D8 D7 D6 D5 D4 D3 D2 D1
Check
C8 C4 C2 C1
bit
Word
stored 0 0 1 1 0 1 0 0 1 1 1 1
as
Word
fetched 0 0 1 1 0 1 1 0 1 1 1 1
as
Position
1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001
Number
Check
0 0 0 1
Bit
Control Gate
N+ N+
Drain Source
P-substrate
+ + + + + +
Control Gate Control Gate
Floating Gate – – – – – –
N+ N+ N+ N+
Drain Source Drain Source
P-substrate P-substrate
(b) Flash memory cell in one state (c) Flash memory cell in zero state
High High
High Hard High Hard
Low Easy Low Easy
High Hard High Hard
Active Code Active Code
Low Low Low Low
power Low execution power Low execution
High High
High High
Read speed Capacity Read speed Capacity
High High
Write speed Write speed
Increasing performance
and endurance
SRAM
STT-RAM
DRAM
PCRAM
NAND FLASH
ReRAM
HARD DISK
Decreasing cost
per bit,
increasing capacity
or density
(a) STT-RAM
Heater Heater
Insulator Insulator
(b) PCRAM
(c) ReRAM
9/14/2021 Duy-Hieu Bui 51
Figure 5.19 Nonvolatile RAM Technologies
ĐẠI HỌC
CÔNG NGHỆ
Emerging memories
• Khái niệm về bộ nhớ trong máy tính, các đặc điểm chính, …
• Bộ nhớ chính
– Nguyên tắc
– Phân loại
– Tổ chức bộ nhớ lớn