Explore BrainMass

Explore BrainMass

    Direct Mapped Cache - Memory Blocks

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Suppose that a computer using direct-mapped cache has 2^24 words of main memory and a cache of 64 blocks, where each cache block contains 16 words.

    A. How many blocks of main memory are there?

    B. What is the format of a memory address as seen by the cache? That is, what are the sizes of the tag, block and word fields?

    C. To which cache block will the memory reference (20DB63)base16 map?

    © BrainMass Inc. brainmass.com October 10, 2019, 12:46 am ad1c9bdddf

    Solution Preview

    Size of main memory (Sm) = 2^24 words
    Size of cache block (Sc) = 16 or 2^4 words
    Number of blocks in cache (Nc) = 64

    A. Number of blocks of main memory (Nm) = Sm/Sc = 2^24 / 2^4 = 2^20 blocks

    B. Number of bits needed to represent word field = 4 (because there are 2^4 words / cache block)
    Number of bits ...

    Solution Summary

    This solution shows brief and relevant computations for number of blocks of main memory, number of bits needed to represent the word, block, and tag field, and which cache block the memory reference will apply to.