Class Mmu<A extends Address<?>>
- java.lang.Object
-
- ru.ispras.microtesk.mmu.model.sim.Mmu<A>
-
- All Implemented Interfaces:
Buffer<ru.ispras.fortress.data.types.bitvector.BitVector,A>
,MemoryDevice
public abstract class Mmu<A extends Address<?>> extends java.lang.Object implements Buffer<ru.ispras.fortress.data.types.bitvector.BitVector,A>, MemoryDevice
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isHit(A address)
Checks whether the given address hits the buffer.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.void
resetState()
Resets the state of the buffer.void
store(ru.ispras.fortress.data.types.bitvector.BitVector address, int offset, ru.ispras.fortress.data.types.bitvector.BitVector data)
Stores the specified data at the given address.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
writeEntry(A address, int lower, int upper, ru.ispras.fortress.data.types.bitvector.BitVector newData)
Writes the data associated w/ the given address into the given field of the entry.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ru.ispras.microtesk.mmu.model.sim.Buffer
readEntry, writeEntry
-
Methods inherited from interface ru.ispras.microtesk.model.memory.MemoryDevice
getAddressBitSize, getDataBitSize
-
-
-
-
Method Detail
-
isInitialized
public boolean isInitialized(ru.ispras.fortress.data.types.bitvector.BitVector address)
Description copied from interface:MemoryDevice
Checks whether the specified address location has been initialized.- Specified by:
isInitialized
in interfaceMemoryDevice
- Parameters:
address
- Address to be checked.- Returns:
true
is the address location is initialized orfalse
otherwise.
-
isHit
public boolean isHit(A address)
Description copied from interface:Buffer
Checks whether the given address hits the buffer.
-
load
public ru.ispras.fortress.data.types.bitvector.BitVector load(ru.ispras.fortress.data.types.bitvector.BitVector address)
Description copied from interface:MemoryDevice
Loads data from the given address.- Specified by:
load
in interfaceMemoryDevice
- Parameters:
address
- Load address.- Returns:
- Data of size equal to returned by
MemoryDevice.getDataBitSize()
.
-
store
public void store(ru.ispras.fortress.data.types.bitvector.BitVector address, int offset, ru.ispras.fortress.data.types.bitvector.BitVector data)
Description copied from interface:MemoryDevice
Stores the specified data at the given address.- Specified by:
store
in interfaceMemoryDevice
- Parameters:
address
- Store address.offset
- Data offset in bits.data
- Data of size equal toMemoryDevice.getDataBitSize()
-offset
.
-
store
public void store(ru.ispras.fortress.data.types.bitvector.BitVector address, ru.ispras.fortress.data.types.bitvector.BitVector data)
Description copied from interface:MemoryDevice
Stores the specified data at the given address.- Specified by:
store
in interfaceMemoryDevice
- Parameters:
address
- Store address.data
- Data of size equal to returned byMemoryDevice.getDataBitSize()
.
-
writeEntry
public final void writeEntry(A address, int lower, int upper, ru.ispras.fortress.data.types.bitvector.BitVector newData)
Description copied from interface:Buffer
Writes the data associated w/ the given address into the given field of the entry.- Specified by:
writeEntry
in interfaceBuffer<ru.ispras.fortress.data.types.bitvector.BitVector,A extends Address<?>>
- Parameters:
address
- the address.lower
- the lower bit.upper
- the upper bit.newData
- the new data.
-
resetState
public void resetState()
Description copied from interface:Buffer
Resets the state of the buffer.- Specified by:
resetState
in interfaceBuffer<ru.ispras.fortress.data.types.bitvector.BitVector,A extends Address<?>>
-
-