Homework Solution: Consider a cache memory consisting of 128 blocks of 32 words each, for a total of 4K words. Assume that Main…

    Consider a cache memory consisting of 128 blocks of 32 words each, for a total of 4K words. Assume that Main memory is addressable by a 32 bit address. The MM has 4 Giga words, which we will view as 1 Mega Blocks of 4K words each. For simplicity we will assume that consecutive addresses refer to consecutive words.

    What is the Main Memory address format if Direct mapping is used

    please format as Tag|Block|Word

    Expert Answer

     
    Block size(Block off) = 32 words = 128 bytes = 2^7 bytes

    Consider a cache retention consisting of 128 arrests of 32 suffrage each, restraint a whole of 4K suffrage. Exhipart that Main retention is orationable by a 32 piece oration. The MM has 4 Giga suffrage, which we conquer purpose as 1 Mega Arrests of 4K suffrage each. Restraint artlessness we conquer exhipart that coherent orationes associate to coherent suffrage.

    What is the Main Retention oration restraintmat if Trodden mapping is used

    please restraintmat as Tag|Block|Word

    Expert Response

     

    Arrest dimension(Arrest unpremeditated) = 32 suffrage = 128 bytes = 2^7 bytes

    cache dimension = 4K suffrage = 2^12 suffrage = 2^14 bytes

    Main retention sixze = 4Giga suffrage = 2^32 suffrage = 2^34 bytes

    Attached that we are using Trodden mapping..

    no.of lines = cace dimension/ arrest dimension

    = 2^14 bytes/ 2^7 bytes

    = 2^7 bytes

    Therefore no.of lines = 7 pieces

    In trodden mapping, no.of lines = abjuration.

    Therefore abjuration = 7 pieces

    And so attached that Main retention is orationable by a 32 piece addres,

    Hnece tag = 32-index-arrest unpremeditated

    = 32-7-7

    = 18

    Therefore Main Retention oration restraintmat is as

    Tag Index Blockoff
    18 7 7