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:

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 


There are many source files related to generating simulation tool "sim-cache", such as main.c, cache.h, cache.c, sim-cache.c etc. For this lab, you only need to modify sim-cache.c to add level-3 caches

some related functions in sim-cache.c: