dioscuri.module.cpu32
Class LinearAddressSpace

java.lang.Object
  extended by dioscuri.module.cpu32.Memory
      extended by dioscuri.module.cpu32.AbstractMemory
          extended by dioscuri.module.cpu32.AddressSpace
              extended by dioscuri.module.cpu32.LinearAddressSpace
All Implemented Interfaces:
ByteArray, HardwareComponent, Hibernatable

public final class LinearAddressSpace
extends AddressSpace
implements HardwareComponent

Author:
Bram Lohman, Bart Kiers

Nested Class Summary
static class LinearAddressSpace.PageFaultWrapper
           
 
Field Summary
 
Fields inherited from class dioscuri.module.cpu32.AddressSpace
BLOCK_MASK, BLOCK_SIZE, INDEX_MASK, INDEX_SHIFT, INDEX_SIZE
 
Constructor Summary
LinearAddressSpace()
           
 
Method Summary
 void acceptComponent(HardwareComponent component)
           
 void clear()
           
 CodeBlock decodeCodeBlockAt(Processor cpu, int offset)
           
 void dumpState(java.io.DataOutput output)
           
 int execute(Processor cpu, int offset)
           
 void flush()
           
 byte getByte(int offset)
           
 int getDoubleWord(int offset)
           
 int getLastWalkedAddress()
           
 Memory getReadMemoryBlockAt(int offset)
           
 short getWord(int offset)
           
 Memory getWriteMemoryBlockAt(int offset)
           
 boolean initialised()
           
 void invalidateTLBEntry(int offset)
           
 boolean isPagingEnabled()
           
 boolean isSupervisor()
           
 void loadState(java.io.DataInput input)
           
 boolean pagingDisabled()
           
 boolean reset()
           
 void setByte(int offset, byte data)
           
 void setDoubleWord(int offset, int data)
           
 void setGlobalPagesEnabled(boolean value)
           
 void setPageCacheEnabled(boolean value)
           
 void setPageDirectoryBaseAddress(int address)
           
 void setPageSizeExtensionsEnabled(boolean value)
           
 void setPageWriteThroughEnabled(boolean value)
           
 void setPagingEnabled(boolean value)
           
 void setSupervisor(boolean value)
           
 void setWord(int offset, short data)
           
 void setWriteProtectUserPages(boolean value)
           
 void timerCallback()
           
 java.lang.String toString()
           
 void updateComponent(HardwareComponent component)
           
 boolean updated()
           
 Memory validateTLBEntryRead(int offset)
           
 Memory validateTLBEntryWrite(int offset)
           
 
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 dioscuri.module.cpu32.Memory
isAllocated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinearAddressSpace

public LinearAddressSpace()
Method Detail

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