Question: You have a cache that holds 4 blocks, each block is 4 Words. Initially the cache is empty ( e . g . all blocks
You have a cache that holds blocks, each block is Words. Initially the cache is empty eg all blocks are invalid The Main Memory is shown in the table below and is byte addressable.
For the loop given in the assembly code below, what is the final data in the cache assuming a direct mapped bway set associative and c fully associative? Empty tables for each type of
cache are below. Write a description of how each cache works hits and misses and how you reached your end result.
LOOP: lw $s$s
addi $s$s
# $s Arrayi
add $s$s$s
sw $s$s
# $s$s
# $s$s$s
addi $s$s
# Arrayi$s
bne $s$s LP
# $s$s
# branch if $s$s
Initial values of the registers:
beginarrayl
$ s
$ s times
$ s
endarray
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
