|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--sim.MemoryMap
Implements a mapped memory.
| Constructor Summary | |
MemoryMap(Mips machine)
|
|
| Method Summary | |
void |
attach(Memory mem,
int location)
Attach memory of size, at location |
void |
doCycle()
Give each block a cycle |
int |
getLastWriteAddr()
|
int |
getLastWriteVal()
|
int |
getSize()
|
void |
initialize()
Initialize each block |
boolean |
isMapped(int address)
Answer if this address is mapped. |
byte |
readByte(int address)
Read a byte at the given address. |
int |
readWord(int address)
Read a word at the given address. |
java.lang.String |
toString()
|
void |
writeByte(int address,
byte value)
Write a byte at the given address. |
void |
writeWord(int address,
int value)
Write a word at the given address. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public MemoryMap(Mips machine)
| Method Detail |
public int getLastWriteAddr()
public int getLastWriteVal()
public java.lang.String toString()
toString in class java.lang.Object
public void attach(Memory mem,
int location)
public boolean isMapped(int address)
public void doCycle()
doCycle in interface Memorypublic void initialize()
initialize in interface Memorypublic int getSize()
getSize in interface Memorypublic int readWord(int address)
readWord in interface Memorypublic byte readByte(int address)
readByte in interface Memory
public void writeWord(int address,
int value)
writeWord in interface Memory
public void writeByte(int address,
byte value)
writeByte in interface Memory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||