|
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
jmce.sim.memory.MappedMemory
public class MappedMemory
Mapped memory
This Class implement one memory base over other memory mapped to this one. All part of memory not mapped will be redirect to a standard PlainMemory. The memory can be mapped at address and size multiple of the page size.
Field Summary | |
---|---|
protected int |
page
Size of minimum mapped unit in bytes |
protected jmce.sim.memory.MappedMemory.Page[] |
pages
Pages of memory |
Fields inherited from class jmce.sim.memory.PlainMemory |
---|
memory, tmpMemory |
Fields inherited from class jmce.sim.memory.AbstractMemory |
---|
size, vms |
Fields inherited from class jmce.sim.AbstractPeripheral |
---|
cpu |
Constructor Summary | |
---|---|
MappedMemory()
Default constructor |
|
MappedMemory(java.lang.String name,
int size)
Constructor with only name and size. |
|
MappedMemory(java.lang.String name,
int size,
int page)
Constructor with all paramater. |
Method Summary | |
---|---|
int |
getPage()
|
protected int |
mapAddress(int a)
Map address for virtual memory. |
protected Memory |
mapMemory(int a)
Map memory for virtual memory. |
void |
mapMemory(Memory m,
int address,
int offset,
int size)
|
void |
setPage(int page)
|
java.lang.String |
toString()
|
Methods inherited from class jmce.sim.memory.PlainMemory |
---|
allocMemory, copyMemory, get, reset, set, setSize |
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 page
protected jmce.sim.memory.MappedMemory.Page[] pages
Constructor Detail |
---|
public MappedMemory(java.lang.String name, int size, int page)
name
- - Name of the memory.size
- - Total size of memory.page
- - Size of each page.public MappedMemory(java.lang.String name, int size)
public MappedMemory()
Method Detail |
---|
public int getPage()
public void setPage(int page)
public void mapMemory(Memory m, int address, int offset, int size) throws SIMException
SIMException
protected Memory mapMemory(int a)
AbstractMemory
This method must be overriden from virtual memory sub class.
mapMemory
in class AbstractMemory
protected int mapAddress(int a)
AbstractMemory
This method must be overridden from virtual memory sub class.
mapAddress
in class AbstractMemory
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 |