Implementation of a Cache Simulator, verified against SPEC benchmarks