|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmce.sim.AbstractHardware
jmce.sim.AbstractPeripheral
jmce.sim.memory.AbstractMemory
jmce.sim.memory.PlainMemory
public class PlainMemory
Field Summary | |
---|---|
protected int[] |
memory
Array with memory data |
protected int[] |
tmpMemory
Temporary array pointer for memory copy operation |
Fields inherited from class jmce.sim.memory.AbstractMemory |
---|
size, vms |
Fields inherited from class jmce.sim.AbstractPeripheral |
---|
cpu |
Constructor Summary | |
---|---|
PlainMemory()
Default constructor |
|
PlainMemory(java.lang.String name)
Constructor with memory name |
|
PlainMemory(java.lang.String name,
int size)
Constructor with memory name and memory size |
Method Summary | |
---|---|
protected static int[] |
allocMemory(int size)
Function used by subclass to allocate memory he memory is filled with 0xff. |
protected static void |
copyMemory(int[] source,
int soffset,
int[] dest,
int doffset,
int size)
Function used by subclass to copy memory. |
protected int |
get(int a)
Get memory. |
void |
reset()
Reset the memory to initial state. |
protected void |
set(int a,
int v)
Set memory. |
void |
setSize(int newSize)
Set the size of the memory. |
Methods inherited from class jmce.sim.AbstractPeripheral |
---|
idle, registerCPU, setIdle, setLive |
Methods inherited from class jmce.sim.AbstractHardware |
---|
addHardware, createFrame, destroy, getHardware, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareForName, getHardwareInstances, getHardwareTree, getName, getParent, init, initSwing, removeHardware, removeHardware, setHardware, setHardware, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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, setHardware, setHardware, setName |
Field Detail |
---|
protected int[] memory
protected int[] tmpMemory
Constructor Detail |
---|
public PlainMemory()
public PlainMemory(java.lang.String name)
public PlainMemory(java.lang.String name, int size)
Method Detail |
---|
protected void set(int a, int v)
AbstractMemory
Used by subclass to implement the phisical memory.
set
in class AbstractMemory
protected int get(int a)
AbstractMemory
Used by subclass to implement the phisical memory.
get
in class AbstractMemory
public void reset() throws SIMException
reset
in interface Hardware
reset
in class AbstractHardware
SIMException
public void setSize(int newSize)
Memory
setSize
in interface Memory
setSize
in class AbstractMemory
protected static int[] allocMemory(int size)
protected static void copyMemory(int[] source, int soffset, int[] dest, int doffset, int size)
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |