IKI20210 Pengantar Organisasi Komputer Kuliah no. 6b: Memori
Bobby Nazief (
[email protected]) Johny Moningka (
[email protected])
1
Agenda ° Review teknologi memori ° Static RAM (SRAM) ° Dynamic RAM (DRAM) ° Struktur Memori Besar
° Referensi: Ch. 5 (Computer Organization, Harmarcher)
2
1
Review: 5 Komponen Komputer
Computer Processor
Memory
(active)
(passive)
Control (“brain”)
Datapath (“brawn”)
Devices
Keyboard, Mouse
Input (where programs, data live when running)
Disk (permanent storages)
Output
Display, Printer
3
Istilah/Jenis Semikonduktor Memori RAM
-- Random Access Memory
time taken to access any arbitrary location in memory is constant
SRAM
-- Static RAM
A RAM chip design technology (see later)
DRAM
-- Dynamic RAM
A RAM chip design technology (see later)
ROM
-- Read Only Memory R O M s are R A M s with data built-i n w h e n t h e chip is created. Usually stores BIOS info. Older uses included storage of bootstrap info
PROM
-- Programmable ROM
A ROM which can be programmed
EPROM
-- Erasable PROM
A PROM which can be programmed, erased by exposure to UV radiation
E E R O M – Electrical E P R O M
A PROM programmed & erased electrically
4
2
Istilah …?? Tambahan istilah:
SIMM
Single In- Line Memory Module
DIMM
Dual In - Line Memory Module
FPM RAM
Fast Page- M o d e R A M
EDO RAM
Extended -data -out RAM
A packaging technology (single 32-bit data path) A packaging technology (dual 32-bit data paths) An older technology capable of about 60ns cycle time More modern FPM RAM, exploiting address coherency (see cachelater) capable of about 20ns access speed SDRAM
Synchronous DRAM Synchronous Dynamic RAM; allows access speeds as low as about 10ns PC 100, PC133, PC2100, PC2600 => memory product you can buy
5
Connection: Memory - Processor
Processor
k-bit address bus
MAR
Memory Sampai 2k addressable locations
n-bit data bus Panjang word = n bits
MDR
Control lines, R/W, MFC, etc.
6
3
Konsep Dasar ° Memory: akses per byte • Transfer dilakukan per-word (cepat, kelipatan bytes) • Misalkan: 32-bit komputer => address 32 bit Kemampuan addressing: 2 ^ 32 = 4 Gbytes • Jika transfer data per-word: 32 bit (data bus) => 4 bytes • Bytes mana yang diakses dari kemungkinan word tsb? - Perlu 2 bits untuk menentukan bytes yang mana dari word - Sisa bit: 30 bits digunakan untuk address word 7
Organisasi Internal Memori ° Bentuk array: terdiri dari sel memori • Sel berisi 1 bit informasi • Baris dari sel membentuk untaian satu word • Contoh: 16 x 8 memori - memori SRAM mengandung 16 words - setiap words terdiri dari 8 bit data - Kapasitas memori: 16 x 8 = 128 bits • Decoder digunakan untuk memilih baris word mana yang akan diakses - Tipikal SRAM, array 1 dimensi => indeks dari baris pada array tersebut.
8
4
Review: Static RAM Cell 6-Transistor SRAM Cell 0
Latch => menyimpan state 1 bit Transistor T bertindak sebagai switch Contoh: state 1
T
T 0
b’
°
word (row select)
1
1
b
Latch dapat berubah dengan: - put bit value pada b dan b’ - word line pull high (select)
Write: 1. Drive bit lines sesuai dengan bit (mis. b = 1, b’ = 0) 2. Select row => store nilai b dan b’ menjadi state latch
°
Read: 1. Precharge (set) bit lines high 2. Select row 3. Sense amp mendeteksi bit lines mana yang low => state bit
9
Static RAM (SRAM) ° SRAM dapat menyimpan “state” (isi RAM) selama terdapat “tegangan” power supply ° Sangat cepat, 10 nano-detik ° Densitas rendah (bits per chip) => memerlukan 6 transistor per-sel => mahal ° Pilihan teknologi memori: sangat cepat dengan kapasitas kecil
10
5
Contoh: 1-level-decode SRAM (16 x 8) Word => 8 bit data b7
b7’
b1
b1’
b0
b0’
W0
W1
A0 A1 A2
Address Address decoder decoder
memory cells
A3 W15
16 words
Input/output lines
sense/write sense/write amps amps
sense/write sense/write amps amps
sense/write sense/write amps amps
d7
d1
d0
R/W’
CS
11
Review: Kuliah Lalu ° Random Access Memory (RAM) • Tempat penyimpanan dimana waktu akses konstan untuk setiap lokasi memori • Waktu akses: 5 nsec sampai 100 nsec.
° Static RAM (SRAM) • Semikonduktor RAM yang dapat menyimpan data (state 1 dan 0) selama terdapat “power”. • Sangat cepat (orde 10 nsec), kapasitas kecil, dan mahal. • Digunakan: high speed memori (supercomputer) dan cache memori
12
6
Review: 1-Transistor Memory Cell (DRAM) Kapasitor menyimpan state 1 (charged) atau 0 (discharge) Perlu refresh!
row select row high, T “on”,
° Write: 1. Drive bit line 2. Select row (T sebagai switch “on” => charge atau recharge C)
T C bit
° Read: 1. Select row, T switch “on”, C terhubung dengan bit line. 2. Sense Amp (terhubung dengan bit line): sense sesuai ambang batas (threshold) tegangan. Jika di bawah ambang batas, state 0, di atas maka state 1 3. Write: jika 1, maka Sense Amp drive “high” => recharge C supaya state tetap 1
° Refresh • Just do a dummy read to every cell. 13
Refreshing the Memory
1 written Vcap
refreshes
V CC HIGH LOW
threshold 0V
time 0 stored
Secara periodik refresh memori sel dengan melakukan operasi read setiap sel (mis. setiap 1 msec) 14
7
Classical DRAM Organization (square) bit (data) lines r o w
Each intersection represents a 1-T DRAM Cell
RAM Cell Array
d e c o d e r
word (row) select
row address
Column Selector & I/O Circuits
Column Address
° Row and Column Address together:
data
• Memilih 1 bit
15
Contoh: 1 K x 1 memory chip 5-bit decoder
W0 W1 W31
32 x 32 Memory cell array
5-bit row address Sense/write circuitry
32 x 1 Output/input multiplexer
R/W CS
5-bit column address 10-bit address Data Input/Output (1 bit)
16
8
Dynamic RAM (DRAM) ° Slower than SRAM • access time ~60 ns
° Nonpersistant • every row must be accessed every ~1 ms, (refreshed); karena “leakage” tegangan kapasitor
° Densitas tinggi: 1 transistor/bit • Lebih murah dari SRAM • ~$1/MByte [2002]
° Fragile • electrical noise, light, radiation
° Pilihan teknologi memori untuk kapasitas besar dan “low cost” 17
Struktur Memori Besar (1/4) Misalkan: Chip memori 128 x 8
8 data lines
17 address lines /CS
Chips select
/WE /CS
/WE
Function
Data Lines
H
X
not selected
Hi- Z
L
H
Read
data at location on address lines
L
L
Write
write data on data lines to address on address lines
18
9
Contoh: Struktur 1 MB (2/4) 1 MB dapat dikonstruksi dengan organisasi 8 chips memori 128 KB (8 x 128 x 8 = 1 MB) The address space is
This will be chip 0
partitioned into 128K blocks;
This will be chip 1
block 0 has addresses 0 -- 1 2 8 K -1 block 1 has addresses 128K -- 2 5 6 K-1 block 2 has addresses 256K -- 3 8 4 K -1 : : : : block 7 has addresses 896K -- 1 0 2 4 K -1
This will be chip 7
Berapa banyak bits yang diperlukan untuk alamat pada chips? memilih chips yang mana? 19
Contoh: Pembagian field address (3/4) 1MB requires 20 bits of address, Ide: membagi field address menjadi 2 yakni: bits untuk memilih chips dan address pada field tsb. Bits 19 - - 17 (3 address bits)
Bits 16 - - 0 (17 address bits)
17 bits select the address in each 128KB block (== each chip)
3 address bits select on of the 8 128KB blocks (chips)
20
10
Contoh: Struktur 1MB memory (4/4) 20 Address Lines 17 Address Lines A16 -- A0
Write 3 Address Lines A19 --A17
3- to- 8 /WE
decoder
Data Lines
21
Ringkasan (.. To remember) ° DRAM lambat tapi murah dan kapasitas besar (densitas tinggi) • Pilihan untuk memberikan kapasitas BESAR pada sistem memori.
° SRAM cepat tapi mahal dan kapasitas kecil • Pilihan untuk menyediakan sistem memori yang waktu aksesnya CEPAT.
° Struktur memori besar dapat dibangun dari kumpulan chips memori kecil: • Field alamat dibagi: field address dan field untuk memilih chips/memori yang mana. • Next topic: Trend teknologi memori (go to: http//www.tomshardware.com, search SDRAM guide)
22
11