|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmce.sim.Interrupt
public class Interrupt
General interrupt.
Since version 1.01 is not an interface but a complete class.
When the constructor is called the interrupt is added to the specified InterruptManager (normally the CPU) and the interrupt will be fired when the 2 properties enabled and active are both true.
Field Summary | |
---|---|
protected int |
vector
|
Constructor Summary | |
---|---|
Interrupt(InterruptManager cpu,
java.lang.String name)
|
|
Interrupt(InterruptManager cpu,
java.lang.String name,
int vector)
|
|
Interrupt(InterruptManager mgr,
java.lang.String name,
int vector,
boolean nmi)
Constructor with all parameter |
Method Summary | |
---|---|
void |
addInterruptManager(InterruptManager mgr)
Add a new interrupt manager to this interrupt. |
protected void |
checkReady()
Called when the enabled or the active property is changed. |
int |
getCounter()
Return the number of interrupt occured. |
java.lang.String |
getName()
Return the interrupt name |
int |
getVector()
Return the interrupt vector. |
boolean |
isActive()
Return true if the interrupt is active |
boolean |
isAutoReset()
Return the property autoReset. |
boolean |
isEnabled()
Return true if the interrupt is enabled. |
boolean |
isNmi()
Return true if this interrupt is NMI interrupt. |
boolean |
isReady()
Return true if the interrupt is ready to be fired. |
void |
resetCounter()
Reset the counter of number of interrupt fired. |
void |
setActive(boolean mode)
Set the active property. |
void |
setAutoReset(boolean mode)
Set the property autoReset. |
void |
setEnabled(boolean mode)
Set the enabled property. |
void |
setVector(int n)
Set the interrupt vector. |
void |
startISR()
Called when the interrupt is started |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int vector
Constructor Detail |
---|
public Interrupt(InterruptManager mgr, java.lang.String name, int vector, boolean nmi)
public Interrupt(InterruptManager cpu, java.lang.String name, int vector)
public Interrupt(InterruptManager cpu, java.lang.String name)
Method Detail |
---|
public void addInterruptManager(InterruptManager mgr)
public boolean isNmi()
public void startISR() throws SIMException
SIMException
public int getCounter()
public void resetCounter()
public void setVector(int n)
public int getVector() throws SIMException
SIMException
public java.lang.String getName()
public boolean isEnabled()
public boolean isActive() throws SIMException
SIMException
public final void setEnabled(boolean mode) throws SIMException
SIMException
public final void setActive(boolean mode) throws SIMException
SIMException
public boolean isReady() throws SIMException
SIMException
protected final void checkReady() throws SIMException
SIMException
public void setAutoReset(boolean mode)
If this property is set to true automatically the CPU call the method setActive(false) after the interrupt is fired. Can be used when the interrupt source cannot be reset programmatically.
public boolean isAutoReset()
public java.lang.String toString()
toString
in class java.lang.Object
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |