3 Replies - 1481 Views - Last Post: 28 April 2014 - 04:56 PM

#1 lamentofking  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 160
  • Joined: 03-July 13

Working with Direct-mapped Caching

Posted 25 April 2014 - 10:54 AM

Hello. I have a non-programming question that I'm trying to tackle but cannot seem to understand. I'm using a book, Computer Systems by Warford, to help but there are lack of detailed examples. Anyway here is the question:

A CPU can address 16 MB of main memory. It has a direct-mapped cache which it stores 256 8-byte cache lines.
(a). How many bits are required for a memory address?
( b ). How many bits are required for the byte field of the address?
( c ). How many bits are required for the line field of the address?
(d). How many bits are required for the tag field of the address?
(e). How many bits are required for the data field of each cache entry?
(f). How many bits are required for all the fields of one cache entry?
(g). How many bits total are required for the entire cache?


The type of CPU being used is Pep/8. I don't understand how to solve any part of the question but I'm trying. Now for part a: do I just take the natural log of 16 divided by the natural log of 2 to get the bits?

This post has been edited by lamentofking: 25 April 2014 - 10:55 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Working with Direct-mapped Caching

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3449
  • View blog
  • Posts: 10,643
  • Joined: 05-May 12

Re: Working with Direct-mapped Caching

Posted 28 April 2014 - 06:21 AM

I thought that there was a brand new processor out there since I've never heard of Pep/8 before. I had to look it up:
https://code.google.com/p/pep8-1/

If you read the processor description and addressing modes, you can derive some of the answers for your questions.
Was This Post Helpful? 2
  • +
  • -

#3 lamentofking  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 160
  • Joined: 03-July 13

Re: Working with Direct-mapped Caching

Posted 28 April 2014 - 03:42 PM

Thanks. I think I figured out almost all of the parts to the question. I can't figure out part e though, do you have any idea?
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3449
  • View blog
  • Posts: 10,643
  • Joined: 05-May 12

Re: Working with Direct-mapped Caching

Posted 28 April 2014 - 04:56 PM

How did you answer f and g, if you didn't know e?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1