Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## dioscuri.module.motherboard
Class Motherboard

    java.lang.Object
      dioscuri.module.AbstractModule
          dioscuri.module.ModuleMotherboard
              dioscuri.module.motherboard.Motherboard

All Implemented Interfaces:
  Addressable, Module

    public class Motherboard

extends ModuleMotherboard

An implementation of a motherboard module. This module is responsible for allowing devices to communicate with the CPU and vice versa.

See Also:
  `

  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.`

Nested Class Summary

Nested classes/interfaces inherited from interface dioscuri.interfaces.Module
`Module.Type`

Field Summary
`Addressable[]` | `ioAddressSpace`
`static int` | `IOSPACE_EISA_SIZE`
`static int` | `IOSPACE_ISA_SIZE`
`protected int` | `ioSpaceSize`
`static int` | `SYSTEM_CONTROL_PORT_A`

Fields inherited from class dioscuri.module.AbstractModule
`type`

Constructor Summary
`Motherboard(Emulator owner)` Class constructor

Method Summary
`boolean` | `getA20()` Get value of A20 address line
`long` | `getCurrentInstructionNumber()` Retrieve current number of instruction (instructions executed so far)
`java.lang.String` | `getDump()` Return a dump of module status
`byte` | `getIOPortByte(int portAddress)`
`byte[]` | `getIOPortDoubleWord(int portAddress)`
`byte[]` | `getIOPortWord(int portAddress)`
`boolean` | `registerClock(ModuleClock clock)` Registers a clock to motherboard
`boolean` | `requestTimer(Updateable device, int updateInterval, boolean continuous)` Requests a timer for given device at clock
`boolean` | `reset()` Reset all parameters of module.
`boolean` | `resetTimer(Updateable device, int updateInterval)` Resets the timer of device (if any)
`void` | `setA20(boolean a20)` Set value of A20 address line
`boolean` | `setIOPort(int portAddress, Addressable device)` Set I/O address port to given device
`void` | `setIOPortByte(int portAddress, byte dataByte)`
`void` | `setIOPortDoubleWord(int portAddress, byte[] dataDoubleWord)`
`void` | `setIOPortWord(int portAddress, byte[] dataWord)`
`boolean` | `setTimerActiveState(Updateable device, boolean activeState)` Set a timer to start/stop running

Methods inherited from class dioscuri.module.AbstractModule
`getConnection, getConnections, getDebugMode, getExpectedConnections, getType, isConnected, 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.Module
`getConnection, getConnections, getDebugMode, getExpectedConnections, getType, isConnected, setConnection, setDebugMode, start, stop`

Field Detail

### ioSpaceSize

    protected int ioSpaceSize

### ioAddressSpace

    public Addressable[] ioAddressSpace

### IOSPACE_ISA_SIZE

    public static final int IOSPACE_ISA_SIZE

See Also:
  Constant Field Values

### IOSPACE_EISA_SIZE

    public static final int IOSPACE_EISA_SIZE

See Also:
  Constant Field Values

### SYSTEM_CONTROL_PORT_A

    public static final int SYSTEM_CONTROL_PORT_A

See Also:
  Constant Field Values

Constructor Detail

### Motherboard

    public Motherboard(Emulator owner)

  Class constructor

  Parameters:
    `owner` -

Method Detail

### reset

    public boolean reset()

  Reset all parameters of module.

  Specified by:
    `reset` in interface `Module`
  Specified by:
    `reset` in class `AbstractModule`
  Returns:
    true iff the AbstractModule was reset properly.
  See Also:
    `AbstractModule`

### getDump

    public java.lang.String getDump()

  Return a dump of module status

  Provides a dummy implementation since many of the subclasses of this abstract module class do not need or use a getDump() implementation. The ones that do, can override this method.

  Specified by:
    `getDump` in interface `Module`
  Overrides:
    `getDump` in class `AbstractModule`
  Returns:
    string containing a dump of this module
  See Also:
    `AbstractModule`

### registerClock

    public boolean registerClock(ModuleClock clock)

  Registers a clock to motherboard

  Specified by:
    `registerClock` in class `ModuleMotherboard`
  Returns:
    boolean true if registration is successfully, false otherwise
  See Also:
    `ModuleMotherboard`

### requestTimer

    public boolean requestTimer(Updateable device,
                                int updateInterval,
                                boolean continuous)

  Requests a timer for given device at clock

  Specified by:
    `requestTimer` in class `ModuleMotherboard`
  Returns:
    boolean true if registration is successfully, false otherwise
  See Also:
    `ModuleMotherboard`

### setTimerActiveState

    public boolean setTimerActiveState(Updateable device,
                                       boolean activeState)

  Set a timer to start/stop running

  Specified by:
    `setTimerActiveState` in class `ModuleMotherboard`
  Returns:
    boolean true if timer is reset successfully, false otherwise
  See Also:
    `ModuleMotherboard`

### resetTimer

    public boolean resetTimer(Updateable device,
                              int updateInterval)

  Resets the timer of device (if any)

  Specified by:
    `resetTimer` in class `ModuleMotherboard`
  Returns:
    boolean true if reset is successfully, false otherwise
  See Also:
    `ModuleMotherboard`

### setIOPort

    public boolean setIOPort(int portAddress,
                             Addressable device)

  Set I/O address port to given device

  Specified by:
    `setIOPort` in class `ModuleMotherboard`
  Returns:
    boolean true if data is set successfully, false otherwise
  See Also:
    `ModuleMotherboard`

### getIOPortByte

    public byte getIOPortByte(int portAddress)
                       throws ModuleException

  Specified by:
    `getIOPortByte` in interface `Addressable`
  Specified by:
    `getIOPortByte` in class `ModuleMotherboard`
  Returns:
  Throws:
    `ModuleException`
  See Also:
    `Addressable`

### setIOPortByte

    public void setIOPortByte(int portAddress,
                              byte dataByte)
                       throws ModuleException

  Specified by:
    `setIOPortByte` in interface `Addressable`
  Specified by:
    `setIOPortByte` in class `ModuleMotherboard`
  Throws:
    `ModuleException`
  See Also:
    `Addressable`

### getIOPortWord

    public byte[] getIOPortWord(int portAddress)
                         throws ModuleException

  Specified by:
    `getIOPortWord` in interface `Addressable`
  Specified by:
    `getIOPortWord` in class `ModuleMotherboard`
  Returns:
  Throws:
    `ModuleException`
  See Also:
    `Addressable`

### setIOPortWord

    public void setIOPortWord(int portAddress,
                              byte[] dataWord)
                       throws ModuleException

  Specified by:
    `setIOPortWord` in interface `Addressable`
  Specified by:
    `setIOPortWord` in class `ModuleMotherboard`
  Throws:
    `ModuleException`
  See Also:
    `Addressable`

### getIOPortDoubleWord

    public byte[] getIOPortDoubleWord(int portAddress)
                               throws ModuleException

  Specified by:
    `getIOPortDoubleWord` in interface `Addressable`
  Specified by:
    `getIOPortDoubleWord` in class `ModuleMotherboard`
  Returns:
  Throws:
    `ModuleException`
  See Also:
    `Addressable`

### setIOPortDoubleWord

    public void setIOPortDoubleWord(int portAddress,
                                    byte[] dataDoubleWord)
                             throws ModuleException

  Specified by:
    `setIOPortDoubleWord` in interface `Addressable`
  Specified by:
    `setIOPortDoubleWord` in class `ModuleMotherboard`
  Throws:
    `ModuleException`
  See Also:
    `Addressable`

### getA20

    public boolean getA20()

  Get value of A20 address line

  Specified by:
    `getA20` in class `ModuleMotherboard`
  Returns:
    true if set, false if not
  See Also:
    `ModuleMotherboard`

### setA20

    public void setA20(boolean a20)

  Set value of A20 address line

  Specified by:
    `setA20` in class `ModuleMotherboard`
  Parameters:
    `a20` - true to set, false to clear
  See Also:
    `ModuleMotherboard`

### getCurrentInstructionNumber

    public long getCurrentInstructionNumber()

  Retrieve current number of instruction (instructions executed so far)

  Specified by:
    `getCurrentInstructionNumber` in class `ModuleMotherboard`
  Returns:
    long containing number of instructions
  See Also:
    `ModuleMotherboard`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD