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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!