|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.kbna.dioscuri.module.Module
nl.kbna.dioscuri.module.ModuleMotherboard
nl.kbna.dioscuri.module.motherboard.Motherboard
public class Motherboard
An implementation of a motherboard module. This module is responsible for allowing devices to communicate with the CPU and vice versa.
Metadata module
********************************************
general.type : motherboard
general.name : General x86 motherboard
general.architecture : Von Neumann
general.description : imitates an x86 motherboard including I/O address space, ...
general.creator : Tessella Support Services, Koninklijke Bibliotheek, Nationaal Archief of the Netherlands
general.version : 1.0
general.keywords : motherboard, mainboard, ioports, ...
general.relations : cpu, devices
general.yearOfIntroduction :
general.yearOfEnding :
general.ancestor :
general.successor :
motherboard.ioAddressSpaceSize : 65536 bytes
motherboard.architecture : ISA, EISA, PCI
Rule:
This module should always be initialised before I/O devices.| Field Summary | |
|---|---|
private boolean |
A20Enabled
|
private ModuleClock |
clock
|
private ModuleCPU |
cpu
|
private boolean |
debugMode
|
private Devices |
devices
|
private Emulator |
emu
|
ModuleDevice[] |
ioAddressSpace
|
static int |
IOSPACE_EISA_SIZE
|
static int |
IOSPACE_ISA_SIZE
|
protected int |
ioSpaceSize
|
private boolean |
isObserved
|
private static java.util.logging.Logger |
logger
|
private ModuleMemory |
memory
|
static int |
MODULE_ID
|
static java.lang.String |
MODULE_NAME
|
static java.lang.String |
MODULE_TYPE
|
private java.lang.String[] |
moduleConnections
|
static int |
SYSTEM_CONTROL_PORT_A
|
| Constructor Summary | |
|---|---|
Motherboard(Emulator owner)
Class constructor |
|
| Method Summary | |
|---|---|
boolean |
getA20()
Return A20 address line status |
java.lang.String[] |
getConnection()
Returns a String[] with all names of modules it needs to be connected to |
long |
getCurrentInstructionNumber()
Retrieve current number of instruction (instructions executed so far) |
byte[] |
getData(Module requester)
Returns data from this module |
boolean |
getDebugMode()
Returns the status of the debug mode toggle |
java.lang.String |
getDump()
Returns a dump of this module |
int |
getID()
Returns the ID of the module |
byte |
getIOPortByte(int portAddress)
Return I/O port data from I/O address space |
byte[] |
getIOPortDoubleWord(int portAddress)
Return a double word from I/O address space at given port |
byte[] |
getIOPortWord(int portAddress)
Return a word from I/O address space at given port |
java.lang.String |
getName()
Returns the name of the module |
java.lang.String |
getType()
Returns the type of the module |
boolean |
isConnected()
Checks if this module is connected to operate normally NOTE: not all devices are required, so they are not checked |
boolean |
isObserved()
Returns the status of observed toggle |
boolean |
registerClock(ModuleClock clock)
Registers a clock to motherboard |
boolean |
requestTimer(ModuleDevice device,
int updateInterval,
boolean continuous)
Requests a timer for given device at clock |
boolean |
reset()
Reset all parameters of module |
boolean |
resetTimer(ModuleDevice device,
int updateInterval)
Resets the timer of device (if any) |
void |
setA20(boolean a20)
Set A20 address line status |
boolean |
setConnection(Module module)
Sets up a connection with another module |
boolean |
setData(byte[] data,
Module sender)
Set data for this module |
boolean |
setData(java.lang.String[] data,
Module sender)
Set String[] data for this module |
void |
setDebugMode(boolean status)
Sets the debug mode toggle |
boolean |
setIOPort(int portAddress,
ModuleDevice device)
Set I/O address port to given device |
void |
setIOPortByte(int portAddress,
byte dataByte)
Set a byte in I/O address space at given port |
void |
setIOPortDoubleWord(int portAddress,
byte[] dataDoubleWord)
Set a double word in I/O address space at given port |
void |
setIOPortWord(int portAddress,
byte[] dataWord)
Set a word in I/O address space at given port |
void |
setObserved(boolean status)
Sets the observed toggle |
boolean |
setTimerActiveState(ModuleDevice device,
boolean activeState)
Set a timer to start/stop running |
void |
start()
Starts the module |
void |
stop()
Stops the module |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Emulator emu
private java.lang.String[] moduleConnections
private ModuleCPU cpu
private ModuleMemory memory
private Devices devices
private ModuleClock clock
private boolean isObserved
private boolean debugMode
private boolean A20Enabled
protected int ioSpaceSize
public ModuleDevice[] ioAddressSpace
private static java.util.logging.Logger logger
public static final int MODULE_ID
public static final java.lang.String MODULE_TYPE
public static final java.lang.String MODULE_NAME
public static final int IOSPACE_ISA_SIZE
public static final int IOSPACE_EISA_SIZE
public static final int SYSTEM_CONTROL_PORT_A
| Constructor Detail |
|---|
public Motherboard(Emulator owner)
| Method Detail |
|---|
public int getID()
getID in class ModuleModulepublic java.lang.String getType()
getType in class ModuleModulepublic java.lang.String getName()
getName in class ModuleModulepublic java.lang.String[] getConnection()
getConnection in class Modulepublic boolean setConnection(Module module)
setConnection in class Modulemod - Module that is to be connected to this class
Modulepublic boolean isConnected()
isConnected in class Modulepublic boolean reset()
reset in class Modulepublic void start()
start in class ModuleModulepublic void stop()
stop in class ModuleModulepublic boolean isObserved()
isObserved in class ModuleModulepublic void setObserved(boolean status)
setObserved in class Modulestatus - Modulepublic boolean getDebugMode()
getDebugMode in class ModuleModulepublic void setDebugMode(boolean status)
setDebugMode in class Modulestatus - Modulepublic byte[] getData(Module requester)
getData in class ModuleModule - requester, the requester of the data
Module
public boolean setData(byte[] data,
Module sender)
setData in class Modulebyte[] - dataModule - sender, the sender of the data
Module
public boolean setData(java.lang.String[] data,
Module sender)
setData in class ModuleString[] - dataModule - sender, the sender of the data
Modulepublic java.lang.String getDump()
getDump in class ModuleModulepublic boolean registerClock(ModuleClock clock)
registerClock in class ModuleMotherboard
public boolean requestTimer(ModuleDevice device,
int updateInterval,
boolean continuous)
requestTimer in class ModuleMotherboardModuleDevice - device that requests the timerint - updateInterval defining the frequency that update has to be done in microseconds
public boolean setTimerActiveState(ModuleDevice device,
boolean activeState)
setTimerActiveState in class ModuleMotherboardModuleDevice - device that request a timer to be setboolean - runState the state to set the timer to (start/stop)
public boolean resetTimer(ModuleDevice device,
int updateInterval)
resetTimer in class ModuleMotherboardModuleDevice - device that requests the timer resetint - updateInterval defining the frequency that update has to be done in microseconds
public boolean setIOPort(int portAddress,
ModuleDevice device)
setIOPort in class ModuleMotherboardint - portAddress containing the address of the I/O portModuleDevice - device
public byte getIOPortByte(int portAddress)
throws ModuleException
getIOPortByte in class ModuleMotherboardint - portAddress containing the address of the I/O port
ModuleException
public void setIOPortByte(int portAddress,
byte dataByte)
throws ModuleException
setIOPortByte in class ModuleMotherboardint - portAddress containing the address of the I/O portbyte - data
ModuleException, - ModuleWriteOnlyPortException
ModuleException
public byte[] getIOPortWord(int portAddress)
throws ModuleException
getIOPortWord in class ModuleMotherboardint - portAddress containing the address of the I/O port
ModuleException
public void setIOPortWord(int portAddress,
byte[] dataWord)
throws ModuleException
setIOPortWord in class ModuleMotherboardint - portAddress containing the address of the I/O portbyte[] - word
ModuleException, - ModuleWriteOnlyPortException
ModuleException
public byte[] getIOPortDoubleWord(int portAddress)
throws ModuleException
getIOPortDoubleWord in class ModuleMotherboardint - portAddress containing the address of the I/O port
ModuleException
public void setIOPortDoubleWord(int portAddress,
byte[] dataDoubleWord)
throws ModuleException
setIOPortDoubleWord in class ModuleMotherboardint - portAddress containing the address of the I/O portbyte[] - double word
ModuleException, - ModuleWriteOnlyPortException
ModuleExceptionpublic boolean getA20()
getA20 in class ModuleMotherboardpublic void setA20(boolean a20)
setA20 in class ModuleMotherboardboolean - true to enable A20, false otherwisepublic long getCurrentInstructionNumber()
getCurrentInstructionNumber in class ModuleMotherboard
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||