cse378.cache
Class CacheLine

java.lang.Object
  extended by cse378.AbstractLine
      extended by cse378.cache.CacheLine

public class CacheLine
extends AbstractLine


Field Summary
 
Fields inherited from class cse378.AbstractLine
entries, entrySize, recent, sets, tagBits
 
Constructor Summary
CacheLine(int tagBits)
           
CacheLine(int tagBits, int dataSize)
           
CacheLine(int tagBits, int dataSize, int associativity)
           
 
Method Summary
 CacheBlock allocEntry()
          Pick a CacheEntry to receive new data.
 CacheBlock getEntry(int index)
          getEntry returns the AbstractBlock indexed by index
 CacheBlock probe(BitField tag)
          Test if any of the entries in this line match a Tag
 java.lang.String toString()
           
 
Methods inherited from class cse378.AbstractLine
getLRU, indexCheck, setMRU
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheLine

public CacheLine(int tagBits)

CacheLine

public CacheLine(int tagBits,
                 int dataSize)

CacheLine

public CacheLine(int tagBits,
                 int dataSize,
                 int associativity)
Method Detail

toString

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

getEntry

public CacheBlock getEntry(int index)
getEntry returns the AbstractBlock indexed by index

Overrides:
getEntry in class AbstractLine
Parameters:
index - AbstractBlock within the cacheline
Returns:
CacheEntry specified by index

allocEntry

public CacheBlock allocEntry()
Pick a CacheEntry to receive new data. Rely solely on LRU info

Overrides:
allocEntry in class AbstractLine
Returns:
allocated AbstractBlock

probe

public CacheBlock probe(BitField tag)
Test if any of the entries in this line match a Tag

Overrides:
probe in class AbstractLine
Parameters:
tag - tag in question
Returns:
CacheEntry if found, null otherwise