ONE LEVEL CACHE :
A cache of size S with CL as the number of cache lines and block size B with S, CL, and B are in powers of 2.
TWO LEVEL CACHE :
The size of the level 1 cache is S/2 and the size of level 2 cache is S. This is also be a standalone cache without the intervention of the main memory.
The following mappings are implemented for searching and loading data into both the types of cache memory :
- Direct mapping
- Associative memory
- n-way set associative memory where n is a power of 2.