D
- Data type.A
- Address type.public abstract class MmuMapping<D extends Data,A extends Address & Data> extends java.lang.Object implements Buffer<D,A>, BufferObserver
MmuMapping
class describes a buffer mapped to memory.
An access to such a buffer causes a access to memory by virtual
address using MMU (address translation, caches, physical memory).Constructor and Description |
---|
MmuMapping(java.math.BigInteger length,
int associativity,
PolicyId policyId,
Indexer<A> indexer,
Matcher<D,A> matcher)
Constructs a memory-mapped buffer of the given length and associativity.
|
Modifier and Type | Method and Description |
---|---|
D |
getData(A address)
Returns the data associated with the given address.
|
protected abstract int |
getDataBitSize() |
protected abstract Mmu<A> |
getMmu() |
boolean |
isHit(A address)
Checks whether the given address causes a hit.
|
boolean |
isHit(ru.ispras.fortress.data.types.bitvector.BitVector value)
Checks whether the given address causes a hit.
|
protected abstract A |
newAddress() |
protected abstract D |
newData(ru.ispras.fortress.data.types.bitvector.BitVector value) |
D |
setData(A address,
D data)
Updates the data associated with the given address.
|
public MmuMapping(java.math.BigInteger length, int associativity, PolicyId policyId, Indexer<A> indexer, Matcher<D,A> matcher)
length
- the number of sets in the buffer.associativity
- the number of lines in each set.indexer
- the set indexer.matcher
- the line matcher.public boolean isHit(A address)
Buffer
public boolean isHit(ru.ispras.fortress.data.types.bitvector.BitVector value)
BufferObserver
isHit
in interface BufferObserver
value
- Address to be checked.true
if the address causes a hit; false
otherwise.public D getData(A address)
Buffer
public D setData(A address, D data)
Buffer
protected abstract A newAddress()
protected abstract D newData(ru.ispras.fortress.data.types.bitvector.BitVector value)
protected abstract int getDataBitSize()