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.pit
Class PIT

    java.lang.Object
      dioscuri.module.AbstractModule
          dioscuri.module.ModulePIT
              dioscuri.module.pit.PIT

All Implemented Interfaces:
  Addressable, Module, Updateable

    public class PIT

extends ModulePIT

An implementation of a Programmable Interval Timer (PIT) module based on the Intel 82C54 PIT chip.

See Also:
  `

  Metadata module ******************************************** general.type : pit general.name : Programmable Interval Timer (PIT) based on Intel 82C54 PIT general.architecture : Von Neumann general.description : Implements the Intel 82C54 PIT extended with a system clock general.creator : Tessella Support Services, Koninklijke Bibliotheek, Nationaal Archief of the Netherlands general.version : 1.0 general.keywords : pit, timer, counter general.relations : motherboard, cpu general.yearOfIntroduction : 1994 general.yearOfEnding : general.ancestor : Intel 8253 general.successor : pit.numberOfCounters : 3 pit.numberOfModes : 6 pit.clockFrequency : 1193181 (ideally, but maybe not feasible in Java)

  Notes: This PIT is implemented to be as close as possible to the functional behaviour of an original Intel 82C54. However, not all logic has to be implemented. Not part of this implementation is: - Signal lines WR, RD, CD, A0 and A1.

  Normally counters 0,1,2 are defined to a particular task (RTC, etc.). In this implementation counter zero generates a IRQ 0 if the count becomes zero. Other counters are not assigned.

  In the original PIT, the clock signal is generated by a separate hardware component (crystal). In the emulated PIT, the clock signal is generated by a separate moduleClock (imitates the crystal, but may have a different frequency).`

Nested Class Summary

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

Field Summary
`protected int` | `irqNumber`

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

Constructor Summary
`PIT(Emulator owner)` Class constructor

Method Summary
`java.lang.String` | `getDump()` Return a dump of module status
`byte` | `getIOPortByte(int portAddress)`
`byte[]` | `getIOPortDoubleWord(int portAddress)`
`byte[]` | `getIOPortWord(int portAddress)`
`int` | `getUpdateInterval()` Get the update interval.
`protected void` | `lowerIRQ(Counter counter)`
`protected void` | `raiseIRQ(Counter counter)`
`boolean` | `reset()` Reset all parameters of module.
`void` | `setIOPortByte(int portAddress, byte data)`
`void` | `setIOPortDoubleWord(int portAddress, byte[] dataDoubleWord)`
`void` | `setIOPortWord(int portAddress, byte[] dataWord)`
`void` | `setUpdateInterval(int interval)` Defines the interval between subsequent updates
`void` | `update()` Update the module.

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

### irqNumber

    protected int irqNumber

Constructor Detail

### PIT

    public PIT(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`

### getUpdateInterval

    public int getUpdateInterval()

  Get the update interval.

  Returns:
    the update interval
  See Also:
    `Updateable`

### setUpdateInterval

    public void setUpdateInterval(int interval)

  Defines the interval between subsequent updates

  Parameters:
    `interval` - the interval between subsequent updates in ms.
  See Also:
    `Updateable`

### update

    public void update()

  Update the module.

  See Also:
    `Updateable`

### getIOPortByte

    public byte getIOPortByte(int portAddress)
                       throws ModuleException,
                              UnknownPortException

  Returns:
  Throws:
    `ModuleException`
    `UnknownPortException`
  See Also:
    `Addressable`

### setIOPortByte

    public void setIOPortByte(int portAddress,
                              byte data)
                       throws ModuleException,
                              UnknownPortException

  Throws:
    `ModuleException`
    `UnknownPortException`
  See Also:
    `Addressable`

### getIOPortWord

    public byte[] getIOPortWord(int portAddress)
                         throws ModuleException,
                                WriteOnlyPortException

  Returns:
  Throws:
    `ModuleException`
    `WriteOnlyPortException`
  See Also:
    `Addressable`

### setIOPortWord

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

  Throws:
    `ModuleException`
  See Also:
    `Addressable`

### getIOPortDoubleWord

    public byte[] getIOPortDoubleWord(int portAddress)
                               throws ModuleException,
                                      WriteOnlyPortException

  Returns:
  Throws:
    `ModuleException`
    `WriteOnlyPortException`
  See Also:
    `Addressable`

### setIOPortDoubleWord

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

  Throws:
    `ModuleException`
  See Also:
    `Addressable`

### raiseIRQ

    protected void raiseIRQ(Counter counter)

  Parameters:
    `counter` -

### lowerIRQ

    protected void lowerIRQ(Counter counter)

  Parameters:
    `counter` -

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