public final class MemoryStorage extends java.lang.Object implements MemoryDevice
MemoryStorage implements a memory storage.| Constructor and Description |
|---|
MemoryStorage(java.math.BigInteger regionCount,
int regionBitSize) |
MemoryStorage(long regionCount,
int regionBitSize) |
MemoryStorage(MemoryStorage other) |
| Modifier and Type | Method and Description |
|---|---|
static int |
calculateAddressSize(java.math.BigInteger regionCount) |
int |
getAddressBitSize()
Returns the size of address used to perform an access to the memory device.
|
int |
getDataBitSize()
Returns the size of data unit that can be read or written from
the memory device at once.
|
java.lang.String |
getId() |
int |
getRegionBitSize() |
java.math.BigInteger |
getRegionCount() |
boolean |
isAddressCheckNeeded() |
boolean |
isInitialized(ru.ispras.fortress.data.types.bitvector.BitVector address)
Checks whether the specified address location has been initialized.
|
boolean |
isInitialized(int address) |
boolean |
isInitialized(long address) |
boolean |
isReadOnly() |
ru.ispras.fortress.data.types.bitvector.BitVector |
load(ru.ispras.fortress.data.types.bitvector.BitVector address)
Loads data from the given address.
|
ru.ispras.fortress.data.types.bitvector.BitVector |
read(java.math.BigInteger address) |
ru.ispras.fortress.data.types.bitvector.BitVector |
read(ru.ispras.fortress.data.types.bitvector.BitVector address) |
ru.ispras.fortress.data.types.bitvector.BitVector |
read(int address) |
ru.ispras.fortress.data.types.bitvector.BitVector |
read(long address) |
void |
reset() |
void |
setUseTempCopy(boolean value) |
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.
|
java.lang.String |
toString() |
void |
useTemporaryContext(boolean value)
Switches the device from main context to temporary context or vice versa.
|
void |
write(java.math.BigInteger address,
ru.ispras.fortress.data.types.bitvector.BitVector data) |
void |
write(ru.ispras.fortress.data.types.bitvector.BitVector address,
ru.ispras.fortress.data.types.bitvector.BitVector data) |
void |
write(int address,
ru.ispras.fortress.data.types.bitvector.BitVector data) |
void |
write(long address,
ru.ispras.fortress.data.types.bitvector.BitVector data) |
public MemoryStorage(long regionCount,
int regionBitSize)
public MemoryStorage(java.math.BigInteger regionCount,
int regionBitSize)
public MemoryStorage(MemoryStorage other)
public int getAddressBitSize()
MemoryDevicegetAddressBitSize in interface MemoryDevicepublic int getDataBitSize()
MemoryDevicegetDataBitSize in interface MemoryDevicepublic ru.ispras.fortress.data.types.bitvector.BitVector load(ru.ispras.fortress.data.types.bitvector.BitVector address)
MemoryDeviceload in interface MemoryDeviceaddress - Load address.MemoryDevice.getDataBitSize().public void store(ru.ispras.fortress.data.types.bitvector.BitVector address,
ru.ispras.fortress.data.types.bitvector.BitVector data)
MemoryDevicestore in interface MemoryDeviceaddress - Store address.data - Data of size equal to returned by MemoryDevice.getDataBitSize().public void useTemporaryContext(boolean value)
MemoryDeviceuseTemporaryContext in interface MemoryDevicevalue - true to switch from main context to temporary context
or false to switch from temporary context to main context.public void setUseTempCopy(boolean value)
public static int calculateAddressSize(java.math.BigInteger regionCount)
public java.lang.String getId()
public boolean isReadOnly()
public boolean isAddressCheckNeeded()
public java.math.BigInteger getRegionCount()
public int getRegionBitSize()
public boolean isInitialized(int address)
public boolean isInitialized(long address)
public boolean isInitialized(ru.ispras.fortress.data.types.bitvector.BitVector address)
MemoryDeviceisInitialized in interface MemoryDeviceaddress - Address to be checked.true is the address location is initialized or false otherwise.public ru.ispras.fortress.data.types.bitvector.BitVector read(int address)
public ru.ispras.fortress.data.types.bitvector.BitVector read(long address)
public ru.ispras.fortress.data.types.bitvector.BitVector read(java.math.BigInteger address)
public ru.ispras.fortress.data.types.bitvector.BitVector read(ru.ispras.fortress.data.types.bitvector.BitVector address)
public void write(int address,
ru.ispras.fortress.data.types.bitvector.BitVector data)
public void write(long address,
ru.ispras.fortress.data.types.bitvector.BitVector data)
public void write(java.math.BigInteger address,
ru.ispras.fortress.data.types.bitvector.BitVector data)
public void write(ru.ispras.fortress.data.types.bitvector.BitVector address,
ru.ispras.fortress.data.types.bitvector.BitVector data)
public void reset()
public java.lang.String toString()
toString in class java.lang.Object