Sheet 5
Sheet 5
Sheet 5
Solutions For
Selected Problems
5.4 (a)
The total RAM capacity = 2K = 2048 =
211 bytes
The capacity of a one RAM chip = 256 =
28 bytes
The number of memory chips needed =
211 / 28 = 8 memory chips.
The total ROM capacity = 4K = 4096 = 212
bytes
The capacity of a one RAM chip = 1024 =
210 bytes
The number of memory chips needed =
212 / 210 = 4 memory chips.
(b) The memory and I/O address map for the
system is shown below:
Hexadecimal Address Bus
component
address 13 12 11 10 9 8 7 6 5 4 3 2 1 0
(c)
The address ranges are shown in the table above.
'
M i is the sum of exclusive-OR
functions.
The logic diagram can be easily
drawn referring to Fig.5-9.
5.13
Number of lines per set = 4
Line size = 2 word (16-bit word)
Total cache capacity = 4K word (32-bit
word)
= 4 * 2 = 8K word (16-bit word).K
Number of lines in the cache
=cache capacity / Line size = 8K / 2 = 4K
Lines
Total number of sets in the cache
= Number of lines in the cache / Number of lines
per set
= 4K / 4 = 210 sets.
As the processor has a 24-bit address:
The cache address will be mapped as
f
o
l
l
o
w
s
:
1-bit for selecting the word within a
line.
10-bits for the Set addressing.
The remaining 13-bits will be reserved
as tag bits
The arrangement will be as follows:
13-bit 10-bit 1-bit
Tag Set word
SHEET(5)