CPSC 330 - Fall 2010 Project 2 - Cache Simulation [original assignment given on Nov. 3; updates on Nov. 5, 6, and 7] Due on November 10. You may work individually or in teams of two. If you discover that a teammate is not pulling his weight, fire him and inform me. You may discuss the project requirements with other teams/students in class, but drafts, code, and final reports should not be shared. You are to write a short (e.g., two-page) report on cache hits and misses for 200x200 matrix multiply. To begin, copy these two files: http://www.cs.clemson.edu/~mark/330/tracegen.c http://www.cs.clemson.edu/~mark/330/sa4_64kb.c You will need to modify the cache simulator to obtain the required results. Test these three patterns: ijk$ 4i4jk$ 8d8f4j2ik$ suggested by T. Maeno of the Tokyo Inst. of Tech. The cache misses for the 64-KB cache, 32-byte lines, 4-way set associative for the ijk$ example are obtained by: % gcc sa4_64kb.c -o sa4_64kb % gcc tracegen.c -o tracegen % ./tracegen 200 ijk$ > test.c % gcc test.c % ./a.out | ./sa4_64kb Provide five numbers for each pattern: 1) # misses for 64-KB cache, 32-byte lines, direct mapped 2) # misses for 64-KB cache, 32-byte lines, 16-way set associative 3) # compulsory misses for 32-byte lines 4) # capacity misses (calculated as # 16-way misses - # compulsory misses, where we are estimating the # fully associative misses by the # 16-way misses) 5) # conflict misses for direct mapped (calculated as # direct mapped misses - # compulsory misses - # capacity misses) That is, you will need to submit a report with 13 numbers. 64-KB cache and 32-byte lines ijk 4i4jk 8d8f4j2ik direct-mapped misses --- --- --- 16-way misses --- --- --- compulsory misses --- same same capacity misses --- --- --- DM conflict misses --- --- --- As part of your report, please explain why the different access patterns have different numbers of memory references. Finally, append your modified code for direct-mapped cache simulation and 16-way set associative cache simulation. (The code is not considered part of the page count.)