cse378.cache
Class CacheLine
java.lang.Object
cse378.AbstractLine
cse378.cache.CacheLine
public class CacheLine
- extends AbstractLine
Constructor Summary |
CacheLine(int tagBits)
|
CacheLine(int tagBits,
int dataSize)
|
CacheLine(int tagBits,
int dataSize,
int associativity)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CacheLine
public CacheLine(int tagBits)
CacheLine
public CacheLine(int tagBits,
int dataSize)
CacheLine
public CacheLine(int tagBits,
int dataSize,
int associativity)
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