misim.microchip
Class PIC84_EECon1
java.lang.Object
|
+--misim.Register
|
+--misim.microchip.PIC84_EECon1
- All Implemented Interfaces:
- ChainedClockListener, ClockListener, ResetListener
- public class PIC84_EECon1
- extends Register
- implements ChainedClockListener, ResetListener
This extends Register to implement the EEPRom EECon1 register functions
Method Summary |
void |
clockEvent(long clocks)
This method is called after each instruction is executed. |
ClockListener |
getNext()
Return the next event handler in the chain. |
void |
handleUpdate()
Subclasses should implement this to respond to changes made to the value
of the register. |
void |
prepare(long clocks)
Prepare for emulation, beginning at the given clock count |
void |
reset(int resetType)
The processor has been reset |
void |
setNext(ClockListener nextListener)
Set the next event handler in the chain. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PIC84_EECon1
public PIC84_EECon1(MachineState machineState,
Register dataReg,
Register addrReg,
PIC84_EECon2 con2Reg,
PIC84_Intcon intconReg)
handleUpdate
public void handleUpdate()
- Description copied from class:
Register
- Subclasses should implement this to respond to changes made to the value
of the register. This is only called when the member variable 'simple'
is set to false.
- Overrides:
handleUpdate
in class Register
reset
public void reset(int resetType)
- The processor has been reset
- Specified by:
reset
in interface ResetListener
- Parameters:
resetType
- The type of the reset that has ocurred.
prepare
public void prepare(long clocks)
- Prepare for emulation, beginning at the given clock count
- Specified by:
prepare
in interface ClockListener
- Parameters:
clocks
- The clock count that emulation will start at
clockEvent
public void clockEvent(long clocks)
- This method is called after each instruction is executed. Note that
the number of clocks since the last call may be more than 1. This
will occur for some branch instructions, and when loops have been
optimised - resulting in a sequence of loop instructions being
emulated in a single atomic event.
- Specified by:
clockEvent
in interface ClockListener
- Parameters:
clocks
- The current clock count for the processor
setNext
public void setNext(ClockListener nextListener)
- Set the next event handler in the chain. The implementation of
this class MUST call nextListener.clockEvent at the start of the
clockEvent method - ie. it must honour the chain.
- Specified by:
setNext
in interface ChainedClockListener
- Parameters:
nextListener
- The next clock event listener in the chain
getNext
public ClockListener getNext()
- Return the next event handler in the chain.
- Specified by:
getNext
in interface ChainedClockListener
- Returns:
- The next event handler in the chain