|
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.BankedMemory
public class BankedMemory
Field Summary |
---|
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 | |
---|---|
BankedMemory()
Default constructor |
|
BankedMemory(java.lang.String name,
int bankSize,
int numBank,
int numPage,
int pageSize)
Constructor with all parameter. |
Method Summary | |
---|---|
protected int |
get(int a)
Get memory. |
int |
getBank()
Return the current bank |
int |
getNumBank()
Return the number of bank |
int |
getNumPage()
Return the number of page in each bank. |
int |
getPageMap(int bank,
int page)
Return the mapping for one page. |
int |
getPageSize()
Return the size of the page. |
int |
getSharedSize()
Return the size of the shared area. |
int |
getSharedStart()
Return the start of the shared area in pages. |
protected void |
initMmu()
Initialize the MMU. |
boolean |
isMmuInitialized()
Return true if the MMU is initialized and the memory operate as banked. |
void |
reset()
Reset the memory to initial state. |
protected void |
set(int a,
int v)
Set memory. |
void |
setBank(int n)
Set the current bank. |
void |
setNumBank(int n)
Set the number of bank |
void |
setNumPage(int n)
Set the number of page in each bank. |
void |
setPageMap(int bank,
int page,
int p)
Map a page of memory. |
void |
setPageSize(int n)
Set the size of each page in byte. |
void |
setSharedSize(int n)
Set the lenght of the shared area in page |
void |
setSharedStart(int n)
Set the start address of the shared area in page. |
void |
showMemory()
Show using log the configuration of memory. |
java.lang.String |
toString()
|
Methods inherited from class jmce.sim.memory.PlainMemory |
---|
allocMemory, copyMemory, 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 |
Constructor Detail |
---|
public BankedMemory()
public BankedMemory(java.lang.String name, int bankSize, int numBank, int numPage, int pageSize)
Method Detail |
---|
public final void setPageSize(int n)
public final int getPageSize()
public final void setNumPage(int n)
public final int getNumPage()
public final void setNumBank(int n)
public final int getNumBank()
protected final void initMmu()
Till this method is not called the memory operate like a standard memory. After the MMU initialization the content of the memory for each bank is the same of the content of the standard memory before the initialization.
public final void setSharedStart(int n)
public final void setSharedSize(int n)
public final int getSharedSize()
public final int getSharedStart()
public final int getBank()
public final void setBank(int n)
protected final int get(int a)
AbstractMemory
Used by subclass to implement the phisical memory.
get
in class PlainMemory
protected final void set(int a, int v)
AbstractMemory
Used by subclass to implement the phisical memory.
set
in class PlainMemory
public void reset() throws SIMException
PlainMemory
reset
in interface Hardware
reset
in class PlainMemory
SIMException
public boolean isMmuInitialized()
public void showMemory()
public final void setPageMap(int bank, int page, int p)
bank
- - Bank number.page
- - Logical page.p
- - Phisical page.public final int getPageMap(int bank, int page)
bank
- - Bank number.page
- - Logical page.
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 |