Ch9 - MEMORY DEVICES PDF

Title Ch9 - MEMORY DEVICES
Course Digital Electronics
Institution Universiti Teknologi MARA
Pages 9
File Size 516.4 KB
File Type PDF
Total Downloads 57
Total Views 155

Summary

MEMORY DEVICES
Objectives :
RAM – Read Only Memory
Write and Read operation
Expanding RAM Capacity ...


Description

CHAPTER 9 MEMORY DEVICES Objectives 

RAM – Read Only Memory



Write and Read operation



Expanding RAM Capacity

122

Memory Devices

9.1 Memory Cell A RAM is organized as an array of memory cells together with an address decoder and I/O drivers. As shown below, a memory cell (mc) can be constructed with a SR latch and logic gates. The memory cell is activated/selected when Select = 1. If the Read/Write = 0, the value of Input will stored in the latch. If the Read/Write = 1, the bit stored in the SR latch will be output.

The memory shown above is an example of 4 x 3 memory consisting of 12 memory cells. For each memory access, the address decodes the address and selects one of the rows.

123

Memory Devices

If ME=1 and R/W=0, the data from the Input will be written into each cell of the row selected. If ME=1 and R/W=1, the data from the row selected will be passed to the output. n

Memory components are manufactured in sizes 2 x m, where n and m can vary over a wide range of numbers. A 4 x 3 memory has an address lines n=2, and a word size m = 3.

An 8 x 4 memory consists of 32 memory cells, where the number of address n

lines is n= 3 (2 = 8) and the word size is 4.

A 1K x 8bit memory consists of 1024 x 8 = 8192 memory cells. The number n

10

of address lines is n =10 (2 = 1K =1024 = 2 ). The address ranges from 0 to 1023. The word size is m= 8 bit.

124

Memory Devices

Example 1: Given a 16K x 8 bit memory chip: a) b) c) d) e) f)

Determine the number of input and output lines. Determine the number of address lines. Determine the word size. Determine the memory cells. What is capacity in bytes? Draw the memory diagram.

Solution: a) b) c) d) e) f)

Input and output lines => 8 lines The number of address lines => 16K = 24. 210 = 24+10 = 214 ; n = 14 The word size = 8 bit The memory cells = 16 x 1024 x 8 = 131072 memory cells Capacity in bytes = 16 x 1024 x 1 byte = 16384 bytes Memory diagram: Input

8

R/W

8

Output

16K x 8 bit

ME 14 Address

Example 2: Given a 32K x 16 bit memory chip: a) b) c) d)

Determine Determine Determine Determine

the the the the

capacity in bits. capacity in bytes. number of address lines. word size.

Solution: a) b) c) d)

Capacity in bits = 32 x 1024 x 16 = 524288 bits Capacity in bytes = 32 x 1024 x 2 bytes = 65536 bytes The number of address lines => 32K = 25. 210 = 25+10 = 215 ; n = 15 The word size = 16 bit

125

Memory Devices

9.2 RAM Write and Read operation A 4 x 3 bit RAM is shown below.

It has:  Input and output data   

2

2 address lines which can access 2 = 4 memory location (address) from 0 to 3. Read/Write (R/W) or Write Enable (WE) Memory enable (ME) or chip select (CS)

To perform a write operation, data 101 at address 01. 1. 2. 3. 4.

Data input = 101 Address A1A0 = 01 R/W = 0 or WE = 0 Finally the ME or CS must go 0.

The memory address 01 will now contain the data 101.

To perform a read operation, for example: read the contents of address location 01. 1. The ME or CS = 1 2. R/W or WE = 1 3. The address is A1A0 =01. The output is 101.

126

Memory Devices

9.4 Expanding the Memory Capacity In many memory applications, the required RAM or ROM memory capacity cannot be satisfied by one memory chip. Instead, several memory chips must be combined to provide the capacity or the word size. Suppose that we need a memory that can store 16 x 4 bit, and all that we have are 8 x 4 bit chips. By combining two 8 x 4 chips as shown below, we can expand the memory to a 16 x 4. The 4 input and output lines are connected to a common four-line data bus. The R/W is connected to the common R/W line. Since the total capacity of this memory is 16 x 4, there must be 16 different addresses. This requires 4 n

address lines (2 = 16). The upper address line S is used to select RAM0 or RAM1. The other 3 address line (A2A1A0) is used to select the memory location from the RAM. To select RAM0 or RAM1, we use a 1:2 decoder or a NOT gate. If S=0, RAM0 is selected, if S=1 RAM1 is selected.

127

Memory Devices

A simplified memory diagram above is shown below:

1:2

By combining three 8 x 4 chips, we can expand the memory to a 24 x 4. This n

requires 5 address lines (2 = 24). The upper address line S1S0 is used to select RAM0, RAM1 or RAM2. The other 3 address line (A2A1A0) is used to select the memory location from the RAM. To select RAM0, RAM1 or RMA2, we use a 2:4 decoder. S1S0 =00 to select RAM0, S 1S0=01 to select RAM1 and S1S0=10 to select RAM2. The S1S0 = 11 is not used.

2

2:4 3

4

128

Memory Devices

Example 1: Given an 8K x 8 bit memory chip: a) b) c) d)

Determine the capacity of the chip in bytes Determine the number of address lines. How many 8K x 8 bit chips are needed to produce 32K x 8 bit? What type of decoder is required to expand the memory capacity to 32K x 8 bit? e) Draw the expanded memory diagram in (d) Solution: a) b) c) d) e)

Capacity in bytes = 8 x 1024 x 1 byte = 8192 bytes The number of address lines => 8K = 23. 210 = 23+10 = 213 ; n = 13 Chip needed = 32/8 = 4 chips Type of decoder = 2:4 decoder Expanded memory diagram:

Input

8

8

Output

8K x 8 bit ME 13 8

8 8K x 8 bit ME

8

8 13 8

8 8K x 8 bit ME 13

8

8 8K x 8 bit ME

R/W 2:4 13 Address

13

129

Memory Devices

9.4 Exercises 1. a. Perform a write operation into the RAM. b. Perform a read operation from address 010.

2. Given an 4K x 8 bit memory: a. Determine the word size b. Determine the number of input lines c. Determine the capacity in bits d. Determine the number of address lines. e. Draw the 4K x 8 bit memory. f. How many chips are needed to produce a 12K x 8 bit memory? g. What type of decoder is required to expand the memory capacity to 12K x 8 bit? h. Draw the expanded memory diagram in (f) 3. Given a 16K x 16 bit memory: a. Determine the word size b. Determine the number of memory cells c. Determine the number of output lines d. Determine the capacity in bytes e. Determine the number of address lines. f. How many chips are needed to produce a 32K x 16 bit memory? g. Draw the expanded memory diagram in (f) 4. Given a 4M x 8 bit memory chip: a. Determine the number of input and output lines b. Determine the capacity in bits c. Determine the number of address lines. d. Draw the 4M x 8 bit memory. e. How many chips are needed to produce a 16M x 8 bit memory? f. What type of decoder is required to expand the memory capacity to 16M x 8 bit? g. Draw the expanded memory diagram in (e)....


Similar Free PDFs