|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dioscuri.module.AbstractModule dioscuri.module.ModulePIT dioscuri.module.pit.PIT
public class PIT
An implementation of a Programmable Interval Timer (PIT) module based on the Intel 82C54 PIT chip.
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 |
---|
protected int irqNumber
Constructor Detail |
---|
public PIT(Emulator owner)
owner
- Method Detail |
---|
public boolean reset()
reset
in interface Module
reset
in class AbstractModule
AbstractModule
public java.lang.String getDump()
getDump
in interface Module
getDump
in class AbstractModule
AbstractModule
public int getUpdateInterval()
Updateable
public void setUpdateInterval(int interval)
interval
- the interval between subsequent updates in ms.Updateable
public void update()
Updateable
public byte getIOPortByte(int portAddress) throws ModuleException, UnknownPortException
ModuleException
UnknownPortException
Addressable
public void setIOPortByte(int portAddress, byte data) throws ModuleException, UnknownPortException
ModuleException
UnknownPortException
Addressable
public byte[] getIOPortWord(int portAddress) throws ModuleException, WriteOnlyPortException
ModuleException
WriteOnlyPortException
Addressable
public void setIOPortWord(int portAddress, byte[] dataWord) throws ModuleException
ModuleException
Addressable
public byte[] getIOPortDoubleWord(int portAddress) throws ModuleException, WriteOnlyPortException
ModuleException
WriteOnlyPortException
Addressable
public void setIOPortDoubleWord(int portAddress, byte[] dataDoubleWord) throws ModuleException
ModuleException
Addressable
protected void raiseIRQ(Counter counter)
counter
- protected void lowerIRQ(Counter counter)
counter
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |