Professional Documents
Culture Documents
data-in write/read
A.J. Han Vinck 2
Bus structure
H enable
H enable
L disable
States are: High ( +5 V 1), Low ( 0 V 0 ) and Disconnected ( High impedance := Hi-Z )
Q1 OUT
Q2 L
A.J. Han Vinck
inverter
5
B C decoder data
A.J. Han Vinck
in oe
6
ROM
RAM
CPU
Input/output
device
Memory out
bus
A.J. Han Vinck 10
11
The larger RAM. - some specific constellations: - how to make a larger memory from smaller ones
Random Access Memory: read and write to any location specified by the address
We refer to this as a 2k x n memory. There are k address lines, which can specify one of 2k addresses. Each address contains an n-bit word. 2k x n memory
k n
ADRS DATA CS WR
OUT
For example, a 224 x 16 RAM contains 224 = 16M words, each 16 bits long. The RAM would need 24 address lines. The total storage capacity is 224 x 16 = 228 bits.
A.J. Han Vinck 13
Notice that the DATA input is unused for read operations. 2k x n memory
k n
1 0
ADRS DATA CS WR
OUT
14
1 1
ADRS DATA CS WR
OUT
15
Summary
2k x n memory
k n
CS
WR x 0 1
ADRS DATA CS WR
OUT
0 1 1
16
Size matters!
Memory sizes are usually specified in numbers of bytes (8 bits). The 228-bit memory translates into: 228 bits / 8 bits per byte = 225 bytes With the abbreviations below, this is equivalent to 32 megabytes.
Prefix Base 2 Kilo 210 = 1,024 Mega 220 = 1,048,576 Giga 230 = 1,073,741,824 Base 10 103 = 1,000 106 = 1,000,000 109 = 1,000,000,000
K M G
17
Writing to the RAM cell: Make CS = 1 and WR = 1, the latch control input will be 1. Then make WR = 0. Reading from the RAM cell and maintaining the current contents: The current latch contents will appear on OUT when CS = 1 .
A.J. Han Vinck 18
a 4 x 1 RAM
Since there are four words, ADRS is two bits. Each word is only one bit, so DATA and OUT are one bit each. Word selection is done with a decoder attached to the CS inputs of the RAM cells. Only one cell can be read or written at a time. Notice that the outputs are connected together with a single line!
A.J. Han Vinck 19
A 4 x 4 RAM
DATA and OUT are now each four bits long, so you can read and write fourbit words.
20
16 8
21
22
23
Address ranges
8 16
11 1111 1111 1111 1111 (0x3ffff) to 11 0000 0000 0000 0000 (0x30000) 10 1111 1111 1111 1111 (0x2ffff) to 10 0000 0000 0000 0000 (0x20000) 01 1111 1111 1111 1111 (0x1ffff) to 01 0000 0000 0000 0000 (0x10000) 00 1111 1111 1111 1111 (0x0ffff) to 00 0000 0000 0000 0000 (0x00000)
24
8 16
25
Connected to bus
19 address bits = 512 x 1024 addresses A.J. Han Vinck
26
Not selected
to tri-state logic
27
!Bit
Bit
Read: Make word line H + sense value on bit lines Write: Make word line H + put values to Bit and !Bit flip-flop stays in stable state when word line L
28
29
Word line HIGH enables the bitline to write in or read from the capacitor.
B it L i n e
Refresh cycles are needed for the whole memory to restore the content! (do dummy read) Small cell high density lower speed (refresh) more difficult to produce
30
Summary
A RAM looks like a bunch of registers connected together, allowing users to select a particular address to read or write.
Much of the hardware in memory chips supports this selection process: Chip select inputs Decoders Tri-state buffers
A.J. Han Vinck 31
size
A.J. Han Vinck 32
33