a. Direct Mapped Cache Addres_format: // (tag, line, wo
Verified
Added on 2023/01/19
|2
|449
|49
AI Summary
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
a. Direct Mapped Cache Addres_format: //(tag, line, word) // Given , Number of bits in Tag field = 20 bits; Number of bits in offset field = log264 = 6 bits Total number of bits in address = 32 Then number of bits for lines/blocks in cache = 32 – 20 – 6 = 6 bits TAG fieldLine FieldOffset Field 20 bits6 bits6 bits Total addressable units in bytes = 2 ^ 32 = 4GB Number of blocks in Main Memory = 2 ^ (number of tag field bits + number of Line Fields) = 2 ^ 26 = 64MB Number of lines/blocks in cache = 2 ^ number of bits in Line field = 2 ^ 6 = 64 blocks Number of bits in TAG field = 20 bits. b. Fully Associative Cache Address_format: //(tag, word) // Given number of bits for offset field = log264 = 6 bits Total number of bits in address = 32 Then number of bits for TAG field = 32 – 6 = 26 bits. TAG FieldOffset Field 26 Bits6 Bits Total addressable units in bytes = 2 ^ 32 = 4GB Number of blocks in Main Memory = 2 ^ (number of tag field bits) = 2 ^ 26 = 64MB
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Number of lines/blocks in cache = Size of Cache / Size of block. Since Size of Cache not mentioned, this can’t be determined Number of bits in TAG field = 26 bits c. 4 way Set Associative Cache Address_format: //(tag,set,word)// Given, number of bits for TAG field = 9 bits. Given number of bits for offset field = log264 = 6 bits Total number of bits in address = 32 Bits for determining set in Cache = 32 – bits in tag – bits in offset = 32 – 9 – 6 = 17 bits Then Number of sets in cache = 2 ^ number of set bits = 2 ^ 17 = 128K TAG FieldSet FieldOffset Field 9 bits17 bits6 bits Total addressable units in bytes = 2 ^ 32 = 4GB Number of blocks in Main Memory = 2 ^ (number of tag field bits + set Field bits) = 2 ^ 26 = 64MB Total Number of lines in Cache = number of Way * Number of Sets = 4 * 128K = 512K ( 2 ^ 19) Number of bits in TAG field = 9 bits