Write Program Vs C 2017 Determine Tag Set Number Offset Memory Address System Supporting N Q37088454

Write a program in VS C++2017 to determine the tag, set number,and offset for a memory address of a system supporting an N-wayset-associative cache.Your program should first read in theinformation for N,memory capacity (in bytes), block/line size (inbytes), cache capacity (in bytes), and a memory address(indecimal). It then does the necessary mapping and displays theresult to the screen.You may assume that all the informationentered is power of 2 except the memory address. The followingshows a scenario of running a sample program, where user’s inputsare represented in boldface.

Enter N: 4

Enter memory capacity:512

Enter block/line size: 8

Enter cache capacity: 128

Enter a memory address:

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.