Cache question

This is a discussion on Cache question within the Tech Board forums, part of the Community Boards category; This is part of a a homework assignment, I want to make sure that I am understanding correctly. In class, ...

  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    16

    Cache question

    This is part of a a homework assignment, I want to make sure that I am understanding correctly. In class, my professor said that in direct mapping using 16 bit addresses, we have 4 tag bits, 4 set bits and 8 offset bits. The size of the block is 256 (2^8).

    For the homework, we have a direct mapped cache, using 16 bit addresses. the right most four bits are the offset and there is 4 sets. one of the questions is what is the size of the block? Is 2^4 or 16 correct?

  2. #2
    Registered User
    Join Date
    Nov 2004
    Location
    India
    Posts
    515
    Yes. But that would imply that you have 8 bits as tag values. Unless the tag values do some special line selection within a block, I guess the block size would be 2^4.
    Code:
    >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ideas requested for a CACHE.
    By bean66 in forum C Programming
    Replies: 2
    Last Post: 02-21-2008, 11:01 AM
  2. Resource manager tree
    By VirtualAce in forum Game Programming
    Replies: 23
    Last Post: 09-07-2007, 11:27 PM
  3. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 02:30 PM
  4. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 03:51 PM
  5. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21