It is given that memory size = 216 bytes
So memory address should be of size 16-bit because of byte-addressable main memory, each byte should be uniquely addressed.
a) Number of blocks of main memory
Since each block of main memory is mapped into a block in the cache.
The size of the main memory block is also the same as size of cache block.
Main memory size = 216 bytes
Block size = 32 byte = 25 bytes
Number of blocks of main memory = 216 / 25 = 211 = 2048 blocks.
b) Format of memory address seen by the cache.
The 16-bit memory address is seen by the cache is divided into 3 fields tag, block number, and offset(within a block).
Size there are 64 cache blocks, so the block number field is of size 6 bit. (6 bits are required to identify one block)
Size there one cache block is 32 bytes, so the offset field is of size 5 bit. (5 bits are required to identify one bye within a block)
Therefore the size of the tag field = 16 - 6 - 5 = 5 bits
Memory address =
tag(5 bit) | block(6 bit) | offset(5 bit) |
c) Memory address (F8C9)16
(F8C9)16 = 1 1 1 1 1 0 0 0 1 1 0 0 1 0 0 1
tag(first 6 bits) = 1 1 1 1 1
block number(next 6 bits) = 0 0 0 1 1 0 = 6th block of the cache
offset(last 5 bits) = 0 1 0 0 1 = 9th byte within the block
So (F8C9)16 maps to 6th block of the cache and it refers to 9th byte within that block.
---------------------------------------------------
I hope this helped you,
Please rate this answer if it helped you,
Thank you for the opportunity
QUESTION 2 Suppose a computer using direct mapped cache has 216 bytes of byte-addressable main memory...
Suppose a computer using direct mapped cache has 232 byte of byte-addressable main memory, and a cache of 1024 blocks, where each cache block contains 32 bytes. a. How many blocks of main memory are there? b. What is the format of a memory address as seen by the cache, i.e., what are the sizes of the tag, block, and offset fields? c.To which cache block will the memory address 0x000063FA map?
Suppose a computer using a fully associative cache has 232 bytes of byte-addressable main memory and a cache of 1024 blocks, were each cache block contains 32 bytes. Consider a memory address as seen by the cache. How many bits are in the tag field?
Suppose a computer has 216 words of main memory, and a cache of 64 blocks, where each cache block contains 32 words. Please explain step by step. a) If this cache is a direct-mapped cache, what is the format of a memory address as seen by the cache, i.e., what are the sizes of the tag and word fields? b) To which cache block will the memory reference F8C9 map? c) If this cache is fully associative, what is the...
A direct-mapped cache consists of 8 blocks. Byte-addressable main memory contains 4K blocks of 8 bytes each. Access time for the cache is 22ns, and the time required to fill a cache slot from main memory is 300ns. (This time allows us to determine the block is missing and bring it into cache.) Assume a request is always started in parallel to both cache and to main memory(so if it is not found in cache, we do not have to...
Suppose a computer using set associative cache has 216 words of main memory and a cache of 32 blocks, and each cache block contains 8 words. 3. If this cache is 2-way set associative, what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, set, and word fields? If this cache is 4-way set associative, what is the format of a memory address as seen by the cache?...
Name #5 Suppose a compute memory and a cache of 1024 blocks, where each cache block contains a) How many blocks of main memory are there? b) Wha r using direct mapped cache has 4bytes of byte-addressable main t is the format of a memory address as seen by the cache; that is, what are the sizes of the tag, block, and offset fields? To which cache block will the memory address 0x000063FA map? c)
Memory Hierarchy and Cache Consider a computer with byte-addressable memory. Addresses are 24-bits. The cache is capable of storing a total of 64KB of data, and frames of 32 bytes, Show the format of a 24-bit memory address for: a- Direct mapped cache b- 2-way associative cache c- 4-way associative cache d- For each type of cache above, indicate where would the reference memory address 0DEFB6 map
For a 16K-byte, direct-mapped cache, suppose the block size is 32 bytes, draw a cache diagram. Indicate the block size, number of blocks, and address field decomposition (block offset, index, and tag bit width) assuming a 32-bit memory address.
Problem 6. Suppose we have a computer with 32 megabytes of main memory, 256 bytes of cache, and a block size of 16 bytes. For each configuration below, determine the memory address format, indicating the number of bits needed for each appropriate field (i.e. tag, block, set, offset). Show any relevant calculations. Direct cache mapping and memory is byte-addressable a) Direct cache mapping and memory is word-addressable with a word size of 16 bits b) c) 2-way set associative cache...
Suppose a computer using fully-associative cache has 222 words of main memory and a cache of 32 blocks, where each cache block contains 16 bytes. How many blocks of main memory are there? Assuming memory addressing starts from zero, what is the highest memory address? How many bits are needed to represent all of the memory addresses? What is the format of a memory address as seen by the cache, that is, what are the sizes of the tag and...