cse378
Class TaggedBlock

java.lang.Object
  extended by cse378.AbstractBlock
      extended by cse378.TaggedBlock
Direct Known Subclasses:
CacheBlock, PageTableEntry, TLBEntry

public abstract class TaggedBlock
extends AbstractBlock


Field Summary
protected  BitField tag
           
protected  byte tagBits
           
 
Fields inherited from class cse378.AbstractBlock
dirty, id, valid
 
Constructor Summary
TaggedBlock(int tagBits, int id)
           
 
Method Summary
 BitField getTag()
          getTag returns the tag
 boolean hasTag(BitField tag)
          Checks this entry for a matching Tag
 void setTag(BitField tag)
          writeTag writes the new tag
 java.lang.String toString()
           
 void update(BitField tag)
          Update the current entry with a new one
 
Methods inherited from class cse378.AbstractBlock
getId, hashCode, isDirty, isValid, setDirty, setValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

tag

protected BitField tag

tagBits

protected final byte tagBits
Constructor Detail

TaggedBlock

public TaggedBlock(int tagBits,
                   int id)
Method Detail

getTag

public BitField getTag()
getTag returns the tag

Returns:
tag of cacheline

setTag

public void setTag(BitField tag)
writeTag writes the new tag

Parameters:
tag - new tag for the cacheline

hasTag

public boolean hasTag(BitField tag)
Checks this entry for a matching Tag

Parameters:
tag -
Returns:
true if the tags match

update

public void update(BitField tag)
Update the current entry with a new one

Parameters:
tag - new Tag

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object