dioscuri.module.cpu32
Class LinearAddressSpace
java.lang.Object
dioscuri.module.cpu32.Memory
dioscuri.module.cpu32.AbstractMemory
dioscuri.module.cpu32.AddressSpace
dioscuri.module.cpu32.LinearAddressSpace
- All Implemented Interfaces:
- ByteArray, HardwareComponent, Hibernatable
public final class LinearAddressSpace
- extends AddressSpace
- implements HardwareComponent
- Author:
- Bram Lohman, Bart Kiers
Methods inherited from class dioscuri.module.cpu32.AddressSpace |
copyContentsFrom, copyContentsInto, getBlockEnd, getBlockStart, getLowerDoubleQuadWord, getQuadWord, getSize, getUpperDoubleQuadWord, setLowerDoubleQuadWord, setQuadWord, setUpperDoubleQuadWord |
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, wait, wait, wait |
LinearAddressSpace
public LinearAddressSpace()
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
getLastWalkedAddress
public int getLastWalkedAddress()
- Returns:
- -
isSupervisor
public boolean isSupervisor()
- Returns:
- -
setSupervisor
public void setSupervisor(boolean value)
- Parameters:
value
-
isPagingEnabled
public boolean isPagingEnabled()
- Returns:
- -
setPagingEnabled
public void setPagingEnabled(boolean value)
- Parameters:
value
-
setPageCacheEnabled
public void setPageCacheEnabled(boolean value)
- Parameters:
value
-
setPageSizeExtensionsEnabled
public void setPageSizeExtensionsEnabled(boolean value)
- Parameters:
value
-
setPageWriteThroughEnabled
public void setPageWriteThroughEnabled(boolean value)
- Parameters:
value
-
setGlobalPagesEnabled
public void setGlobalPagesEnabled(boolean value)
- Parameters:
value
-
setWriteProtectUserPages
public void setWriteProtectUserPages(boolean value)
- Parameters:
value
-
pagingDisabled
public boolean pagingDisabled()
- Returns:
- -
flush
public void flush()
setPageDirectoryBaseAddress
public void setPageDirectoryBaseAddress(int address)
- Parameters:
address
-
invalidateTLBEntry
public void invalidateTLBEntry(int offset)
- Parameters:
offset
-
validateTLBEntryRead
public Memory validateTLBEntryRead(int offset)
- Parameters:
offset
-
- Returns:
- -
validateTLBEntryWrite
public Memory validateTLBEntryWrite(int offset)
- Parameters:
offset
-
- Returns:
- -
getReadMemoryBlockAt
public Memory getReadMemoryBlockAt(int offset)
- Specified by:
getReadMemoryBlockAt
in class AddressSpace
- Parameters:
offset
-
- Returns:
- -
getWriteMemoryBlockAt
public Memory getWriteMemoryBlockAt(int offset)
- Specified by:
getWriteMemoryBlockAt
in class AddressSpace
- Parameters:
offset
-
- Returns:
- -
getByte
public byte getByte(int offset)
- Specified by:
getByte
in interface ByteArray
- Overrides:
getByte
in class AddressSpace
- Parameters:
offset
-
- Returns:
- -
getWord
public short getWord(int offset)
- Overrides:
getWord
in class AddressSpace
- Parameters:
offset
-
- Returns:
- -
getDoubleWord
public int getDoubleWord(int offset)
- Overrides:
getDoubleWord
in class AddressSpace
- Parameters:
offset
-
- Returns:
- -
setByte
public void setByte(int offset,
byte data)
- Specified by:
setByte
in interface ByteArray
- Overrides:
setByte
in class AddressSpace
- Parameters:
offset
- data
-
setWord
public void setWord(int offset,
short data)
- Overrides:
setWord
in class AddressSpace
- Parameters:
offset
- data
-
setDoubleWord
public void setDoubleWord(int offset,
int data)
- Overrides:
setDoubleWord
in class AddressSpace
- Parameters:
offset
- data
-
clear
public void clear()
- Specified by:
clear
in interface ByteArray
- Specified by:
clear
in class AddressSpace
execute
public int execute(Processor cpu,
int offset)
- Specified by:
execute
in class Memory
- Parameters:
cpu
- offset
-
- Returns:
- -
decodeCodeBlockAt
public CodeBlock decodeCodeBlockAt(Processor cpu,
int offset)
- Specified by:
decodeCodeBlockAt
in class Memory
- Parameters:
cpu
- offset
-
- Returns:
- -
reset
public boolean reset()
- Specified by:
reset
in interface HardwareComponent
- Returns:
- -
updated
public boolean updated()
- Specified by:
updated
in interface HardwareComponent
- Specified by:
updated
in class AddressSpace
- Returns:
- -
updateComponent
public void updateComponent(HardwareComponent component)
- Specified by:
updateComponent
in interface HardwareComponent
- Parameters:
component
-
initialised
public boolean initialised()
- Specified by:
initialised
in interface HardwareComponent
- Returns:
- -
acceptComponent
public void acceptComponent(HardwareComponent component)
- Specified by:
acceptComponent
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