dioscuri.module.cpu32
Class AddressSpace
java.lang.Object
dioscuri.module.cpu32.Memory
dioscuri.module.cpu32.AbstractMemory
dioscuri.module.cpu32.AddressSpace
- All Implemented Interfaces:
- ByteArray
- Direct Known Subclasses:
- AlignmentCheckedAddressSpace, LinearAddressSpace, PhysicalAddressSpace
public abstract class AddressSpace
- extends AbstractMemory
- Author:
- Bram Lohman, Bart Kiers
Method Summary |
abstract void |
clear()
|
void |
copyContentsFrom(int address,
byte[] buffer,
int off,
int len)
|
void |
copyContentsInto(int address,
byte[] buffer,
int off,
int len)
|
int |
getBlockEnd(int address)
|
int |
getBlockStart(int address)
|
byte |
getByte(int offset)
|
int |
getDoubleWord(int offset)
|
long |
getLowerDoubleQuadWord(int offset)
|
long |
getQuadWord(int offset)
|
abstract Memory |
getReadMemoryBlockAt(int offset)
|
long |
getSize()
|
long |
getUpperDoubleQuadWord(int offset)
|
short |
getWord(int offset)
|
abstract Memory |
getWriteMemoryBlockAt(int offset)
|
void |
setByte(int offset,
byte data)
|
void |
setDoubleWord(int offset,
int data)
|
void |
setLowerDoubleQuadWord(int offset,
long data)
|
void |
setQuadWord(int offset,
long data)
|
void |
setUpperDoubleQuadWord(int offset,
long data)
|
void |
setWord(int offset,
short data)
|
abstract boolean |
updated()
|
Methods inherited from class dioscuri.module.cpu32.AbstractMemory |
clear, clearArray, clearArray, getDoubleWord, getDoubleWordInBytes, getQuadWordInBytes, getWord, getWordInBytes, setDoubleWordInBytes, setQuadWordInBytes, setWordInBytes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BLOCK_SIZE
public static final int BLOCK_SIZE
- See Also:
- Constant Field Values
BLOCK_MASK
public static final int BLOCK_MASK
- See Also:
- Constant Field Values
INDEX_MASK
public static final int INDEX_MASK
- See Also:
- Constant Field Values
INDEX_SHIFT
public static final int INDEX_SHIFT
- See Also:
- Constant Field Values
INDEX_SIZE
public static final int INDEX_SIZE
- See Also:
- Constant Field Values
AddressSpace
public AddressSpace()
getSize
public final long getSize()
- Specified by:
getSize
in interface ByteArray
- Specified by:
getSize
in class AbstractMemory
- Returns:
- -
getBlockStart
public final int getBlockStart(int address)
- Parameters:
address
-
- Returns:
- -
getBlockEnd
public final int getBlockEnd(int address)
- Parameters:
address
-
- Returns:
- -
getReadMemoryBlockAt
public abstract Memory getReadMemoryBlockAt(int offset)
- Parameters:
offset
-
- Returns:
- -
getWriteMemoryBlockAt
public abstract Memory getWriteMemoryBlockAt(int offset)
- Parameters:
offset
-
- Returns:
- -
clear
public abstract void clear()
- Specified by:
clear
in interface ByteArray
- Overrides:
clear
in class AbstractMemory
updated
public abstract boolean updated()
- Returns:
- -
getByte
public byte getByte(int offset)
- Specified by:
getByte
in interface ByteArray
- Specified by:
getByte
in class AbstractMemory
- Parameters:
offset
-
- Returns:
- -
setByte
public void setByte(int offset,
byte data)
- Specified by:
setByte
in interface ByteArray
- Specified by:
setByte
in class AbstractMemory
- Parameters:
offset
- data
-
getWord
public short getWord(int offset)
- Overrides:
getWord
in class AbstractMemory
- Parameters:
offset
-
- Returns:
- -
getDoubleWord
public int getDoubleWord(int offset)
- Overrides:
getDoubleWord
in class AbstractMemory
- Parameters:
offset
-
- Returns:
- -
getQuadWord
public long getQuadWord(int offset)
- Overrides:
getQuadWord
in class AbstractMemory
- Parameters:
offset
-
- Returns:
- -
getLowerDoubleQuadWord
public long getLowerDoubleQuadWord(int offset)
- Overrides:
getLowerDoubleQuadWord
in class AbstractMemory
- Parameters:
offset
-
- Returns:
- -
getUpperDoubleQuadWord
public long getUpperDoubleQuadWord(int offset)
- Overrides:
getUpperDoubleQuadWord
in class AbstractMemory
- Parameters:
offset
-
- Returns:
- -
setWord
public void setWord(int offset,
short data)
- Overrides:
setWord
in class AbstractMemory
- Parameters:
offset
- data
-
setDoubleWord
public void setDoubleWord(int offset,
int data)
- Overrides:
setDoubleWord
in class AbstractMemory
- Parameters:
offset
- data
-
setQuadWord
public void setQuadWord(int offset,
long data)
- Overrides:
setQuadWord
in class AbstractMemory
- Parameters:
offset
- data
-
setLowerDoubleQuadWord
public void setLowerDoubleQuadWord(int offset,
long data)
- Overrides:
setLowerDoubleQuadWord
in class AbstractMemory
- Parameters:
offset
- data
-
setUpperDoubleQuadWord
public void setUpperDoubleQuadWord(int offset,
long data)
- Overrides:
setUpperDoubleQuadWord
in class AbstractMemory
- Parameters:
offset
- data
-
copyContentsFrom
public void copyContentsFrom(int address,
byte[] buffer,
int off,
int len)
- Overrides:
copyContentsFrom
in class AbstractMemory
- Parameters:
address
- buffer
- off
- len
-
copyContentsInto
public void copyContentsInto(int address,
byte[] buffer,
int off,
int len)
- Specified by:
copyContentsInto
in interface ByteArray
- Overrides:
copyContentsInto
in class AbstractMemory
- Parameters:
address
- buffer
- off
- len
-