Assume that the instruction cache is a direct mapped cache as in Q1(a) and the data cache is a 2-way set
associative cache as in Q1(b). Given that the CPI is 1, clock rate is 4GHz and the main memory access
requires 100 cycles. Compute the following:
(a) Performance (Inverse of the execution time) for the MIPS program.
(b) AMAT (average memory access time) for instruction cache and data cache separately.
(Hint: For the two caches, the num. instructions and the miss rates are obtained from Q1. You should
substitute them in the formula for AMAT and performance, along with the other values given in Q2.)
Please be descriptive, and let me know if you need more information or explanationInstructions: 1. Write the formula and show the complete work, including the substitution steps to receive full credit for any question. Highlight the answers, for easy grading. 2. For Question 1 , show the cache and the contents (data in cache) whenever a block is added or removed from the cache. 3. For the data in cache, you DO NOT need to know the actual data in the memory, you can use the notation we used in class examples. (next point). 4. For a block of memory from address OxAD to OxAF, you can write M[OxAD] - M[OxAF] or M[OxAD - 0xAF]. 5. To replace contents of cache in Question 1, we will use the LRU (least recently used) scheme. 6. For all questions, the addresses are 32 -bit addresses. MIPS Code for the task
C[i]=A[i]+B[k−i]
for 0 to
k
elements: [You don't need to convert to corresponding Machine code. Identify the (minimum) number of machine instructions, i.e., core instructions.] Question 2: Performance and AMAT ( 10 points for each part) Assume that the instruction cache is a direct mapped cache as in Q1(a) and the data cache is a 2-way set associative cache as in
Q1(b)
. Given that the CPI is 1 , clock rate is
4GHz
and the main memory access requires 100 cycles. Compute the following: (a) Performance (Inverse of the execution time) for the MIPS program. (b) AMAT (average memory access time) for instruction cache and data cache separately. (Hint: For the two caches, the num. instructions and the miss rates are obtained from Q1. You should substitute them in the formula for AMAT and performance, along with the other values given in Q2.)