miSim

misim.microchip
Class PIC84_Intcon

java.lang.Object
  |
  +--misim.Register
        |
        +--misim.microchip.PIC84_Intcon
All Implemented Interfaces:
ClockListener

public class PIC84_Intcon
extends Register
implements ClockListener

This extends Register to implement the Interrupt Control register functions


Field Summary
 boolean bEEWriteIntEnable
           
 boolean bGlobalIntEnable
           
 boolean bIntEnable
           
 boolean bPortBIntEnable
           
 boolean bTmr0IntEnable
           
static int eeieBit
           
static int gieBit
           
static int inteBit
           
static int intfBit
           
static int rbieBit
           
static int rbifBit
           
static int t0ieBit
           
static int t0ifBit
           
 int tmrCounter
           
 
Fields inherited from class misim.Register
machineState, simple, val
 
Constructor Summary
PIC84_Intcon(MachineState machineState, PIC84_Tmr0 tmrReg, PIC84_Option optionReg, PIC84_Status statusReg)
           
 
Method Summary
 void clockEvent(long clocks)
          If interrupts are to be handled, this should be called after every instruction.
 void handleUpdate()
          Subclasses should implement this to respond to changes made to the value of the register.
 void invokeInterrupt()
          Call the interrupt handler, clearing the global interrupt enable flag and putting the current program counter location onto the stack.
 void prepare(long clocks)
          Prepare for emulation of interrupts - mainly by tracking the clock cycles that have occurred each time the main handling routine is called
 
Methods inherited from class misim.Register
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bGlobalIntEnable

public boolean bGlobalIntEnable

bTmr0IntEnable

public boolean bTmr0IntEnable

bPortBIntEnable

public boolean bPortBIntEnable

bIntEnable

public boolean bIntEnable

bEEWriteIntEnable

public boolean bEEWriteIntEnable

tmrCounter

public int tmrCounter

rbifBit

public static final int rbifBit

intfBit

public static final int intfBit

t0ifBit

public static final int t0ifBit

rbieBit

public static final int rbieBit

inteBit

public static final int inteBit

t0ieBit

public static final int t0ieBit

eeieBit

public static final int eeieBit

gieBit

public static final int gieBit
Constructor Detail

PIC84_Intcon

public PIC84_Intcon(MachineState machineState,
                    PIC84_Tmr0 tmrReg,
                    PIC84_Option optionReg,
                    PIC84_Status statusReg)
Method Detail

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

prepare

public void prepare(long clocks)
Prepare for emulation of interrupts - mainly by tracking the clock cycles that have occurred each time the main handling routine is called
Specified by:
prepare in interface ClockListener
Parameters:
clocks - The current clock count for the processor

clockEvent

public final void clockEvent(long clocks)
If interrupts are to be handled, this should be called after every instruction.
Specified by:
clockEvent in interface ClockListener
Following copied from interface: misim.ClockListener
Parameters:
clocks - The current clock count for the processor

invokeInterrupt

public void invokeInterrupt()
Call the interrupt handler, clearing the global interrupt enable flag and putting the current program counter location onto the stack.

miSim