|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthades.models.mips.memory.BaseMemory
Straight forward implementation of the memory interface to be extended by classes that provide further functionality
Field Summary | |
protected int |
adrMask
|
protected int |
bitMask
|
protected int |
bits
|
protected boolean |
debug
|
protected EntryHandler |
entryHandler
|
protected boolean |
entryHandlerInstalled
|
protected int[] |
mem
|
protected int |
size
|
Constructor Summary | |
BaseMemory(int newSize,
int newBits)
|
Method Summary | |
boolean |
getLog()
Get debug mode |
int |
getMemorySize()
Capacity of the memory in words |
int |
getWordWidth()
Witdh of one word in bits |
void |
installEntryHandler(EntryHandler newEntryHandler)
Set the entry handler |
int |
readMemory(int address)
Read a word from the memory |
void |
setEntry(int entry,
int globalPointer)
Call the entry handler in order to set the entry |
void |
setLog(boolean newDebug)
Enable or disable logging output |
void |
writeMemory(int address,
int word)
Write a word into the memory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int[] mem
protected int size
protected int adrMask
protected int bits
protected int bitMask
protected EntryHandler entryHandler
protected boolean entryHandlerInstalled
protected boolean debug
Constructor Detail |
public BaseMemory(int newSize, int newBits)
Method Detail |
public int getWordWidth()
getWordWidth
in interface Memory
public int getMemorySize()
getMemorySize
in interface Memory
public int readMemory(int address)
readMemory
in interface Memory
public void writeMemory(int address, int word)
writeMemory
in interface Memory
public void setEntry(int entry, int globalPointer)
setEntry
in interface Memory
public void installEntryHandler(EntryHandler newEntryHandler)
installEntryHandler
in interface Memory
public void setLog(boolean newDebug)
Memory
setLog
in interface Memory
public boolean getLog()
Memory
getLog
in interface Memory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |