dioscuri.module.dma
Class DMA

java.lang.Object
  extended by dioscuri.module.AbstractModule
      extended by dioscuri.module.ModuleDMA
          extended by dioscuri.module.dma.DMA
All Implemented Interfaces:
Addressable, Module

public class DMA
extends ModuleDMA

An implementation of a DMA controller module.

See Also:

Metadata module ******************************************** general.type : dma general.name : DMA Controller general.architecture : Von Neumann general.description : Implements a standard DMA controller general.creator : Tessella Support Services, Koninklijke Bibliotheek, Nationaal Archief of the Netherlands general.version : 1.0 general.keywords : DMA, PIO, ATA, IDE, 8237 general.relations : motherboard, memory general.yearOfIntroduction : general.yearOfEnding : general.ancestor : general.successor :


Nested Class Summary
 
Nested classes/interfaces inherited from interface dioscuri.interfaces.Module
Module.Type
 
Field Summary
 DMAController[] controller
           
 DMA16Handler[] dma16Handler
           
 DMA8Handler[] dma8Handler
           
 
Fields inherited from class dioscuri.module.AbstractModule
type
 
Constructor Summary
DMA(Emulator owner)
          Class constructor
 
Method Summary
 void acknowledgeBusHold()
          Control has been relinquished of the system busses
DMA now has control over the system busses, so the highest priority DMA channel that scheduled a request is located and after setting up the necessary parameters (address, count, memory), the DMA transfer is initiated
 java.lang.String getDump()
          Return a dump of module status
 byte getIOPortByte(int portAddress)
          
 byte[] getIOPortDoubleWord(int portAddress)
          
 byte[] getIOPortWord(int portAddress)
          
 boolean isTerminalCountReached()
          
 boolean registerDMAChannel(int chanNum, DMA16Handler dma16handler)
          
 boolean registerDMAChannel(int chanNum, DMA8Handler dma8handler)
          
 boolean reset()
          Reset all parameters of module.
 void setDMARequest(int chanNum, boolean dmaRequest)
          Sets the DMA Requests in the corresponding controller's status register, and initiates the handling of Hold Requests
 void setIOPortByte(int portAddress, byte data)
          
 void setIOPortDoubleWord(int portAddress, byte[] dataDoubleWord)
          
 void setIOPortWord(int portAddress, byte[] dataWord)
          
 
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

controller

public DMAController[] controller

dma8Handler

public DMA8Handler[] dma8Handler

dma16Handler

public DMA16Handler[] dma16Handler
Constructor Detail

DMA

public DMA(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

getIOPortByte

public byte getIOPortByte(int portAddress)
                   throws UnknownPortException

Returns:
Throws:
UnknownPortException
See Also:
Addressable

setIOPortByte

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

Throws:
UnknownPortException
See Also:
Addressable

getIOPortWord

public byte[] getIOPortWord(int portAddress)
                     throws UnknownPortException

Returns:
Throws:
UnknownPortException
See Also:
Addressable

setIOPortWord

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

Throws:
UnknownPortException
See Also:
Addressable

getIOPortDoubleWord

public byte[] getIOPortDoubleWord(int portAddress)
                           throws WriteOnlyPortException

Returns:
Throws:
WriteOnlyPortException
See Also:
Addressable

setIOPortDoubleWord

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

Throws:
UnknownPortException
See Also:
Addressable

registerDMAChannel

public boolean registerDMAChannel(int chanNum,
                                  DMA8Handler dma8handler)

Specified by:
registerDMAChannel in class ModuleDMA
Returns:
See Also:
ModuleDMA

registerDMAChannel

public boolean registerDMAChannel(int chanNum,
                                  DMA16Handler dma16handler)

Specified by:
registerDMAChannel in class ModuleDMA
Returns:
See Also:
ModuleDMA

isTerminalCountReached

public boolean isTerminalCountReached()

Specified by:
isTerminalCountReached in class ModuleDMA
Returns:
See Also:
ModuleDMA

setDMARequest

public void setDMARequest(int chanNum,
                          boolean dmaRequest)
Sets the DMA Requests in the corresponding controller's status register, and initiates the handling of Hold Requests

Specified by:
setDMARequest in class ModuleDMA
Parameters:
chanNum - Channel requesting a DMA transfer
dmaRequest - Set request (true); clear request (false)
See Also:
ModuleDMA

acknowledgeBusHold

public void acknowledgeBusHold()
Control has been relinquished of the system busses
DMA now has control over the system busses, so the highest priority DMA channel that scheduled a request is located and after setting up the necessary parameters (address, count, memory), the DMA transfer is initiated

Specified by:
acknowledgeBusHold in class ModuleDMA
See Also:
ModuleDMA