|
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.ArrayMemory
public class ArrayMemory
Array memory.
This type of memory are implemented using one array of memory and only one can be enabled at time. It look like a BankedMemory but each bank can be a different memory and do not support shared page.
Field Summary |
---|
Fields inherited from class jmce.sim.memory.AbstractMemory |
---|
size, vms |
Fields inherited from class jmce.sim.AbstractPeripheral |
---|
cpu |
Constructor Summary | |
---|---|
ArrayMemory()
|
Method Summary | |
---|---|
void |
addMemory(Memory v)
Add virtual memory to the actual list. |
protected int |
get(int a)
Get memory. |
int |
getIndex()
Return the index of the current selected 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 |
setIndex(int i)
Set the memory index. |
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, 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 ArrayMemory()
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
public void init(Hardware parent) throws SIMException
Hardware
init
in interface Hardware
init
in class AbstractHardware
parent
- Parent of this hardware.
SIMException
public int getIndex()
public void setIndex(int i)
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 addMemory(Memory v)
addMemory
in class AbstractMemory
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |