Question

a) Suppose we have a 64 KB, direct-mapped cache with 8-word blocks. Determine how many bits...

a) Suppose we have a 64 KB, direct-mapped cache with 8-word blocks. Determine how many
bits are required for the tag, index, and offset fields for a 32-bit memory address.
b) If instead, we use a 64 KB, 4-way set-associative cache with 8-word blocks, how many bits
will be required for the tag, index, and offset fields for a 32-bit address?
c) What type of cache is shown in problem 2? How many bits are required for this cache’s tag,
index, and offset fields for a 32-bit memory address?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:- a) The block size is 8-word = 8 x 4 byte = 32-byte.
Thus the number of bits in offset field is = log2(32) = 5.

Number of index bits = log2(64 KB / 32) = log2(216 / 25) = 11 bits.

Number of tag bits = 32 - (11 + 5) = 16.

Answer:- b) The block size is 8-word = 8 x 4 byte = 32-byte.
Thus the number of bits in offset field is = log2(32) = 5.

Number of index bits = log2(64 KB / 32*4) = log2(216 / 27) = 9 bits. Divided by 4 as 4-blocks per set.

Number of tag bits = 32 - (9 + 5) = 18.

c) Problem 2 is not given here. Please add. Thank you.

Add a comment
Know the answer?
Add Answer to:
a) Suppose we have a 64 KB, direct-mapped cache with 8-word blocks. Determine how many bits...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • question 2 and 3 2. Determine how many sets of cache blocks will be there for...

    question 2 and 3 2. Determine how many sets of cache blocks will be there for the following Cache memory size (in bytes) Direct Mapped Blocks Size (in bits) 32 64 218 2-way Set Associative Block Size (in bits) 32 64 A 2A6 [0.5 * 16 = 8] 4-way Set Associative Block Size (in bits) 32 64 SK 64K 256K 3. The physical memory address generated by a CPU is converted into cache memory addressing scheme using the following mapping...

  • Suppose a computer has 216 words of main memory, and a cache of 64 blocks, where...

    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...

  • For a direct-mapped cache with a 32-bit address and 32-bit words, the following address bits are...

    For a direct-mapped cache with a 32-bit address and 32-bit words, the following address bits are used to access the cache. TAG INDEX OFFSET 31-15 14-8 7-0 a. What is the cache block size (in words)? [13 points] b. How many blocks does the cache have? [12 points]

  • Consider a 32 KiB (not KB) cache in a system where the processor uses 64-bit words....

    Consider a 32 KiB (not KB) cache in a system where the processor uses 64-bit words. The system use the byte address of 36-bits. Each cache line (block) stores 256 bits. a) How many bits are used as the byte offset (b)? How many bits are used as the block offset (m)? b) How many index bits are used? How many blocks (lines) are available in the cache? c) Consider the cache being organized as direct-mapped cache. How many bits...

  • Q2. Consider a four-way set associative cache with a data size of 64 KB. The CPU...

    Q2. Consider a four-way set associative cache with a data size of 64 KB. The CPU generates a 32-bit byte addressable memory address. Each memory word contains 4 bytes. The block size is 16 bytes. Show the logical partitioning of the memory address into byte offset, cache index, and tag components.

  • Please refer the following memory system : Main memory : 64 MB Cache memory: 64 KB...

    Please refer the following memory system : Main memory : 64 MB Cache memory: 64 KB Block size of 1 KB 1. Direct Mapping Offset bits? Number of lines in cache? Line number bits? Tag size? 2. Fully Associative Mapping Offset bits? Tag size? 3. 2-way set-associative mapping Offset bits? Number of lines in cache? Set number bits? Tag size? 4. 4-way set-associative mapping Offset bits? Number of lines in cache? Set number bits? Tag size?

  • ) Consider an 8-way associative 64 Kilo Byte cache with 32 byte cache lines. Assume memory...

    ) Consider an 8-way associative 64 Kilo Byte cache with 32 byte cache lines. Assume memory addresses are 32 bits long. a). Show how a 32-bit address is used to access the cache (show how many bits for Tag, Index and Byte offset). b). Calculate the total number of bits needed for this cache including tag bits, valid bits and data c). Translate the following addresses (in hex) to cache set number, byte number and tag (i) B2FE3053hex (ii) FFFFA04Ehex...

  • Cache of 4096 blocks, a 4-word block size, and a 32-bit address, find the total number...

    Cache of 4096 blocks, a 4-word block size, and a 32-bit address, find the total number of sets and the total number of tag bits for caches that are direct mapped, four-way set associative, and fully associative.

  • 3- for a direct mapped cache design with a 32 bit address, the following bits of address are used...

    Please answer all parts correctly and show your work 3- for a direct mapped cache design with a 32 bit address, the following bits of address are used to access the cache Tag Index Offset 31-10 9-5 4-0 Starting from power on, the following byte addressed cache reference are recorded. Address 0 16 132 232 160 1024 30 140 3100180 2180 d. How many blocks are replaced e. What is the hit ratio f. List final state of the cache,...

  • A direct-mapped cache holds 64KB of useful data (not including tag or control bits). Assuming that...

    A direct-mapped cache holds 64KB of useful data (not including tag or control bits). Assuming that the block size is 32-byte and the address is 32-bit, find the number of bits needed for tag, index, and byte select fields of the address. Number of bits for offset bits Number of bits for index bits Number of bits for tag bits

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT