Adding Third-level Data Cache (dl3) and Instruction Cache (il3)
The purpose of this lab is to get familiar with
cache hierarchical structure and its implementation in SimpleScalar. You need to
modify the C/C++ source code in sim-cache.c
file to add a
third-level data cache and a third-level instruction cache. After you modify the
code, recompile it using command:
make
you will get new simulation tool: "sim-cache" with extended functionality. You need to use the two provided configuration files (lab3_cache1.cfg and lab3_cache2.cfg) on test-math to test if your implementation is correct. Use the following command
/simplesim-3.0/./sim-cache -config lab3_cache1.cfg -redir:sim sim_lab3_cache1.out ./test-math
Here is the simulation output file sim_lab3_cache1.out when running simulation using configuration lab3_cache1.cfg on test-math
some related functions in sim-cache.c:
Take printout of this file and mark the above functions. Then go through them one by one and see how IL1 , IL2, DL1 and DL2 are implemented in these functions. Also pay attention to variables that are declared above these functions and are used in these functions. This is how i was able to do it.
you should describe how to implement a level-3 instruction cache and a level-3 data cache in SimpleScalar. You should also attach the modified source code : sim-cache.c, and mark the place where you make modification. Run simulations using provided simulation configuration file(lab3_cache1.cfg and lab3_cache2.cfg ), for each run you should submit one output file as described in Overview.