|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Memory
Memory device.
Interface used to simulate every memory mapped device like ram. eprom , I/O space and so on. The width of the memory is 8 bit.
Memory can have global MemoryWriteListener
, called
at every memory write and a specific listener called when a specific
location is written.
Memory can have MemoryReadListener
called when one
memory location must be read. Multiple MemoryReadListener can be
installed and are called in installation order.
Method Summary | |
---|---|
void |
addMemoryReadListener(int a,
MemoryReadListener l)
|
void |
addMemoryReadListener(MemoryReadListener l)
|
void |
addMemoryWriteListener(int address,
MemoryWriteListener l)
Add a specific MemoryWriteListener. |
void |
addMemoryWriteListener(MemoryWriteListener l)
Add a global MemoryWriteListener. |
void |
clrBit(int a,
int mask)
|
int |
getMemory(int address)
Get a location of memory. |
java.lang.String |
getMemoryName(int address)
|
MemoryReadListener |
getMemoryReadListenerAt(int i)
|
MemoryReadListener |
getMemoryReadListenerAt(int i,
int a)
|
int |
getMemoryReadListenerCount()
|
int |
getMemoryReadListenerCount(int a)
|
MemoryWriteListener |
getMemoryWriteListenerAt(int i)
|
MemoryWriteListener |
getMemoryWriteListenerAt(int i,
int a)
|
int |
getMemoryWriteListenerCount()
Return the number of global memory write listener installed. |
int |
getMemoryWriteListenerCount(int a)
Return the number of specific memory write listener installed at the specified affress. |
boolean |
getReadOnly(int add)
Check if a speficied location is read only. |
int |
getSize()
Return the size of the memory in byte. |
boolean |
isBit(int a,
int mask)
|
void |
removeMemoryReadListener(int a,
MemoryReadListener l)
|
void |
removeMemoryReadListener(MemoryReadListener l)
|
void |
removeMemoryWriteListener(int a,
MemoryWriteListener l)
Remove a previus specific installed memory write listener. |
void |
removeMemoryWriteListener(MemoryWriteListener l)
Remove a previous global installed memory write listener. |
void |
setBit(int a,
int mask)
|
void |
setMemory(int address,
int value)
Set a location of memory. |
void |
setMemoryName(int address,
java.lang.String name)
|
void |
setReadOnly()
Set the flag read only for all the memory |
void |
setReadOnly(int address)
Set the flag read only for a single address. |
void |
setReadOnly(int start,
int len)
Set the flag read only for the specified range |
void |
setSize(int size)
Set the size of the memory. |
Methods inherited from interface jmce.sim.Peripheral |
---|
idle, registerCPU |
Methods inherited from interface jmce.sim.Hardware |
---|
addHardware, destroy, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, init, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName |
Method Detail |
---|
void setMemory(int address, int value) throws SIMException
address
- - Memory addressvalue
- - Value to set only 8 bit are used
SIMException
int getMemory(int address) throws SIMException
address
- - Location
SIMException
int getSize()
void setSize(int size)
void addMemoryWriteListener(MemoryWriteListener l)
The listener will be called when any location of the memory is writed.
l
- - Memory write listener called when the memory is
writed.void addMemoryWriteListener(int address, MemoryWriteListener l)
The listener will be called when the specified memory location is written.
address
- - Address where to install the listener.l
- - Memory write listener called when the memory is
writed.void removeMemoryWriteListener(MemoryWriteListener l)
void removeMemoryWriteListener(int a, MemoryWriteListener l)
int getMemoryWriteListenerCount()
int getMemoryWriteListenerCount(int a)
MemoryWriteListener getMemoryWriteListenerAt(int i)
MemoryWriteListener getMemoryWriteListenerAt(int i, int a)
void addMemoryReadListener(MemoryReadListener l)
void removeMemoryReadListener(MemoryReadListener l)
void removeMemoryReadListener(int a, MemoryReadListener l)
void addMemoryReadListener(int a, MemoryReadListener l)
int getMemoryReadListenerCount()
int getMemoryReadListenerCount(int a)
MemoryReadListener getMemoryReadListenerAt(int i)
MemoryReadListener getMemoryReadListenerAt(int i, int a)
void setMemoryName(int address, java.lang.String name)
java.lang.String getMemoryName(int address)
void setBit(int a, int mask) throws SIMException
SIMException
void clrBit(int a, int mask) throws SIMException
SIMException
boolean isBit(int a, int mask) throws SIMException
SIMException
void setReadOnly(int start, int len)
void setReadOnly(int address)
void setReadOnly()
boolean getReadOnly(int add)
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |