jmce - 1_02

jmce.intel.mcs51
Class Timer

java.lang.Object
  extended by jmce.sim.AbstractHardware
      extended by jmce.sim.AbstractPeripheral
          extended by jmce.intel.mcs51.Timer
All Implemented Interfaces:
CycleListener, Hardware, Peripheral

public class Timer
extends AbstractPeripheral
implements CycleListener

Standard Timer0/Timer1 for 8051 family.

For each timer only MODE 0,MODE 1 and MODE 2 is supported.

Version:
1.00
Author:
Mario Viara

Field Summary
 
Fields inherited from class jmce.sim.AbstractPeripheral
cpu
 
Constructor Summary
Timer()
          Default constructor
 
Method Summary
 void cycle(int n)
          Cycle listener.
 void registerCPU(CPU cpu)
          Register a parent CPU for future reference.
 
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, init, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jmce.sim.Hardware
addHardware, destroy, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, init, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName
 

Constructor Detail

Timer

public Timer()
Default constructor

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

cycle

public final void cycle(int n)
                 throws SIMException
Description copied from interface: CycleListener
Cycle listener. This type of listener is very time consuming and must be used only when necessary because can have great impact on the simulator performance.

Specified by:
cycle in interface CycleListener
Parameters:
n - - The number of microprocessor cycle elapsed from the last call.
Throws:
SIMException
See Also:
CPU.addCycleListener(jmce.sim.CycleListener)

jmce - 1_02