Question

6. a) Consider a direct mapped cache with 10 blocks of 10 words each. Suppose main memory is 1000 words. For each memory addr
0 0
Add a comment Improve this question Transcribed image text
Answer #1

A direct mapped cache is the simplest and modest approach, where each main memory address maps to exactly  one cache block. For instance, on the right is a 16 byte main memory with a 4 byte cache ( for 1-byte blocks ).

Cache block - It is the basic unit of cache storage. It may have multiple bytes / words of data. There are 16 Bytes in Cache block.

Offset corresponds to the bits used to define the byte that to be accessed from the cache line.

Tag - It is a unique identifier for a group of data. Because a memory can be mapped in different regions of block, a Tag is used to differentiate between them.

Considering the given problem, where it supposes the main memory is 1000 words. And a word is defined to be a 32 - bits. So, here 'Word addressable' cache block is used, where smallest accessible chunk is 32 bits.

if the main memory is 1000 words. and each word is a 32 bits. i.e. 1000 * 32 = 32000 bits.

Block offset is equal to memory address / 2 to the power of n.

if there are 32 bytes which is equal to 2 to the power of 5, Therefore Offset is 5 Bits.

And, Tag is all the bits that are left in address space.

Add a comment
Know the answer?
Add Answer to:
6. a) Consider a direct mapped cache with 10 blocks of 10 words each. Suppose main...
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
  • Suppose a computer using direct mapped cache has 232 byte of byte-addressable main memory, and a...

    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?

  • Name #5 Suppose a compute memory and a cache of 1024 blocks, where each cache block...

    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)

  • 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 memory, the following data is given.                    Main memory              &nb

    For a direct-mapped cache memory, the following data is given.                    Main memory                                       Cache memory            Size = 64KB                                               Size = 128B           Block size = 8Bytes                                    Block size = 4Bytes Calculate the following: Number of blocks created in main memory. Number of blocks created in cache memory. The distribution of the address fields in the system. Q5. For a direct-mapped cache memory, the following data is given. Main memory Cache memory Size...

  • For a 16K-byte, direct-mapped cache, suppose the block size is 32 bytes, draw a cache diagram....

    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.

  • 6. (30) Consider a 64B direct-mapped cache with 16B blocks and 4 sets for an 8-bit architecture (...

    6. (30) Consider a 64B direct-mapped cache with 16B blocks and 4 sets for an 8-bit architecture (i.e., 256 bytes of memory): a. (5) Write a C function unsigned char getTag(unsigned char address) that returns the cache tag for the specified address using bitwise operators: b. (5) Write a C function unsigned char getSet(unsigned char address) that returns the cache set for the specified address using bitwise operators: c. (10) Considering the following sequence of memory addresses, which addresses will...

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

  • QUESTION 2 Suppose a computer using direct mapped cache has 216 bytes of byte-addressable main memory...

    QUESTION 2 Suppose a computer using direct mapped cache has 216 bytes of byte-addressable main memory and a cache of 64 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, (include field names and their sizes) c) To which cache block will the memory address (F8C916 map? What address in that block does it map to?

  • Question 33 10 pts For a direct mapped cache of 4 blocks with a cache block...

    Question 33 10 pts For a direct mapped cache of 4 blocks with a cache block size of 1 byte, in which cache block will each memory location map to? The order of accesses if given by the operation number. Indicate if each access is a hit or a miss, and what the tag value is for each entry. Assume that the cache is initially empty, and the accesses are in order of appearance. REDRAW AND COMPLETE THE CACHE TABLE...

  • Consider a hypothetical machine with 1K words of cache memory. They are iin direct-mapped organiz...

    Consider a hypothetical machine with 1K words of cache memory. They are iin direct-mapped organization, with cache block size of 128 words, using LRU replacement algorithm. Suppose the cache hit time is 8ns, the time to transfer the first word from main memory to cache is 50ns, while subsequent words require 10ns/word. Consider the following read pattern (in blocks of 128 words, and block id starts from 0): 1 2 3 5 6 2 3 4 9 10 11 6...

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