dioscuri.module.cpu32
Class DMAController
java.lang.Object
dioscuri.module.AbstractModule
dioscuri.module.cpu32.DMAController
- All Implemented Interfaces:
- Addressable, Module, HardwareComponent, Hibernatable, IOPortCapable
public class DMAController
- extends AbstractModule
- implements IOPortCapable, Addressable, HardwareComponent
- Author:
- Bram Lohman, Bart Kiers
Nested classes/interfaces inherited from interface dioscuri.interfaces.Module |
Module.Type |
Constructor Summary |
DMAController(boolean highPageEnable,
boolean zeroth)
|
Method Summary |
void |
acceptComponent(HardwareComponent component)
|
void |
dumpState(java.io.DataOutput output)
|
int |
getChannelMode(int channelNumber)
|
byte |
getIOPortByte(int portAddress)
|
byte[] |
getIOPortDoubleWord(int portAddress)
|
byte[] |
getIOPortWord(int portAddress)
|
void |
holdDREQ(int channelNumber)
|
boolean |
initialised()
|
int |
ioPortReadByte(int address)
|
int |
ioPortReadLong(int address)
|
int |
ioPortReadWord(int address)
|
int[] |
ioPortsRequested()
|
void |
ioPortWriteByte(int address,
int data)
|
void |
ioPortWriteLong(int address,
int data)
|
void |
ioPortWriteWord(int address,
int data)
|
boolean |
isFirst()
|
void |
loadState(java.io.DataInput input)
|
int |
readMemory(int channelNumber,
byte[] buffer,
int bufferOffset,
int position,
int length)
|
void |
registerChannel(int channelNumber,
DMATransferCapable device)
|
void |
releaseDREQ(int channelNumber)
|
boolean |
reset()
Reset all parameters of module. |
void |
runTransfers()
|
void |
setIOPortByte(int portAddress,
byte data)
|
void |
setIOPortDoubleWord(int portAddress,
byte[] dataDoubleWord)
|
void |
setIOPortWord(int portAddress,
byte[] dataWord)
|
void |
timerCallback()
|
java.lang.String |
toString()
|
void |
updateComponent(HardwareComponent component)
|
boolean |
updated()
|
int |
writeMemory(int channelNumber,
byte[] buffer,
int bufferOffset,
int position,
int length)
|
Methods inherited from class dioscuri.module.AbstractModule |
getConnection, getConnections, getDebugMode, getDump, getExpectedConnections, getType, isConnected, setConnection, setDebugMode, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface dioscuri.interfaces.Module |
getConnection, getConnections, getDebugMode, getDump, getExpectedConnections, getType, isConnected, setConnection, setDebugMode, start, stop |
DMAController
public DMAController(boolean highPageEnable,
boolean zeroth)
- Parameters:
highPageEnable
- zeroth
-
dumpState
public void dumpState(java.io.DataOutput output)
throws java.io.IOException
- Specified by:
dumpState
in interface HardwareComponent
- Parameters:
output
-
- Throws:
java.io.IOException
loadState
public void loadState(java.io.DataInput input)
throws java.io.IOException
- Specified by:
loadState
in interface HardwareComponent
- Parameters:
input
-
- Throws:
java.io.IOException
isFirst
public boolean isFirst()
- Returns:
- -
reset
public boolean reset()
- Reset all parameters of module.
- Specified by:
reset
in interface Module
- Specified by:
reset
in interface HardwareComponent
- Specified by:
reset
in class AbstractModule
- Returns:
- true iff the AbstractModule was reset properly.
- See Also:
AbstractModule
ioPortWriteByte
public void ioPortWriteByte(int address,
int data)
- Specified by:
ioPortWriteByte
in interface IOPortCapable
- Parameters:
address
- data
-
ioPortWriteWord
public void ioPortWriteWord(int address,
int data)
- Specified by:
ioPortWriteWord
in interface IOPortCapable
- Parameters:
address
- data
-
ioPortWriteLong
public void ioPortWriteLong(int address,
int data)
- Specified by:
ioPortWriteLong
in interface IOPortCapable
- Parameters:
address
- data
-
ioPortReadByte
public int ioPortReadByte(int address)
- Specified by:
ioPortReadByte
in interface IOPortCapable
- Parameters:
address
-
- Returns:
- -
ioPortReadWord
public int ioPortReadWord(int address)
- Specified by:
ioPortReadWord
in interface IOPortCapable
- Parameters:
address
-
- Returns:
- -
ioPortReadLong
public int ioPortReadLong(int address)
- Specified by:
ioPortReadLong
in interface IOPortCapable
- Parameters:
address
-
- Returns:
- -
ioPortsRequested
public int[] ioPortsRequested()
- Specified by:
ioPortsRequested
in interface IOPortCapable
- Returns:
- -
runTransfers
public void runTransfers()
getChannelMode
public int getChannelMode(int channelNumber)
- Parameters:
channelNumber
-
- Returns:
- -
holdDREQ
public void holdDREQ(int channelNumber)
- Parameters:
channelNumber
-
releaseDREQ
public void releaseDREQ(int channelNumber)
- Parameters:
channelNumber
-
registerChannel
public void registerChannel(int channelNumber,
DMATransferCapable device)
- Parameters:
channelNumber
- device
-
readMemory
public int readMemory(int channelNumber,
byte[] buffer,
int bufferOffset,
int position,
int length)
- Parameters:
channelNumber
- buffer
- bufferOffset
- position
- length
-
- Returns:
- -
writeMemory
public int writeMemory(int channelNumber,
byte[] buffer,
int bufferOffset,
int position,
int length)
- Parameters:
channelNumber
- buffer
- bufferOffset
- position
- length
-
- Returns:
- -
initialised
public boolean initialised()
- Specified by:
initialised
in interface HardwareComponent
- Returns:
- -
updated
public boolean updated()
- Specified by:
updated
in interface HardwareComponent
- Returns:
- -
acceptComponent
public void acceptComponent(HardwareComponent component)
- Specified by:
acceptComponent
in interface HardwareComponent
- Parameters:
component
-
updateComponent
public void updateComponent(HardwareComponent component)
- Specified by:
updateComponent
in interface HardwareComponent
- Parameters:
component
-
timerCallback
public void timerCallback()
- Specified by:
timerCallback
in interface HardwareComponent
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getIOPortByte
public byte getIOPortByte(int portAddress)
throws ModuleException,
UnknownPortException,
WriteOnlyPortException
-
- Specified by:
getIOPortByte
in interface Addressable
- Returns:
-
- Throws:
ModuleException
UnknownPortException
WriteOnlyPortException
- See Also:
Addressable
getIOPortWord
public byte[] getIOPortWord(int portAddress)
throws ModuleException,
UnknownPortException,
WriteOnlyPortException
-
- Specified by:
getIOPortWord
in interface Addressable
- Returns:
-
- Throws:
ModuleException
UnknownPortException
WriteOnlyPortException
- See Also:
Addressable
getIOPortDoubleWord
public byte[] getIOPortDoubleWord(int portAddress)
throws ModuleException,
UnknownPortException,
WriteOnlyPortException
-
- Specified by:
getIOPortDoubleWord
in interface Addressable
- Returns:
-
- Throws:
ModuleException
UnknownPortException
WriteOnlyPortException
- See Also:
Addressable
setIOPortByte
public void setIOPortByte(int portAddress,
byte data)
throws ModuleException,
UnknownPortException
-
- Specified by:
setIOPortByte
in interface Addressable
- Throws:
ModuleException
UnknownPortException
- See Also:
Addressable
setIOPortWord
public void setIOPortWord(int portAddress,
byte[] dataWord)
throws ModuleException,
UnknownPortException
-
- Specified by:
setIOPortWord
in interface Addressable
- Throws:
ModuleException
UnknownPortException
- See Also:
Addressable
setIOPortDoubleWord
public void setIOPortDoubleWord(int portAddress,
byte[] dataDoubleWord)
throws ModuleException,
UnknownPortException
-
- Specified by:
setIOPortDoubleWord
in interface Addressable
- Throws:
ModuleException
UnknownPortException
- See Also:
Addressable