public abstract class Mmu<A extends Address & Data> extends java.lang.Object implements Buffer<ru.ispras.fortress.data.types.bitvector.BitVector,A>, MemoryDevice
Constructor and Description |
---|
Mmu() |
Modifier and Type | Method and Description |
---|---|
boolean |
isHit(A address)
Checks whether the given address causes a hit.
|
boolean |
isInitialized(ru.ispras.fortress.data.types.bitvector.BitVector address)
Checks whether the specified address location has been initialized.
|
ru.ispras.fortress.data.types.bitvector.BitVector |
load(ru.ispras.fortress.data.types.bitvector.BitVector address)
Loads data from the given address.
|
protected abstract A |
newAddress() |
void |
store(ru.ispras.fortress.data.types.bitvector.BitVector address,
ru.ispras.fortress.data.types.bitvector.BitVector data)
Stores the specified data at the given address.
|
void |
useTemporaryContext(boolean value)
Switches the device from main context to temporary context or vice versa.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAddressBitSize, getDataBitSize
public boolean isInitialized(ru.ispras.fortress.data.types.bitvector.BitVector address)
MemoryDevice
isInitialized
in interface MemoryDevice
address
- Address to be checked.true
is the address location is initialized or false
otherwise.public void useTemporaryContext(boolean value)
MemoryDevice
useTemporaryContext
in interface MemoryDevice
value
- true
to switch from main context to temporary context
or to switch from temporary context to main context.public boolean isHit(A address)
Buffer
public ru.ispras.fortress.data.types.bitvector.BitVector load(ru.ispras.fortress.data.types.bitvector.BitVector address)
MemoryDevice
load
in interface MemoryDevice
address
- Load address.MemoryDevice.getDataBitSize()
.public void store(ru.ispras.fortress.data.types.bitvector.BitVector address, ru.ispras.fortress.data.types.bitvector.BitVector data)
MemoryDevice
store
in interface MemoryDevice
address
- Store address.data
- Data of size equal to returned by MemoryDevice.getDataBitSize()
.protected abstract A newAddress()