Question

1. Suppose we have a 32KB direct-mapped data cache with 32-byte blocks. a) Show how a...

1. Suppose we have a 32KB direct-mapped data cache with 32-byte blocks.
a) Show how a 32-bit memory address is divided into tag, index and offset. Show clearly how many bits are in each field.
b) How many total bits are there in this cache?
2. Suppose we have a 8KB direct-mapped data cache with 64-byte blocks.
a) Show how a 32-bit memory address is divided into tag, index and offset. Show clearly how many bits are in each field.
b) How many total bits are there in this cache?

Homework Answers

Answer #1

1. Given-

  • Cache memory size = 32KB​​​​​​
  • Block size = Frame size = Line size=32 byte
  • Memory address = 32 byte

Number of Bits in Block Offset-

we have,

Block size

=32 byte

= bytes

Thus, Number of bits in block offset= 5 bits

Number of bits in index number-

Total number of the lines in cache

= Cache size/ Line size

=32 KB/32 bytes

= bytes/ bytes

= lines

Thus, Number of bits in index number= 10 bits

Number of bits in tag

= Number of bits in physical address – (Number of bits in index number + Number of bits in block offset)

=32 bits -(10 bits + 5 bits)

=32 bits - 15 bits

=17 bits

Thus, number of bits in tag= 17 bits

b. Size of cache memory

=32 KB

= bytes

Thus, total number of bits in cache= 15.

Know the answer?
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
Similar Questions
14. For a direct-mapped cache with a 32-bit address and 32-bit words, the following address bits...
14. 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-16 15-5 4-0 What is the cache block size (in words)? How many blocks does the cache have?
Assume a byte-addressable memory consisting of 1G (230) bytes. A Direct Mapped Cache contains 256 (28)...
Assume a byte-addressable memory consisting of 1G (230) bytes. A Direct Mapped Cache contains 256 (28) blocks of 2048 (211) bytes each. Therefore the 30 bits address is partitioned into three areas of the following sizes (in bits): offset bits block bits tag bits
In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of...
In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of 32-byte size, with direct-map (S = 1) placement policy and LRU replacement policy, answer each of the following questions: Determine the address fields for index, tag and block offset in the memory address. How many sets are there in the cache? How many blocks in the main memory are mapped to the same set of blocks in cache? If associative (parallel) comparison is to...
In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of...
In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of 32-byte size, with direct-map (S = 2) placement policy and LRU replacement policy, answer each of the following questions: Determine the address fields for index, tag and block offset in the memory address. How many sets are there in the cache? How many blocks in the main memory are mapped to the same set of blocks in cache? If associative (parallel) comparison is to...
The cache is direct mapped, 16 lines, each line is 2 bytes The offset field is...
The cache is direct mapped, 16 lines, each line is 2 bytes The offset field is ________ bits The line field is ________ bits The tag field is ________ bits line tag byte 0 byte 1 (can someone explain this to me) 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Suppose a computer using direct mapped cache has 224 bytes of byte-addressable main memory, and a...
Suppose a computer using direct mapped cache has 224 bytes of byte-addressable main memory, and a cache of 128 blocks, where each cache block contains 8 bytes. For four-way set associative cache, to which block of cache the address 0x1895BA maps? Group of answer choices Block 70 Block 16 Block 23 Not enough information
13. Calculate the total number of bits required to implement a 1024 KiB direct-mapped cache with...
13. Calculate the total number of bits required to implement a 1024 KiB direct-mapped cache with 10-word blocks. Assume that the cache is byte addressable, and addresses and data words are both 32 bits. (1 KiB = 210 bytes)
Assume a byte-addressable memory has 64K bytes. Blocks are 8 bytes in length and the cache...
Assume a byte-addressable memory has 64K bytes. Blocks are 8 bytes in length and the cache consists of 4K bytes. Show the format for a main memory address assuming a 4-way set associative cache mapping scheme. Include the field names as well as their sizes. 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...
A 16 GB main memory has a 8 MB cache organized as a 8-way set associative...
A 16 GB main memory has a 8 MB cache organized as a 8-way set associative cache with 128 Byte cache blocks (line). How many cache blocks are there in the cache? How many sets are there in the cache? (Show your computation.) Show how the 36-bit address generated by the CPU would be divided to map into the cache. (Indicate the sizes of the tag, line, etc.)
Consider one direct mapped cache with four sectors holding one block per sector and one 32-bit...
Consider one direct mapped cache with four sectors holding one block per sector and one 32-bit word per block. The machine is byte addressed on word boundaries and uses write allocation with write back. For each of the following cache accesses, is it a hit or miss? If it is a miss, identify the type of miss (compulsory, capacity, or conflict miss). Assume the cache starts out completely invalidated. read 0x00 read 0x04 write 0x08 read 0x10 read 0x08 write...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT