CPSC 3300 - Spring 2017 Homework 7 Due at start of class on Tuesday, April 25 1. Consider an array declared in C as "double a[400];". How many 64-byte cache lines are required to hold the complete array? 2. Consider a byte-addressed direct-mapped data cache design in which a 32-bit address is divided into these three fields: 20-bit tag, 9-bit index, and 3-bit offset. (a) How large is a line in number of bytes? (b) How many lines are in the cache? (c) How large is the cache in number of bytes? 3. Consider a byte-addressed direct-mapped cache with 1024 lines of 64 bytes each. For the byte address 0x00147ad0: (a) what is the offset value in hex? (b) what is the index value in hex? (c) what is the tag value in hex? 4. Consider matrix transpose code written in C and shown below. Which array is exhibiting spatial locality: array "a", "b", or both? (Note that NROWS and NCOLS could each be relatively large compared to the size of the cache.) for(i=0;i