|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcse378.AbstractCache
cse378.cache.Cache
public class Cache
Cache for CSE 378 lab 5
Field Summary |
---|
Fields inherited from class cse378.AbstractCache |
---|
blockBits, blockSize, cachelines, cleanMisses, dirtyMisses, hits, lineBits, numLines, numSets, stat |
Constructor Summary | |
---|---|
Cache(Component c,
int lines,
int sets,
int blockSize)
|
Method Summary | |
---|---|
protected BitField |
computeIndex(cse378.address.PhysicalAddress location)
Compute the index of a particular location |
protected BitField |
computeTag(cse378.address.PhysicalAddress location)
Compute the tag for a particular location. |
protected CacheLine |
getLine(BitField index)
Get the line addressed by the index |
private void |
initStatus(cse378.address.PhysicalAddress addr)
|
void |
load(cse378.address.PhysicalAddress addr)
Signal a read from the cache |
void |
store(cse378.address.PhysicalAddress addr)
Signal a write to Cache |
Methods inherited from class cse378.AbstractCache |
---|
getCleanMisses, getCounts, getDirtyMisses, getHits, getInfo, getStatus |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Cache(Component c, int lines, int sets, int blockSize)
Method Detail |
---|
protected CacheLine getLine(BitField index)
getLine
in class AbstractCache
index
- a BitField specifying the index
private void initStatus(cse378.address.PhysicalAddress addr)
public void load(cse378.address.PhysicalAddress addr)
load
in class AbstractCache
addr
- Physical Address of the loadpublic void store(cse378.address.PhysicalAddress addr)
store
in class AbstractCache
addr
- physical address of the load targetprotected BitField computeIndex(cse378.address.PhysicalAddress location)
computeIndex
in class AbstractCache
location
- location in memory to be wrote to
protected BitField computeTag(cse378.address.PhysicalAddress location)
computeTag
in class AbstractCache
location
- location in memory to be wrote to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |