Question: 4. (16 Points) Consider the code segment: fld fld fmult fsd fo, 0(x0) f2, 0(x2) f2, f2, fo f2, 0(x2) x2, x2, 8 x4, x3,

4. (16 Points) Consider the code segment: fld fld fmult fsd fo, 0(x0) f2, 0(x2) f2, f2, fo f2, 0(x2) x2, x2, 8 x4, x3, x2 x4, xO, loop load fo from address 0+x0 load f2 from address 0+x2 ; store x2 at address 0+x2+ x4 x3-x2- Loop addwi subw p branch to loop if x40 Assume the initial value of x3 is x2 64. Assume xo 0 and x2-16, and the memory contains: 16 24 32 40 48 56 64 72 80 The cache size is 64 bytes and the block size is 16 bytes. Make table similar with Example 5+ Display the content of memory, cache hit or miss status, and the content of cache as the loop executes, assuming the cache is direct mapped, with write through and no write allocate. Repeat Part (a) assuming cache is a 2-way set associative, with FIFO replacement policy, and write back, and write allocate. a) b) 4. (16 Points) Consider the code segment: fld fld fmult fsd fo, 0(x0) f2, 0(x2) f2, f2, fo f2, 0(x2) x2, x2, 8 x4, x3, x2 x4, xO, loop load fo from address 0+x0 load f2 from address 0+x2 ; store x2 at address 0+x2+ x4 x3-x2- Loop addwi subw p branch to loop if x40 Assume the initial value of x3 is x2 64. Assume xo 0 and x2-16, and the memory contains: 16 24 32 40 48 56 64 72 80 The cache size is 64 bytes and the block size is 16 bytes. Make table similar with Example 5+ Display the content of memory, cache hit or miss status, and the content of cache as the loop executes, assuming the cache is direct mapped, with write through and no write allocate. Repeat Part (a) assuming cache is a 2-way set associative, with FIFO replacement policy, and write back, and write allocate. a) b)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
