Question: In this lab you will simulate a direct mapped cache with a C program. You will read a list of addresses collected from the WPS

In this lab you will simulate a direct mapped cache with a C program. You will read a list of addresses collected from the WPS simulator running the insertion sort code. You will simulate the cache by comparing the tag for each address to the tag stored in an array. If the tag is there you got a HIT and add 1 to cycles. If the tag is not there, you got a MISS so insert the tag into the array and add 100 to the number of cycles. After reading all the address you are to report the number of hits and misses, and the number of cycles. In this lab you will simulate a direct mapped cache with a C program. You will read a list of addresses collected from the WPS simulator running the insertion sort code. You will simulate the cache by comparing the tag for each address to the tag stored in an array. If the tag is there you got a HIT and add 1 to cycles. If the tag is not there, you got a MISS so insert the tag into the array and add 100 to the number of cycles. After reading all the address you are to report the number of hits and misses, and the number of cycles
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
