Lecture 7-1 Memory
Lecture 7-1 Memory
Lecture 7-1 Memory
Memory
Kyeongha Kwon
School of EE, KAIST
1
Memory Unit
A collection of cells capable of storing a large quantity of binary information
− For storage, binary information is transferred to a memory unit
− For processing, binary information is retrieved from a memory unit and transferred to
registers in the processing unit
− Intermediate and final results obtained in the processing unit are transferred back to
be stored in memory
Binary data
A collection of cells
Processing Unit Data for storage storing a large
Memory
(Comb. logic + Registers) quantity of binary
information
Data for processing
2
A Word in Memory
A memory unit stores binary information in groups of bits called words
Word
− A group of bits that go in and out of memory as a unit
− A group of 1’s and 0’s that represents some binary‐coded information
Byte
− A group of 8 bits Word size: 1 byte
Memory
e.g.1 byte = 8 bits 8 bits of data
16-bit word = 2 bytes
32-bit word = 4 bytes
Capacity = the total number of bytes that the memory can store
3
2 Types of Memories
Random‐access memory (RAM)
− Volatile memory
− Information is temporarily stored
− Read/write operation
− Working area of computer
Example
− A memory with 1K (=210) words of 16 bits → 2K bytes
− 10-bit address ranging from 0 to 1023 required
k-bit address
Memory
2k words
10-bit address 210-1
6
RAM Write Operation
Steps to write a word
1. Apply the binary address of the desired word to the address lines
2. Apply the data bits that should be stored in memory to data input lines
3. Assert Enable and clear Read/Write control signals to 0, thereby enabling the write mode
1 Enable
0 Read/Write
8
RAM Read Operation
Steps to read a word
1. Apply the binary address of the designed word to the address lines
2. Assert Enable and Read/Write control signals to enable the read mode
3. The memory unit will apply the bits from the word to the data output lines
Not used
1 Enable
1 Read/Write
T1 T2 T3 T4 T5
1 1
T1 T2 T3 T4 T5
Read A Read B
0 Input
0 Input`
1 0
15
RAM Overall Architecture
A RAM with a capacity of 16 bits (4 words of 4bits each)
[4 words x 4 bits RAM]
− One word line = a row of bits 4 words
Write
Memory with 2m words needs m address lines
− Address inputs given to a decoder 4 bits
Memory enable
− EN = 0; No word selected
− EN = 1; Select only one-word line
Read
16
2-Dimensional Address Decoding
Large-capacity RAMs have thousands of words
A memory with 2k words (n bits per word) requires k address lines that go into a
k x 2k decoder
− Address decoding can be very costly
− E.g. 1024 words need a 10-to-1024 decoder
• 10-to-1024 decoder requires 1024 AND gates (10 inputs per gate)
17
2-Dimensional Address Decoding
Two-dimensional selection
− Divide into row selection and column selection
18
Read-Only Memory (ROM)
Nonvolatile memory
− Allows permanent storage of binary information
- Contains the programming that enables a computer to start up or
regenerate each time it is turned on
- Only read operation (normally, no write operation no data input lines)
- Internal organization is similar to RAM
Depth (= #words)
Width
(= #bits per word)
19
Read-Only Memory (ROM)
Example: 32 x 8 ROM (32 words, 8 bit each)
− 2k x n ROM has k x 2k decoder + n 2k-input OR gates
2k 32 X 8 = 256 interconnections
Address decoder
n OR gates
8 x 32-input OR
20
Programmable ROM (PROM)
Fuse: normally connects two points, but can be blown (= open) by applying high voltage
− Once blown, it can’t be restored ① 5 bits
Once programmed,
Can’t be changed
m0=A’B’C’ Connected Open
m1=A’B’C
③ 8 X 5 crosspoints
m2=A’BC’
A
m3=A’BC
3 to 8
B
decoder m4=AB’C’
C m5=AB’C
m6=ABC’
② 3-bit address
m7=ABC
① 23 words
②1
③1 1 1 1
④ Outputs : 10110010 23
PROM Truth Table
A ROM can be used to implement a truth table
- k inputs, n outputs
- Each minterm of each function can be specified
A B C F0 F1 F 2 F 3 F 4
A
3 Inputs ROM 0 0 0 0 1 0 1 0
B 8 words
Lines 0 0 1 1 1 1 1 0
C x 5 bits
0 1 0 0 0 0 1 1
0 1 1 1 1 1 0 1
1 0 0 0 1 0 1 0
F0 F 1 F 2 F 3 F 4 1 0 1 0 1 1 1 1
1 1 0 1 0 1 0 1
1 1 1 1 1 0 1 0
5 Outputs Lines
24
Summary
Memories provide storage for computers
- Memories are organized in words
- Each word has multiple bits and is selected by input address
25
Notice
Additional tutoring?
− Email to TA in charge of tutoring on Chapter 7
− Sara Kim (김사라, sara@kaist.ac.kr)
26