Question

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:

  1. Number of blocks created in main memory.
  2. Number of blocks created in cache memory.
  3. 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 = 64KB Size = 128B Block siz

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

1. Number of blocks in main memory=Main memory size / Block size

1 KB = 2^10 Bytes

Number of blocks in main memory= 64 * 2^10 / 8

Number of blocks in main memory= 2^13 Blocks

2. Number of blocks created in cache memory =Cache memory size / Block size

Number of blocks in cache memory = 128 / 4

Number of blocks in cache memory = 32 = 2^5

3.Distribution of the address fields in the system -

It is given that system follows direct mapping

address field have 16 bits ( 64KB-->2^16 B )

These 16 bits can be visualised as distributed in TAG, BLOCK, WORD.

Word is nothing but Block offset

since Block size = 8 B = 2^3 B

so Word require 3 bits

The Block for a direct mapped cache is the number of blocks in the cache (5 bits in this case, because 2^5 = 32 )

Then the tag is all the bits that are left

Tag = Total address bits- Block -Word

Tag = 16-5-3 = 8 bits

Feel free to ask any doubt in comment section and don't forget to upvote if found this answer helpful.

Add a comment
Know the answer?
Add Answer to:
For a direct-mapped cache memory, the following data is given.                    Main memory              &nb
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?

  • 3) Direct-Mapped Cache Determine the Cache line holding an address EEL 3801 UCF Given: An 8-bit...

    3) Direct-Mapped Cache Determine the Cache line holding an address EEL 3801 UCF Given: An 8-bit computer system with 4 MB of main memory. It has a 16K-words direct-mapped cache with a block size of 16 Bytes. Sought: Calculate the cache line number when Byte address 5678ten from main memory is mapped to cache. Consider that numbering of main memory blocks and cache lines starts from zero. Express your answer in hexadecimal. It is required to show ALL incremental steps...

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

  • 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?

  • Given: An 8-bit computer system with 4 MB of main memory. It has a 16K-words direct-mapped...

    Given: An 8-bit computer system with 4 MB of main memory. It has a 16K-words direct-mapped cache with a block size of 16 Bytes. Sought: Calculate the cache line number when Byte address2271len from main memory is mapped to cache. Consider that numbering of main memory blocks and cache lines starts from zero. Express your answer in hexadecimal. It is required to show ALL incremental steps of the solution.

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

  • 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

  • Assume the cache can hold 64 kB. Data are transferred between main memory and the cache...

    Assume the cache can hold 64 kB. Data are transferred between main memory and the cache in blocks of 4 bytes each. This means that the cache is organized as 16K=2^14 lines of 4 bytes each. The main memory consists of 16 MB, with each byte directly addressable by a 24-bit address (2^24 =16M). Thus, for mapping purposes, we can consider main memory to consist of 4M blocks of 4 bytes each. Please show illustrations too for all work. Part...

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

  • A direct-mapped cache consists of 8 blocks. Byte-addressable main memory contains 4K blocks of 8 bytes...

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

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