Documente Academic
Documente Profesional
Documente Cultură
Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Tech
Memory
Random Access Memory (RAM)
Contrary to Serial Access Memory (e.g. Tape) Static Random Access Memory (SRAM)
Data stored so long as Vdd is applied 6-transistors per cell Faster Differential Require periodic refresh Smaller (can be implemented with 1 or 3 transistor) Slower Single-Ended
BitLine
BitLine
Typically each bit is implemented with 6 transistors (6T SRAM Cell) During read, the bitline and its inverse are precharged to Vdd (1) before set WL=1 During write, put the value on Bitline and its inverse on Bitline_bar before set WL=1
Bitline
1-transistor DRAM cell During a write, put value on bitline and then set WL=1 During a read, precharge bitline to Vdd (1) before assert WL to 1 Storage decays, thus requires periodic refreshing (read-sense-write)
Memory Description
Capacity of a memory is described as
# addresses x Word size Examples:
Memory # of addr # of data lines # of addr lines # of total bytes
1M x 8
2M x 4
1,048,576
2,097,152
8
4
20
21
1 MB
1 MB
1K x 4
4M x 32
1024
4,194,304
4
32
10
22
512 B
16 MB
16K x 64
16,384
64
14
128 KB
0
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
2 A1 CS
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
3
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
Chip Select
D7
D6
D5
D4
D3
D2
D1
D0
0
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
2 A1=0 3 CS
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
1-bit
1-bit
1-bit
1-bit
1-bit
1-bit
1-bit
1-bit
Chip Select=1
Access address = 0x1
D7
D6
D5
D4
D3
D2
D1
D0
Use 2 Decoders
2-to-4 Decoder A1 Row Decoder 1
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
8x4 Memory 0
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
2 A2 CS
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
3
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
Chip Select
D0 D1 D2 D3
A0
Tristate Buffer
En
Input
Output
Input En Vdd
Output
Input
En
Output
En
CMOS circuit
11
Read/Write Memory
8x4 Memory 0
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
A1
1
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
2
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
A2 CS Rd/Wr = 0
3
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
Chip Select = 0
CS
D0 D1 D2 D3
A0
12
Read/Write Memory
8x4 Memory 0
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
A1
1
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
2
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
A2 CS Rd/Wr = 1
3
1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit 1-bit
Chip Select = 1
CS
D0 D1 D2 D3
A0
13
D6
D5 D4
CS
D3
1Mx4
A0 A0
CS R/W
D2
D1
D0
CS
14
D3
D2
D1 D0
CS
R/W
CS
CS
15
D7
1Mx4 CS R/W
D6 D5 D4 D3 D2
1Mx4
D1
D0
CS
1Mx4 CS R/W
1Mx4 CS R/W
16
A0
Memory Model
32-bit address space can address up to 4GB (232) different memory locations
0x00000000 0x00000001 0x00000002
0x0A
0xB6 0x41
0x00000003
0xFC
0xFFFFFFFF
0x0D
Little Endian
Least significant byte of a multi-byte word is stored at the lowest memory address e.g. Intel x86
Some embedded & DSP processors would support both for interoperability
18
Endianness Examples
Store 0x87654321 at address 0x0000, byte-addressable
0x0000 0x0001 0x0002
0x87
0x65 0x43
0x21
0x43 0x65
0x0003
0x21
0x0003
0x87
e f 10 11 12 13
1c 1d 1e 1f
0x34 -----0x10
20
21
0x43
----------0x0E 0x43
14
15
16
17 18 19 1a 1b
0x81
0x1E 0x0B ------
0x81
0x1E 0x2B
ROM
2k words N-bit per work
21
32x8 ROM
5 A4 A3 A2 A1 A0 5-to-32 Decoder
28 29 30 31 0 1 2 3
32x8 ROM
D7
D6
D5
D4
D3
D2
D1
D0
22
1
1
1
1
1
1
1
1
0
1
0
1
1
1
0
1
1
0
0
0
1
0
1
0
0
1
A4 A3 A2 5-to-32 Decoder
0 1 2
A1 A0
29 30 31
D7 D6 D5 D4 D3 D2 D1 D0
23
X 0 1 2 3 4 5 6 7
F(X)=X2 0 1 4 9 16 25 36 49
24
X2 X1 X0
3-to-8 Decoder
2 3 4 5 6 7
F5
F4
F3
F2
F1
F0
25
X2 X1 X0
3-to-8 Decoder
2 3 4 5 6 7
F5
F4
F3
F2
F1
F0
= X0
Not Used
26
X
000 001 010 011 100 101 110 111
F(X)=X2
000000 000001 000100 001001 010000 011001 100100 110001
X2 X1 X0
3-to-8 Decoder
2 3 4 5 6 7
F5
F4
F3
F2
F1
F0
27
OUTPUT
(Programmable) Read-Only Memory (ROM) Programmable AND plane Programmable Connections Programmable OR plane
INPUT
OUTPUT
F/F OUTPUT
INPUT
F2
29
F1 A B AC BC F1 AB AC BC F2 AB AC A BC
30
F1 AB AC BC F2 AB AC A BC
F2
31
PAL Device
A Programmable AND Plane A A B B IO1 IO2 IO1 IO1 IO1
IO2
B Fixed OR Plane
32
IO2
HCPLD (High Capacity PLD) is often used to refer to both CPLD and FPGA
34
CPLD structure
Logic block
PLD
PLD
PLD
PLD
I/O block
Interconnects
PLD
PLD
PLD
PLD
35
FPGA Structure
Logic block
I/O block
Interconnects
36
FPGA Programmability
Floating gate transistor
Used in EPROM and EEPROM
Antifuse
Similar to fuse Originally an Open-Circuit One-Time Programmable (OTP)
37