Question
A direct mapped cache consists of 128 lines. Memory blocks contain 16 bytes. Main memory can contain at most 2GiB and each byte has a
A direct mapped cache consists of 128 lines. Memory blocks contain 16 bytes. Main memory can contain at most 2GiB and each byte has a separate address. In other words, each word is one byte long.
a) How many bits are there in a memory address? How many bits are there in a line address? How many bits are there in a memory block address?
b) Divide the memory address bits into the fields w, s, r, s-r as is done in the class slides. Label each field, and clearly indicate the number of bits in each field. Indicate the number of bits in each of the Tag, Line, and Word fields.
c) How big is the cache overall? How big is the data portion of the cache?
d) Suppose that the tag stored in line 2 of the cache contains the value 1011002 (assume as many leading 0s as necessary). i. Give the block address of the block that is in this line of the cache. ii. Give the memory address (in hex) of the first and last word that is in this block.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started