|
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.CombinedMemory
public class CombinedMemory
Memory made from other memory.
This type of memory is the result of addtion of other memory for example if we add one memory of 4 KB and another of 20 KB the total size of the memory will be 24 KB.
AbstractMemory.addMemory(jmce.sim.Memory)
Field Summary |
---|
Fields inherited from class jmce.sim.memory.AbstractMemory |
---|
size, vms |
Fields inherited from class jmce.sim.AbstractPeripheral |
---|
cpu |
Constructor Summary | |
---|---|
CombinedMemory()
|
|
CombinedMemory(java.lang.String name)
|
Method Summary | |
---|---|
protected int |
get(int a)
Get memory. |
int |
getSize()
Return the size of the memory in byte. |
void |
init(Hardware parent)
Initialize the hardware. |
protected int |
mapAddress(int a)
Map address for virtual memory. |
protected Memory |
mapMemory(int a)
Map memory for virtual memory. |
protected void |
set(int a,
int v)
Set memory. |
void |
setSize(int newSize)
Set the size of the memory. |
java.lang.String |
toString()
|
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, initSwing, removeHardware, removeHardware, reset, 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, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName |
Constructor Detail |
---|
public CombinedMemory()
public CombinedMemory(java.lang.String name)
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 setSize(int newSize)
Memory
setSize
in interface Memory
setSize
in class AbstractMemory
public int getSize()
Memory
getSize
in interface Memory
getSize
in class AbstractMemory
protected final Memory mapMemory(int a)
AbstractMemory
This method must be overriden from virtual memory sub class.
mapMemory
in class AbstractMemory
protected final int mapAddress(int a)
AbstractMemory
This method must be overridden from virtual memory sub class.
mapAddress
in class AbstractMemory
public void init(Hardware parent) throws SIMException
Hardware
init
in interface Hardware
init
in class AbstractHardware
parent
- Parent of this hardware.
SIMException
public java.lang.String toString()
toString
in class AbstractMemory
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |