jmce - 1_02

jmce.sim.memory
Class DuplicateMemory

java.lang.Object
  extended by jmce.sim.AbstractHardware
      extended by jmce.sim.AbstractPeripheral
          extended by jmce.sim.memory.AbstractMemory
              extended by jmce.sim.memory.DuplicateMemory
All Implemented Interfaces:
Hardware, Memory, Peripheral

public abstract class DuplicateMemory
extends AbstractMemory
implements Memory

Helper class to duplicate one memory. Used only by inner class.

Version:
1.00
Author:
Mario Viara

Field Summary
 
Fields inherited from class jmce.sim.memory.AbstractMemory
size, vms
 
Fields inherited from class jmce.sim.AbstractPeripheral
cpu
 
Constructor Summary
protected DuplicateMemory()
           
protected DuplicateMemory(AbstractMemory memory)
           
 
Method Summary
 Memory getMemoryModel()
           
 void init(Hardware parent)
          Initialize the hardware.
protected  AbstractMemory mapMemory(int a)
          Map memory for virtual memory.
 void registerCPU(CPU cpu)
          Register a parent CPU for future reference.
 void setMemoryModel(AbstractMemory memory)
           
 java.lang.String toString()
           
 
Methods inherited from class jmce.sim.memory.AbstractMemory
addHardwareMemory, addMemory, addMemoryReadListener, addMemoryReadListener, addMemoryWriteListener, addMemoryWriteListener, clrBit, get, getMemory, getMemoryAt, getMemoryCount, getMemoryName, getMemoryReadListenerAt, getMemoryReadListenerAt, getMemoryReadListenerCount, getMemoryReadListenerCount, getMemoryWriteListenerAt, getMemoryWriteListenerAt, getMemoryWriteListenerCount, getMemoryWriteListenerCount, getReadOnly, getSize, isBit, mapAddress, removeMemoryReadListener, removeMemoryReadListener, removeMemoryWriteListener, removeMemoryWriteListener, set, setBit, setMemory, setMemoryName, setReadOnly, setReadOnly, setReadOnly, setSize
 
Methods inherited from class jmce.sim.AbstractPeripheral
idle, 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.Memory
addMemoryReadListener, addMemoryReadListener, addMemoryWriteListener, addMemoryWriteListener, clrBit, getMemory, getMemoryName, getMemoryReadListenerAt, getMemoryReadListenerAt, getMemoryReadListenerCount, getMemoryReadListenerCount, getMemoryWriteListenerAt, getMemoryWriteListenerAt, getMemoryWriteListenerCount, getMemoryWriteListenerCount, getReadOnly, getSize, isBit, removeMemoryReadListener, removeMemoryReadListener, removeMemoryWriteListener, removeMemoryWriteListener, setBit, setMemory, setMemoryName, setReadOnly, setReadOnly, setReadOnly, setSize
 
Methods inherited from interface jmce.sim.Peripheral
idle
 
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

DuplicateMemory

protected DuplicateMemory()

DuplicateMemory

protected DuplicateMemory(AbstractMemory memory)
Method Detail

registerCPU

public void registerCPU(CPU cpu)
                 throws SIMException
Description copied from interface: Peripheral
Register a parent CPU for future reference.

Specified by:
registerCPU in interface Peripheral
Overrides:
registerCPU in class AbstractPeripheral
Throws:
SIMException

setMemoryModel

public void setMemoryModel(AbstractMemory memory)

getMemoryModel

public Memory getMemoryModel()

init

public void init(Hardware parent)
          throws SIMException
Description copied from interface: Hardware
Initialize the hardware. This method must be called before any use of the interface. Only set ... / get ... method are allowed to be called before the intialization.

Specified by:
init in interface Hardware
Overrides:
init in class AbstractHardware
Parameters:
parent - Parent of this hardware.
Throws:
SIMException

mapMemory

protected AbstractMemory mapMemory(int a)
Description copied from class: AbstractMemory
Map memory for virtual memory.

This method must be overriden from virtual memory sub class.

Overrides:
mapMemory in class AbstractMemory

toString

public java.lang.String toString()
Overrides:
toString in class AbstractMemory

jmce - 1_02