This project implements a simulator to test cache configurations and their performance w.r.t. different access patterns. I have implementd a LRU with WriteBack/WriteAllocate cache with victim block. Multiple cache levels can be chained. Main.cpp demonstrates the use of 2 levels of cache with user provided input configurations.
$> cd CacheSimulator
$> make
The script runs the binary with predefined test inputs and diffs the result with expected output files. If test are successfull no output will be displayed else difference is printed to the screen.
$>./verifyB.sh
- Make generates the project binary sim_cache
./sim_cache
- Application will prompt with list of expected arguments
- Specify the arguments in correct order and run the applicatio again
- Results are printed to console hence you can redirect it to a file for future use
- Have a look at verifyB.sh for sample inputs
$> ./sim_cache <arguments> > Result.txt