Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a simple C program to simulate a two-way set associative cache. Assume the

ID: 3535236 • Letter: W

Question

Write a simple C program to simulate a two-way set associative cache.

Assume the following specifications:

Block size = 1 word (4 bytes)

Number of sets (height) = 4

Memory is 64 words

The program should read a series of memory addresses from an external file and display

whether a hit or miss occurred. At the termination, it should display the final contents of

the cache and give statistics on hits versus misses. To simplify parsing of the cache, you

can represent the tag and cache contents in separate array elements. The file called

addresses.txt will be placed on BlackBoard with the sequence of addresses (word level

as in class examples) to input to your program.

Explanation / Answer

Please rate with 5 stars :)


You will find the neccessary code and details here:


REFERENCE:

http://stackoverflow.com/questions/10128295/2way-cache-associative-how-many-bytes-do-i-read-from-memory


Cheers!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote