|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dioscuri.module.AbstractModule dioscuri.module.ModuleCPU
public abstract class ModuleCPU
Interface representing a generic CPU module.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface dioscuri.interfaces.Module |
---|
Module.Type |
Field Summary |
---|
Fields inherited from class dioscuri.module.AbstractModule |
---|
type |
Constructor Summary | |
---|---|
ModuleCPU()
|
Method Summary | |
---|---|
abstract java.lang.String |
dumpRegisters()
Returns a dump of the current registers with their value |
abstract boolean |
getCpuInstructionDebug()
Get CPU instruction debug. |
abstract long |
getCurrentInstructionNumber()
Retrieve current number of instruction (instructions executed so far) |
abstract int |
getIPS()
Get the Instructions Per Second (ips) for this CPU. |
abstract java.lang.String |
getNextInstructionInfo()
Retrieve string with information about next instruction to be executed |
abstract java.lang.String |
getRegisterHex(int register)
|
protected abstract byte[] |
getRegisterValue(java.lang.String registerName)
Returns the value of a named register. |
protected abstract void |
incrementInstructionCounter()
Increment current number of instruction by one |
protected abstract boolean |
initInstructionTables()
Initialise the single and double byte opcode lookup arrays with instructions corresponding to the Intel hexadecimal machinecode values. |
protected abstract boolean |
initRegisters()
Initialise registers |
abstract void |
interruptRequest(boolean value)
Set the interrupt request (IRQ). |
abstract boolean |
isAbnormalTermination()
Returns if CPU halted abnormally or not |
abstract boolean |
isShutdown()
Returns if CPU halted due to full system shutdown or not |
abstract void |
setCpuInstructionDebug(boolean isDebugMode)
Set the CPU instruction debug. |
abstract void |
setHoldRequest(boolean value,
Module originator)
Sets the CPU hold mode by asserting a Hold Request. This informs the CPU to avoid using the (non-existent) bus as another device (usually via DMA) is using it; it should be scheduled as a asynchronous event in CPU. |
abstract void |
setIPS(int ips)
Set the Instructions Per Second (ips) for this CPU. |
abstract void |
setIPS(int ips,
int lowestUpdatePeriod)
Set the Instructions Per Second (ips) for this CPU. |
protected abstract boolean |
setRegisterValue(java.lang.String registerName,
byte[] value)
Sets the value of a named register to given value. |
protected abstract void |
setRunning(boolean status)
Set the boolean that starts and stops the CPU loop |
Methods inherited from class dioscuri.module.AbstractModule |
---|
getConnection, getConnections, getDebugMode, getDump, getExpectedConnections, getType, isConnected, reset, setConnection, setDebugMode, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface dioscuri.interfaces.Addressable |
---|
getIOPortByte, getIOPortDoubleWord, getIOPortWord, setIOPortByte, setIOPortDoubleWord, setIOPortWord |
Methods inherited from interface dioscuri.interfaces.Module |
---|
getConnection, getConnections, getDebugMode, getDump, getExpectedConnections, getType, isConnected, reset, setConnection, setDebugMode, start, stop |
Constructor Detail |
---|
public ModuleCPU()
Method Detail |
---|
public abstract void setIPS(int ips)
ips
- the Instructions Per Second (ips) for this CPU.public abstract int getIPS()
public abstract void setIPS(int ips, int lowestUpdatePeriod)
ips
- lowestUpdatePeriod
- the lowest update period in microsecondspublic abstract java.lang.String getNextInstructionInfo()
public abstract long getCurrentInstructionNumber()
protected abstract void incrementInstructionCounter()
public abstract java.lang.String dumpRegisters()
protected abstract boolean initRegisters()
protected abstract boolean initInstructionTables()
protected abstract void setRunning(boolean status)
status
- sets the isRunning booleanprotected abstract byte[] getRegisterValue(java.lang.String registerName)
registerName
-
protected abstract boolean setRegisterValue(java.lang.String registerName, byte[] value)
registerName
- value
- containing the value
public abstract void interruptRequest(boolean value)
value
- public abstract void setHoldRequest(boolean value, Module originator)
value
- state of the Hold Requestoriginator
- -public abstract java.lang.String getRegisterHex(int register)
register
-
public abstract boolean getCpuInstructionDebug()
public abstract void setCpuInstructionDebug(boolean isDebugMode)
isDebugMode
- status of instructionDebug (on/off)public abstract boolean isAbnormalTermination()
public abstract boolean isShutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |